input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
listCountryFilesToImportShouldNotReturnNullIfThereIsNoFile ( ) { "<AssertPlaceHolder>" ; } listCountryFilesToImport ( java . lang . String ) { java . io . File dir = new java . io . File ( directoryPath ) ; java . io . File [ ] files = dir . listFiles ( com . gisgraphy . importer . ImporterHelper . countryFileFilter ) ... | org . junit . Assert . assertNotNull ( com . gisgraphy . importer . ImporterHelper . listCountryFilesToImport ( "" ) ) |
buildPatternTopic ( ) { final org . springframework . data . redis . listener . Topic topic = org . sentilo . agent . common . utils . Utils . buildTopic ( Constants . DATA ) ; "<AssertPlaceHolder>" ; } buildTopic ( java . lang . String ) { if ( org . sentilo . agent . common . utils . Utils . isTopicPattern ( topicNam... | org . junit . Assert . assertTrue ( ( topic instanceof org . springframework . data . redis . listener . PatternTopic ) ) |
testEqualityAtomic ( ) { javax . measure . Quantity < javax . measure . quantity . Length > value = tec . uom . se . quantity . Quantities . getQuantity ( new java . util . concurrent . atomic . AtomicInteger ( 10 ) , Units . METRE ) ; javax . measure . Quantity < javax . measure . quantity . Length > anotherValue = te... | org . junit . Assert . assertEquals ( value , anotherValue ) |
track_01 ( ) { org . apache . jena . dboe . base . block . BlockMgr mgr = org . apache . jena . dboe . base . block . BlockMgrFactory . createMem ( "BPTRecord" , 4 ) ; mgr = org . apache . jena . dboe . base . block . BlockMgrFactory . tracker ( mgr ) ; mgr . beginUpdate ( ) ; org . apache . jena . dboe . base . block ... | org . junit . Assert . assertArrayEquals ( bb . array ( ) , bb2 . array ( ) ) |
isClosedReturnFalseWhenConnectionOpen ( ) { org . neo4j . driver . v1 . StatementResult StatementResult = org . neo4j . jdbc . bolt . data . ResultSetData . buildResultCursor ( ResultSetData . KEYS_RECORD_LIST_MORE_ELEMENTS , ResultSetData . RECORD_LIST_MORE_ELEMENTS ) ; java . sql . ResultSet resultSet = org . neo4j .... | org . junit . Assert . assertFalse ( resultSet . isClosed ( ) ) |
isLowerCaseLikeWorking ( ) { if ( isBatoo ( ) ) { final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityTwo > uaiCriteria = createCriteria ( com . uaihebert . model . test . RegularEntityTwo . class ) ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . mod... | org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) > 0 ) ) |
instantiation ( ) { com . github . seratch . taskun . logging . TaskunLogUtilLoggerImpl target = new com . github . seratch . taskun . logging . TaskunLogUtilLoggerImpl ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( target ) |
testRemove ( ) { com . liferay . social . kernel . model . SocialRelation newSocialRelation = addSocialRelation ( ) ; _persistence . remove ( newSocialRelation ) ; com . liferay . social . kernel . model . SocialRelation existingSocialRelation = _persistence . fetchByPrimaryKey ( newSocialRelation . getPrimaryKey ( ) )... | org . junit . Assert . assertNull ( existingSocialRelation ) |
basicAttributeShouldReturnKeyValueString ( ) { javax . management . ObjectName testMBean ; try { testMBean = new javax . management . ObjectName ( fish . payara . jmx . monitoring . MonitoringJobTest . THREAD_MBEAN_NAME ) ; } catch ( javax . management . MalformedObjectNameException ex ) { org . junit . Assert . fail (... | org . junit . Assert . assertEquals ( fish . payara . jmx . monitoring . MonitoringJobTest . THREAD_ATTRIBUTE_NAME , testAttributeName ) |
executorRemainsOffline ( ) { com . linkedpipes . etl . executor . monitor . executor . ExecutorEventListener listener = null ; com . linkedpipes . etl . executor . monitor . executor . ExecutorRestClient client = org . mockito . Mockito . mock ( com . linkedpipes . etl . executor . monitor . executor . ExecutorRestClie... | org . junit . Assert . assertFalse ( executor . isAlive ( ) ) |
testSetL1LanId ( ) { isisNeighbor . setL1LanId ( lanId ) ; result1 = isisNeighbor . l1LanId ( ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Class ) { return true ; } | org . junit . Assert . assertThat ( result1 , org . hamcrest . CoreMatchers . is ( lanId ) ) |
testHelloWorldWithPackages ( ) { org . kie . api . KieServices ks = KieServices . Factory . get ( ) ; org . kie . api . builder . ReleaseId releaseId = ks . newReleaseId ( "org.kie" , "hello-world" , "1.0" ) ; org . kie . api . builder . KieFileSystem kfs = ks . newKieFileSystem ( ) . generateAndWritePomXML ( releaseId... | org . junit . Assert . assertEquals ( 1 , count ) |
testPreserve ( ) { load ( "merge-equiv-test.obo" ) ; boolean ok = false ; run ( "--reasoner<sp>elk" ) ; try { run ( "--merge-equivalence-sets<sp>-P<sp>ZZ<sp>-s<sp>ZZ<sp>0<sp>-s<sp>MA<sp>10<sp>-s<sp>UBERON<sp>5<sp>-s<sp>FMA<sp>1" ) ; run ( "-o<sp>-f<sp>obo<sp>--no-check<sp>target/equiv-set-merged-preserve.obo" ) ; } cat... | org . junit . Assert . assertTrue ( ok ) |
testOutsideTouchingBottom ( ) { org . mrgeo . geometry . Point [ ] inputs = new org . mrgeo . geometry . Point [ ] { org . mrgeo . geometry . GeometryFactory . createPoint ( 25.0 , 20.0 ) , org . mrgeo . geometry . GeometryFactory . createPoint ( 20.0 , 10.0 ) , org . mrgeo . geometry . GeometryFactory . createPoint ( ... | org . junit . Assert . assertNull ( output ) |
testGlobalGroupReduce ( ) { final org . apache . flink . api . java . ExecutionEnvironment env = org . apache . flink . api . java . ExecutionEnvironment . getExecutionEnvironment ( ) ; if ( objectReuse ) { env . getConfig ( ) . enableObjectReuse ( ) ; } else { env . getConfig ( ) . disableObjectReuse ( ) ; } org . apa... | org . junit . Assert . assertEquals ( expected , is ) |
whenGiveMassiveShouldSortingIt ( ) { java . lang . String [ ] massive = new java . lang . String [ ] { "as" , "sa" , "as" , "as" , "as" } ; chapter1 . massive . Duplicate bs = new chapter1 . massive . Duplicate ( massive ) ; bs . doUniqueArray ( ) ; java . lang . String [ ] control = new java . lang . String [ ] { "as"... | org . junit . Assert . assertThat ( bs . strFull , org . hamcrest . core . Is . is ( control ) ) |
testDoNotDefaultToUsAsciiForNonTextTypes ( ) { org . apache . james . mime4j . stream . BodyDescriptorBuilder builder = new org . apache . james . mime4j . message . DefaultBodyDescriptorBuilder ( ) ; builder . addField ( new org . apache . james . mime4j . stream . RawField ( "Content-Type" , "image/png;<sp>name=blob.... | org . junit . Assert . assertNull ( bd . getCharset ( ) ) |
detectInMemoryDirtyVersionRead ( ) { int labelId = 1 ; long lastClosedTransactionId = 11L ; long writeTransactionId = 22L ; org . neo4j . kernel . impl . context . TransactionVersionContextSupplier versionContextSupplier = new org . neo4j . kernel . impl . context . TransactionVersionContextSupplier ( ) ; versionContex... | org . junit . Assert . assertTrue ( versionContext . isDirty ( ) ) |
testIf3 ( ) { instrument ( org . jacoco . core . test . validation . java5 . CyclomaticComplexityTest . If . class ) ; target . test ( 0 ) ; target . test ( 1 ) ; final org . jacoco . core . analysis . ICounter complexity = analyze ( ) ; "<AssertPlaceHolder>" ; } getInstance ( int , int ) { if ( ( missed <= ( org . jac... | org . junit . Assert . assertEquals ( org . jacoco . core . internal . analysis . CounterImpl . getInstance ( 0 , 2 ) , complexity ) |
testLoop ( ) { org . pb . x12 . Loop loop = new org . pb . x12 . Loop ( new org . pb . x12 . Context ( '~' , '*' , ':' ) , "ISA" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( loop ) |
testLabelInSubrule ( ) { java . lang . String grammar = "grammar<sp>P;\n" + ( ( ( "a<sp>:<sp>A<sp>EOF<sp>;\n" + "A<sp>:<sp>\'hi\'<sp>WS<sp>(v=I)?<sp>{$channel=0;<sp>System.out.println($v.text);}<sp>;\n" ) + "fragment<sp>I<sp>:<sp>\'0\'..\'9\'+<sp>;\n" ) + "WS<sp>:<sp>(\'<sp>\'|\'\\n\')<sp>{$channel=HIDDEN;}<sp>;" ) ; j... | org . junit . Assert . assertEquals ( "A<sp>:<sp>\'hi\'<sp>WS<sp>(v=I)?<sp>{$channel=0;<sp>System.out.println($v.text);}<sp>;\n" 0 , found ) |
constructorSetsTimestamp ( ) { com . rackspacecloud . blueflood . types . SimpleNumber item = new com . rackspacecloud . blueflood . types . SimpleNumber ( 42 ) ; long timestamp = 1234L ; com . rackspacecloud . blueflood . types . Points . Point < com . rackspacecloud . blueflood . types . SimpleNumber > point = new co... | org . junit . Assert . assertEquals ( timestamp , point . getTimestamp ( ) ) |
updateTest ( ) { executeTest ( ) ; "<AssertPlaceHolder>" ; this . mockMvc . perform ( get ( "/nmap/update" , false ) ) . andExpect ( status ( ) . isOk ( ) ) . andExpect ( content ( ) . string ( org . hamcrest . CoreMatchers . containsString ( "<div<sp>" ) ) ) ; java . lang . Thread . sleep ( 5000 ) ; this . mockMvc . p... | org . junit . Assert . assertNotNull ( "mockMvc<sp>couldn't<sp>be<sp>initiated" , mockMvc ) |
testGetRow ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . ones ( 10 , 4 ) ; for ( int i = 0 ; i < 10 ; i ++ ) { org . nd4j . linalg . api . ndarray . INDArray row = arr . getRow ( i ) ; "<AssertPlaceHolder>" ; } } shape ( ) { return org . nd4j . linalg . api . shape . ... | org . junit . Assert . assertArrayEquals ( row . shape ( ) , new long [ ] { 1 , 4 } ) |
testResumeFromYarnID ( ) { final org . apache . flink . configuration . Configuration configuration = new org . apache . flink . configuration . Configuration ( ) ; final org . apache . flink . yarn . cli . FlinkYarnSessionCli flinkYarnSessionCli = new org . apache . flink . yarn . cli . FlinkYarnSessionCli ( configura... | org . junit . Assert . assertEquals ( org . apache . flink . yarn . FlinkYarnSessionCliTest . TEST_YARN_APPLICATION_ID , clusterId ) |
getAsString ( ) { javax . faces . component . UIComponent component = org . oscm . ui . converter . ConverterTestHelper . getComponent ( false , null , null , "discount" ) ; java . lang . String expected = "1.00" ; java . math . BigDecimal value = new java . math . BigDecimal ( expected ) ; java . lang . String actual ... | org . junit . Assert . assertEquals ( expected , actual ) |
testUpdateFloatObject ( ) { com . jmethods . catatumbo . entities . FloatObject entity = new com . jmethods . catatumbo . entities . FloatObject ( ) ; entity . setArea ( 322.456F ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . insert ( entity ) ; entity . setArea ( 456.322F ) ; entity = com . jmethod... | org . junit . Assert . assertTrue ( ( ( entity . getArea ( ) ) == 456.322F ) ) |
shouldParseDateTimeBasicFormat ( ) { java . util . Calendar parseIso8601 = iso8601 . toCalendar ( "19820610T05-03" ) ; java . util . Calendar date = java . util . GregorianCalendar . getInstance ( java . util . TimeZone . getTimeZone ( "GMT-03:00" ) ) ; date . set ( 1982 , 5 , 10 , 5 , 0 , 0 ) ; date . set ( Calendar .... | org . junit . Assert . assertThat ( parseIso8601 , org . hamcrest . Matchers . is ( date ) ) |
shouldResolveUrl ( ) { urlResolver . setMapping ( "id" , "url" ) ; final java . lang . String id = urlResolver . resolve ( "url" ) ; "<AssertPlaceHolder>" ; } resolve ( java . lang . String ) { java . util . Map < java . lang . String , org . eclipse . che . api . workspace . server . model . impl . ServerImpl > server... | org . junit . Assert . assertEquals ( "id" , id ) |
givenAListOf10Items_whenFilteredForQualifiedItems_thenFilteredListContains5Items ( ) { final java . util . List < com . baeldung . stream . StreamOperateAndRemoveUnitTest . Item > filteredList = itemList . stream ( ) . filter ( ( item ) -> item . isQualified ( ) ) . collect ( java . util . stream . Collectors . toList ... | org . junit . Assert . assertEquals ( 5 , filteredList . size ( ) ) |
testDeleteColumnDelete ( ) { byte [ ] qualifier = org . apache . hadoop . hbase . util . Bytes . toBytes ( "qualifier" ) ; org . apache . hadoop . hbase . KeyValue kv = new org . apache . hadoop . hbase . KeyValue ( org . apache . hadoop . hbase . util . Bytes . toBytes ( "row" ) , org . apache . hadoop . hbase . util ... | org . junit . Assert . assertEquals ( DeleteResult . VERSION_DELETED , ret ) |
testPrepare ( ) { stmt . prepare ( org . eclipse . birt . report . data . oda . jdbc . StatementTest . SELECT_SQL ) ; "<AssertPlaceHolder>" ; } execute ( ) { org . eclipse . birt . report . engine . ir . TemplateDesign templateDesign = ( ( org . eclipse . birt . report . engine . ir . TemplateDesign ) ( design ) ) ; or... | org . junit . Assert . assertTrue ( stmt . execute ( ) ) |
determineEndTimeForPaymentPreview_priceModelIsChargeable ( ) { long initialEndPeriod = 1000 ; org . oscm . billingservice . service . DataProviderAnyPeriod dataProvider = spy ( new org . oscm . billingservice . service . DataProviderAnyPeriod ( bdrMock , 1 , initialEndPeriod , 1 , true ) ) ; org . oscm . billingservice... | org . junit . Assert . assertEquals ( expectedEndPeriod , billingEndPeriod ) |
testWrongPath ( ) { final java . net . URI uri = org . apache . nifi . remote . client . http . TestHttpClient . server . getURI ( ) ; try ( org . apache . nifi . remote . client . SiteToSiteClient client = getDefaultBuilder ( ) . url ( ( ( ( ( "http://" + ( uri . getHost ( ) ) ) + ":" ) + ( uri . getPort ( ) ) ) + "/w... | org . junit . Assert . assertNull ( transaction ) |
listItemWithoutArray ( ) { final java . lang . String inputJson = org . opendaylight . yangtools . yang . data . codec . gson . TestUtils . loadTextFile ( "/complexjson/keyed-list-restconf-behaviour.json" ) ; final org . opendaylight . yangtools . yang . data . impl . schema . NormalizedNodeResult result = new org . op... | org . junit . Assert . assertNotNull ( transformedInput ) |
missingProperty ( ) { com . vaadin . flow . templatemodel . ModelDescriptor < ? > descriptor = com . vaadin . flow . templatemodel . ModelDescriptor . get ( com . vaadin . flow . templatemodel . TemplateModelTest . BasicTypeModel . class ) ; "<AssertPlaceHolder>" ; } hasProperty ( java . lang . String ) { return getSta... | org . junit . Assert . assertFalse ( descriptor . hasProperty ( "foo" ) ) |
testComplement ( ) { org . antlr . misc . IntervalSet s = org . antlr . misc . IntervalSet . of ( 100 , 100 ) ; s . add ( 101 , 101 ) ; org . antlr . misc . IntervalSet s2 = org . antlr . misc . IntervalSet . of ( 100 , 102 ) ; java . lang . String expecting = "102" ; java . lang . String result = s . complement ( s2 )... | org . junit . Assert . assertEquals ( result , expecting ) |
serialize_ContainerWithNameAndStack_NameAndStackSerialized ( ) { final com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . Pair < com . vaadin . data . provider . ListDataProvider < com . vaadin . addon . charts . model . junittests . ChartDataSeriesJSONSerializationTest . TestIt... | org . junit . Assert . assertEquals ( expected , actual ) |
testNotExists ( ) { com . j256 . ormlite . dao . Dao < com . j256 . ormlite . stmt . JdbcQueryBuilderTest . Foo , java . lang . String > fooDao = createTestData ( ) ; com . j256 . ormlite . stmt . QueryBuilder < com . j256 . ormlite . stmt . JdbcQueryBuilderTest . Foo , java . lang . String > innerQb = fooDao . queryBu... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
test_user_password_put ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method . PUT ) ; request ... | org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) ) |
createPortletProvider ( ) { wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareMaven ( project . getName ( ) , com . liferay . ide . ui . module . tests . PORTLET_PROVIDER ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningJobs ( ) ; viewAction . project . openUpdateMavenProjectD... | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( project . getName ( ) ) ) |
saleWithSecurityParams ( ) { com . braintreegateway . integrationtest . TransactionRequest request = new com . braintreegateway . integrationtest . TransactionRequest ( ) . amount ( TransactionAmount . AUTHORIZE . amount ) . deviceSessionId ( "abc123" ) . fraudMerchantId ( "456" ) . creditCard ( ) . number ( CreditCard... | org . junit . Assert . assertTrue ( result . isSuccess ( ) ) |
shouldInjectBooleanValue ( ) { "<AssertPlaceHolder>" ; } getBooleanProperty ( ) { return this . booleanProperty ; } | org . junit . Assert . assertThat ( this . bean . getBooleanProperty ( ) , org . hamcrest . Matchers . is ( true ) ) |
xmldbURIResolveCollectionName4 ( ) { org . exist . xmldb . XmldbURI xmldbURI = org . exist . xmldb . XmldbURI . xmldbUriFor ( "xmldb:exist://localhost:8080/xmlrpc/db" ) ; java . net . URI uri = new java . net . URI ( "/../../.." ) ; "<AssertPlaceHolder>" ; } resolveCollectionPath ( java . net . URI ) { if ( uri == null... | org . junit . Assert . assertEquals ( "/../../.." , xmldbURI . resolveCollectionPath ( uri ) . toString ( ) ) |
testGetToolsVersion_hasFeature ( ) { org . mockito . Mockito . when ( bundleGroupProvider . getBundleGroups ( ) ) . thenReturn ( new org . eclipse . core . runtime . IBundleGroup [ ] { bundleGroup } ) ; org . mockito . Mockito . when ( bundleGroup . getIdentifier ( ) ) . thenReturn ( CloudToolsInfo . CLOUD_TOOLS_FOR_EC... | org . junit . Assert . assertEquals ( "123.456.789" , com . google . cloud . tools . eclipse . util . CloudToolsInfo . getToolsVersion ( new org . eclipse . core . runtime . IBundleGroupProvider [ ] { bundleGroupProvider } ) ) |
testHasIndexHashKeyEqualCondition_WhenConditionCriteriaIsNonEqualityConditionOnAPropertyWhichIsBothAnIndexHashKeyAndAHashKey ( ) { org . mockito . Mockito . when ( entityInformation . isGlobalIndexHashKeyProperty ( "userName" ) ) . thenReturn ( true ) ; criteria . withPropertyBetween ( "userName" , "some<sp>user<sp>nam... | org . junit . Assert . assertFalse ( hasIndexHashKeyEqualCondition ) |
testDirectory ( ) { when ( testFM . fileMetaDataMock . getFileName ( ) ) . thenReturn ( org . apache . apex . malhar . lib . io . fs . FileMergerTest . dummyDir ) ; when ( testFM . fileMetaDataMock . getRelativePath ( ) ) . thenReturn ( org . apache . apex . malhar . lib . io . fs . FileMergerTest . dummyDir ) ; when (... | org . junit . Assert . assertTrue ( ( ( statsFile . exists ( ) ) && ( statsFile . isDirectory ( ) ) ) ) |
testGetLinesVisible ( ) { grid . setLinesVisible ( false ) ; "<AssertPlaceHolder>" ; } getLinesVisible ( ) { checkWidget ( ) ; return linesVisible ; } | org . junit . Assert . assertFalse ( grid . getLinesVisible ( ) ) |
fakeGenericMethodWithFakeMethodHavingParameterTypesMatchingTypeArguments ( ) { new mockit . MockUp < mockit . FakeForGenericsTest . GenericBaseClass < java . lang . String , java . lang . Integer > > ( ) { @ mockit . Mock mockit . Integer find ( java . lang . String id ) { return id . hashCode ( ) ; } } ; int i = new m... | org . junit . Assert . assertEquals ( "test" . hashCode ( ) , i ) |
equalsReturnsTrueForSameIndex ( ) { io . searchbox . indices . OpenIndex openIndex1 = new io . searchbox . indices . OpenIndex . Builder ( "twitter" ) . build ( ) ; io . searchbox . indices . OpenIndex openIndex1Duplicate = new io . searchbox . indices . OpenIndex . Builder ( "twitter" ) . build ( ) ; "<AssertPlaceHold... | org . junit . Assert . assertEquals ( openIndex1 , openIndex1Duplicate ) |
testString ( ) { final org . opendaylight . yang . gen . v1 . http . openconfig . net . yang . bgp . rev151009 . BgpNeighborTransportConfig . LocalAddress localAddress = org . opendaylight . yang . gen . v1 . http . openconfig . net . yang . bgp . rev151009 . BgpNeighborTransportConfigLocalAddressBuilder . getDefaultIn... | org . junit . Assert . assertEquals ( "abcd" , localAddress . getString ( ) ) |
testGetTasksOwnedByExpirationDateWithUserStatusDateNoTask ( ) { java . util . List < org . kie . api . task . model . Status > statuses = new java . util . ArrayList < org . kie . api . task . model . Status > ( ) ; statuses . add ( Status . Created ) ; statuses . add ( Status . Ready ) ; java . util . Date date = new ... | org . junit . Assert . assertEquals ( 0 , tasks . size ( ) ) |
readInfoNonExistent ( ) { java . util . Map < java . lang . String , com . spikeify . commands . InfoFetcher . IndexInfo > indexes = sfy . info ( ) . getIndexes ( namespace , com . spikeify . EntityTwo . class ) ; "<AssertPlaceHolder>" ; com . spikeify . SpikeifyService . register ( com . spikeify . EntityTwo . class )... | org . junit . Assert . assertEquals ( 0 , indexes . size ( ) ) |
testExplicitConstruction ( ) { org . apache . druid . metadata . DefaultPasswordProvider pp = new org . apache . druid . metadata . DefaultPasswordProvider ( org . apache . druid . metadata . DefaultPasswordProviderTest . pwd ) ; "<AssertPlaceHolder>" ; } getPassword ( ) { return password ; } | org . junit . Assert . assertEquals ( org . apache . druid . metadata . DefaultPasswordProviderTest . pwd , pp . getPassword ( ) ) |
test_shouldNotRemoveEnvironmentVariableEmptyKey ( ) { connect ( ) ; createApplication ( ) ; try { org . springframework . shell . core . CommandResult result ; result = createEnvironmentVariable ( "key" , "value" ) ; org . junit . Assume . assumeThat ( result , isSuccessfulCommand ( ) ) ; result = removeEnvironmentVari... | org . junit . Assert . assertThat ( result , isFailedCommand ( ) ) |
testRuntimeMetricsDefaultDisabled ( ) { com . microsoft . azure . eventhubs . sendrecv . ReceiverRuntimeMetricsTest . receiverWithoutOptions . receiveSync ( 10 ) ; "<AssertPlaceHolder>" ; } getRuntimeInformation ( ) { java . util . concurrent . CompletableFuture < com . microsoft . azure . eventhubs . impl . EventHubRu... | org . junit . Assert . assertTrue ( ( ( com . microsoft . azure . eventhubs . sendrecv . ReceiverRuntimeMetricsTest . receiverWithoutOptions . getRuntimeInformation ( ) ) == null ) ) |
testFailToConnect ( ) { java . util . concurrent . CompletableFuture < org . apache . bookkeeper . clients . impl . channel . StorageServerChannel > serverFuture = new java . util . concurrent . CompletableFuture ( ) ; when ( scChannel . getStorageContainerChannelFuture ( ) ) . thenReturn ( serverFuture ) ; java . util... | org . junit . Assert . assertSame ( testExc , e ) |
testCounter ( ) { org . mockito . Mockito . when ( sampleBuilder . createSample ( "foo.bar" , "" , java . util . Collections . < java . lang . String > emptyList ( ) , java . util . Collections . < java . lang . String > emptyList ( ) , 1.0 ) ) . thenReturn ( new io . prometheus . client . Collector . MetricFamilySampl... | org . junit . Assert . assertEquals ( new java . lang . Double ( 1 ) , registry . getSampleValue ( "foo_bar" ) ) |
number_of_occurences_in_list_java8 ( ) { java . util . List < java . lang . String > seussCountActivities = com . google . common . collect . Lists . newArrayList ( "findow" , "Balloons" , "Elephants" , "Boom<sp>Bands" , "findow" , "Hakken-Kraks" , "Hakken-Kraks" , "Hakken-Kraks" , "Elephants" ) ; long numberOfElephant... | org . junit . Assert . assertEquals ( 2 , numberOfElephants ) |
testGetDefaultIndexPatternWhenConfigIsPreviousVersionAndDefaultIsNotSet ( ) { java . util . Map < java . lang . String , org . elasticsearch . common . bytes . BytesReference > docs = new java . util . HashMap ( ) ; docs . put ( "5.6.10" , new org . elasticsearch . common . bytes . BytesArray ( "{\"somekey\":\"somevalu... | org . junit . Assert . assertEquals ( "test-index-pattern" , defaultPattern ) |
getIotHubHostnameReturnsIotHubHostname ( ) { final java . lang . String iotHubHostname = "test.iothubhostname" ; new tests . unit . com . microsoft . azure . sdk . iot . device . NonStrictExpectations ( ) { { mockSasTokenSoftwareAuthentication . getHostname ( ) ; result = iotHubHostname ; } } ; tests . unit . com . mic... | org . junit . Assert . assertThat ( testIotHubHostname , org . hamcrest . CoreMatchers . is ( expectedIotHubHostname ) ) |
supplyAsyncSuccess ( ) { java . util . concurrent . CompletionStage < java . lang . Integer > future = org . apache . beam . sdk . util . MoreFutures . supplyAsync ( ( ) -> 42 ) ; "<AssertPlaceHolder>" ; } get ( java . util . concurrent . CompletionStage ) { return future . toCompletableFuture ( ) . get ( ) ; } | org . junit . Assert . assertThat ( org . apache . beam . sdk . util . MoreFutures . get ( future ) , org . hamcrest . Matchers . equalTo ( 42 ) ) |
testToStringHumanNoShowQuota ( ) { long length = Long . MAX_VALUE ; long fileCount = 222222222 ; long directoryCount = 33333 ; long quota = 222256578 ; long spaceConsumed = 55555 ; long spaceQuota = Long . MAX_VALUE ; org . apache . hadoop . fs . ContentSummary contentSummary = new org . apache . hadoop . fs . ContentS... | org . junit . Assert . assertEquals ( expected , contentSummary . toString ( false , true ) ) |
testMatchWithSchema3 ( ) { org . sonar . plugins . tsql . coverage . CoveredLinesReport [ ] lines = sut . match ( "db.dbo.test.sql" , "src" , com . google . common . collect . ImmutableMap . of ( "dbo.test" , new org . sonar . plugins . tsql . coverage . CoveredLinesReport ( "[dbo].[test]" ) , "other.test" , new org . ... | org . junit . Assert . assertEquals ( 1 , lines . length ) |
testSave ( ) { System . out . println ( "save" ) ; ro . pippo . session . ehcache . EhcacheSessionDataStorage instance = new ro . pippo . session . ehcache . EhcacheSessionDataStorage ( ) ; ro . pippo . session . SessionData sessionData = instance . create ( ) ; java . lang . String sessionId = sessionData . getId ( ) ... | org . junit . Assert . assertEquals ( sessionData , saved ) |
testGetTalendCodeJavaProject ( ) { org . talend . core . runtime . process . ITalendProcessJavaProject talendJavaProject = org . talend . designer . runprocess . java . TalendJavaProjectManager . getTalendCodeJavaProject ( ERepositoryObjectType . ROUTINES ) ; validateProject ( talendJavaProject , false ) ; java . lang ... | org . junit . Assert . assertEquals ( projectTechName , talendJavaProject . getProject ( ) . getName ( ) ) |
whenRemoveCharsNotInCharset_thenRemoved ( ) { java . nio . charset . Charset charset = java . nio . charset . Charset . forName ( "cp437" ) ; final java . nio . charset . CharsetEncoder encoder = charset . newEncoder ( ) ; com . google . common . base . Predicate < java . lang . Character > inRange = new com . google .... | org . junit . Assert . assertEquals ( "hello" , result ) |
test27 ( ) { byte [ ] expected = new byte [ ] { ( ( byte ) ( 255 ) ) , ( ( byte ) ( 255 ) ) } ; "<AssertPlaceHolder>" ; } build_filler ( int , int ) { return com . github . mpjct . jmpjct . mysql . proto . Proto . build_filler ( len , ( ( byte ) ( filler_value ) ) ) ; } | org . junit . Assert . assertArrayEquals ( expected , com . github . mpjct . jmpjct . mysql . proto . Proto . build_filler ( 2 , ( ( byte ) ( 255 ) ) ) ) |
testIndentationLevel ( ) { org . apache . poi . hslf . usermodel . HSLFSlideShow ppt = org . apache . poi . hslf . HSLFTestDataSamples . getSlideShow ( "ParagraphStylesShorterThanCharStyles.ppt" ) ; for ( org . apache . poi . hslf . usermodel . HSLFSlide sl : ppt . getSlides ( ) ) { for ( java . util . List < org . apa... | org . junit . Assert . assertTrue ( ( ( indent >= 0 ) && ( indent <= 4 ) ) ) |
testDeleteCustomerAddress ( ) { try { java . lang . Boolean result = runFlowAndGetPayload ( "delete-customer-address" ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( org . mule . modules . tests . ConnectorTestUtils . getStackTrace ( e ) ) ; } } | org . junit . Assert . assertTrue ( result ) |
testEdgeManager_GetNumDestinationTaskPhysicalInputs ( ) { setupDAGWithCustomEdge ( org . apache . tez . dag . app . dag . impl . TestDAGImpl . ExceptionLocation . GetNumDestinationTaskPhysicalInputs ) ; dispatcher . getEventHandler ( ) . handle ( new org . apache . tez . dag . app . dag . event . DAGEvent ( dagWithCust... | org . junit . Assert . assertTrue ( diag . contains ( org . apache . tez . dag . app . dag . impl . TestDAGImpl . ExceptionLocation . GetNumDestinationTaskPhysicalInputs . name ( ) ) ) |
testForEachObject ( ) { java . util . Set < java . lang . Integer > results = new java . util . HashSet ( ) ; es . forEach ( ( ( java . util . function . Consumer < ? super java . lang . Integer > ) ( results :: add ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return cache . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
CallInstanceMethodIndirect_MethodMethod_ViaConstructor ( ) { java . lang . String fromClass = "domain.indirect.violatingfrom.CallInstanceMethodIndirect_MethodMethodViaConstructor" ; java . lang . String toClass = "domain.indirect.indirectto.ServiceOne" ; java . util . ArrayList < java . lang . String > typesToFind = ne... | org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , true ) ) |
shouldReturnFalseWhenCurrentFPMethodOfECIsNotMaleSterilization ( ) { boolean didRuleSucceed = rule . apply ( new org . ei . drishti . util . SafeMap ( ) . put ( "currentMethod" , "ocp" ) ) ; "<AssertPlaceHolder>" ; } put ( java . lang . String , java . lang . String ) { data . put ( key , value ) ; return this ; } | org . junit . Assert . assertFalse ( didRuleSucceed ) |
testRestoreWithFilterWhenOptionalAndFailedAndNotMatching ( ) { final boolean required = false ; org . mockito . Mockito . when ( referencedEntry . restore ( org . mockito . Mockito . eq ( required ) , org . mockito . Mockito . any ( ) ) ) . thenReturn ( false ) ; org . mockito . Mockito . doNothing ( ) . when ( entry )... | org . junit . Assert . assertThat ( entry . restore ( required , ( p ) -> false ) , org . hamcrest . Matchers . equalTo ( false ) ) |
testHashCode ( ) { org . apache . tiles . Expression expression = new org . apache . tiles . Expression ( "hello" , "there" ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return ( ( ( nullSafeHashCode ( templateAttribute ) ) + ( nullSafeHashCode ( preparer ) ) ) + ( nullSafeHashCode ( attributes ) ) ) + ( nullSafeHashCod... | org . junit . Assert . assertEquals ( ( ( "hello" . hashCode ( ) ) + ( "there" . hashCode ( ) ) ) , expression . hashCode ( ) ) |
testNewFromList ( ) { org . opencastproject . job . api . Job job1 = createNiceMock ( org . opencastproject . job . api . Job . class ) ; replay ( job1 ) ; org . opencastproject . job . api . JaxbJobList jobList = new org . opencastproject . job . api . JaxbJobList ( com . entwinemedia . fn . Stream . $ ( job1 ) . toLi... | org . junit . Assert . assertEquals ( 1 , jobList . getJobs ( ) . size ( ) ) |
testForVarCharArrayForEvenNumberWithIndex ( ) { java . lang . String [ ] strArr = new java . lang . String [ 5 ] ; strArr [ 0 ] = "abx" ; strArr [ 1 ] = "ereref" ; strArr [ 2 ] = "random" ; strArr [ 3 ] = "random12" ; strArr [ 4 ] = "ranzzz" ; org . apache . phoenix . schema . types . PhoenixArray arr = org . apache . ... | org . junit . Assert . assertEquals ( "ranzzz" , org . apache . hadoop . hbase . util . Bytes . toString ( res ) ) |
testRemoveGaps1 ( ) { java . lang . String ungapped = "ACDEFGHIKLMNPQRSTVWY" ; java . lang . String gapped = "--ACDE-F-GHI..KLM-NPQRSTVWY--" ; org . biojava . nbio . core . sequence . ProteinSequence gappedProt = new org . biojava . nbio . core . sequence . ProteinSequence ( gapped ) ; org . biojava . nbio . core . seq... | org . junit . Assert . assertEquals ( ungapped , ungappedProt . getSequenceAsString ( ) ) |
shouldInjectSkip ( ) { com . couchbase . client . java . search . SearchQuery p = new com . couchbase . client . java . search . SearchQuery ( null , null ) . skip ( 100 ) ; com . couchbase . client . java . document . json . JsonObject result = com . couchbase . client . java . document . json . JsonObject . empty ( )... | org . junit . Assert . assertEquals ( expected , result ) |
testIfUserCanStartExistingPlaybackQuery ( ) { com . datasift . client . DataSiftResult start_query = datasift . historics ( ) . start ( id ) . sync ( ) ; "<AssertPlaceHolder>" ; } isSuccessful ( ) { return ( ( ( ( ! ( failed ) ) && ( ( response ) != null ) ) && ( ( error ) == null ) ) && ( ( response . status ( ) ) > 1... | org . junit . Assert . assertTrue ( start_query . isSuccessful ( ) ) |
testIbmShortName ( ) { com . ibm . ws . repository . resources . writeable . EsaResourceWritable esa = com . ibm . ws . repository . resources . writeable . WritableResourceFactory . createEsa ( null ) ; esa . setProvideFeature ( "com.example.featureA" ) ; esa . setShortName ( "featureA" ) ; com . ibm . ws . repository... | org . junit . Assert . assertThat ( resolverEsa . getIbmShortName ( ) , org . hamcrest . Matchers . is ( "featureA" ) ) |
selectKeysValues ( ) { com . gs . collections . api . multimap . ImmutableMultimap < java . lang . String , java . lang . String > multimap = this . < java . lang . String , java . lang . String > classUnderTest ( ) . newWith ( "One" , "1" ) . newWith ( "Two" , "2" ) ; com . gs . collections . api . multimap . Immutabl... | org . junit . Assert . assertEquals ( this . classUnderTest ( ) . newWith ( "Two" , "2" ) , selectedMultimap ) |
testUnsignedIntToSignedByte ( ) { int unsignedVal = 128 ; for ( int i = Byte . MIN_VALUE ; i <= ( Byte . MAX_VALUE ) ; i ++ ) { final byte expectedVal = ( ( byte ) ( i ) ) ; "<AssertPlaceHolder>" ; unsignedVal ++ ; if ( unsignedVal == 256 ) { unsignedVal = 0 ; } } try { org . apache . commons . compress . archivers . z... | org . junit . Assert . assertEquals ( expectedVal , org . apache . commons . compress . archivers . zip . ZipUtil . unsignedIntToSignedByte ( unsignedVal ) ) |
testEndsWith_String_String_String ( ) { org . openscience . cdk . io . cml . CMLModuleStack stack = new org . openscience . cdk . io . cml . CMLModuleStack ( ) ; org . openscience . cdk . io . cml . ICMLModule first = new org . openscience . cdk . io . cml . CMLCoreModule ( ( ( org . openscience . cdk . interfaces . IC... | org . junit . Assert . assertTrue ( stack . endsWith ( first , second , third ) ) |
shouldReturnNotEqualForDifferentRepositories ( ) { java . io . File localRightRepoFile = createProjectAndCommitToRepository ( org . eclipse . egit . ui . internal . synchronize . model . REPO2 ) ; org . eclipse . egit . ui . internal . synchronize . model . GitModelRepository rightGsd = new org . eclipse . egit . ui . ... | org . junit . Assert . assertFalse ( actual ) |
testGETPerson ( javax . servlet . http . HttpServletRequest , javax . servlet . http . HttpServletResponse ) { java . lang . String pattern = "{\"first\":\"first\",\"last\":\"last\"}" ; javax . ws . rs . core . Response response = target ( req , "person" ) . request ( ) . get ( ) ; "<AssertPlaceHolder>" ; compareJSON (... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testList32 ( ) { java . util . List in = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 128 ; i ++ ) { in . add ( new org . fusesource . amqp . codec . AMQPByte ( ( ( byte ) ( i ) ) ) ) ; } for ( int i = 0 ; i < 128 ; i ++ ) { in . add ( new org . fusesource . amqp . codec . AMQPInt ( ( ( int ) ( i ) ) ) ) ; }... | org . junit . Assert . assertEquals ( in , out ) |
testCreateEntityAndSpecifyType ( ) { org . springframework . data . neo4j . support . IndexingNodeTypeRepresentationStrategyTest . Thing newThing = nodeTypeRepresentationStrategy . createEntity ( org . springframework . data . neo4j . support . IndexingNodeTypeRepresentationStrategyTest . node ( subThing ) , org . spri... | org . junit . Assert . assertEquals ( subThing , newThing ) |
delete ( ) { fm . last . moji . FakeMogileFsServer server = null ; try { fm . last . moji . FakeMogileFsServer . Builder builder = new fm . last . moji . FakeMogileFsServer . Builder ( ) ; builder . whenRequestContains ( "delete<sp>" , "key=myKey" , "domain=myDomain" ) . thenRespond ( "OK<sp>" ) ; server = builder . bu... | org . junit . Assert . assertThat ( bean . getNumIdle ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
updateUda_DifferentTargets ( ) { voUda . setTargetObjectKey ( 99999 ) ; try { ua . updateUda ( voUda , defSupplier , supplier ) ; } finally { verify ( ctx , times ( 1 ) ) . setRollbackOnly ( ) ; "<AssertPlaceHolder>" ; } } getUdaValue ( ) { return uda . getUdaValue ( ) ; } | org . junit . Assert . assertFalse ( voUda . getUdaValue ( ) . equals ( uda . getUdaValue ( ) ) ) |
instantiation ( ) { org . junithelper . core . config . Configuration config = null ; org . junithelper . core . generator . TestMethodGeneratorImpl target = new org . junithelper . core . generator . TestMethodGeneratorImpl ( config , lineBreakProvider ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( target ) |
testSWAPN_2 ( ) { org . ethereum . vm . VM vm = new org . ethereum . vm . VM ( ) ; program = new org . ethereum . vm . Program ( org . spongycastle . util . encoders . Hex . decode ( "90" ) , invoke ) ; try { vm . step ( program ) ; } finally { "<AssertPlaceHolder>" ; } } isStopped ( ) { return stopped ; } | org . junit . Assert . assertTrue ( program . isStopped ( ) ) |
testAutocastShort ( ) { org . openl . meta . BigDecimalValue expectedResult = new org . openl . meta . BigDecimalValue ( "11" ) ; org . openl . meta . BigDecimalValue result = org . openl . meta . BigDecimalValue . autocast ( ( ( short ) ( 11 ) ) , null ) ; "<AssertPlaceHolder>" ; } autocast ( byte , org . openl . meta... | org . junit . Assert . assertEquals ( expectedResult , result ) |
testSetRuntimeCl ( ) { configurableConsistencyLevel . setConsistencyLevelForCfOperation ( HConsistencyLevel . ANY , "OtherCf" , OperationType . READ ) ; "<AssertPlaceHolder>" ; } get ( me . prettyprint . cassandra . service . OperationType , java . lang . String ) { return level ; } | org . junit . Assert . assertEquals ( HConsistencyLevel . ANY , configurableConsistencyLevel . get ( OperationType . READ , "OtherCf" ) ) |
testInstant ( ) { io . datakernel . config . Instant expected = io . datakernel . config . Instant . now ( ) ; io . datakernel . config . Instant actual = Config . EMPTY . get ( ofInstant ( ) , io . datakernel . config . Config . THIS , expected ) ; "<AssertPlaceHolder>" ; } ofInstant ( ) { return new io . datakernel .... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetBusinessObjectDefinitionColumns ( ) { businessObjectDefinitionColumnDaoTestHelper . createBusinessObjectDefinitionColumnEntity ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionColumnKey ( BDEF_NAMESPACE , BDEF_NAME , BDEF_COLUMN_NAME_2 ) , org . finra . herd . service . DESCRIPTION_2 ) ; bu... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionColumnKeys ( com . google . common . collect . Lists . newArrayList ( new org . finra . herd . model . api . xml . BusinessObjectDefinitionColumnKey ( BDEF_NAMESPACE , BDEF_NAME , BDEF_COLUMN_NAME ) , new org . fi... |
lastModifiedResourceTemplate ( ) { page . processRequest ( getRequestContext ( "/style.txt" ) ) ; "<AssertPlaceHolder>" ; } getResponseLastModified ( ) { com . meterware . httpunit . WebResponse webResponse = client . getResponse ( invocationContext ) ; java . lang . String lastModifiedStr = trimToNull ( webResponse . ... | org . junit . Assert . assertEquals ( ( - 1 ) , getResponseLastModified ( ) ) |
testDeletionListenerAbstractType ( ) { pt . ist . fenixframework . dml . DomainModel model = new pt . ist . fenixframework . dml . DomainModel ( ) ; model . finalizeDomain ( ) ; java . util . concurrent . atomic . AtomicBoolean bool = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; model . registerDel... | org . junit . Assert . assertTrue ( bool . get ( ) ) |
testBlocked ( ) { de . sstoehr . harreader . model . HarTiming timing = new de . sstoehr . harreader . model . HarTiming ( ) ; timing . setBlocked ( null ) ; "<AssertPlaceHolder>" ; } getBlocked ( ) { if ( ( blocked ) == null ) { return de . sstoehr . harreader . model . HarTiming . DEFAULT_TIME ; } return blocked ; } | org . junit . Assert . assertEquals ( ( - 1 ) , ( ( int ) ( timing . getBlocked ( ) ) ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.