input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
butJamesHasNoPendingTask ( ) { final org . bonitasoft . engine . identity . User plop = createUser ( "plop" , org . bonitasoft . engine . process . actor . PASSWORD ) ; final org . bonitasoft . engine . bpm . process . impl . ProcessDefinitionBuilder processBuilder = new org . bonitasoft . engine . bpm . process . impl... | org . junit . Assert . assertEquals ( 0 , tasks . size ( ) ) |
withReadLockAndDelegate ( ) { com . gs . collections . impl . list . mutable . MultiReaderFastList < java . lang . Integer > list = this . newWith ( 1 ) ; java . lang . Object [ ] result = new java . lang . Object [ 1 ] ; list . withReadLockAndDelegate ( ( delegate ) -> { result [ 0 ] = delegate . getFirst ( ) ; this .... | org . junit . Assert . assertNotNull ( result [ 0 ] ) |
checkAbilityToUseNodeDefinedExplicitly ( ) { java . io . File mainJS = io . appium . java_client . service . local . ServerBuilderTest . PATH_T0_TEST_MAIN_JS . toFile ( ) ; io . appium . java_client . service . local . AppiumServiceBuilder builder = new io . appium . java_client . service . local . AppiumServiceBuilder... | org . junit . Assert . assertThat ( builder . createArgs ( ) . get ( 0 ) , org . hamcrest . Matchers . is ( mainJS . getAbsolutePath ( ) ) ) |
readData0 ( ) { java . util . Date traceDateTime = new java . util . Date ( ( ( long ) ( 1.414092264446E12 ) ) ) ; com . att . aro . core . peripheral . pojo . VideoTime videoTime = null ; nativeVideoDisplayfile = makeFile ( "exvideo.mov" , null ) ; videoTime = videoTimeReaderImpl . readData ( tracePath , traceDateTime... | org . junit . Assert . assertEquals ( true , videoTime . isExVideoTimeFileNotFound ( ) ) |
testGetProductsList ( ) { java . util . List < org . joedayz . corespringtest . model . Product > list = productDao . getProductsList ( null ) ; "<AssertPlaceHolder>" ; } getProductsList ( org . joedayz . corespringtest . model . Product ) { return productDao . getProductsList ( product ) ; } | org . junit . Assert . assertNotNull ( list ) |
readsPatchForEntityNestedInCollection ( ) { org . springframework . data . rest . webmvc . json . DomainObjectReaderUnitTests . Phone phone = new org . springframework . data . rest . webmvc . json . DomainObjectReaderUnitTests . Phone ( ) ; phone . creationDate = new java . util . GregorianCalendar ( ) ; org . springf... | org . junit . Assert . assertThat ( result . phones . get ( 0 ) . creationDate ) |
testLANG1190 ( ) { final java . lang . reflect . Type fromType = org . apache . commons . lang3 . reflect . TypeUtilsTest . ClassWithSuperClassWithGenericType . class . getDeclaredMethod ( "methodWithGenericReturnType" ) . getGenericReturnType ( ) ; final java . lang . reflect . Type failingToType = org . apache . comm... | org . junit . Assert . assertTrue ( org . apache . commons . lang3 . reflect . TypeUtils . isAssignable ( fromType , failingToType ) ) |
testNotOrdered ( ) { com . ctrip . platform . dal . dao . configure . DalConfigLoader instance = com . ctrip . platform . dal . dao . helper . ServiceLoaderHelper . getInstance ( com . ctrip . platform . dal . dao . configure . DalConfigLoader . class ) ; "<AssertPlaceHolder>" ; } getInstance ( java . lang . Class ) { ... | org . junit . Assert . assertNull ( instance ) |
testTableSuffix ( ) { com . j256 . ormlite . db . MariaDbDatabaseType dbType = new com . j256 . ormlite . db . MariaDbDatabaseType ( ) ; java . lang . String suffix = "ewfwefef" ; dbType . setCreateTableSuffix ( suffix ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; dbType . appendCreateTable... | org . junit . Assert . assertTrue ( sb . toString ( ) . contains ( suffix ) ) |
testIsRenderNothingFalseWithSelectedRange ( ) { com . liferay . portal . search . web . internal . modified . facet . display . context . ModifiedFacetDisplayBuilder modifiedFacetDisplayBuilder = createDisplayBuilder ( ) ; modifiedFacetDisplayBuilder . setParameterValues ( "past-24-hours" ) ; modifiedFacetDisplayBuilde... | org . junit . Assert . assertFalse ( modifiedFacetDisplayContext . isRenderNothing ( ) ) |
getNextTest ( ) { org . ccnx . ccn . impl . support . Log . info ( Log . FAC_TEST , "Starting<sp>getNextTest" ) ; org . ccnx . ccn . io . CCNWriter writer = new org . ccnx . ccn . io . CCNWriter ( "/getNext" , putHandle ) ; org . ccnx . ccn . io . CCNReader reader = new org . ccnx . ccn . io . CCNReader ( getHandle ) ;... | org . junit . Assert . assertTrue ( ( testCo != null ) ) |
getTestCaseSourceCodeWithLackingTestMethod_A$String ( ) { java . lang . String sourceCodeString = "package<sp>hoge.foo;<sp>import<sp>java.util.List;<sp>public<sp>class<sp>Sample<sp>{<sp>public<sp>Sample()<sp>{}\r\n<sp>public<sp>int<sp>doSomething(String<sp>str,<sp>long<sp>longValue)<sp>throws<sp>Throwable<sp>{<sp>Syste... | org . junit . Assert . assertEquals ( expected , actual ) |
composes_multiple_levels ( ) { com . noodlesandwich . rekord . keys . BuildableKey < com . noodlesandwich . rekord . keys . Person , com . noodlesandwich . rekord . Rekord < com . noodlesandwich . rekord . keys . Address > > companyAddress = com . noodlesandwich . rekord . keys . ComposedKey . named ( "company<sp>addre... | org . junit . Assert . assertThat ( anna . get ( Person . company ) . get ( Company . address ) . get ( Address . city ) , org . hamcrest . Matchers . is ( "St.<sp>Petersburg" ) ) |
testOverrideDescription ( ) { org . pentaho . di . trans . step . StepStatus status = new org . pentaho . di . trans . step . StepStatus ( ) ; status . setStatusDescription ( "Empty" ) ; java . lang . String [ ] overrides = status . getTransLogFields ( "Override" ) ; "<AssertPlaceHolder>" ; } getTransLogFields ( java .... | org . junit . Assert . assertEquals ( "Override" , overrides [ 10 ] ) |
testUpgradeCalendarColorPreferences ( ) { long calendarId = com . liferay . portal . kernel . test . util . RandomTestUtil . randomLong ( ) ; long color = com . liferay . portal . kernel . test . util . RandomTestUtil . randomLong ( ) ; java . lang . String preferencesXML = getPreferences ( com . liferay . calendar . w... | org . junit . Assert . assertEquals ( java . lang . String . valueOf ( color ) , value ) |
testHashCode ( ) { org . jfree . chart . axis . NumberTickUnit t1 = new org . jfree . chart . axis . NumberTickUnit ( 1.23 , new java . text . DecimalFormat ( "0.00" ) ) ; org . jfree . chart . axis . NumberTickUnit t2 = new org . jfree . chart . axis . NumberTickUnit ( 1.23 , new java . text . DecimalFormat ( "0.00" )... | org . junit . Assert . assertEquals ( h1 , h2 ) |
testFullyQualifiedClassNameSamePackage ( ) { java . lang . String expected = "com.jakewharton.test.SomeClass" ; java . lang . String actual = com . actionbarsherlock . internal . ActionBarSherlockCompat . cleanActivityName ( "com.jakewharton.test" , "com.jakewharton.test.SomeClass" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( expected , org . hamcrest . CoreMatchers . equalTo ( actual ) ) |
testUpdateAccessLogNoMAC ( ) { contentAccessLogger = new eu . smartenit . unada . ctm . cache . impl . ContentAccessLoggerImpl ( 1213131 , "1.1.1.1" ) ; boolean access = contentAccessLogger . updateAccessLog ( ) ; "<AssertPlaceHolder>" ; } updateAccessLog ( ) { eu . smartenit . unada . ctm . cache . impl . ContentAcces... | org . junit . Assert . assertFalse ( access ) |
testExceptionGetWriteChannel ( ) { org . geotools . data . shapefile . files . ShpFiles shpFiles = new org . geotools . data . shapefile . files . ShpFiles ( new java . net . URL ( "http://blah/blah.shp" ) ) ; try { shpFiles . getWriteChannel ( org . geotools . data . shapefile . files . ShpFileType . SHP , this ) ; or... | org . junit . Assert . assertEquals ( 0 , shpFiles . numberOfLocks ( ) ) |
testGetConnectionId_withoutConnectionId ( ) { "<AssertPlaceHolder>" ; } getConnectionId ( ) { org . eclipse . rap . rwt . service . UISession uiSession = org . eclipse . rap . rwt . internal . service . ContextProvider . getUISession ( ) ; return uiSession == null ? null : ( ( org . eclipse . rap . rwt . internal . ser... | org . junit . Assert . assertNull ( uiSession . getConnectionId ( ) ) |
case2 ( ) { org . openstack . atlas . usagerefactor . List < org . openstack . atlas . service . domain . usage . entities . LoadBalancerMergedHostUsage > mergedRecords = usagePollerHelper . processExistingEvents ( lbHostMap ) ; "<AssertPlaceHolder>" ; org . openstack . atlas . usagerefactor . junit . AssertLoadBalance... | org . junit . Assert . assertEquals ( 1 , mergedRecords . size ( ) ) |
testParseEmpty ( ) { final javax . mail . internet . InternetAddress [ ] addresses = javax . mail . internet . InternetAddress . parse ( "" , true ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 0 , addresses . length ) |
handleItemReturnsOldVersionOfItemForNonTransientAppliedItemWithPendingTxItem ( ) { doReturn ( mockTx ) . when ( isolationHandler ) . loadTransaction ( com . amazonaws . services . dynamodbv2 . transactions . ReadUncommittedIsolationHandlerImplUnitTest . TX_ID ) ; doReturn ( com . amazonaws . services . dynamodbv2 . tra... | org . junit . Assert . assertEquals ( com . amazonaws . services . dynamodbv2 . transactions . ReadUncommittedIsolationHandlerImplUnitTest . UNLOCKED_ITEM , isolationHandler . handleItem ( com . amazonaws . services . dynamodbv2 . transactions . ReadUncommittedIsolationHandlerImplUnitTest . NON_TRANSIENT_APPLIED_ITEM ,... |
getHBaseTypeDescNumberTest ( ) { stubValueMeta . setType ( 1 ) ; java . lang . String stubType = stubValueMeta . getHBaseTypeDesc ( ) ; "<AssertPlaceHolder>" ; } getHBaseTypeDesc ( ) { if ( isInteger ( ) ) { return getIsLongOrDouble ( ) ? "Long" : "Integer" ; } if ( isNumber ( ) ) { return getIsLongOrDouble ( ) ? "Doub... | org . junit . Assert . assertEquals ( "Float" , stubType ) |
testGetBooleanTypeBoolean ( ) { secureNodeBuilder . setProperty ( "boolean" , true , Type . BOOLEAN ) ; "<AssertPlaceHolder>" ; } getBoolean ( java . lang . String ) { return delegate . getBoolean ( name ) ; } | org . junit . Assert . assertTrue ( secureNodeBuilder . getBoolean ( "boolean" ) ) |
transformIsolated ( ) { org . opencb . commons . datastore . core . ObjectMap params = new org . opencb . commons . datastore . core . ObjectMap ( ) ; java . net . URI outputUri = newOutputUri ( ) ; org . opencb . opencga . storage . core . variant . VariantStorageEngine variantStorageManager = getVariantStorageEngine ... | org . junit . Assert . assertEquals ( 0 , malformedFiles . length ) |
cantRetrieve ( ) { dao . retrieve ( new java . lang . Long ( ( - 1 ) ) , new org . easycassandra . persistence . cassandra . ResultAsyncCallBack < org . easycassandra . bean . model . Person > ( ) { @ org . easycassandra . bean . Override public void result ( org . easycassandra . bean . model . Person person ) { "<Ass... | org . junit . Assert . assertNull ( person ) |
iteratingPropertiesContainingArraysAndMapsShouldWork ( ) { org . constretto . ConstrettoConfiguration configuration = new org . constretto . ConstrettoBuilder ( false ) . createPropertiesStore ( ) . addResource ( new org . constretto . model . ClassPathResource ( "test-with-array-and-map.properties" ) ) . done ( ) . ge... | org . junit . Assert . assertEquals ( 2 , props . size ( ) ) |
left ( ) { "<AssertPlaceHolder>" ; } left ( ) { org . junit . Assert . assertEquals ( 2 , new com . machinezoo . sourceafis . Block ( 2 , 3 , 4 , 5 ) . left ( ) ) ; } | org . junit . Assert . assertEquals ( 2 , new com . machinezoo . sourceafis . Block ( 2 , 3 , 4 , 5 ) . left ( ) ) |
testShouldPropagatePositive ( ) { when ( propertyChain . getProperty ( ( ( io . tracee . configuration . PropertiesBasedTraceeFilterConfiguration . TRACEE_DEFAULT_PROFILE_PREFIX ) + ( io . tracee . configuration . AsyncDispatch . name ( ) ) ) ) ) . thenReturn ( ".*" ) ; "<AssertPlaceHolder>" ; } shouldProcessParam ( ja... | org . junit . Assert . assertTrue ( unit . shouldProcessParam ( "foo" , io . tracee . configuration . AsyncDispatch ) ) |
testHasStatus ( ) { com . eclipsesource . jaxrs . consumer . internal . RequestError error = mock ( com . eclipsesource . jaxrs . consumer . internal . RequestError . class ) ; when ( error . getStatus ( ) ) . thenReturn ( 233 ) ; com . eclipsesource . jaxrs . consumer . RequestException exception = new com . eclipseso... | org . junit . Assert . assertEquals ( 233 , status ) |
testDescribeVoices ( ) { final com . amazonaws . services . polly . DescribeVoicesRequest request = new com . amazonaws . services . polly . DescribeVoicesRequest ( ) ; "<AssertPlaceHolder>" ; final com . amazonaws . services . polly . DescribeVoicesResult result = client . describeVoices ( request ) ; checkDescribeVoi... | org . junit . Assert . assertNotNull ( request ) |
_boolean ( ) { io . jenkins . plugins . casc . Configurator c = io . jenkins . plugins . casc . impl . configurators . PrimitiveConfiguratorTest . registry . lookupOrFail ( boolean . class ) ; final java . lang . Object value = c . configure ( new io . jenkins . plugins . casc . model . Scalar ( "true" ) , io . jenkins... | org . junit . Assert . assertTrue ( ( ( java . lang . Boolean ) ( value ) ) ) |
testInvokeCreateSubscription ( ) { org . opendaylight . yang . gen . v1 . urn . ietf . params . xml . ns . netmod . notification . rev080714 . netconf . streams . Stream stream = new org . opendaylight . yang . gen . v1 . urn . ietf . params . xml . ns . netmod . notification . rev080714 . netconf . streams . StreamBui... | org . junit . Assert . assertEquals ( org . opendaylight . netconf . messagebus . eventsources . netconf . NetconfEventSourceMountTest . STREAM_1 , org . opendaylight . netconf . messagebus . eventsources . netconf . NetconfEventSourceMountTest . getStreamName ( captor . getValue ( ) ) ) |
testGetDependencyPath3 ( ) { int [ ] parents = new int [ ] { 2 , 0 , - 1 , 2 , 3 } ; java . util . List < edu . jhu . prim . tuple . Pair < java . lang . Integer , edu . jhu . pacaya . parse . dep . ParentsArray . Dir > > path = edu . jhu . pacaya . parse . dep . ParentsArray . getDependencyPath ( 1 , 2 , parents ) ; j... | org . junit . Assert . assertEquals ( path , goldPath ) |
testDetachDisk ( ) { initializeExpectedInstance ( 2 ) ; expect ( compute . getOptions ( ) ) . andReturn ( mockOptions ) ; com . google . cloud . compute . deprecated . Operation operation = new com . google . cloud . compute . deprecated . Operation . Builder ( serviceMockReturnsOptions ) . setOperationId ( com . googl... | org . junit . Assert . assertSame ( operation , instance . detachDisk ( "dev0" ) ) |
testToCropWithPercent ( ) { edu . illinois . library . cantaloupe . operation . Crop expected = new edu . illinois . library . cantaloupe . operation . CropByPercent ( 0.3 , 0.4 , 0.5 , 0.6 ) ; instance = new edu . illinois . library . cantaloupe . resource . iiif . v2 . Region ( ) ; instance . setType ( Region . Type ... | org . junit . Assert . assertEquals ( expected , actual ) |
usage ( ) { java . util . Set < de . flapdoodle . tests . sample . IJoinedSample < java . lang . Integer , java . lang . Boolean , de . flapdoodle . tests . sample . ISample < java . lang . Boolean > > > notEquals = new java . util . HashSet < de . flapdoodle . tests . sample . IJoinedSample < java . lang . Integer , j... | org . junit . Assert . assertEquals ( ( "" + notEquals ) , 2 , notEquals . size ( ) ) |
someTest3 ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
compareActuality ( ) { java . lang . String message ; if ( expected ) { message = ( ( ( "Params2<sp>(" + ( this . params2 ) ) + ")<sp>should<sp>be<sp>considered<sp>newer<sp>than<sp>Params1<sp>(" ) + ( this . params1 ) ) + ")" ; } else { message = ( ( ( "Params1<sp>(" + ( this . params1 ) ) + ")<sp>should<sp>be<sp>consi... | org . junit . Assert . assertTrue ( message , ( ( de . uzl . itm . ncoap . communication . observing . ResourceStatusAge . isReceivedStatusNewer ( params1 , params2 ) ) == ( expected ) ) ) |
computeAllUncheckedForMultipleNodesRunsInParallel ( ) { java . util . concurrent . CountDownLatch countDownLatch = new java . util . concurrent . CountDownLatch ( com . facebook . buck . core . graph . transformation . DefaultGraphTransformationEngineTest . NUMBER_OF_THREADS ) ; com . facebook . buck . core . graph . t... | org . junit . Assert . assertFalse ( resultMap . isEmpty ( ) ) |
testGetMetadataClassFromNullMid ( ) { "<AssertPlaceHolder>" ; } getMetadataClass ( java . lang . String ) { if ( ( ! ( org . springframework . roo . metadata . MetadataIdentificationUtils . isValid ( metadataId ) ) ) || ( metadataId . equals ( ( ( org . springframework . roo . metadata . MetadataIdentificationUtils . M... | org . junit . Assert . assertNull ( org . springframework . roo . metadata . MetadataIdentificationUtils . getMetadataClass ( null ) ) |
test_minus_Period_zero ( ) { java . time . LocalDate t = TEST_2007_07_15 . minus ( MockSimplePeriod . ZERO_DAYS ) ; "<AssertPlaceHolder>" ; } minus ( int ) { return compileOperation ( new org . apache . xpath . operations . Minus ( ) , opPos ) ; } | org . junit . Assert . assertSame ( t , TEST_2007_07_15 ) |
shouldGetProperty ( ) { given ( settings . getProperty ( SecuritySettings . CAPTCHA_LENGTH ) ) . willReturn ( 8 ) ; int result = commonService . getProperty ( SecuritySettings . CAPTCHA_LENGTH ) ; verify ( settings ) . getProperty ( SecuritySettings . CAPTCHA_LENGTH ) ; "<AssertPlaceHolder>" ; } getProperty ( ch . jalu... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( 8 ) ) |
testGetNextSet5 ( ) { java . util . Random r = new java . util . Random ( - 559038737 ) ; for ( int i = 0 ; i < 10 ; i ++ ) { com . google . zxing . common . BitArray array = new com . google . zxing . common . BitArray ( ( 1 + ( r . nextInt ( 100 ) ) ) ) ; int numSet = r . nextInt ( 20 ) ; for ( int j = 0 ; j < numSet... | org . junit . Assert . assertEquals ( expected , actual ) |
testEnablingTableCache ( ) { createTable ( org . apache . blur . manager . clusterstatus . ZookeeperClusterStatusTest . TEST , false ) ; "<AssertPlaceHolder>" ; clusterStatus1 . enableTable ( org . apache . blur . manager . clusterstatus . ZookeeperClusterStatusTest . DEFAULT , org . apache . blur . manager . clusterst... | org . junit . Assert . assertFalse ( clusterStatus2 . isEnabled ( true , org . apache . blur . manager . clusterstatus . ZookeeperClusterStatusTest . DEFAULT , org . apache . blur . manager . clusterstatus . ZookeeperClusterStatusTest . TEST ) ) |
runTestStaticInitialization3 ( ) { soot . jimple . infoflow . results . InfoflowResults res = analyzeAPKFile ( "GeneralJava/StaticInitialization3.apk" ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( this . results ) == null ? 0 : this . results . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , res . size ( ) ) |
testConfigureCache ( ) { System . out . println ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.configure]" ) ) + "--------<sp>cache<sp>can<sp>only<sp>be<sp>'true'<sp>or<sp>'false'" ) ) ; java . lang . String attrPersistence = null ; java . lang . String batchSize = null ; java . lang . String batchTime = null ; java . l... | org . junit . Assert . assertTrue ( sink . getInvalidConfiguration ( ) ) |
createEntityPath ( ) { com . querydsl . core . types . Path < java . lang . Object > path = pathFactory . createEntityPath ( java . lang . Object . class , metadata ) ; "<AssertPlaceHolder>" ; } createEntityPath ( java . lang . Class , com . querydsl . core . types . PathMetadata ) { if ( com . querydsl . core . alias ... | org . junit . Assert . assertNotNull ( path ) |
testResourceConfigModifier ( ) { boolean [ ] b = new boolean [ ] { false } ; com . englishtown . vertx . jersey . ApplicationConfigurator configurator = ( rc ) -> { b [ 0 ] = true ; return rc ; } ; packages . add ( "com.englishtown.vertx.jersey.resources" ) ; container = new com . englishtown . vertx . jersey . impl . ... | org . junit . Assert . assertTrue ( b [ 0 ] ) |
filter_A$Function1_Nil ( ) { com . m3 . scalaflavor4j . F1 < java . lang . String , java . lang . Boolean > f = new com . m3 . scalaflavor4j . F1 < java . lang . String , java . lang . Boolean > ( ) { public com . m3 . scalaflavor4j . Boolean apply ( java . lang . String v1 ) { return v1 . contains ( "f" ) ; } } ; com ... | org . junit . Assert . assertThat ( actual . toList ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 0 ) ) ) |
testParseQuery_SelectEntityProperty ( ) { java . lang . String query = "$select=id" ; de . fraunhofer . iosb . ilt . frostserver . query . Query expResult = new de . fraunhofer . iosb . ilt . frostserver . query . Query ( ) ; expResult . getSelect ( ) . add ( EntityProperty . ID ) ; de . fraunhofer . iosb . ilt . frost... | org . junit . Assert . assertEquals ( expResult , result ) |
sameHash ( ) { org . jaitools . imageutils . ImageLayout2 il1 = new org . jaitools . imageutils . ImageLayout2 ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , null , null ) ; org . jaitools . imageutils . ImageLayout2 il2 = new org . jaitools . imageutils . ImageLayout2 ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , null , null ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( il1 . hashCode ( ) , il2 . hashCode ( ) ) |
testSerializable ( ) { org . apache . hadoop . fs . Path p = new org . apache . hadoop . fs . Path ( "uqsf://ybpnyubfg:8020/sbb/one/onm" ) ; org . apache . hadoop . fs . permission . FsPermission perm = org . apache . hadoop . fs . permission . FsPermission . getFileDefault ( ) ; org . apache . hadoop . fs . FileStatus... | org . junit . Assert . assertEquals ( stat , deser ) |
testGISTrainSignature5 ( ) { try ( opennlp . tools . util . ObjectStream < opennlp . tools . ml . model . Event > eventStream = createEventStream ( ) ) { opennlp . tools . util . TrainingParameters params = opennlp . tools . util . model . ModelUtil . createDefaultTrainingParameters ( ) ; params . put ( AbstractTrainer... | org . junit . Assert . assertNotNull ( trainer . train ( eventStream ) ) |
setValue_updateFromServerIsAppliedViaSyncToServer_syncToServerUpdatesValue ( ) { com . vaadin . client . flow . nodefeature . MapPropertyTest . TestTree tree = new com . vaadin . client . flow . nodefeature . MapPropertyTest . TestTree ( ) ; com . vaadin . client . flow . StateNode node = new com . vaadin . client . fl... | org . junit . Assert . assertEquals ( "baz" , property . getValue ( ) ) |
testCryptUtil ( ) { com . github . emailtohl . building . common . encryption . Crypter c = new com . github . emailtohl . building . common . encryption . Crypter ( ) ; java . security . KeyPair k = c . createKeyPairs ( 1024 ) ; java . lang . String plaintext = "" ; System . out . println ( ( "<sp>" + plaintext ) ) ; ... | org . junit . Assert . assertEquals ( plaintext , decodeStr ) |
enlist ( ) { "<AssertPlaceHolder>" ; verify ( transaction ) . enlistResource ( xaResource ) ; } enlist ( ) { org . mule . runtime . core . privileged . transaction . XaTransaction transaction = getTransaction ( ) ; synchronized ( this ) { if ( ! ( isEnlisted ( ) ) ) { final javax . transaction . xa . XAResource xaResou... | org . junit . Assert . assertThat ( resource . enlist ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
validateFormWithNotEmptyAndEmailAndPhoneValidators ( ) { android . content . Context context = org . robolectric . Robolectric . getShadowApplication ( ) . getApplicationContext ( ) ; android . widget . TextView notEmptyField = new android . widget . TextView ( context ) ; notEmptyField . setText ( "validate" ) ; com .... | org . junit . Assert . assertTrue ( form . validate ( ) ) |
testAangeverKindMetBetrokkenheidOuder ( ) { final nl . bzk . brp . bijhouding . bericht . model . RegistratieAdresActieElement actie = createRegistratieAdresValideerActie ( false , false , nl . bzk . brp . bijhouding . bericht . model . RegistratieAdresActieElementTest . LEEFTIJD_OUDER_18 , nl . bzk . brp . bijhouding ... | org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) ) |
testCreateTad ( ) { org . eclipse . kapua . commons . configuration . metatype . ObjectFactoryImpl factoryImpl = new org . eclipse . kapua . commons . configuration . metatype . ObjectFactoryImpl ( ) ; "<AssertPlaceHolder>" ; } createTad ( ) { return new org . eclipse . kapua . commons . configuration . metatype . TadI... | org . junit . Assert . assertNotNull ( factoryImpl . createTad ( ) ) |
testContext ( ) { org . dasein . cloud . Cloud cloud = org . dasein . cloud . Cloud . register ( providerName , cloudName , endpoint , org . dasein . cloud . test . TestNewCloudProvider . class ) ; org . dasein . cloud . ProviderContext ctx = cloud . createContext ( org . dasein . cloud . CloudConnectTestCase . ACCOUNT... | org . junit . Assert . assertNull ( "The<sp>default<sp>context<sp>test<sp>in<sp>the<sp>test<sp>provider<sp>should<sp>always<sp>return<sp>null" , p . testContext ( ) ) |
testDenyAllSecurityManager ( ) { org . kie . api . runtime . manager . RuntimeEnvironment environment = RuntimeEnvironmentBuilder . Factory . get ( ) . newEmptyBuilder ( ) . userGroupCallback ( userGroupCallback ) . addAsset ( org . kie . internal . io . ResourceFactory . newClassPathResource ( "BPMN2-ScriptTask.bpmn2"... | org . junit . Assert . assertNotNull ( manager ) |
testParsePath ( ) { final java . lang . String pathString = "/home/user/files/file1" ; final org . apache . hadoop . fs . Path path = new org . apache . hadoop . fs . Path ( pathString ) ; final java . net . URI uri = new java . net . URI ( "http://container.localhost" ) ; final org . apache . hadoop . fs . swift . uti... | org . junit . Assert . assertEquals ( expected , actual ) |
equals_onePropertyIsNull_shouldBeFalse ( ) { com . vaadin . v7 . data . util . filter . Like like1 = new com . vaadin . v7 . data . util . filter . Like ( null , "bar" ) ; com . vaadin . v7 . data . util . filter . Like like2 = new com . vaadin . v7 . data . util . filter . Like ( "foo" , "baz" ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertFalse ( like1 . equals ( like2 ) ) |
complexSortTest ( ) { sortElementList . add ( uncertain1 ) ; sortElementList . add ( before4 ) ; sortElementList . add ( before2 ) ; sortElementList . add ( before3 ) ; sortElementList . add ( before1 ) ; sortElementList . add ( after4 ) ; sortElementList . add ( after2 ) ; sortElementList . add ( after3 ) ; sortElemen... | org . junit . Assert . assertArrayEquals ( expectedElementList . toArray ( ) , sel . toArray ( ) ) |
testSkipIoMappingInvocation ( ) { org . camunda . bpm . engine . repository . ProcessDefinition processDefinition = testRule . deployAndGetDefinition ( modify ( instance ) . activityBuilder ( "user2" ) . camundaInputParameter ( "foo" , "bar" ) . done ( ) ) ; org . camunda . bpm . engine . runtime . ProcessInstance proc... | org . junit . Assert . assertEquals ( 0 , runtimeService . createVariableInstanceQuery ( ) . count ( ) ) |
apply_resonseObject ( ) { final net . ripe . db . whois . common . domain . ResponseObject object = new net . ripe . db . whois . query . domain . MessageObject ( "text" ) ; final net . ripe . db . whois . common . domain . ResponseObject response = subject . apply ( object ) ; "<AssertPlaceHolder>" ; } apply ( java . ... | org . junit . Assert . assertThat ( response , org . hamcrest . Matchers . is ( object ) ) |
non_strict_with_undefined_scenarios ( ) { createNonStrictExitStatus ( ) ; bus . send ( testCaseFinishedWithStatus ( Result . Type . UNDEFINED ) ) ; "<AssertPlaceHolder>" ; } exitStatus ( ) { if ( results . isEmpty ( ) ) { return cucumber . runtime . ExitStatus . DEFAULT ; } if ( runtimeOptions . isWip ( ) ) { return mi... | org . junit . Assert . assertEquals ( 0 , exitStatus . exitStatus ( ) ) |
deveInformarSchema ( ) { final com . fincatto . documentofiscal . nfe . classes . distribuicao . NFDistribuicaoDocumentoZip documentoZip = new com . fincatto . documentofiscal . nfe . classes . distribuicao . NFDistribuicaoDocumentoZip ( ) ; documentoZip . setSchema ( "NFe-4.00" ) ; "<AssertPlaceHolder>" ; } getSchema ... | org . junit . Assert . assertEquals ( "NFe-4.00" , documentoZip . getSchema ( ) ) |
testConstructor1 ( ) { org . ujmp . core . Matrix matrix = org . ujmp . core . calculation . string . TestReplaceRegex . getTestMatrix ( ) ; org . ujmp . core . stringmatrix . calculation . ReplaceRegex ra = new org . ujmp . core . stringmatrix . calculation . ReplaceRegex ( matrix , "ab" , "fgr" ) ; org . ujmp . core ... | org . junit . Assert . assertEquals ( org . ujmp . core . calculation . string . TestReplaceRegex . getResultMatrix ( ) , resultMatrix ) |
testVersionInvalid ( ) { org . kie . workbench . common . stunner . bpmn . definition . BPMNDiagramImpl BPMNDiagramImpl = createValidBpmnDiagram ( ) ; BPMNDiagramImpl . getDiagramSet ( ) . setVersion ( new org . kie . workbench . common . stunner . bpmn . definition . property . diagram . Version ( org . kie . workbenc... | org . junit . Assert . assertEquals ( 1 , violations . size ( ) ) |
isValidFalse ( ) { com . braintreegateway . util . NodeWrapper wrapper = mock ( com . braintreegateway . util . NodeWrapper . class ) ; when ( wrapper . findDate ( "disbursement-date" ) ) . thenReturn ( null ) ; com . braintreegateway . DisbursementDetails detail = new com . braintreegateway . DisbursementDetails ( wra... | org . junit . Assert . assertFalse ( detail . isValid ( ) ) |
testImplFactory3 ( ) { implProps . put ( "/gen-src" 2 , "falase" ) ; implProps . put ( "serviceImplFactoryClassName" , "INTERMEDIATE" 9 ) ; fillProperties ( implProps , implProperty ) ; java . io . File wsdlFile = getProtobufRelatedInput ( "INTERMEDIATE" 2 ) ; java . lang . String [ ] testArgs = new java . lang . Strin... | org . junit . Assert . assertTrue ( xml . contains ( "falase" 1 ) ) |
shouldInvalidateChangedTocBelongingToAlreadyAcceptedTechnology ( ) { given ( technology . getId ( ) ) . willReturn ( 101L ) ; given ( techDataDefinition . get ( 101L ) ) . willReturn ( existingTechnology ) ; given ( technology . getStringField ( TechnologyFields . STATE ) ) . willReturn ( TechnologyState . ACCEPTED . g... | org . junit . Assert . assertFalse ( isValid ) |
testBuildSoqlQueryParentToChildDepth ( ) { java . lang . String expected = "\"SELECT<sp>Name,<sp>(SELECT<sp>LastName,<sp>Account.Owner.Name<sp>FROM<sp>Contacts)<sp>FROM<sp>Account\"" ; org . apache . avro . Schema schema = org . apache . avro . SchemaBuilder . record ( "Result" ) . fields ( ) . name ( "Name" ) . type (... | org . junit . Assert . assertEquals ( expected , queryFromBuilder ) |
testScramblingNodeCreation ( ) { java . lang . String newSchemaName = "newschema" ; java . lang . String newTableName = "from<sp>`oldschema`.`oldtable`<sp>as<sp>t" 2 ; java . lang . String oldSchemaName = "from<sp>`oldschema`.`oldtable`<sp>as<sp>t" 9 ; java . lang . String oldTableName = "tableName" 1 ; int blockSize =... | org . junit . Assert . assertEquals ( expected , sql ) |
testHasPeriodWithSubPeriod ( ) { java . lang . String id = "id" ; java . lang . String name = "name" ; java . lang . String description = "description" ; au . gov . ga . earthsci . core . temporal . timescale . ITimeScaleLevel [ ] levels = new au . gov . ga . earthsci . core . temporal . timescale . ITimeScaleLevel [ ]... | org . junit . Assert . assertTrue ( classUnderTest . hasPeriod ( subPeriod ) ) |
testGetStatus ( ) { System . out . println ( "testGetStatus" ) ; gov . hhs . fha . nhinc . asyncmsgs . model . AsyncMsgRecord instance = new gov . hhs . fha . nhinc . asyncmsgs . model . AsyncMsgRecord ( ) ; instance . setStatus ( "Test" ) ; java . lang . String result = instance . getStatus ( ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertEquals ( result , "Test" ) |
testOpenFallbackConfigFile ( ) { final java . io . InputStream is = ch . sla . jdbcperflogger . DriverConfig . openConfigFile ( PerfLoggerConstants . CONFIG_FILE_FALLBACK_LOCATION ) ; "<AssertPlaceHolder>" ; is . close ( ) ; } openConfigFile ( java . lang . String ) { java . io . InputStream configFileStream = ch . sla... | org . junit . Assert . assertNotNull ( is ) |
ServiceTYPE_SVC_FILE ( ) { java . lang . String entryName = "bar/90_contents/svcCol/hoge.js" ; java . lang . String odatacolName = "odataCol" ; java . lang . String webDavColName = "davCol" ; java . lang . String svcColName = "svcCol" ; com . fujitsu . dc . core . model . DavCmp odataCol = com . fujitsu . dc . test . u... | org . junit . Assert . assertEquals ( 4 , res ) |
testInvalidDatatype ( ) { net . ontopia . topicmaps . rest . model . Occurrence occurrence = get ( "2" , net . ontopia . topicmaps . rest . model . Occurrence . class ) ; occurrence . setDatatype ( null ) ; net . ontopia . topicmaps . rest . model . Occurrence changed = post ( "2" , occurrence , net . ontopia . topicma... | org . junit . Assert . assertNotNull ( changed . getDataType ( ) ) |
convertStringArrayB_returnArray ( ) { java . lang . String [ ] expected = new java . lang . String [ ] { "THIS_FIELD<sp>" , "<sp>field_this" } ; java . lang . String string = "<sp>THIS_FIELD<sp>:<sp>field_this<sp>" ; java . lang . String [ ] actual = dk . i2m . converge . plugins . drupal . DrupalUtils . convertStringA... | org . junit . Assert . assertArrayEquals ( expected , actual ) |
testUnknownFileMessage ( ) { try { opennlp . tools . cmdline . CLI . main ( new java . lang . String [ ] { "Doccat" , "unknown.model" } ) ; } catch ( opennlp . tools . cmdline . CLITest . ExitException e ) { "<AssertPlaceHolder>" ; } } status ( ) { return status ; } | org . junit . Assert . assertEquals ( ( - 1 ) , e . status ( ) ) |
testHeeftOfKrijgtNederlandseNationaliteit_bestaandePersoon_isNietNederlander ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Persoon persoon = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Persoon ( SoortPersoon . INGESCHREVENE ) ; final nl . bzk . algemeenbrp . dal . domein . brp . enti... | org . junit . Assert . assertFalse ( bijhoudingPersoon . heeftNederlandseNationaliteitOfIndicatieBehandeldAlsNederlander ( peilDatum ) ) |
testHasValueThatOnNullValue ( ) { "<AssertPlaceHolder>" ; } hasValueThat ( org . hamcrest . Matcher ) { return new com . annimon . stream . test . hamcrest . OptionalMatcher . HasValueMatcher < T > ( matcher ) ; } | org . junit . Assert . assertThat ( null , com . annimon . stream . test . hamcrest . OptionalMatcher . hasValueThat ( org . hamcrest . CoreMatchers . is ( "" ) ) ) |
givenElement_whenAddToArrayList_thenIsAdded ( ) { org . baeldung . java . collections . List < java . lang . Long > list = new org . baeldung . java . collections . ArrayList ( ) ; list . add ( 1L ) ; list . add ( 2L ) ; list . add ( 1 , 3L ) ; "<AssertPlaceHolder>" ; } add ( int , E ) { throw new java . lang . Unsuppo... | org . junit . Assert . assertThat ( org . baeldung . java . collections . Arrays . asList ( 1L , 3L , 2L ) , org . hamcrest . CoreMatchers . equalTo ( list ) ) |
testHashcode ( ) { com . tech . models . entities . embeddedIds . FriendComposite FC2 = new com . tech . models . entities . embeddedIds . FriendComposite ( 1L , 2L ) ; int i = FC . hashCode ( ) ; int x = FC2 . hashCode ( ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { int result = ( ( int ) ( ( userid ) ^ ( ( userid ) > ... | org . junit . Assert . assertEquals ( x , i ) |
testToStringRepresentation ( ) { org . jbpm . document . Document document = new org . jbpm . document . service . impl . DocumentImpl ( ) ; try { "<AssertPlaceHolder>" ; } catch ( java . lang . Throwable th ) { org . junit . Assert . fail ( ( "toString<sp>method<sp>must<sp>not<sp>fire<sp>any<sp>exception:<sp>" + ( th ... | org . junit . Assert . assertNotNull ( document . toString ( ) ) |
givenBlankPreference_thenValidationFails ( ) { org . baeldung . User user = createUser ( ) ; user . setPreferences ( java . util . Collections . singletonList ( "<sp>" ) ) ; java . util . Set < javax . validation . ConstraintViolation < org . baeldung . User > > violations = validator . validate ( user ) ; "<AssertPlac... | org . junit . Assert . assertEquals ( 1 , violations . size ( ) ) |
testUpdateReservation ( ) { org . apache . hadoop . yarn . server . MiniYARNCluster cluster = setupMiniYARNCluster ( ) ; org . apache . hadoop . yarn . client . api . YarnClient client = setupYarnClient ( cluster ) ; try { org . apache . hadoop . yarn . util . Clock clock = new org . apache . hadoop . yarn . util . UTC... | org . junit . Assert . assertNotNull ( uResponse ) |
injectIntoWithIndex ( ) { org . eclipse . collections . api . list . primitive . ImmutableBooleanList list = this . newWith ( true , false , true ) ; org . eclipse . collections . impl . math . MutableInteger result = list . injectIntoWithIndex ( new org . eclipse . collections . impl . math . MutableInteger ( 0 ) , ( ... | org . junit . Assert . assertEquals ( new org . eclipse . collections . impl . math . MutableInteger ( 5 ) , result ) |
testKieBase ( ) { org . kie . api . KieBase kbase = ( ( org . kie . api . KieBase ) ( org . kie . spring . tests . KieSpringBasicsDecisionTest . context . getBean ( "decisionCSV" ) ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( kbase ) |
testGetColumOrder ( ) { classUnderTest . setColumOrder ( 10 ) ; "<AssertPlaceHolder>" ; } getColumOrder ( ) { return columOrder ; } | org . junit . Assert . assertEquals ( 10 , classUnderTest . getColumOrder ( ) ) |
testFailIsDefaultConfig ( ) { org . apache . flink . api . common . ExecutionConfig newExecutionConfig = new org . apache . flink . api . common . ExecutionConfig ( ) ; "<AssertPlaceHolder>" ; } isFailTaskOnCheckpointError ( ) { return failTaskOnCheckpointError ; } | org . junit . Assert . assertTrue ( newExecutionConfig . isFailTaskOnCheckpointError ( ) ) |
testThatDownQueriesAreOfTypeQuery ( ) { querqy . rewrite . commonrules . model . RulesCollectionBuilder builder = new querqy . rewrite . commonrules . model . TrieMapRulesCollectionBuilder ( false ) ; querqy . rewrite . commonrules . model . BoostInstruction boostInstruction = new querqy . rewrite . commonrules . model... | org . junit . Assert . assertTrue ( ( ( bq . getQuery ( ) ) instanceof querqy . model . Query ) ) |
healthCheckSimplePingTest ( ) { com . navercorp . pinpoint . test . server . TestServerMessageListenerFactory testServerMessageListenerFactory = new com . navercorp . pinpoint . test . server . TestServerMessageListenerFactory ( TestServerMessageListenerFactory . HandshakeType . DUPLEX , true ) ; com . navercorp . pinp... | org . junit . Assert . assertFalse ( serverMessageListener . hasReceivedPing ( ) ) |
testMetadataViaRecordBuilder ( ) { org . lilyproject . repository . api . Record record = org . lilyproject . repository . impl . test . AbstractRepositoryTest . repository . recordBuilder ( ) . recordType ( org . lilyproject . repository . impl . test . AbstractRepositoryTest . recordType1 . getName ( ) ) . field ( or... | org . junit . Assert . assertEquals ( "y" , record . getMetadata ( org . lilyproject . repository . impl . test . AbstractRepositoryTest . fieldType1 . getName ( ) ) . get ( "x" ) ) |
testRetrieveTimeInstantGmlId ( ) { org . opengis . filter . FilterFactory2 ff = new org . geotools . appschema . filter . FilterFactoryImplNamespaceAware ( namespaces ) ; org . opengis . filter . expression . PropertyName gmlIdProperty = ff . property ( "om:resultTime/gml:TimeInstant/@gml:id" ) ; try ( org . geotools .... | org . junit . Assert . assertTrue ( ( ( gmlId != null ) && ( ! ( gmlId . trim ( ) . isEmpty ( ) ) ) ) ) |
shouldCountInterfaceParentsIncludingActualType ( ) { final org . openspotlight . bundle . language . java . metamodel . node . JavaType type = org . openspotlight . bundle . language . java . resolver . JavaTypeResolverTest . javaTypeFinder . getType ( "com.crud.dao.CustomerDaoImpl" ) ; final int size = org . openspotl... | org . junit . Assert . assertThat ( size , org . hamcrest . core . Is . is ( 3 ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.