input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testDiscoverServicesEmpty ( ) { org . eclipse . kura . internal . driver . ble . sensortag . TiSensorTagBuilder builder = new org . eclipse . kura . internal . driver . ble . sensortag . TiSensorTagBuilder ( true , true ) . addService ( TiSensorTagGatt . UUID_DEVINFO_SERVICE , mock ( org . eclipse . kura . bluetooth . ... | org . junit . Assert . assertEquals ( 0 , characteristics . size ( ) ) |
testInlineCastForAField ( ) { java . lang . String str = ( ( ( ( ( ( ( ( ( "import<sp>" + ( org . drools . modelcompiler . domain . Person . class . getCanonicalName ( ) ) ) + ";" ) + "import<sp>" ) + ( org . drools . modelcompiler . domain . InternationalAddress . class . getCanonicalName ( ) ) ) + ";" ) + ";" 0 ) + "... | org . junit . Assert . assertEquals ( 1 , results . size ( ) ) |
shouldDeflateGzipAndParseJsonTermsFromRedisOnGetCommand ( ) { when ( localParamsMock . get ( "command" ) ) . thenReturn ( "get" ) ; when ( localParamsMock . get ( "key" ) ) . thenReturn ( "simpleKey" ) ; when ( localParamsMock . get ( "compression" ) ) . thenReturn ( "gzip" ) ; when ( localParamsMock . get ( "serializa... | org . junit . Assert . assertEquals ( 3 , terms . size ( ) ) |
testSection4273LinkTypeInvalidMime ( ) { org . apache . abdera . i18n . iri . IRI uri = org . apache . abdera . test . parser . stax . FeedValidatorTest . baseURI . resolve ( "4.2.7.3/link-type-invalid-mime.xml" ) ; org . apache . abdera . model . Document < org . apache . abdera . model . Feed > doc = parse ( uri ) ; ... | org . junit . Assert . assertTrue ( ( e instanceof org . apache . abdera . util . MimeTypeParseException ) ) |
testShutdownTimeoutBadConfiguration ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; long shutdownTimeout = 50 ; conf . setTimeDuration ( org . apache . hadoop . util . SERVICE_SHUTDOWN_TIMEOUT , shutdownTimeout , TimeUnit . NANOSECONDS ) ; "<AssertPlaceHo... | org . junit . Assert . assertEquals ( org . apache . hadoop . util . SERVICE_SHUTDOWN_TIMEOUT , ShutdownHookManager . TIMEOUT_MINIMUM , org . apache . hadoop . util . ShutdownHookManager . getShutdownTimeout ( conf ) ) |
testLastBlock ( ) { try { System . out . println ( io . nem . apps . api . ChainApi . getChainLastBlock ( ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . InterruptedException | java . util . concurrent . ExecutionException e ) { assert false ; } } getChainLastBlock ( ) { org . nem . core . serialization . Deseria... | org . junit . Assert . assertNotNull ( io . nem . apps . api . ChainApi . getChainLastBlock ( ) ) |
testGetContentDigest ( ) { final java . lang . String checksum = checksumString ( org . fcrepo . kernel . modeshape . LocalFileBinaryTest . EXPECTED_CONTENT ) ; mockChecksumProperty ( checksum ) ; final java . net . URI digestUri = testObj . getContentDigest ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { final java . l... | org . junit . Assert . assertEquals ( checksum , digestUri . toString ( ) ) |
retrieveExplicitlyAssociatedProfileCase4 ( ) { org . restcomm . connect . core . service . profile . ProfileServiceTest . MockingService mocks = new org . restcomm . connect . core . service . profile . ProfileServiceTest . MockingService ( ) ; org . restcomm . connect . dao . entities . Organization organization = ret... | org . junit . Assert . assertNull ( resultantProfile ) |
testNoMaxWatermarkOnImmediateStop ( ) { final java . util . List < org . apache . flink . streaming . runtime . streamrecord . StreamElement > output = new java . util . ArrayList ( ) ; final org . apache . flink . streaming . api . operators . StoppableStreamSource < java . lang . String , org . apache . flink . strea... | org . junit . Assert . assertTrue ( output . isEmpty ( ) ) |
testHead ( ) { io . reactivex . Single < java . lang . String > single = org . jboss . resteasy . test . rx . rxjava2 . Rx2SingleProxyTest . proxy . head ( ) ; single . subscribe ( ( java . lang . String s ) -> { org . jboss . resteasy . test . rx . rxjava2 . Rx2SingleProxyTest . value . set ( s ) ; org . jboss . reste... | org . junit . Assert . assertNull ( org . jboss . resteasy . test . rx . rxjava2 . Rx2SingleProxyTest . value . get ( ) ) |
ANDtest ( ) { final org . roaringbitmap . RoaringBitmap rr = new org . roaringbitmap . RoaringBitmap ( ) ; for ( int k = 4000 ; k < 4256 ; ++ k ) { rr . add ( k ) ; } for ( int k = 65536 ; k < ( 65536 + 4000 ) ; ++ k ) { rr . add ( k ) ; } for ( int k = 3 * 65536 ; k < ( ( 3 * 65536 ) + 9000 ) ; ++ k ) { rr . add ( k )... | org . junit . Assert . assertTrue ( correct . equals ( rr ) ) |
build_shouldSetId ( ) { com . testwithspring . starter . assertions . task . Task task = com . testwithspring . starter . assertions . task . Task . getBuilder ( ) . withId ( com . testwithspring . starter . assertions . task . TaskTest . ID ) . withAssignee ( com . testwithspring . starter . assertions . task . TaskTe... | org . junit . Assert . assertEquals ( com . testwithspring . starter . assertions . task . TaskTest . ID , task . getId ( ) ) |
getMetadataKeyIdObjectValue ( ) { final java . lang . String person = "person" ; source = new org . mule . runtime . module . extension . internal . runtime . source . ExtensionMessageSourceTestCase . DummySource ( person ) ; sourceAdapter = createSourceAdapter ( ) ; when ( sourceAdapterFactory . createAdapter ( any ( ... | org . junit . Assert . assertThat ( metadataKeyValue , org . hamcrest . CoreMatchers . is ( person ) ) |
setMeasurand_powerOffered_measurandIsSet ( ) { java . lang . String measurand = "Power.Offered" ; sampledValue . setMeasurand ( measurand ) ; "<AssertPlaceHolder>" ; } getMeasurand ( ) { return measurand ; } | org . junit . Assert . assertThat ( sampledValue . getMeasurand ( ) , org . hamcrest . CoreMatchers . equalTo ( measurand ) ) |
testRemove1 ( ) { final com . syncleus . ferma . traversals . VertexTraversal < ? , ? , ? > traversal = graph . v ( ) . has ( "lang" , "java" ) ; traversal . next ( ) ; traversal . remove ( ) ; "<AssertPlaceHolder>" ; } v ( ) { return getGraph ( ) . v ( ) ; } | org . junit . Assert . assertEquals ( 5 , graph . v ( ) . count ( ) ) |
saveFileNoUpdate ( ) { org . mewx . wenku8 . util . LightCache . saveFile ( org . mewx . wenku8 . util . LightCacheTest . BASE_TEMP_FILE_FULL_NAME_PATH , new byte [ ] { 'a' , 'b' , 'c' } , false ) ; org . mewx . wenku8 . util . LightCache . saveFile ( org . mewx . wenku8 . util . LightCacheTest . BASE_TEMP_FILE_FULL_NA... | org . junit . Assert . assertArrayEquals ( new byte [ ] { 'a' , 'b' , 'c' } , org . mewx . wenku8 . util . LightCache . loadFile ( org . mewx . wenku8 . util . LightCacheTest . BASE_TEMP_FILE_FULL_NAME_PATH ) ) |
testStandardNormalise ( ) { double [ ] a = new double [ ] { 851620 , 746981 , 637136 , 581571 , 521126 , 485352 } ; uk . ac . tgac . rampart . stage . analyse . asm . stats . Scaling . standardScale ( a , true ) ; "<AssertPlaceHolder>" ; } standardScale ( double [ ] , boolean ) { double min = uk . ac . tgac . rampart .... | org . junit . Assert . assertTrue ( ( ( a [ 0 ] ) == 0.0 ) ) |
apply_A$ObjectArray ( ) { com . m3 . scalaflavor4j . IndexedSeq < java . lang . Integer > actual = com . m3 . scalaflavor4j . IndexedSeq . apply ( 1 , 2 , 3 ) ; "<AssertPlaceHolder>" ; } size ( ) { return 0 ; } | org . junit . Assert . assertThat ( actual . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 3 ) ) ) |
testCountByExample ( ) { int result = topicServiceImpl . countByExample ( topic ) ; "<AssertPlaceHolder>" ; } countByExample ( com . onboard . domain . model . Tag ) { com . onboard . domain . mapper . model . TagExample example = new com . onboard . domain . mapper . model . TagExample ( item ) ; return tagMapper . co... | org . junit . Assert . assertEquals ( result , size ) |
testSimpleDefineFunction ( ) { org . nd4j . autodiff . samediff . SameDiff sameDiffOuter = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . autodiff . samediff . Map < java . lang . String , org . nd4j . linalg . api . ndarray . INDArray > inputs = variablesForInput ( ) ; inputs . remove ( "y" ) ... | org . junit . Assert . assertEquals ( 1 , sameDiffOuter . definedFunctionNames ( ) . size ( ) ) |
shouldPersist ( ) { net . rrm . ehour . domain . Customer customer = net . rrm . ehour . domain . CustomerObjectMother . createCustomer ( ) ; customer . setName ( "aa" ) ; customer . setCode ( "bb" ) ; customer . setCustomerId ( null ) ; customerDao . persist ( customer ) ; "<AssertPlaceHolder>" ; } getCustomerId ( ) {... | org . junit . Assert . assertNotNull ( customer . getCustomerId ( ) ) |
updateActiveStateShouldFailIfNotFound ( ) { com . spotify . styx . storage . DatastoreStorageTransaction tx = new com . spotify . styx . storage . DatastoreStorageTransaction ( com . spotify . styx . storage . DatastoreStorageTransactionTest . datastore . newTransaction ( ) ) ; tx . updateActiveState ( com . spotify . ... | org . junit . Assert . assertThat ( e . isNotFound ( ) , org . hamcrest . Matchers . is ( true ) ) |
getPatientIdentifierTypes_shouldReturnNonRetiredPatientIdentifierTypes_OrderedByRequiredFirst ( ) { org . openmrs . PatientIdentifierType nonRetiredNonRequiredType1 = dao . getPatientIdentifierType ( 1 ) ; org . openmrs . PatientIdentifierType nonRetiredNonRequiredType2 = dao . getPatientIdentifierType ( 5 ) ; org . op... | org . junit . Assert . assertArrayEquals ( new java . lang . Object [ ] { nonRetiredRequiredType , nonRetiredNonRequiredType1 , nonRetiredNonRequiredType2 } , patientIdentifierTypes . toArray ( ) ) |
should_get_gatalog_whith_prefixed_service_offering ( ) { com . orange . cloud . servicebroker . filter . core . service . mapper . SuffixedCatalogMapper mapper = new com . orange . cloud . servicebroker . filter . core . service . mapper . SuffixedCatalogMapper ( "-suffix" ) ; org . springframework . cloud . servicebro... | org . junit . Assert . assertEquals ( expectedCatalog ( ) , prefixedCatalog ) |
testSanitizePathWithoutSensitiveInfoIsUnchanged ( ) { java . lang . String path = "myhost:8080/mypath" ; "<AssertPlaceHolder>" ; } sanitizePath ( java . lang . String ) { java . lang . String sanitized = path ; if ( path != null ) { sanitized = org . apache . camel . util . URISupport . PATH_USERINFO_PASSWORD . matcher... | org . junit . Assert . assertEquals ( path , org . apache . camel . util . URISupport . sanitizePath ( path ) ) |
testMemAlloc ( ) { for ( int i = 0 ; i < 10000 ; i ++ ) { java . nio . ByteBuffer byteBuffer = getBuffer ( 8194 ) ; byteBuffer . put ( "helll<sp>world" . getBytes ( ) ) ; byteBuffer . flip ( ) ; byte [ ] src = new byte [ byteBuffer . remaining ( ) ] ; byteBuffer . get ( src ) ; "<AssertPlaceHolder>" ; free ( byteBuffer... | org . junit . Assert . assertEquals ( "helll<sp>world" , new java . lang . String ( src ) ) |
insertBeforeHgroup ( ) { html = org . mixer2 . xhtml . insert . InsertById_html5Test . m2e . loadHtmlTemplate ( new java . io . File ( templateFilePath ) ) ; org . mixer2 . jaxb . xhtml . P p = org . mixer2 . xhtml . TagCreator . pWithId ( "p1" ) ; p . getContent ( ) . add ( "paragraph" ) ; html . insertBeforeId ( "hgr... | org . junit . Assert . assertEquals ( "p1" , ( ( org . mixer2 . jaxb . xhtml . P ) ( objList . get ( ( i - 1 ) ) ) ) . getId ( ) ) |
testAnonymous ( ) { com . amazonaws . auth . AWSCredentials credentials = new com . amazonaws . auth . AnonymousAWSCredentials ( ) ; com . amazonaws . Request < ? > request = new com . amazonaws . DefaultRequest < java . lang . Void > ( "Foo" ) ; request . setContent ( new java . io . ByteArrayInputStream ( "{\"TableNa... | org . junit . Assert . assertNull ( authorization ) |
testCountWithTimestampInMessageAndCustomFormat ( ) { this . sink . input ( ) . send ( new org . springframework . messaging . support . GenericMessage < java . lang . Object > ( java . util . Collections . singletonMap ( "ts" , "14/10/1978" ) ) ) ; org . joda . time . DateTime endDate = new org . joda . time . DateTime... | org . junit . Assert . assertThat ( counts . getCounts ( ) , org . hamcrest . Matchers . equalTo ( new long [ ] { 0 , 0 , 1 , 0 , 0 } ) ) |
testTestWhenFalse ( ) { org . apache . commons . functor . NullaryFunction < java . lang . Boolean > f = new org . apache . commons . functor . adapter . NullaryPredicateNullaryFunction ( org . apache . commons . functor . core . Constant . FALSE ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { return java . lang . Integer... | org . junit . Assert . assertEquals ( Boolean . FALSE , f . evaluate ( ) ) |
ListEqualTest ( ) { java . util . List < model . Team > teams = teamServices . listEqual ( 10 ) ; "<AssertPlaceHolder>" ; } size ( ) { int size = 0 ; for ( com . github . drinkjava2 . jdialects . springsrc . utils . ConcurrentReferenceHashMap < K , V > . Segment segment : this . segments ) { size += segment . getCount ... | org . junit . Assert . assertEquals ( 1 , teams . size ( ) ) |
testIgnoresNullValues ( ) { try ( final org . apache . druid . server . lookup . namespace . cache . CacheScheduler . Entry entry = ensureEntry ( ) ) { insertValues ( handleRef , "fooz" , null , null , "2900-01-01<sp>00:00:00" ) ; waitForUpdates ( 1000L , 2L ) ; java . lang . Thread . sleep ( 100 ) ; java . util . Set ... | org . junit . Assert . assertFalse ( set . contains ( "fooz" ) ) |
testHandle ( ) { org . springframework . validation . BindException e = new org . springframework . validation . BindException ( bindingResult ) ; java . lang . String field = "name" ; java . lang . String defaultMessage = "not<sp>valid" ; org . springframework . validation . FieldError fieldError1 = new org . springfr... | org . junit . Assert . assertEquals ( expected , actual ) |
getHoldsForFilePlan ( ) { doReturn ( holds ) . when ( mockedHoldService ) . getHolds ( filePlan ) ; java . util . Map < java . lang . String , java . lang . String > parameters = buildParameters ( "store_type" , filePlan . getStoreRef ( ) . getProtocol ( ) , "store_id" , filePlan . getStoreRef ( ) . getIdentifier ( ) ,... | org . junit . Assert . assertNotNull ( json ) |
testValueOf ( ) { for ( org . jscep . transaction . MessageType msgType : org . jscep . transaction . MessageType . values ( ) ) { "<AssertPlaceHolder>" ; } } valueOf ( int ) { for ( org . jscep . transaction . MessageType msgType : org . jscep . transaction . MessageType . values ( ) ) { if ( ( msgType . getValue ( ) ... | org . junit . Assert . assertSame ( msgType , org . jscep . transaction . MessageType . valueOf ( msgType . getValue ( ) ) ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . portal . workflow . kaleo . model . KaleoTimerInstanceToken missingKaleoTimerInstanceToken = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ... | org . junit . Assert . assertNull ( missingKaleoTimerInstanceToken ) |
testGetGyroscopeRaw ( ) { org . eclipse . kura . raspberrypi . sensehat . sensors . LSM9DS1 lsm9ds1 = org . eclipse . kura . raspberrypi . sensehat . sensors . LSM9DS1 . getIMUSensor ( 1 , 3 , 4 , 1 , 1 ) ; float [ ] gyroRaw = lsm9ds1 . getGyroscopeRaw ( ) ; float [ ] expected = new float [ ] { - 0.024642F , - 0.020255... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( expected , gyroRaw ) ) |
testPriority ( ) { org . kefirsf . bb . conf . Code code = new org . kefirsf . bb . conf . Code ( ) ; code . setPriority ( 3 ) ; "<AssertPlaceHolder>" ; } getPriority ( ) { return priority ; } | org . junit . Assert . assertEquals ( 3 , code . getPriority ( ) ) |
testOntbekendeSpatieRondOperator ( ) { final java . lang . String voorwaardeRegel = "08.11.60<sp>GA1<sp>\"2261*\"<sp>OFVGL<sp>\"2262*\"OFVGL<sp>\"2263*\"<sp>OFVGL\"2264*\"<sp>OFVGL<sp>\"2265*\"<sp>" ; final java . lang . String expressieVerwacht = "Persoon.Adres.Postcode<sp>EIN%<sp>{\"2261*\",<sp>\"2262*\",<sp>\"2263*\... | org . junit . Assert . assertEquals ( expressieVerwacht , expressie ) |
testOverrideSerializableAttributeWithNonSerializable ( ) { java . lang . String attributeName = "name" ; java . io . Serializable serializableAttribute = new java . lang . String ( ) ; uiSession . setAttribute ( attributeName , serializableAttribute ) ; java . lang . Object overridingAtribute = new java . lang . Object... | org . junit . Assert . assertSame ( overridingAtribute , uiSession . getAttribute ( attributeName ) ) |
testSerialize ( ) { com . akkafun . common . test . domain . NotifyFirstTestEvent testEventFirst = new com . akkafun . common . test . domain . NotifyFirstTestEvent ( "" , java . time . LocalDateTime . now ( ) ) ; java . lang . String json = com . akkafun . common . event . EventUtils . serializeEvent ( testEventFirst ... | org . junit . Assert . assertThat ( testEventFirstFromJson , org . hamcrest . Matchers . is ( testEventFirst ) ) |
testResourcePathsDiffer ( ) { org . eclipse . rap . rwt . internal . theme . CssImage image1 = org . eclipse . rap . rwt . internal . theme . CssImage . valueOf ( Fixture . IMAGE_50x100 , org . eclipse . rap . rwt . internal . theme . ThemeTestUtil . RESOURCE_LOADER ) ; org . eclipse . rap . rwt . internal . theme . Cs... | org . junit . Assert . assertFalse ( path1 . equals ( path2 ) ) |
one_$this_array_query_projection_with_no_match_projection ( ) { com . redhat . lightblue . query . Projection p = com . redhat . lightblue . eval . EvalTestContext . projectionFromJson ( "{'field':'field7.$this','match':{'field':'elemf3','op':'>','rvalue':25},'projection':{'field':'*'}}" ) ; com . redhat . lightblue . ... | org . junit . Assert . assertEquals ( expectedNode . toString ( ) , pdoc . toString ( ) ) |
testIsTablePatternAvailable ( ) { mmarquee . automation . pattern . Table pattern = org . mockito . Mockito . mock ( mmarquee . automation . pattern . Table . class ) ; when ( pattern . isAvailable ( ) ) . thenReturn ( true ) ; mmarquee . automation . controls . AutomationWindow window = new mmarquee . automation . con... | org . junit . Assert . assertTrue ( value ) |
testGetOutputFormat ( ) { java . util . List < org . geoserver . wms . GetMapOutputFormat > producers = org . geoserver . wms . WMSExtensions . findMapProducers ( applicationContext ) ; for ( org . geoserver . wms . GetMapOutputFormat producer : producers ) { "<AssertPlaceHolder>" ; } } getMimeType ( ) { switch ( this ... | org . junit . Assert . assertNotNull ( producer . getMimeType ( ) ) |
testHoleAssignment ( ) { java . awt . Dimension ps = new java . awt . Dimension ( 500 , 500 ) ; org . locationtech . jts . geom . PrecisionModel precision = new org . locationtech . jts . geom . PrecisionModel ( ) ; java . util . ArrayList shells = new java . util . ArrayList ( ) ; java . util . ArrayList holes = new j... | org . junit . Assert . assertEquals ( ( ( java . util . ArrayList ) ( assigned . get ( 0 ) ) ) . size ( ) , holes . size ( ) ) |
testAddToReceivedInt ( long , int , long ) { com . github . mucaho . jnetrobust . util . ShiftableBitSet actualBitSet = new com . github . mucaho . jnetrobust . util . ShiftableBitSet ( preBits ) ; com . github . mucaho . jnetrobust . util . ShiftableBitSet expectedBitSet = new com . github . mucaho . jnetrobust . util... | org . junit . Assert . assertEquals ( debug , expectedBitSet . get ( ) , actualBitSet . get ( ) ) |
testGrantPermissionWebApplicationException ( ) { org . apache . ranger . plugin . model . RangerPolicy policy = rangerPolicy ( org . apache . ranger . rest . TestAssetREST . Id ) ; org . apache . ranger . plugin . model . RangerService service = rangerService ( org . apache . ranger . rest . TestAssetREST . Id ) ; org ... | org . junit . Assert . assertTrue ( true ) |
testLargeDoubleQueue ( ) { java . util . Random random = new java . util . Random ( ) ; com . charlesbihis . sandbox . queuefromstacks . Queue < java . lang . Double > queue = new com . charlesbihis . sandbox . queuefromstacks . QueueFromStacks < java . lang . Double > ( ) ; java . util . Queue < java . lang . Double >... | org . junit . Assert . assertEquals ( list . remove ( ) , queue . dequeue ( ) ) |
testGetProperty ( ) { org . aeonbits . owner . ConfigFactory . setProperty ( "mypath" , org . aeonbits . owner . RESOURCES_DIR ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { return org . aeonbits . owner . ConfigFactory . INSTANCE . getProperty ( key ) ; } | org . junit . Assert . assertEquals ( org . aeonbits . owner . RESOURCES_DIR , org . aeonbits . owner . ConfigFactory . getProperty ( "mypath" ) ) |
setNxShouldNotSetValueWhenAlreadyExistsInDBCorrectly ( ) { nativeConnection . set ( org . springframework . data . redis . connection . lettuce . KEY_1 , org . springframework . data . redis . connection . lettuce . VALUE_1 ) ; clusterConnection . setNX ( org . springframework . data . redis . connection . lettuce . Le... | org . junit . Assert . assertThat ( nativeConnection . get ( org . springframework . data . redis . connection . lettuce . KEY_1 ) , is ( org . springframework . data . redis . connection . lettuce . VALUE_1 ) ) |
testStripManifest ( ) { final java . io . File out = java . io . File . createTempFile ( "manifest" , null ) ; out . deleteOnExit ( ) ; new io . github . zlika . reproducible . ManifestStripper ( ) . strip ( new java . io . File ( this . getClass ( ) . getResource ( "MANIFEST.MF" ) . getFile ( ) ) , out ) ; final byte ... | org . junit . Assert . assertArrayEquals ( expected , actual ) |
attemptReconnectsAfterAFailedReconnect ( ) { final java . util . concurrent . BlockingQueue < java . lang . Object > values = new java . util . concurrent . LinkedBlockingQueue < java . lang . Object > ( ) ; com . github . nkzawa . socketio . client . IO . Options opts = createOptions ( ) ; opts . reconnection = true ;... | org . junit . Assert . assertThat ( ( ( java . lang . Integer ) ( values . take ( ) ) ) , org . hamcrest . CoreMatchers . is ( 2 ) ) |
testReplaceWhereScalar ( ) { for ( org . nd4j . linalg . indexing . conditions . Condition c : new org . nd4j . linalg . indexing . conditions . Condition [ ] { org . nd4j . linalg . indexing . conditions . Conditions . lessThan ( 0.5 ) , org . nd4j . linalg . indexing . conditions . Conditions . greaterThan ( 0.5 ) , ... | org . junit . Assert . assertNull ( err ) |
testSingleTokenDeletionDuringLoop2 ( ) { java . lang . String grammar = "grammar<sp>T;\n" + "a<sp>:<sp>'a'<sp>('b'|'z'{;})*<sp>'c'<sp>;" ; java . lang . String found = execParser ( "T.g4" , grammar , "TParser" , "TLexer" , "a" , "ababbc" , false ) ; java . lang . String expecting = "line<sp>1:2<sp>extraneous<sp>input<s... | org . junit . Assert . assertEquals ( expecting , result ) |
testContainsWithMultipleValues ( ) { com . thinkaurelius . titan . core . PropertyKey name = makeKey ( "name" , java . lang . String . class ) ; mgmt . buildIndex ( "store1" , org . apache . tinkerpop . gremlin . structure . Vertex . class ) . addKey ( name ) . buildMixedIndex ( com . thinkaurelius . titan . graphdb . ... | org . junit . Assert . assertEquals ( r . property ( "name" ) . value ( ) , "hercules<sp>was<sp>here" ) |
shouldDefaultToPortSpecifiedInProfileWhenDeterminingNextFreePort ( ) { org . junit . Assume . assumeFalse ( org . openqa . selenium . testing . drivers . SauceDriver . shouldUseSauce ( ) ) ; int expectedPort = 2400 ; org . openqa . selenium . firefox . FirefoxProfile profile = new org . openqa . selenium . firefox . Fi... | org . junit . Assert . assertEquals ( expectedPort , profile . getIntegerPreference ( FirefoxProfile . PORT_PREFERENCE , PORT_PREFERENCE_NOT_PROPAGATED ) ) |
testWaiverAmount ( ) { org . mifos . accounts . loan . business . LoanBO loanBO = new org . mifos . accounts . loan . business . LoanBO ( ) { @ org . mifos . accounts . loan . business . Override public org . mifos . accounts . business . AccountActionDateEntity getDetailsOfNextInstallment ( ) { return loanScheduleEnti... | org . junit . Assert . assertEquals ( loanBO . waiverAmount ( ) , new org . mifos . framework . util . helpers . Money ( rupee , "42" ) ) |
sortNameDesc ( ) { java . lang . String sqlite = "SELECT<sp>*<sp>FROM<sp>users<sp>ORDER<sp>BY<sp>name<sp>desc<sp>LIMIT<sp>10" ; java . lang . String api = "select<sp>*<sp>order<sp>by<sp>name<sp>desc" ; org . apache . usergrid . query . validator . QueryRequest request = new org . apache . usergrid . query . validator .... | org . junit . Assert . assertTrue ( response . toString ( ) , response . result ( ) ) |
count_upper_case_letters_guava ( ) { java . lang . String danielTigerLyrics = "Its<sp>a<sp>beautiful<sp>day<sp>in<sp>the<sp>neighborhood,<sp>a<sp>beautiful<sp>day<sp>for<sp>a<sp>neighbor." + "Would<sp>you<sp>be<sp>Mine,<sp>could<sp>you<sp>be<sp>mine,<sp>would<sp>you<sp>be<sp>my<sp>neighbor." ; long count = CharMatcher ... | org . junit . Assert . assertEquals ( 3 , count ) |
character_with_3_bytes ( ) { org . mockito . Mockito . when ( request . getHeader ( "cookie" ) ) . thenReturn ( "c=%E4%BA%AC" ) ; java . lang . String actual = cookies . get ( "c" ) ; java . lang . String expected = "" ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { if ( ( name == null ) || ( ( name . length... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetInt ( ) { headers . delegate ( ) . addInt ( "header" , 1 ) ; "<AssertPlaceHolder>" ; } getInt ( java . lang . CharSequence ) { java . lang . CharSequence value = get ( name ) ; return value != null ? valueConverter . convertToInt ( value ) : null ; } | org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 1 ) ) , headers . getInt ( "header" ) ) |
copyByteArrayValidOutputStreamNegBufSz ( ) { java . io . ByteArrayOutputStream outputStream = new org . apache . maven . shared . utils . io . IOUtilTest . DontCloseByteArrayOutputStream ( ) ; byte [ ] input = new byte [ ] { 1 , 2 , 3 , 4 , 5 , 6 } ; org . apache . maven . shared . utils . io . IOUtil . copy ( input , ... | org . junit . Assert . assertThat ( outputStream . toByteArray ( ) , org . hamcrest . CoreMatchers . is ( input ) ) |
restoreRecordsWarningWhenDirectoryIsNotNormal ( ) { java . nio . file . Path symlink = ddfHome . resolve ( createSoftLink ( "symlink" , path ) ) ; when ( mockPathUtils . resolveAgainstDDFHome ( any ( java . nio . file . Path . class ) ) ) . thenReturn ( symlink ) ; entry = new org . codice . ddf . configuration . migra... | org . junit . Assert . assertThat ( entry . restore ( true ) , org . hamcrest . CoreMatchers . equalTo ( true ) ) |
getCertificateCheck ( ) { org . ops4j . util . property . PropertyResolver propertyResolver = createMock ( org . ops4j . util . property . PropertyResolver . class ) ; expect ( propertyResolver . get ( "org.ops4j.pax.url.mvn.localRepository" ) ) . andReturn ( null ) ; expect ( propertyResolver . get ( "org.ops4j.pax.ur... | org . junit . Assert . assertEquals ( "Certificate<sp>check" , true , config . getCertificateCheck ( ) ) |
getLastOnEmpty ( ) { com . gs . collections . impl . lazy . CollectIterable < java . lang . Integer , java . lang . String > collect = new com . gs . collections . impl . lazy . CollectIterable ( com . gs . collections . impl . list . mutable . FastList . newList ( ) , String :: valueOf ) ; "<AssertPlaceHolder>" ; } ge... | org . junit . Assert . assertNull ( collect . getLast ( ) ) |
shouldImportMovieWithTwoDirectors ( ) { importService . importMovie ( "603" ) ; org . neo4j . cineasts . domain . Movie movie = findMovieByProperty ( "id" , "603" ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } getDirectors ( ) { return directors ; } | org . junit . Assert . assertEquals ( 2 , movie . getDirectors ( ) . size ( ) ) |
shouldAggregateAMixOfEdgesAndEntities ( ) { final uk . gov . gchq . gaffer . store . schema . Schema schema = new uk . gov . gchq . gaffer . store . schema . Schema . Builder ( ) . edge ( TestGroups . EDGE , new uk . gov . gchq . gaffer . store . schema . SchemaEdgeDefinition . Builder ( ) . aggregator ( new uk . gov .... | org . junit . Assert . assertEquals ( expected , resultsSet ) |
testConversionJul ( ) { org . joda . time . format . DateTimeFormatter fmt = org . joda . time . format . DateTimeFormat . forPattern ( org . pm4j . core . pm . joda . impl . LocalDateConverterTest . ddMMMyyyy ) . withLocale ( Locale . ENGLISH ) ; org . joda . time . LocalDate localDate = fmt . parseLocalDate ( "20-Jul... | org . junit . Assert . assertEquals ( localDate . toString ( org . pm4j . core . pm . joda . impl . LocalDateConverterTest . ddMMMyyyy , Locale . ENGLISH ) , "20-Jul-2013" ) |
getAtomContainerTest ( ) { org . openscience . cdk . signature . MoleculeFromSignatureBuilder builder = new org . openscience . cdk . signature . MoleculeFromSignatureBuilder ( org . openscience . cdk . silent . SilentChemObjectBuilder . getInstance ( ) ) ; builder . makeGraph ( ) ; "<AssertPlaceHolder>" ; } getAtomCon... | org . junit . Assert . assertNotNull ( builder . getAtomContainer ( ) ) |
testSetProxyURL ( ) { getContentNodeMock ( mockContent , mockDescNode , org . fcrepo . kernel . modeshape . UrlBinaryTest . EXPECTED_CONTENT ) ; when ( mockDescNode . getNode ( org . fcrepo . kernel . modeshape . JCR_CONTENT ) ) . thenReturn ( mockContent ) ; mockProxyProperty ( ) ; testObj . setProxyURL ( fileUrl ) ; ... | org . junit . Assert . assertEquals ( fileUrl , testObj . getProxyURL ( ) ) |
insertNullBlobAndReadAsByteArray ( ) { com . github . davidmoten . rx . jdbc . Database db = db ( ) ; com . github . davidmoten . rx . jdbc . DatabaseTestBase . insertBlob ( db , null ) ; byte [ ] bytes = db . select ( "select<sp>document<sp>from<sp>person_blob" ) . getAs ( byte [ ] . class ) . first ( ) . toBlocking (... | org . junit . Assert . assertNull ( bytes ) |
equalIfMimeTypeIsNullOnBoth ( ) { com . mpatric . mp3agic . ID3v2PictureFrameData frameData1 = new com . mpatric . mp3agic . ID3v2PictureFrameData ( false , null , ( ( byte ) ( 3 ) ) , new com . mpatric . mp3agic . EncodedText ( ( ( byte ) ( 0 ) ) , com . mpatric . mp3agic . ID3v2PictureFrameDataTest . TEST_DESCRIPTION... | org . junit . Assert . assertEquals ( frameData1 , frameData2 ) |
testGetCurrent ( ) { "<AssertPlaceHolder>" ; } getCurrent ( ) { ( result . totalCount ) ++ ; try { cs = conn . prepareCall ( source . getSPStatement ( setting ) ) ; org . apache . avro . Schema componentSchema = org . talend . components . jdbc . CommonUtils . getMainSchemaFromInputConnector ( ( ( org . talend . compon... | org . junit . Assert . assertNull ( reader . getCurrent ( ) ) |
shouldOverrideStreamsDefaultProducerConfigs ( ) { props . put ( org . apache . kafka . streams . StreamsConfig . producerPrefix ( ProducerConfig . LINGER_MS_CONFIG ) , "10000" ) ; final org . apache . kafka . streams . StreamsConfig streamsConfig = new org . apache . kafka . streams . StreamsConfig ( props ) ; final ja... | org . junit . Assert . assertEquals ( "10000" , producerConfigs . get ( ProducerConfig . LINGER_MS_CONFIG ) ) |
assertGetDateColumnLabelWithCalendar ( ) { for ( java . sql . ResultSet each : resultSets . values ( ) ) { try { each . getDate ( columnName , java . util . Calendar . getInstance ( ) ) ; org . junit . Assert . fail ( "Expected<sp>an<sp>SQLException<sp>to<sp>be<sp>thrown" ) ; } catch ( final java . lang . Exception ex ... | org . junit . Assert . assertFalse ( ex . getMessage ( ) . isEmpty ( ) ) |
shouldRetrieveAllOfficesAsOfficeDtos ( ) { java . util . List < org . mifos . dto . domain . OfficeDto > allOffices = officeDao . findAllOffices ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return fieldErrors . size ( ) ; } | org . junit . Assert . assertThat ( allOffices . size ( ) , org . hamcrest . CoreMatchers . is ( 9 ) ) |
testRemoveSchemaSelect ( ) { java . lang . String sql = "select<sp>id<sp>as<sp>'aa'<sp>from<sp>test<sp>where<sp>name='abcdtestx.aa'<sp>and<sp>id=1<sp>and<sp>testx=123" ; java . lang . String afterAql = io . mycat . route . util . RouterUtil . removeSchema ( sql , "testx" ) ; "<AssertPlaceHolder>" ; } removeSchema ( jav... | org . junit . Assert . assertEquals ( sql , afterAql ) |
testHasLoop_simpleLoop ( ) { org . pentaho . di . job . JobMeta jobMetaSpy = spy ( jobMeta ) ; org . pentaho . di . job . entry . JobEntryCopy jobEntryCopyMain = createJobEntryCopy ( "mainStep" ) ; org . pentaho . di . job . entry . JobEntryCopy jobEntryCopy2 = createJobEntryCopy ( "step2" ) ; org . pentaho . di . job ... | org . junit . Assert . assertTrue ( jobMetaSpy . hasLoop ( jobEntryCopyMain ) ) |
shouldConvert ( ) { br . com . uol . pagseguro . api . utils . RequestMap expectedMap = new br . com . uol . pagseguro . api . utils . RequestMap ( ) ; expectedMap . putMap ( new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "extraAmount" , "100.00" ) ; put ( "receiverEmail" , "tes... | org . junit . Assert . assertEquals ( expectedMap , map ) |
findTest ( ) { ru . itpark . models . Human expected = ru . itpark . models . Human . builder ( ) . id ( 2 ) . age ( 19 ) . name ( "" ) . citizen ( "" ) . build ( ) ; ru . itpark . models . Human actual = testedHumansDao . find ( 2 ) ; "<AssertPlaceHolder>" ; } find ( int ) { return null ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testValidate_getter ( ) { java . lang . Class < ? > [ ] groups = new java . lang . Class [ ] { com . github . mygreen . supercsv . validation . beanvalidation . CsvBeanValidatorTest . Group3 . class } ; com . github . mygreen . supercsv . validation . CsvBindingErrors bindingErrors = new com . github . mygreen . superc... | org . junit . Assert . assertThat ( messages ) |
testFullBuildBigProjectWithLinkingErrors ( ) { org . eclipse . jdt . core . IJavaProject project = workspace . createJavaProject ( "foo" ) ; workspace . addNature ( project . getProject ( ) , XtextProjectHelper . NATURE_ID ) ; org . eclipse . core . resources . IFolder folder = project . getProject ( ) . getFolder ( "s... | org . junit . Assert . assertEquals ( ( NUM_FILES - 1 ) , iMarkers . length ) |
runTestReflection5 ( ) { soot . jimple . infoflow . results . InfoflowResults res = analyzeAPKFile ( "Reflection/Reflection5.apk" , null , enableReflectionCallback ) ; "<AssertPlaceHolder>" ; } size ( ) { return set . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , res . size ( ) ) |
testIPv4AddressMatchesIPv4Address ( ) { com . liferay . portal . kernel . internal . security . access . control . AllowedIPAddressesValidator allowedIPAddressesValidator = com . liferay . portal . kernel . internal . security . access . control . AllowedIPAddressesValidatorFactory . create ( com . liferay . portal . k... | org . junit . Assert . assertTrue ( allowedIPAddressesValidator . isAllowedIPAddress ( com . liferay . portal . kernel . internal . security . access . control . AllowedIPAddressesValidatorTest . _ADDRESS_IP_V4 ) ) |
testNumKSubsetUpTo62 ( ) { for ( int i = 1 ; i < 62 ; i ++ ) { final tlc2 . value . impl . SubsetValue subset = new tlc2 . value . impl . SubsetValue ( new tlc2 . value . impl . IntervalValue ( 1 , i ) ) ; long sum = 0L ; for ( int j = 0 ; j <= i ; j ++ ) { sum += subset . numberOfKElements ( j ) ; } "<AssertPlaceHolde... | org . junit . Assert . assertEquals ( ( 1L << i ) , sum ) |
testIfDifferenceCalculationWorks_shouldReturnTheCorrectAmountOfChanges ( ) { org . openengsb . core . ekb . persistence . persist . edb . models . EngineeringObjectModel old = new org . openengsb . core . ekb . persistence . persist . edb . models . EngineeringObjectModel ( ) ; old . setInternalModelName ( "testModel" ... | org . junit . Assert . assertThat ( diff . getDifferences ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( 5 ) ) |
testRemoveJobException ( ) { org . pentaho . platform . api . scheduler2 . Job job = mock ( org . pentaho . platform . api . scheduler2 . Job . class ) ; doReturn ( job ) . when ( org . pentaho . platform . web . http . api . resources . services . SchedulerServiceTest . schedulerService ) . getJob ( anyString ( ) ) ; ... | org . junit . Assert . assertEquals ( "pause-exception" , e . getMessage ( ) ) |
testCase27 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase27 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; } | org . junit . Assert . assertEquals ( 8 , branch_conditions . size ( ) ) |
testSortAlreadySortedPreferred ( ) { java . util . List < java . net . InetSocketAddress > expected = java . util . Arrays . asList ( io . netty . resolver . dns . NameServerComparatorTest . IPV4ADDRESS1 , io . netty . resolver . dns . NameServerComparatorTest . IPV4ADDRESS2 , io . netty . resolver . dns . NameServerCo... | org . junit . Assert . assertEquals ( expected , addresses ) |
testIsListNotEmpty ( ) { java . util . List < java . lang . String > list = new java . util . ArrayList < java . lang . String > ( ) ; list . add ( "a" ) ; list . add ( "b" ) ; boolean listValue = stringUtil . isEmpty ( list ) ; "<AssertPlaceHolder>" ; } isEmpty ( java . util . Collection ) { return ( set == null ) || ... | org . junit . Assert . assertFalse ( listValue ) |
testDistributeWithTwoProfiles ( ) { long timestamp = 100 ; java . lang . String entity = ( ( java . lang . String ) ( messageOne . get ( "ip_src_addr" ) ) ) ; org . apache . metron . profiler . MessageRoute routeOne = new org . apache . metron . profiler . MessageRoute ( createDefinition ( profileOne ) , entity , messa... | org . junit . Assert . assertEquals ( 2 , measurements . size ( ) ) |
testIsDebugEnabled ( ) { when ( mockLogger . isDebugEnabled ( ) ) . thenReturn ( true ) ; io . netty . util . internal . logging . InternalLogger logger = io . netty . util . internal . logging . InternalLoggerFactory . getInstance ( "mock" ) ; "<AssertPlaceHolder>" ; verify ( mockLogger ) . isDebugEnabled ( ) ; } isDe... | org . junit . Assert . assertTrue ( logger . isDebugEnabled ( ) ) |
testGetAccessTokenString ( ) { org . uberfire . ext . security . management . keycloak . client . auth . credentials . AccessTokenResponse response = mock ( org . uberfire . ext . security . management . keycloak . client . auth . credentials . AccessTokenResponse . class ) ; when ( response . getToken ( ) ) . thenRetu... | org . junit . Assert . assertEquals ( "token2" , s ) |
testAnalyzeSelectStatement_OK_ColumnReferenceAndTableAlias ( ) { final java . lang . String sql = "SELECT<sp>`ID`,<sp>`NAME`<sp>FROM<sp>STUDENT<sp>STU" ; final org . codefamily . crabs . jdbc . lang . Statement actual = org . codefamily . crabs . jdbc . compiler . GrammarAnalyzer . analyze ( sql ) ; final org . codefam... | org . junit . Assert . assertEquals ( expected , actual ) |
testAlreadyExistingEndPointsDoNotFireEvents ( ) { addNode ( "path" , com . bazaarvoice . ostrich . discovery . zookeeper . ZooKeeperHostDiscoveryTest . FOO ) ; com . bazaarvoice . ostrich . discovery . zookeeper . ZooKeeperHostDiscoveryTest . CountingListener endPointListener = new com . bazaarvoice . ostrich . discove... | org . junit . Assert . assertEquals ( 0 , endPointListener . getNumEvents ( ) ) |
testInsert_ListFields ( ) { com . jmethods . catatumbo . entities . ListFields entity = com . jmethods . catatumbo . entities . ListFields . getSampleEntity1 ( ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . insert ( entity ) ; com . jmethods . catatumbo . entities . ListFields entity2 = com . jmetho... | org . junit . Assert . assertTrue ( entity . equals ( entity2 ) ) |
testIsRegionUsingDiskStoreWhenOverflowing ( ) { final java . lang . String diskStoreName = "testDiskStore" ; final com . gemstone . gemfire . cache . Region mockRegion = mockContext . mock ( com . gemstone . gemfire . cache . Region . class , "Region" ) ; final com . gemstone . gemfire . cache . RegionAttributes mockRe... | org . junit . Assert . assertTrue ( function . isUsingDiskStore ( mockRegion , mockDiskStore ) ) |
testGetBandDataType_mixed_integerTypes ( ) { product . addBand ( "one" , ProductData . TYPE_UINT8 ) ; product . addBand ( "two" , ProductData . TYPE_INT32 ) ; product . addBand ( "double" , ProductData . TYPE_INT16 ) ; product . addBand ( "three" , ProductData . TYPE_INT16 ) ; product . addBand ( "four" , ProductData .... | org . junit . Assert . assertEquals ( ProductData . TYPE_INT32 , tiffIFD . getBandDataType ( ) ) |
testVeryObese ( ) { java . lang . String string0 = com . examples . with . different . packagename . BMICalculator . calculateBMICategory ( ( - 1.0 ) , 2138.41 ) ; "<AssertPlaceHolder>" ; } calculateBMICategory ( double , double ) { double bmi = weight / ( height * height ) ; if ( bmi < 18.5 ) { return "underweight" ; ... | org . junit . Assert . assertEquals ( "very<sp>obese" , string0 ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.