input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testWindowIdAhead ( ) { long first = 1431714014123L ; int ahead = 678 ; for ( int windowWidthMillis : new int [ ] { 500 , 123 } ) { long window1 = com . datatorrent . stram . engine . WindowGenerator . getWindowId ( first , first , windowWidthMillis ) ; long window2 = com . datatorrent . stram . engine . WindowGenerato... | org . junit . Assert . assertEquals ( window2 , window1 ) |
is_still_scheduled_should_be_false ( ) { doReturn ( new java . util . ArrayList < org . quartz . Trigger > ( ) ) . when ( scheduler ) . getTriggersOfJob ( any ( org . quartz . JobKey . class ) ) ; final boolean stillScheduled = quartzSchedulerExecutor . isStillScheduled ( org . bonitasoft . engine . scheduler . impl . ... | org . junit . Assert . assertThat ( stillScheduled ) |
testRuleRef ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( ( ( "s\n" + "@init<sp>{setBuildParseTree(true);}\n" ) + "@after<sp>{System.out.println($r.ctx.toStringTree(this));}\n" ) + "s\n" 2 ) + "a<sp>:<sp>b<sp>\'x\'\n" ) + "s\n" 0 ) + "b<sp>:<sp>\'y\'<sp>;\n" ) ; java . lang . String result = execPars... | org . junit . Assert . assertEquals ( expecting , result ) |
testBRY9901DrieDubbeleID ( ) { nl . bzk . brp . business . dto . bijhouding . AbstractBijhoudingsBericht simplegGeboorteBericht = maakSimpleInschrijvingBericht2 ( ) ; nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht famBericht = ( ( nl . bzk . brp . model . bericht . kern . Familierechtelij... | org . junit . Assert . assertEquals ( 1 , meldingen . size ( ) ) |
ThirdTest ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
testFrozenColumn ( ) { sheet = spreadsheet . getBook ( ) . getSheet ( "column" ) ; "<AssertPlaceHolder>" ; } getColumnFreeze ( ) { return getNative ( ) . getViewInfo ( ) . getNumOfColumnFreeze ( ) ; } | org . junit . Assert . assertEquals ( 1 , sheet . getColumnFreeze ( ) ) |
testLimitMiddleAll ( ) { try ( net . sf . eclipsefp . haskell . util . CappedStringWriter w = new net . sf . eclipsefp . haskell . util . CappedStringWriter ( 2 ) ) { w . write ( "toto" ) ; w . write ( "titi" ) ; "<AssertPlaceHolder>" ; } } toString ( ) { return getDisplayName ( ) ; } | org . junit . Assert . assertEquals ( "" , w . toString ( ) ) |
testSetToRelease ( ) { com . ebay . jetstream . event . channel . kafka . PartitionReaderTest . reader . setToRelease ( ) ; "<AssertPlaceHolder>" ; } isTaken ( ) { return m_taken . get ( ) ; } | org . junit . Assert . assertFalse ( com . ebay . jetstream . event . channel . kafka . PartitionReaderTest . reader . isTaken ( ) ) |
getByName ( ) { for ( org . bukkit . WorldType worldType : org . bukkit . WorldType . values ( ) ) { "<AssertPlaceHolder>" ; } } getByName ( java . lang . String ) { return org . bukkit . WorldType . BY_NAME . get ( name . toUpperCase ( ) ) ; } | org . junit . Assert . assertThat ( org . bukkit . WorldType . getByName ( worldType . getName ( ) ) , org . hamcrest . CoreMatchers . is ( worldType ) ) |
testGetTalendJobJavaProject ( ) { boolean enbleMavenNature = false ; org . talend . core . runtime . process . ITalendProcessJavaProject talendJavaProject = org . talend . designer . runprocess . java . TalendJavaProjectManager . getTalendJobJavaProject ( property , enbleMavenNature ) ; validateProject ( talendJavaProj... | org . junit . Assert . assertEquals ( projectTechName , talendJavaProject . getProject ( ) . getName ( ) ) |
testEquals ( ) { org . jfree . data . time . Month m1 = new org . jfree . data . time . Month ( org . jfree . chart . date . MonthConstants . MAY , 2002 ) ; org . jfree . data . time . Month m2 = new org . jfree . data . time . Month ( org . jfree . chart . date . MonthConstants . MAY , 2002 ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertEquals ( m1 , m2 ) |
testGetForeground_onVirtual_resolvesItem ( ) { grid = new org . eclipse . nebula . widgets . grid . Grid ( shell , org . eclipse . swt . SWT . VIRTUAL ) ; grid . setItemCount ( 1 ) ; org . eclipse . nebula . widgets . grid . GridItem item = grid . getItem ( 0 ) ; item . getForeground ( ) ; "<AssertPlaceHolder>" ; } isR... | org . junit . Assert . assertTrue ( item . isResolved ( ) ) |
bar ( ) { org . eclim . test . junit . run . Foo foo = new org . eclim . test . junit . run . Foo ( ) ; "<AssertPlaceHolder>" ; } bar ( ) { org . eclim . test . junit . run . Foo foo = new org . eclim . test . junit . run . Foo ( ) ; org . junit . Assert . assertEquals ( 42 , foo . bar ( ) ) ; } | org . junit . Assert . assertEquals ( 42 , foo . bar ( ) ) |
testPredict ( ) { logger . info ( "testPredict" ) ; com . datumbox . framework . common . Configuration configuration = getConfiguration ( ) ; com . datumbox . framework . core . common . dataobjects . Dataframe [ ] data = com . datumbox . framework . core . Datasets . carsCategorical ( configuration ) ; com . datumbox... | org . junit . Assert . assertEquals ( expResult , result ) |
shouldReturnThatHasNoDomain ( ) { com . openshift . client . utils . DomainTestUtils . destroyAllDomains ( user ) ; java . lang . Boolean hasDomain = user . hasDomain ( ) ; "<AssertPlaceHolder>" ; } hasDomain ( ) { return ( api . getDomains ( ) . size ( ) ) > 0 ; } | org . junit . Assert . assertFalse ( hasDomain ) |
testEmpty3 ( ) { final org . eclipse . kapua . client . gateway . Topic topic = org . eclipse . kapua . client . gateway . Topic . of ( ( ( java . lang . String ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } of ( java . util . List ) { if ( ( segments == null ) || ( segments . isEmpty ( ) ) ) { return null ; } segments . f... | org . junit . Assert . assertNull ( topic ) |
hasTextualContextTypeWithXmlContentTypeShouldReturnTrue ( ) { subject . setContenttype ( "application/xml;<sp>charset:<sp>UTF-8" ) ; "<AssertPlaceHolder>" ; } hasTextualRequestContent ( ) { return ( this . hasContenttype ( ) ) && ( isTextualContentType ( this . contenttype ) ) ; } | org . junit . Assert . assertThat ( subject . hasTextualRequestContent ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
deveObterCnpjComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroDados retornoConsultaCadastroDados = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroDados ( ) ; retornoConsultaCadastroDados . setCnpj ( "280877... | org . junit . Assert . assertEquals ( "28087726000122" , retornoConsultaCadastroDados . getCnpj ( ) ) |
testCompareToEquals ( ) { org . bff . javampd . MPDItem item1 = new org . bff . javampd . album . MPDAlbum ( "Album1" , "Artist1" ) ; org . bff . javampd . MPDItem item2 = new org . bff . javampd . album . MPDAlbum ( "Album1" , "Artist1" ) ; "<AssertPlaceHolder>" ; } compareTo ( org . bff . javampd . MPDItem ) { org . ... | org . junit . Assert . assertTrue ( ( ( item1 . compareTo ( item2 ) ) == 0 ) ) |
resolveTermWhenTermIdIsNullReturnsNull ( ) { final org . phenotips . vocabulary . VocabularyTerm term = this . vocabularyManager . resolveTerm ( null ) ; "<AssertPlaceHolder>" ; } resolveTerm ( java . lang . String ) { org . phenotips . vocabulary . VocabularyTerm term = this . vm . resolveTerm ( termId ) ; if ( term =... | org . junit . Assert . assertNull ( term ) |
testPriorityQueueXorMapped ( ) { int [ ] array1 = new int [ ] { 1232 , 3324 , 123 , 43243 , 1322 , 7897 , 8767 } ; int [ ] array2 = new int [ ] { 39173 , 39174 , 39175 , 39176 , 39177 , 39178 , 39179 } ; int [ ] array3 = new int [ ] { 1232 , 3324 , 123 , 43243 , 1322 , 7897 , 8767 , 39173 , 39174 , 39175 , 39176 , 3917... | org . junit . Assert . assertEquals ( data3 , org . roaringbitmap . buffer . BufferFastAggregation . priorityqueue_xor ( data1 , data2 ) ) |
testBigEntryPoint ( ) { com . orientechnologies . orient . core . metadata . schema . OSchema schema = com . orientechnologies . orient . graph . sql . OMatchStatementExecutionTest . db . getMetadata ( ) . getSchema ( ) ; schema . createClass ( "testBigEntryPoint1" ) ; schema . createClass ( "testBigEntryPoint2" ) ; fo... | org . junit . Assert . assertEquals ( 1 , qResult . size ( ) ) |
isDefined_A$ ( ) { java . lang . String value = "vvv" ; com . m3 . scalaflavor4j . Some < java . lang . String > target = new com . m3 . scalaflavor4j . Some < java . lang . String > ( value ) ; boolean actual = target . isDefined ( ) ; boolean expected = true ; "<AssertPlaceHolder>" ; } isDefined ( ) { return false ; ... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
testDynAnyTypeCode ( ) { java . lang . String msg ; org . omg . CORBA . TypeCode tc = null ; org . omg . DynamicAny . DynStruct dynAny = null ; tc = orb . create_exception_tc ( org . jacorb . test . orb . dynany . DynAnyEmptyExTest . ID , org . jacorb . test . orb . dynany . DynAnyEmptyExTest . NAME , org . jacorb . te... | org . junit . Assert . assertTrue ( msg , dynAny . type ( ) . equal ( tc ) ) |
testEOFExceptionOnDeserializeEdit ( ) { RepositoryRecordSchema . REPOSITORY_RECORD_SCHEMA_V1 . writeTo ( dataOutputStream ) ; java . io . DataInputStream dataInputStream = createDataInputStream ( ) ; schemaRepositoryRecordSerde . readHeader ( dataInputStream ) ; org . apache . nifi . controller . repository . Repositor... | org . junit . Assert . assertNull ( repositoryRecord ) |
testSumDeltaMinusDeltaSum ( ) { final int ulps = 3 ; for ( int i = 0 ; i < ( org . apache . commons . math3 . special . BetaTest . SUM_DELTA_MINUS_DELTA_SUM_REF . length ) ; i ++ ) { final double [ ] ref = org . apache . commons . math3 . special . BetaTest . SUM_DELTA_MINUS_DELTA_SUM_REF [ i ] ; final double a = ref [... | org . junit . Assert . assertEquals ( builder . toString ( ) , expected , actual , tol ) |
shouldThrowExceptionWhenAddingNullKeyToCache ( ) { try { uk . gov . gchq . gaffer . cache . impl . JcsCacheTest . cache . put ( null , 2 ) ; org . junit . Assert . fail ( "Expected<sp>an<sp>exception" ) ; } catch ( final uk . gov . gchq . gaffer . cache . exception . CacheOperationException e ) { "<AssertPlaceHolder>" ... | org . junit . Assert . assertNotNull ( e . getMessage ( ) ) |
testGetItems_By_Index_Mocked ( ) { java . util . List < mmarquee . automation . AutomationElement > result = new java . util . ArrayList ( ) ; result . add ( new mmarquee . automation . AutomationElement ( listElement ) ) ; when ( element . findAll ( any ( mmarquee . automation . uiautomation . TreeScope . class ) , an... | org . junit . Assert . assertTrue ( ( item != null ) ) |
testPostAuthentication ( ) { java . lang . String appId = "1000" ; java . lang . String app2Id = "1001" ; java . lang . String keyId = "1000000" ; java . lang . String encStringValue = "ssssdafdsafdsafdsafdasfdsafdsa" ; java . lang . String service = "http://loacahost:8080/ki4so-app/home.do" ; java . util . Map < java ... | org . junit . Assert . assertNotNull ( authentication ) |
testIsUnionOnUnionWithMultipleElements ( ) { org . apache . avro . Schema schema = org . apache . avro . Schema . createUnion ( org . apache . avro . Schema . create ( Type . NULL ) , org . apache . avro . Schema . create ( Type . LONG ) ) ; "<AssertPlaceHolder>" ; } isUnion ( ) { return ( this ) instanceof org . apach... | org . junit . Assert . assertTrue ( schema . isUnion ( ) ) |
genericEncoderV2GenericDecoderV1 ( ) { org . apache . avro . Schema reader = load ( "users_v1.schema" ) ; org . apache . avro . Schema writer = load ( "users_v2.schema" ) ; org . springframework . cloud . stream . schema . SchemaRegistryClient client = mock ( org . springframework . cloud . stream . schema . SchemaRegi... | org . junit . Assert . assertEquals ( record . get ( "name" ) . toString ( ) , decoded . get ( "name" ) . toString ( ) ) |
doesNotFailWhenThereIsNoDataTypeResolution ( ) { when ( muleContext . getRegistry ( ) ) . thenReturn ( muleRegistry ) ; when ( muleRegistry . lookupTransformer ( org . mockito . Mockito . any ( org . mule . runtime . api . metadata . DataType . class ) , org . mockito . Mockito . any ( org . mule . runtime . api . meta... | org . junit . Assert . assertEquals ( null , resolvedConverter ) |
testSameElementLookedUpDifferentWaysShouldBeEqual ( ) { driver . get ( pages . simpleTestPage ) ; org . openqa . selenium . WebElement body = driver . findElement ( org . openqa . selenium . By . tagName ( "body" ) ) ; org . openqa . selenium . WebElement xbody = driver . findElements ( org . openqa . selenium . By . x... | org . junit . Assert . assertEquals ( body , xbody ) |
shouldOpenDataStoreOnNonSpatialDatabase ( ) { org . neo4j . graphdb . GraphDatabaseService db = null ; try { db = new org . neo4j . test . TestGraphDatabaseFactory ( ) . newImpermanentDatabase ( new java . io . File ( "other-db" ) ) ; org . geotools . data . neo4j . Neo4jSpatialDataStore store = new org . geotools . da... | org . junit . Assert . assertThat ( bounds , org . hamcrest . CoreMatchers . equalTo ( null ) ) |
resolveValidNetworkId_name_deterministic ( ) { org . oscm . app . ror . client . LPlatformClient lPlatformClient = mock ( org . oscm . app . ror . client . LPlatformClient . class ) ; org . oscm . app . ror . data . LPlatformConfiguration lPlatformConfiguration = mock ( org . oscm . app . ror . data . LPlatformConfigur... | org . junit . Assert . assertEquals ( NETWORKID1 , resolvedId ) |
getEmptyProcessInstances ( ) { org . kie . internal . runtime . StatefulKnowledgeSession ksession = reloadKnowledgeSession ( ) ; "<AssertPlaceHolder>" ; ksession . dispose ( ) ; } getProcessInstances ( ) { return processInstanceManager . getProcessInstances ( ) ; } | org . junit . Assert . assertEquals ( 0 , ksession . getProcessInstances ( ) . size ( ) ) |
question5346011 ( ) { org . neo4j . graphdb . GraphDatabaseService service = new org . neo4j . test . TestGraphDatabaseFactory ( ) . newImpermanentDatabase ( ) ; try ( org . neo4j . graphdb . Transaction tx = service . beginTx ( ) ) { org . neo4j . graphdb . index . RelationshipIndex index = service . index ( ) . forRe... | org . junit . Assert . assertEquals ( 1 , hits . size ( ) ) |
testGetResourceStringAndSucceed ( ) { mockStatic ( java . util . ResourceBundle . class ) ; expect ( java . util . ResourceBundle . getBundle ( "SomeBundleName" , Locale . ENGLISH ) ) . andReturn ( bundle ) ; final java . lang . String key = "DUMMY" ; final java . lang . String message = "This<sp>is<sp>a<sp>Message" ; ... | org . junit . Assert . assertEquals ( message , result ) |
shouldFindAllActiveCustomers ( ) { java . util . List < net . rrm . ehour . domain . Customer > customers = customerDao . findAllActive ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return nodes . size ( ) ; } | org . junit . Assert . assertEquals ( 3 , customers . size ( ) ) |
testInteger ( ) { long value = com . alicloud . openservices . tablestore . common . TestUtil . randomLong ( ) ; com . alicloud . openservices . tablestore . model . PrimaryKeyValue v = com . alicloud . openservices . tablestore . model . PrimaryKeyValue . fromLong ( value ) ; "<AssertPlaceHolder>" ; checkType ( v ) ; ... | org . junit . Assert . assertEquals ( v . asLong ( ) , value ) |
testPushV8ObjectToArray ( ) { com . eclipsesource . v8 . V8Array array = new com . eclipsesource . v8 . V8Array ( v8 ) ; com . eclipsesource . v8 . V8Object child = new com . eclipsesource . v8 . V8Object ( v8 ) ; com . eclipsesource . v8 . utils . V8ObjectUtils . pushValue ( v8 , array , child ) ; com . eclipsesource ... | org . junit . Assert . assertEquals ( child , result ) |
testMultipleLoginModules ( ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; int moduleCount = 3 ; java . util . Map < java . lang . Integer , java . util . Map < java . lang . String , java . lang . Object > > moduleOptions = new java . util . HashMap ( ) ; for ( int i = 0 ; i < moduleCou... | org . junit . Assert . assertEquals ( moduleCount , dynamicEntries . length ) |
testSelectUnionAll ( ) { java . lang . String sql = "(select<sp>*<sp>from<sp>xx)<sp>union<sp>all<sp>(select<sp>*<sp>from<sp>xx)" ; com . dianping . zebra . util . SqlType sqlType = com . dianping . zebra . util . SqlUtils . getSqlType ( sql ) ; "<AssertPlaceHolder>" ; } getSqlType ( java . lang . String ) { if ( com . ... | org . junit . Assert . assertEquals ( SqlType . UNKNOWN_SQL_TYPE , sqlType ) |
testSearchElement ( ) { org . ebayopensource . turmeric . tools . annoparser . Element elem = xsdIntf . searchIndependentElement ( "formatBucketParam" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( "formatBucketParam" , elem . getName ( ) ) |
deveObterAmbienteComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFRetornoInfoCancelamento retornoInfoCancelamento = new com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFRetornoInfoCancelamento ( ) ; final com . fincatto . documentof... | org . junit . Assert . assertEquals ( ambiente , retornoInfoCancelamento . getAmbiente ( ) ) |
testHashCode_WithoutWrapper ( ) { java . sql . Connection wrapped = org . axonframework . common . jdbc . ConnectionWrapperFactory . wrap ( connection , closeHandler ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return java . util . Objects . hash ( globalIndex ) ; } | org . junit . Assert . assertEquals ( wrapped . hashCode ( ) , wrapped . hashCode ( ) ) |
testWeirdQuoteWithTrim ( ) { java . lang . String csv = "<sp>ddddd\",ddd,<sp>\"dd,dd\"" ; java . util . List < java . lang . String [ ] > strings = org . simpleflatmapper . lightningcsv . CsvParser . dsl ( ) . trimSpaces ( ) . forEach ( csv , new org . simpleflatmapper . util . ListCollector < java . lang . String [ ] ... | org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "ddddd\"" , "ddd" , "dd,dd" } , strings . get ( 0 ) ) |
testGetPipelineViewWithLastJobProvided ( ) { hudson . model . FreeStyleProject build = jenkins . createFreeStyleProject ( "build" ) ; hudson . model . FreeStyleProject test = jenkins . createFreeStyleProject ( "test" ) ; hudson . model . FreeStyleProject deploy = jenkins . createFreeStyleProject ( "deploy" ) ; build . ... | org . junit . Assert . assertNull ( view . getError ( ) ) |
unusedImplication ( ) { com . facebook . buck . core . model . targetgraph . TargetNode < ? > root = new com . facebook . buck . versions . VersionRootBuilder ( "//:root" ) . setVersionUniverse ( "universe" ) . build ( ) ; com . facebook . buck . core . model . BuildTarget versioned1 = com . facebook . buck . core . mo... | org . junit . Assert . assertThat ( versions , org . hamcrest . Matchers . equalTo ( com . google . common . collect . ImmutableMap . of ( versioned1 , com . facebook . buck . versions . VersionUniverseVersionSelectorTest . ONE , versioned2 , com . facebook . buck . versions . VersionUniverseVersionSelectorTest . ONE )... |
testLdap ( ) { java . util . Properties props = new java . util . Properties ( ) ; props . put ( Context . INITIAL_CONTEXT_FACTORY , "com.sun.jndi.ldap.LdapCtxFactory" ) ; props . put ( Context . PROVIDER_URL , "ldap://estinfra1.lan.est.fujitsu.de:389" ) ; org . oscm . identityservice . local . ILdapResultMapper < org ... | org . junit . Assert . assertFalse ( result . isEmpty ( ) ) |
testBeginRollebackOnlyTx ( ) { txService . begin ( ) ; txService . setRollbackOnly ( ) ; try { txService . begin ( ) ; System . out . println ( ( "++++" + ( txService . getNumberOfActiveTransactions ( ) ) ) ) ; org . junit . Assert . fail ( ( "Impossible<sp>to<sp>begin<sp>a<sp>tx<sp>with<sp>state<sp>" + ( TransactionSt... | org . junit . Assert . assertEquals ( TransactionState . ROLLBACKONLY , txService . getState ( ) ) |
rollupNotFreshEnoughWhenBeforeEarliestAllowedDay ( ) { final org . joda . time . DateMidnight latestRollupDate = new org . joda . time . DateMidnight ( 2013 , 10 , 6 ) ; final org . joda . time . DateMidnight today = new org . joda . time . DateMidnight ( 2013 , 10 , 9 ) ; final java . util . Date endDate = df . parse ... | org . junit . Assert . assertThat ( rollup . isFreshEnough ( ) , org . hamcrest . Matchers . is ( false ) ) |
testCanSerialiseEntityElement ( ) { final uk . gov . gchq . gaffer . data . element . Entity entity = new uk . gov . gchq . gaffer . data . element . Entity ( uk . gov . gchq . gaffer . commonutil . TestGroups . ENTITY , uk . gov . gchq . gaffer . store . serialiser . ElementSerialiserTest . TEST_VERTEX ) ; final byte ... | org . junit . Assert . assertEquals ( entity , deserialisedEntity ) |
testDeclareExtendsJavaParent ( ) { java . lang . String drl = "package<sp>org.drools.test;<sp>\n" + ( ( "import<sp>org.drools.compiler.Person;<sp>\n" + "declare<sp>Student<sp>extends<sp>Person<sp>end<sp>\n" ) + "" ) ; org . kie . internal . builder . KnowledgeBuilder kBuilder = org . kie . internal . builder . Knowledg... | org . junit . Assert . assertFalse ( kBuilder . hasErrors ( ) ) |
testSerialization ( ) { org . jfree . chart . labels . StandardPieToolTipGenerator g1 = new org . jfree . chart . labels . StandardPieToolTipGenerator ( ) ; org . jfree . chart . labels . StandardPieToolTipGenerator g2 = ( ( org . jfree . chart . labels . StandardPieToolTipGenerator ) ( org . jfree . chart . TestUtils ... | org . junit . Assert . assertEquals ( g1 , g2 ) |
testRegionServerPort ( ) { org . apache . hadoop . hbase . MiniHBaseCluster cluster = org . apache . hadoop . hbase . util . TestRegionMover . TEST_UTIL . getHBaseCluster ( ) ; org . apache . hadoop . hbase . regionserver . HRegionServer regionServer = cluster . getRegionServer ( 0 ) ; java . lang . String rsName = reg... | org . junit . Assert . assertEquals ( PORT , rmBuilder . port ) |
testDispose ( ) { sg . dispose ( ) ; "<AssertPlaceHolder>" ; } isRunning ( ) { return ! ( stopped ) ; } | org . junit . Assert . assertFalse ( sg . isRunning ( ) ) |
testEasyrecDataModel_getNumUsersWithPreferenceForDual ( ) { org . easyrec . mahout . model . EasyrecDataModel easyrecDataModel = new org . easyrec . mahout . model . EasyrecDataModel ( org . easyrec . mahout . EasyrecDataModelTest . TENANT_ID , org . easyrec . mahout . EasyrecDataModelTest . RATE_ACTION_TYPE_ID , org .... | org . junit . Assert . assertEquals ( 2 , numberUsersWithPreference ) |
when_isFormSubbmited_is_called_with_form ( ) { initializeRequestParameterMap ( new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "form" , "form" ) ; } } ) ; javax . faces . component . UIForm form = mock ( javax . faces . component . UIForm . class ) ; when ( form . getClientId ( f... | org . junit . Assert . assertTrue ( result ) |
testParseAuthParamA ( ) { java . lang . String header = "Digest<sp>a=b" ; java . io . StringReader input = new java . io . StringReader ( header ) ; java . util . Map < java . lang . String , java . lang . String > result = org . apache . tomcat . util . http . parser . Authorization . parseAuthorizationDigest ( input ... | org . junit . Assert . assertEquals ( "b" , result . get ( "a" ) ) |
decode_4 ( ) { final java . lang . String arg = "foo" ; final java . lang . String exp = "Zm9v" ; "<AssertPlaceHolder>" ; } decode ( byte [ ] ) { if ( ( data . length ) == 0 ) { return data ; } int lastRealDataIndex = ( data . length ) - 1 ; while ( ( data [ lastRealDataIndex ] ) == ( org . erlide . util . Base64 . EQU... | org . junit . Assert . assertEquals ( arg , new java . lang . String ( org . erlide . util . Base64 . decode ( exp . getBytes ( ) ) ) ) |
testIsValidConfPrimitiveNotEqual ( ) { java . util . Map < java . lang . String , java . lang . Object > map4 = org . apache . storm . shade . com . google . common . collect . ImmutableMap . of ( "k0" , 2L ) ; java . util . Map < java . lang . String , java . lang . Object > map5 = org . apache . storm . shade . com .... | org . junit . Assert . assertFalse ( org . apache . storm . utils . Utils . isValidConf ( map4 , map5 ) ) |
testConfigureStaticNatRulesOnLogicalRouterRollback ( ) { resource . configure ( "NiciraNvpResource" , parameters ) ; final com . cloud . agent . api . ConfigureStaticNatRulesOnLogicalRouterCommand cmd = mock ( com . cloud . agent . api . ConfigureStaticNatRulesOnLogicalRouterCommand . class ) ; final com . cloud . agen... | org . junit . Assert . assertFalse ( a . getResult ( ) ) |
testArrayMulti ( ) { java . lang . String name = "myName" ; io . swagger . models . parameters . SerializableParameter parameter = new io . swagger . models . parameters . QueryParameter ( ) ; parameter . setName ( "myName" ) ; parameter . setType ( "array" ) ; parameter . setCollectionFormat ( "multi" ) ; java . util ... | org . junit . Assert . assertArrayEquals ( paramsList . toArray ( ) , ( ( java . util . List ) ( result ) ) . toArray ( ) ) |
testCreateSslContextJksStoreOpenSSL ( ) { org . junit . Assume . assumeTrue ( io . netty . handler . ssl . OpenSsl . isAvailable ( ) ) ; org . junit . Assume . assumeTrue ( io . netty . handler . ssl . OpenSsl . supportsKeyManagerFactory ( ) ) ; org . apache . qpid . jms . transports . TransportOptions options = create... | org . junit . Assert . assertNotNull ( context ) |
testSerialization2 ( ) { org . jfree . chart . plot . ThermometerPlot p1 = new org . jfree . chart . plot . ThermometerPlot ( ) ; p1 . setSubrangePaint ( 1 , new java . awt . GradientPaint ( 1.0F , 2.0F , java . awt . Color . red , 3.0F , 4.0F , java . awt . Color . blue ) ) ; org . jfree . chart . plot . ThermometerPl... | org . junit . Assert . assertTrue ( p1 . equals ( p2 ) ) |
removeOrDecrementTestNewKey ( ) { boolean result = org . talend . dataprep . qa . util . FileComparator . removeOrDecrement ( map , org . talend . dataprep . qa . util . FileComparatorTest . TEST_KEY ) ; "<AssertPlaceHolder>" ; } removeOrDecrement ( java . util . Map , java . lang . String ) { boolean decremented = fal... | org . junit . Assert . assertFalse ( result ) |
testSingletonScope ( ) { com . myapp . UniqueThing thing1 = context . getBean ( com . myapp . UniqueThing . class ) ; com . myapp . UniqueThing thing2 = context . getBean ( com . myapp . UniqueThing . class ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertSame ( thing1 , thing2 ) |
testCourseStartedAndExpiredMoreThanAWeekAgo ( ) { final java . lang . String expectedOutput = "Course<sp>access<sp>expired<sp>on<sp>November<sp>1" ; final java . lang . String expiry = "2018-11-01T00:00:00+05:00" ; final java . lang . String start = "2018-10-01T00:00:00+05:00" ; final java . lang . String output = org ... | org . junit . Assert . assertEquals ( expectedOutput , output ) |
generatorCreatesNoCandidatesForExcludedUri ( ) { org . atlasapi . media . entity . Item item = new org . atlasapi . media . entity . Item ( ) ; item . setCanonicalUri ( "excluded" ) ; java . util . List < org . atlasapi . equiv . results . scores . ScoredCandidates < org . atlasapi . media . entity . Content > > genera... | org . junit . Assert . assertTrue ( generated . isEmpty ( ) ) |
shouldSelectNRandomDifferentSolutionsReturnTheCorrectNumberOfSolutions ( ) { int listSize = 20 ; int solutionsToBeReturned = 4 ; org . uma . jmetal . util . List < org . uma . jmetal . solution . BinarySolution > list = new org . uma . jmetal . util . ArrayList ( listSize ) ; for ( int i = 0 ; i < listSize ; i ++ ) { l... | org . junit . Assert . assertEquals ( solutionsToBeReturned , result . size ( ) ) |
testGetParameterNotFound ( ) { new mockit . Expectations ( ) { { swaggerOperation . getParamByName ( "name" ) ; result = null ; } } ; "<AssertPlaceHolder>" ; } getParameter ( java . lang . String ) { if ( ( parameterMap ) != null ) { java . lang . String [ ] values = parameterMap . get ( name ) ; return values == null ... | org . junit . Assert . assertNull ( request . getParameter ( "name" ) ) |
testFindMostRecentByServiceCode ( ) { java . util . List < org . oscarehr . common . model . BillingService > bss = dao . findMostRecentByServiceCode ( "VOTGVNO" ) ; "<AssertPlaceHolder>" ; } findMostRecentByServiceCode ( java . lang . String ) { javax . persistence . Query query = entityManager . createNativeQuery ( (... | org . junit . Assert . assertNotNull ( bss ) |
testDeleteQueue ( ) { com . crowdriff . styx . Styx styx = new com . crowdriff . styx . Styx ( new java . lang . String [ ] { "localhost:6700" , "localhost:6701" , "localhost:6702" } ) ; com . crowdriff . styx . TestUtils . clearStorage ( styx . getConnection ( ) ) ; com . crowdriff . styx . StyxQueue q = styx . getQue... | org . junit . Assert . assertEquals ( null , j . get ( "testQ" ) ) |
shouldCopyReturnACopyOfTheSolution ( ) { int numberOfObjectives = 3 ; double [ ] values = new double [ ] { 1.0 , 2.0 , 3.0 } ; org . uma . jmetal . util . point . PointSolution solution = new org . uma . jmetal . util . point . PointSolution ( numberOfObjectives ) ; org . springframework . test . util . ReflectionTestU... | org . junit . Assert . assertEquals ( solution , newSolution ) |
assertYearsMonthsDaysInvariant_T1UntilT2_Eq_T2UntilT1Inv ( ) { net . time4j . Duration < net . time4j . CalendarUnit > p1 = this . start . until ( this . end , net . time4j . Duration . in ( net . time4j . CalendarUnit . YEARS , net . time4j . CalendarUnit . MONTHS , net . time4j . CalendarUnit . DAYS ) ) ; net . time4... | org . junit . Assert . assertThat ( p1 , org . hamcrest . CoreMatchers . is ( p2 . inverse ( ) ) ) |
testAsColumnObjects ( ) { org . numenta . nupic . model . Connections cn = new org . numenta . nupic . model . Connections ( ) ; cn . setColumnDimensions ( new int [ ] { 64 , 64 } ) ; cn . setCellsPerColumn ( 4 ) ; org . numenta . nupic . algorithms . TemporalMemory . init ( cn ) ; int [ ] indexes = new int [ ] { 0 , 3... | org . junit . Assert . assertTrue ( idxSet . contains ( column . getIndex ( ) ) ) |
testGetUserInUserNameWhenHasPoundNoUser ( ) { java . lang . String testUser = "#zone" ; java . lang . String expected = "" ; java . lang . String actual = org . irods . jargon . core . utils . MiscIRODSUtils . getUserInUserName ( testUser ) ; "<AssertPlaceHolder>" ; } getUserInUserName ( java . lang . String ) { if ( (... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetSuperAdminListReturnsNull ( ) { when ( authorizationRepository . getSuperAdminRoleList ( ) ) . thenReturn ( null ) ; java . util . List < com . intuit . wasabi . authorizationobjects . UserRole > roles = defaultAuthorization . getSuperAdminRoleList ( ) ; "<AssertPlaceHolder>" ; } getSuperAdminRoleList ( ) { com ... | org . junit . Assert . assertEquals ( null , roles ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . dynamic . data . mapping . model . DDMFormInstanceRecordVersion missingDDMFormInstanceRecordVersion = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPr... | org . junit . Assert . assertNull ( missingDDMFormInstanceRecordVersion ) |
testUsernameIsNullSetAuthenticator ( ) { com . ewcms . publication . deploy . DeployOperatorable operator = new com . ewcms . publication . deploy . provider . DeployOperatorBaseTest . DeployOperatorBaseImpl . Builder ( ) . build ( ) ; org . apache . commons . vfs2 . FileSystemOptions opts = new org . apache . commons ... | org . junit . Assert . assertNull ( auth ) |
testSort ( ) { p . set ( joist . util . Copy . list ( "c" , "b" ) ) ; p . sort ( org . tessell . tests . model . properties . ListPropertyTest . naturalComparator ) ; "<AssertPlaceHolder>" ; } get ( ) { int i = 0 ; for ( org . tessell . tests . model . properties . DummyModel model : models . get ( ) ) { if ( ( ( model... | org . junit . Assert . assertThat ( p . get ( ) , org . hamcrest . Matchers . contains ( "b" , "c" ) ) |
testToBigInteger ( ) { java . lang . String ip = "ffff::ffff" ; java . math . BigInteger expectedIp = new java . math . BigInteger ( "340277174624079928635746076935439056895" ) ; java . math . BigInteger actualIp = new org . openstack . atlas . util . ip . IPv6 ( ip ) . toBigInteger ( ) ; "<AssertPlaceHolder>" ; } comp... | org . junit . Assert . assertEquals ( expectedIp . compareTo ( actualIp ) , 0 ) |
testVarLongSmall ( ) { long [ ] array = new long [ ] { 1 , 2 , 3 , - 5 , 0 , 12345678987L , Long . MIN_VALUE } ; org . apache . giraph . utils . UnsafeByteArrayOutputStream os = new org . apache . giraph . utils . UnsafeByteArrayOutputStream ( ) ; writeLongs ( os , array ) ; long [ ] resArray = new long [ array . lengt... | org . junit . Assert . assertArrayEquals ( array , resArray ) |
testEnableMouseCursorTwiceWithId ( ) { expect ( renderDeviceMock . createMouseCursor ( "test" , 10 , 20 ) ) . andReturn ( mouseCursor ) ; renderDeviceMock . enableMouseCursor ( mouseCursor ) ; replay ( renderDeviceMock ) ; niftyMouse . registerMouseCursor ( "id" , "test" , 10 , 20 ) ; niftyMouse . enableMouseCursor ( "... | org . junit . Assert . assertEquals ( "id" , niftyMouse . getCurrentId ( ) ) |
warningMessageTest ( ) { java . io . BufferedReader br = new java . io . BufferedReader ( new java . io . InputStreamReader ( new java . io . FileInputStream ( org . jboss . additional . testsuite . jdkall . present . logging . profiles . NonExistingProfileTestCase . loggingTestLog ) , java . nio . charset . Charset . ... | org . junit . Assert . assertTrue ( warningFound ) |
testCreateConfig ( ) { org . osgi . service . cm . Configuration config = cm . getConfiguration ( "test" ) ; "<AssertPlaceHolder>" ; } getPid ( ) { return getPid ( true ) ; } | org . junit . Assert . assertEquals ( "test" , config . getPid ( ) ) |
shouldReturnPrimitiveInteger ( ) { final int rows = mapper . updateReturnsPrimitiveInteger ( new org . apache . ibatis . submitted . dml_return_types . User ( 1 , "shouldReturnPrimitiveInteger" ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 1 , rows ) |
test3 ( ) { com . milaboratory . mixcr . util . RunMiXCR . RunMiXCRAnalysis params = new com . milaboratory . mixcr . util . RunMiXCR . RunMiXCRAnalysis ( "/Users/poslavsky/Projects/milab/temp/R1_part.fastq.gz" , "/Users/poslavsky/Projects/milab/temp/R2_part.fastq.gz" ) ; com . milaboratory . mixcr . util . RunMiXCR . ... | org . junit . Assert . assertEquals ( actual , alignment . getOriginalReads ( ) . get ( 0 ) ) |
testExpectedHashVariableLength ( ) { byte [ ] bytes = new byte [ 512 ] ; new java . util . Random ( 23 ) . nextBytes ( bytes ) ; for ( int i = 0 ; i <= ( bytes . length ) ; i ++ ) { int expected = org . greenrobot . essentials . hash . otherhashes . MurmurHash3Yonik . murmurhash3_x86_32 ( bytes , 0 , i , 0 ) ; checksum... | org . junit . Assert . assertEquals ( expected , value ) |
itReturnsASetOfCredentials ( ) { try { provider . getValue ( context ) ; org . junit . Assert . fail ( "should<sp>have<sp>thrown<sp>a<sp>WebApplicationException<sp>but<sp>didn't" ) ; } catch ( javax . ws . rs . WebApplicationException e ) { "<AssertPlaceHolder>" . isEqualTo ( Credentials . CHALLENGE ) ; } } getResponse... | org . junit . Assert . assertThat ( e . getResponse ( ) ) |
test ( ) { org . seasar . extension . jdbc . gen . internal . exception . NextVersionExceededRuntimeException e = new org . seasar . extension . jdbc . gen . internal . exception . NextVersionExceededRuntimeException ( "aaa" ) ; "<AssertPlaceHolder>" ; System . out . println ( e . getMessage ( ) ) ; } getDdlInfoFilePat... | org . junit . Assert . assertEquals ( "aaa" , e . getDdlInfoFilePath ( ) ) |
gettingOCSPNonceShouldReturnNull_inCaseOfOlderAiaOcsp ( ) { this . configuration . setPreferAiaOcsp ( true ) ; org . digidoc4j . impl . CommonOCSPSource source = new org . digidoc4j . impl . CommonOCSPSource ( this . configuration ) ; java . security . cert . X509Certificate certificate = this . pkcs12EccSignatureToken... | org . junit . Assert . assertNull ( nonce ) |
testConfigure_ConfigurableObject ( ) { com . ngdata . hbaseindexer . ConfigureUtilTest . ConfigurableObject configurable = new com . ngdata . hbaseindexer . ConfigureUtilTest . ConfigurableObject ( ) ; java . util . Map < java . lang . String , java . lang . String > params = com . google . common . collect . Maps . ne... | org . junit . Assert . assertEquals ( params , configurable . params ) |
matchingWildcardSucceeds ( ) { result = topicGraph . getAtomsByTitleQuery ( "Arth*" , filter ) ; "<AssertPlaceHolder>" ; } getAtomsByTitleQuery ( java . lang . String , net . fortytwo . smsn . brain . model . Filter ) { return filterAndSort ( wrapper . getVerticesByTitle ( query ) , filter ) ; } | org . junit . Assert . assertEquals ( 1 , result . size ( ) ) |
loadReturnsEmptyDataWhenExceptionThrownWhenObtainingInputStream ( ) { doThrow ( java . io . IOException . class ) . when ( this . oncoTree ) . getInputStream ( any ( java . net . URL . class ) ) ; final java . util . Collection < org . apache . solr . common . SolrInputDocument > data = this . oncoTree . load ( this . ... | org . junit . Assert . assertTrue ( data . isEmpty ( ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . asset . display . page . model . AssetDisplayPageEntry newAssetDisplayPageEntry = addAssetDisplayPageEntry ( ) ; com . liferay . asset . display . page . model . AssetDisplayPageEntry existingAssetDisplayPageEntry = _persistence . fetchByPrimaryKey ( newAssetDisplayPa... | org . junit . Assert . assertEquals ( existingAssetDisplayPageEntry , newAssetDisplayPageEntry ) |
testExtractsMostSpecificDriverName ( ) { java . lang . StackTraceElement [ ] stackTrace = new java . lang . StackTraceElement [ 3 ] ; stackTrace [ 0 ] = new java . lang . StackTraceElement ( "SomeClass" , "someMethod" , "SomeClass.java" , 5 ) ; stackTrace [ 1 ] = new java . lang . StackTraceElement ( "RemoteWebDriver" ... | org . junit . Assert . assertEquals ( "FirefoxDriver" , gotName ) |
offsetOneDay ( ) { net . time4j . clock . AdjustableClock clock = net . time4j . clock . AdjustableClock . of ( SystemClock . INSTANCE ) . withOffset ( 1 , java . util . concurrent . TimeUnit . DAYS ) ; net . time4j . PlainDate tomorrow = net . time4j . SystemClock . inLocalView ( ) . today ( ) . plus ( 1 , CalendarUni... | org . junit . Assert . assertThat ( clock . inLocalView ( ) . today ( ) , org . hamcrest . CoreMatchers . is ( tomorrow ) ) |
shouldMatchAllWhenNoPropertyFilterIsSet ( ) { eventFilter . getPropFilters ( ) . clear ( ) ; java . util . Set < org . unitedinternet . cosmo . model . ICalendarItem > queryEvents = calendarDao . findCalendarItems ( calendar , filter ) ; "<AssertPlaceHolder>" ; } findCalendarItems ( org . unitedinternet . cosmo . model... | org . junit . Assert . assertEquals ( 5 , queryEvents . size ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.