input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testGetDocumentVector ( ) { edu . ucla . sspace . text . IteratorFactory . setProperties ( new edu . ucla . sspace . vsm . Properties ( ) ) ; edu . ucla . sspace . vsm . VectorSpaceModel vsm = new edu . ucla . sspace . vsm . VectorSpaceModel ( ) ; try { java . lang . String [ ] docArr = new java . lang . String [ ] { "... | org . junit . Assert . assertEquals ( 3 , vsm . documentSpaceSize ( ) ) |
shouldReturnNullIntegerValueFromEmptyStringUsingIntegerType ( ) { final java . lang . String integerStringValue = "" ; defaultEntity . setField ( com . qcadoo . model . internal . DefaultEntityTest . INTEGER_FIELD_NAME , integerStringValue ) ; java . lang . Integer result = defaultEntity . getIntegerField ( com . qcado... | org . junit . Assert . assertNull ( result ) |
getPcrManifestFromVmware ( ) { com . intel . mtwilson . model . PcrManifest pcrManifest = test . vendor . vmware . TestVmwareHostAgent . agent . getPcrManifest ( ) ; "<AssertPlaceHolder>" ; for ( int i = 0 ; i < 24 ; i ++ ) { com . intel . mtwilson . model . Pcr pcr = pcrManifest . getPcr ( i ) ; log . debug ( "Pcr<sp>... | org . junit . Assert . assertNotNull ( pcrManifest ) |
testParseDifferentImaginaryChar ( ) { java . lang . String source = ( ( ( "-1" + ( getDecimalCharacter ( ) ) ) + "2323<sp>-<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "4343j" ; org . apache . commons . math . complex . Complex expected = new org . apache . commons . math . complex . Complex ( ( - 1.2323 ) , ( - 1.4343 )... | org . junit . Assert . assertEquals ( expected , actual ) |
lastOption_A$ ( ) { com . m3 . scalaflavor4j . List < java . lang . String > list = com . m3 . scalaflavor4j . Arrays . asList ( "a" , "b" , "a" , "a" , "c" , "z" ) ; com . m3 . scalaflavor4j . Seq < java . lang . String > seq = com . m3 . scalaflavor4j . IndexedSeq . apply ( list ) ; com . m3 . scalaflavor4j . Option ... | org . junit . Assert . assertThat ( actual . getOrNull ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( "z" ) ) ) |
testListTypesOfWorkHours ( ) { int previous = typeOfWorkHoursDAO . list ( org . libreplan . business . costcategories . entities . TypeOfWorkHours . class ) . size ( ) ; org . libreplan . business . costcategories . entities . TypeOfWorkHours typeOfWorkHours = createValidTypeOfWorkHours ( ) ; typeOfWorkHoursDAO . save ... | org . junit . Assert . assertEquals ( ( previous + 1 ) , list . size ( ) ) |
firmwareStatusNotificationVerifyResponse ( ) { io . motown . ocpp . v15 . soap . centralsystem . FirmwareStatusNotificationRequest request = new io . motown . ocpp . v15 . soap . centralsystem . FirmwareStatusNotificationRequest ( ) ; io . motown . ocpp . v15 . soap . centralsystem . FirmwareStatusNotificationResponse ... | org . junit . Assert . assertNotNull ( response ) |
testFireSynchronous ( ) { helper . fireEvent ( new org . cytoscape . event . StubCyEvent ( "homer" ) ) ; "<AssertPlaceHolder>" ; } getNumCalls ( ) { return called ; } | org . junit . Assert . assertEquals ( 1 , service . getNumCalls ( ) ) |
testMutationAppendLargeRow ( ) { final java . lang . String rowId = "largerowappend" ; int batch = 2 ; int batchSize = 10000 ; for ( int i = 0 ; i < batch ; i ++ ) { System . out . println ( ( ( "Adding<sp>Batch<sp>[" + i ) + "]" ) ) ; indexManager . mutate ( getLargeRow ( rowId , RowMutationType . UPDATE_ROW , batchSi... | org . junit . Assert . assertEquals ( ( batch * batchSize ) , fetchRowResult . getTotalRecords ( ) ) |
testIsNotEmpty ( ) { it . unimi . dsi . fastutil . ints . IntCollection test = it . unimi . dsi . fastutil . ints . IntCollections . asCollection ( ( ) -> it . unimi . dsi . fastutil . ints . IntSets . singleton ( 0 ) . iterator ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return delegate . isEmpty ( ) ; } | org . junit . Assert . assertFalse ( test . isEmpty ( ) ) |
isDefinedAt_A$Object ( ) { com . m3 . scalaflavor4j . PartialFunction < java . lang . String > target = com . m3 . scalaflavor4j . PartialFunction . < java . lang . String > apply ( com . m3 . scalaflavor4j . Seq . < com . m3 . scalaflavor4j . CaseClause < ? , java . lang . String > > apply ( com . m3 . scalaflavor4j .... | org . junit . Assert . assertThat ( target . isDefinedAt ( "foo" ) , org . hamcrest . CoreMatchers . is ( true ) ) |
test ( ) { java . lang . String testFile = "../data/skwiki_test_rootChanges_sample.txt" ; mergingInflectedFormNE . Main m = new mergingInflectedFormNE . Main ( ) ; mergingInflectedFormNE . FileReader fr = new mergingInflectedFormNE . FileReader ( ) ; testAndTools . StringTools st = new testAndTools . StringTools ( ) ; ... | org . junit . Assert . assertEquals ( outputData , testData . substring ( 1 ) ) |
testDynamicRuleAdditionsWithEntryPoints ( ) { java . util . Collection < org . kie . api . definition . KiePackage > kpkgs = loadKnowledgePackages ( "test_DynamicWithEntryPoint.drl" ) ; org . drools . core . impl . InternalKnowledgeBase kbase = ( ( org . drools . core . impl . InternalKnowledgeBase ) ( getKnowledgeBase... | org . junit . Assert . assertEquals ( 3 , results . size ( ) ) |
testTranslateCadeiraUsingPTBRtoChineseSimplified ( ) { java . lang . String expected = "" ; java . lang . String actual = com . viniciusmo . androidtextspeech . Translator . translate ( Language . PORTUGUESE_BR , Language . CHINESE_SIMPLIFIED , "cadeira" ) ; "<AssertPlaceHolder>" ; } translate ( com . viniciusmo . andr... | org . junit . Assert . assertEquals ( expected , actual ) |
getPatients_shouldNotMatchVoidedPatients_SignatureNo2 ( ) { java . util . List < org . openmrs . Patient > patients = dao . getPatients ( "Meriadoc" , 0 , 11 ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream . C... | org . junit . Assert . assertEquals ( 0 , patients . size ( ) ) |
testParseRenderer_formatSpecified ( ) { java . lang . String uriString = "http://localhost.com:8080/api/v1/clusters/c1" ; java . net . URI uri = new java . net . URI ( java . net . URLEncoder . encode ( uriString , "UTF-8" ) ) ; org . apache . ambari . server . api . predicate . PredicateCompiler compiler = createStric... | org . junit . Assert . assertSame ( renderer , request . getRenderer ( ) ) |
testConvertAll ( ) { java . lang . String name = "first<sp>blood" ; java . lang . String name1 = "first1<sp>blood1" ; java . lang . Long subjectTypeId = 1L ; org . lnu . is . domain . subject . SubjectType subjectType = new org . lnu . is . domain . subject . SubjectType ( ) ; subjectType . setId ( subjectTypeId ) ; or... | org . junit . Assert . assertEquals ( expecteds , actuals ) |
loadingLatestAccountWorks ( ) { list . addAccount ( new fi . helsinki . cs . tmc . cli . backend . Account ( "-" , "D" ) ) ; list . addAccount ( new fi . helsinki . cs . tmc . cli . backend . Account ( "2" , "e" ) ) ; list . addAccount ( account ) ; fi . helsinki . cs . tmc . cli . backend . Account latest = list . get... | org . junit . Assert . assertSame ( account , latest ) |
testgetStormUiPropertyHttps ( ) { when ( environment . getProperty ( org . apache . metron . rest . MetronRestConstants . STORM_UI_SPRING_PROPERTY ) ) . thenReturn ( org . apache . metron . rest . service . impl . StormStatusServiceImplTest . HTTPS_STORM_UI ) ; org . apache . metron . rest . service . impl . StormStatu... | org . junit . Assert . assertEquals ( org . apache . metron . rest . service . impl . StormStatusServiceImplTest . HTTPS_STORM_UI , serviceImpl . getStormUiProperty ( ) ) |
normalizeQuaternion ( ) { double a = this . random . nextDouble ( ) ; double b = this . random . nextDouble ( ) ; double c = this . random . nextDouble ( ) ; double d = this . random . nextDouble ( ) ; org . arakhne . afc . math . geometry . d3 . continuous . Quaternion q1 = new org . arakhne . afc . math . geometry . ... | org . junit . Assert . assertTrue ( q1 . equals ( q2 ) ) |
testDirectBinaryEncoderInit ( ) { java . io . OutputStream out = new java . io . ByteArrayOutputStream ( ) ; org . apache . avro . io . BinaryEncoder enc = org . apache . avro . io . TestEncoders . factory . directBinaryEncoder ( out , null ) ; "<AssertPlaceHolder>" ; } directBinaryEncoder ( java . io . OutputStream , ... | org . junit . Assert . assertSame ( enc , org . apache . avro . io . TestEncoders . factory . directBinaryEncoder ( out , enc ) ) |
testPerformance ( ) { long count = 0 ; long start = java . lang . System . currentTimeMillis ( ) ; while ( ( java . lang . System . currentTimeMillis ( ) ) < ( start + 5000 ) ) { long id = generator . getId ( ) ; count ++ ; org . apache . marmotta . kiwi . test . generator . SnowflakeTest . log . trace ( "Generated<sp>... | org . junit . Assert . assertTrue ( ( count > 5000 ) ) |
testExonIDInReferenceOrderForward ( ) { de . charite . compbio . jannovar . reference . TranscriptProjectionDecorator projector = new de . charite . compbio . jannovar . reference . TranscriptProjectionDecorator ( infoForward ) ; for ( int i = 0 ; i < 11 ; ++ i ) "<AssertPlaceHolder>" ; } exonIDInReferenceOrder ( int )... | org . junit . Assert . assertEquals ( i , projector . exonIDInReferenceOrder ( i ) ) |
testResultNumReturnedIsNull ( ) { final java . lang . String TITLE = "title" ; final java . lang . String searchPhrase = "*" ; final int pageSize = 1 ; org . codice . ddf . spatial . ogc . wfs . v2_0_0 . catalog . source . WfsSource source = getWfsSource ( org . codice . ddf . spatial . ogc . wfs . v2_0_0 . catalog . s... | org . junit . Assert . assertEquals ( 3 , resp . getResults ( ) . size ( ) ) |
testCoversCRS ( ) { org . locationtech . jts . geom . GeometryFactory fact = new org . locationtech . jts . geom . GeometryFactory ( ) ; final org . locationtech . jts . geom . LinearRing ring = fact . createLinearRing ( new org . locationtech . jts . geom . Coordinate [ ] { new org . locationtech . jts . geom . Coordi... | org . junit . Assert . assertTrue ( expected . equals ( result ) ) |
shouldHoldSharedIndexLockIfNodeIsExists ( ) { org . neo4j . internal . kernel . api . NodeValueIndexCursor cursor = mock ( org . neo4j . internal . kernel . api . NodeValueIndexCursor . class ) ; when ( cursor . next ( ) ) . thenReturn ( true ) ; when ( cursor . nodeReference ( ) ) . thenReturn ( 42L ) ; long nodeId = ... | org . junit . Assert . assertEquals ( 42L , nodeId ) |
testContinuousLearning ( ) { org . hawkular . datamining . forecast . ModelData rModel = org . hawkular . datamining . forecast . ModelReader . read ( "trendStatUpwardLowVar" ) ; org . hawkular . datamining . forecast . models . DoubleExponentialSmoothing . DoubleExOptimizer optimizer = org . hawkular . datamining . fo... | org . junit . Assert . assertTrue ( ( ( continuousLearnStatistics . getMse ( ) ) > ( batchInitStatistics . getMse ( ) ) ) ) |
testCoreQueryAndFetch ( ) { org . nuxeo . ecm . platform . contentview . jsf . ContentView contentView = service . getContentView ( "CURRENT_DOCUMENT_CHILDREN_FETCH" ) ; "<AssertPlaceHolder>" ; java . lang . String parentIdParam = session . getRootDocument ( ) . getId ( ) ; org . nuxeo . ecm . platform . query . api . ... | org . junit . Assert . assertNotNull ( contentView ) |
testAppPermissionType ( ) { org . onosproject . security . AppPermission . Type type = org . onosproject . security . AppPermission . Type . APP_WRITE ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( Type . APP_WRITE , type ) |
testAuthenticate ( ) { System . out . println ( "authenticate" ) ; net . jeremybrooks . knicker . dto . AuthenticationToken result = net . jeremybrooks . knicker . AccountApi . authenticate ( net . jeremybrooks . knicker . AccountApiTest . username , net . jeremybrooks . knicker . AccountApiTest . password ) ; "<Assert... | org . junit . Assert . assertNotNull ( result ) |
testTarWithLongFilename ( ) { java . lang . StringBuilder filename = new java . lang . StringBuilder ( ) ; java . util . List < java . lang . String > l = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 20 ; i ++ ) { filename . append ( "1234567890/" ) ; l . add ( filename . toString ( ) ) ; } filename . append... | org . junit . Assert . assertArrayEquals ( l . toArray ( new java . lang . String [ 0 ] ) , listTarEntries ( result ) ) |
shouldRejectInvalidDelayRangeMin ( ) { hm . setDelay ( 0 ) ; result = hmv . validate ( hm , org . openstack . atlas . api . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results . ValidatorResult , java . lang . Enum ) { java . lang . StringBuil... | org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . validation . validators . PUT ) , result . passedValidation ( ) ) |
simpleTestAES256 ( ) { org . jscep . message . PkiMessage < ? > actual = encodeAndDecodeEnvelope ( "AES_256" ) ; "<AssertPlaceHolder>" ; } encodeAndDecodeEnvelope ( java . lang . String ) { java . security . KeyPair caPair = java . security . KeyPairGenerator . getInstance ( "RSA" ) . generateKeyPair ( ) ; java . secur... | org . junit . Assert . assertEquals ( message , actual ) |
string ( ) { net . hamnaberg . json . Json . JObject object = net . hamnaberg . json . Json . jObject ( "meh" , "hello" ) ; java . lang . String expected = "{\"meh\":\"hello\"}" ; "<AssertPlaceHolder>" ; } writeToString ( net . hamnaberg . json . Json$JValue ) { return net . hamnaberg . json . io . JsonSerializer . wri... | org . junit . Assert . assertEquals ( expected , net . hamnaberg . json . io . JsonSerializer . writeToString ( object ) ) |
setValue ( ) { java . lang . String value = "<xml>xyz</xml>" ; tppd . setValue ( value ) ; java . lang . String s = tppd . getValue ( java . lang . String . class ) ; "<AssertPlaceHolder>" ; } getValue ( org . oscm . app . vmware . business . VMwareValue$Unit ) { if ( ( targetUnit != null ) && ( ( unit ) != null ) ) { ... | org . junit . Assert . assertEquals ( value , s ) |
irrespective_of_configured_value ( ) { allowingConfigurationToReturn ( EditingObjectsConfiguration . EDIT_OBJECTS_KEY , "false" ) ; facetFactory . process ( new org . apache . isis . core . metamodel . facets . FacetFactory . ProcessClassContext ( org . apache . isis . core . metamodel . facets . object . domainobject ... | org . junit . Assert . assertNull ( facet ) |
deactivateTenantVcenterByTenantAdmin ( ) { com . emc . storageos . api . service . BalancedWebResource subTenantAdmin = loginUser ( getSubTenantAdminWithDomain ( ) ) ; java . net . URI vCenterId = createDefaultVcenterNoCleanUpRegister ( subTenantAdmin , HttpStatus . SC_ACCEPTED , false , false ) ; java . util . List < ... | org . junit . Assert . assertEquals ( 1 , vCenterAcls . size ( ) ) |
testEasyBox3 ( ) { System . out . println ( ( "sodium.version=<sp>" + ( Sodium . SODIUM . sodium_version_string ( ) ) ) ) ; net . openhft . chronicle . bytes . BytesStore message = net . openhft . chronicle . bytes . NativeBytesStore . from ( "test" ) ; net . openhft . chronicle . salt . EasyBox . KeyPair alice = EasyB... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( message . toByteArray ( ) , message2 . toByteArray ( ) ) ) |
testOphalenGerelateerdeProcessen ( ) { final java . util . List < java . lang . Long > opgehaaldeIds = new java . util . ArrayList ( ) ; opgehaaldeIds . add ( nl . bzk . migratiebrp . isc . opschoner . dao . impl . MigDaoImplTest . GERELATEERD_PROCES_ID ) ; final java . util . List < java . lang . Long > datumLaatsteBe... | org . junit . Assert . assertEquals ( opgehaaldeIds , datumLaatsteBericht ) |
getDisplayString_shouldReturnTheNamePropertyWhenNoLocalizedMessageIsSpecified ( ) { org . openmrs . Location location = new org . openmrs . Location ( ) ; location . setName ( "Correct" ) ; org . openmrs . module . webservices . rest . web . resource . impl . MetadataDelegatingCrudResourceTest . MockLocationResource re... | org . junit . Assert . assertThat ( display , org . hamcrest . core . Is . is ( "Correct" ) ) |
testSafeCreateCommandNotExisting ( ) { java . lang . String alias = "javax.jdo.option.ConnectionPassword" ; java . lang . String credential = "MyTopSecretPassword" ; java . lang . String providerPath = getProviderPath ( "CreateCommandTest.jceks" ) ; java . lang . String [ ] args ; int exitCode ; credential = "AnotherTo... | org . junit . Assert . assertEquals ( exitCode , 0 ) |
testCustomPrefixWithoutSeparator ( ) { testHandler = new org . apache . juli . FileHandler ( this . getTemporaryDirectory ( ) . toString ( ) , "juli" , ".log" ) ; java . io . File logFile = new java . io . File ( this . getTemporaryDirectory ( ) , "juli.log" ) ; "<AssertPlaceHolder>" ; } exists ( ) { return war . exist... | org . junit . Assert . assertTrue ( logFile . exists ( ) ) |
testImplement ( ) { final com . cloud . network . dao . PhysicalNetworkVO physnet = mock ( com . cloud . network . dao . PhysicalNetworkVO . class ) ; when ( physnetdao . findById ( ( ( java . lang . Long ) ( any ( ) ) ) ) ) . thenReturn ( physnet ) ; when ( physnet . getIsolationMethods ( ) ) . thenReturn ( java . uti... | org . junit . Assert . assertTrue ( ( implementednetwork != null ) ) |
testDisposeControl ( ) { org . eclipse . swt . widgets . List list = new org . eclipse . swt . widgets . List ( shell , org . eclipse . swt . SWT . None ) ; org . eclipse . swt . dnd . DragSource dragSource = new org . eclipse . swt . dnd . DragSource ( list , DND . DROP_MOVE ) ; list . dispose ( ) ; "<AssertPlaceHolde... | org . junit . Assert . assertTrue ( dragSource . isDisposed ( ) ) |
testNextValueArray ( ) { org . roaringbitmap . buffer . MutableRoaringBitmap r = new org . roaringbitmap . buffer . MutableRoaringBitmap ( ) ; r . add ( 0 , 1 , 2 , 4 , 6 ) ; "<AssertPlaceHolder>" ; } nextValue ( short ) { int index = org . roaringbitmap . RunContainer . unsignedInterleavedBinarySearch ( valueslength ,... | org . junit . Assert . assertEquals ( ( - 1 ) , r . nextValue ( 7 ) ) |
testProcessingOrderClientPublishServiceServerPublish ( ) { final java . util . Queue < java . lang . String > events = new java . util . concurrent . ConcurrentLinkedQueue ( ) ; org . cometd . bayeux . server . LocalSession session0 = _bayeux . newLocalSession ( "0.srv.ssn.ext.snd.rpy" 1 ) ; session0 . handshake ( ) ; ... | org . junit . Assert . assertEquals ( expected , new java . util . ArrayList ( events ) ) |
testIsHasMoreStreamsFalse ( ) { when ( mockResult . getLastEvaluatedStreamArn ( ) ) . thenReturn ( null ) ; "<AssertPlaceHolder>" ; } isHasMoreStreams ( ) { return ( internalResult . getLastEvaluatedStreamArn ( ) ) != null ; } | org . junit . Assert . assertFalse ( adapter . isHasMoreStreams ( ) ) |
errorInPopup ( ) { final java . util . List < net . jsourcerer . webdriver . jserrorcollector . JavaScriptError > expectedErrors = java . util . Arrays . asList ( errorPopupHtml ) ; final org . openqa . selenium . WebDriver driver = buildFFDriver ( ) ; driver . get ( urlWithPopupHtml ) ; driver . findElement ( org . op... | org . junit . Assert . assertEquals ( expectedErrors . toString ( ) , jsErrors . toString ( ) ) |
testGetSPARQLprefix ( ) { java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; map . put ( "rdfs" , "<http://www.w3.org/2000/01/rdf-schema#>" ) ; map . put ( "xsd" , "<http://www.w3.org/2000/01/rdf-schema#>" ) ; map . put... | org . junit . Assert . assertEquals ( expResult , result ) |
assertCreatedAnnotationNotEqualToLiteralWithDifferentMemberValues ( ) { java . util . Map < java . lang . String , java . lang . String > memberValue = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; memberValue . put ( "value" , "test1" ) ; javax . inject . Named named1 = org . apache .... | org . junit . Assert . assertFalse ( named1 . equals ( named2 ) ) |
testCumProd ( ) { org . nd4j . autodiff . opvalidation . List < java . lang . String > failing = new org . nd4j . autodiff . opvalidation . ArrayList ( ) ; for ( char order : new char [ ] { 'c' , 'f' } ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; org . nd4j . linalg . api . ndarray . I... | org . junit . Assert . assertEquals ( failing . toString ( ) , 0 , failing . size ( ) ) |
testFillHoles ( ) { net . imglib2 . img . Img < net . imglib2 . type . logic . BitType > result = ops . create ( ) . img ( imgWithHoles ) ; ops . morphology ( ) . fillHoles ( result , imgWithHoles , new net . imglib2 . algorithm . neighborhood . DiamondShape ( 1 ) ) ; net . imglib2 . Cursor < net . imglib2 . type . log... | org . junit . Assert . assertEquals ( one , resultC . next ( ) ) |
testCos ( ) { final org . apache . commons . math4 . analysis . UnivariateFunction cos = new org . apache . commons . math4 . analysis . function . Cos ( ) ; final org . apache . commons . math4 . analysis . integration . gauss . GaussIntegrator integrator = org . apache . commons . math4 . analysis . integration . gau... | org . junit . Assert . assertEquals ( 1 , s , java . lang . Math . ulp ( 1.0 ) ) |
testPojoRoutes ( ) { org . apache . camel . CamelContext camelContext = new org . apache . camel . impl . DefaultCamelContext ( ) ; camelContext . addRoutes ( new org . apache . camel . builder . RouteBuilder ( ) { public void configure ( ) { from ( "direct:hello" ) . transform ( ) . constant ( "Good<sp>Bye!" ) ; } } )... | org . junit . Assert . assertEquals ( "Good<sp>Bye!" , rc ) |
checkTimeoutErrorWithJsonErrorText ( ) { final boolean isTimeout = abstractMethodCallback . checkTimeoutError ( new java . lang . Exception ( AbstractMethodCallback . ERROR_TEXT_RESPONSE_WAS_NOT_A_VALID_JSON ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( false , isTimeout ) |
shouldHaveNextFromCache ( ) { final org . apache . kafka . streams . state . internals . MergedSortedCacheSessionStoreIterator mergeIterator = createIterator ( java . util . Collections . emptyIterator ( ) , cacheKvs ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return false ; } | org . junit . Assert . assertTrue ( mergeIterator . hasNext ( ) ) |
testWrapException ( ) { org . apache . hadoop . test . LambdaTestUtils . intercept ( java . io . EOFException . class , ( "Failed<sp>with<sp>java.io.EOFException<sp>while<sp>processing<sp>file/directory<sp>" + ":[/tmp/abc.txt]<sp>in<sp>method:[testWrapException]" ) , ( ) -> { throw org . apache . hadoop . io . IOUtils ... | org . junit . Assert . assertEquals ( "/tmp/abc.txt" , returnedEx . getPath ( ) . toString ( ) ) |
testBuildReportChunkSuccessfull1 ( ) { instance . buildReportChunk ( ichunk , doc , true ) ; java . util . ArrayList < java . lang . Object [ ] > events = docListener . getCapturedEvents ( ) ; "<AssertPlaceHolder>" ; java . lang . Object [ ] event = events . get ( 0 ) ; confirmParagraphAdded ( event , "CONTEXT:<sp>ERRO... | org . junit . Assert . assertTrue ( ( ( events . size ( ) ) == 6 ) ) |
shouldObeyPriorityOfRoutes ( ) { br . com . caelum . vraptor . http . route . Route first = mock ( br . com . caelum . vraptor . http . route . Route . class ) ; when ( first . getControllerMethod ( ) ) . thenReturn ( anyControllerMethod ( ) ) ; br . com . caelum . vraptor . http . route . Route second = mock ( br . co... | org . junit . Assert . assertThat ( found , org . hamcrest . Matchers . is ( method2 ) ) |
test_CaptureRight ( ) { classUnderTest = addWhitePawn ( GenericPosition . e2 ) ; addBlackPawn ( GenericPosition . d3 ) ; ml = classUnderTest . generateMoves ( new eubos . board . Board ( pl ) ) ; expectedMove = new eubos . board . pieces . GenericMove ( GenericPosition . e2 , GenericPosition . d3 ) ; "<AssertPlaceHolde... | org . junit . Assert . assertTrue ( ml . contains ( expectedMove ) ) |
stress_restore_large ( ) { int count = 10000000 ; com . asakusafw . runtime . value . DecimalOption value = new com . asakusafw . runtime . value . DecimalOption ( new java . math . BigDecimal ( Long . MAX_VALUE ) . multiply ( BigDecimal . TEN ) ) ; byte [ ] bytes = toBytes ( value ) ; com . asakusafw . runtime . value... | org . junit . Assert . assertThat ( buf , is ( value ) ) |
testSignalToSlot ( ) { react . Signal < java . lang . Integer > signal = react . Signal . create ( ) ; react . SignalTest . AccSlot < java . lang . Integer > slot = new react . SignalTest . AccSlot < java . lang . Integer > ( ) ; signal . connect ( slot ) ; signal . emit ( 1 ) ; signal . emit ( 2 ) ; signal . emit ( 3 ... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( 1 , 2 , 3 ) , slot . events ) |
testGetBestCandidateForGroup2 ( ) { final com . github . davidmoten . rtree3d . Mbr r1 = com . github . davidmoten . rtree3d . QuadraticSplitterTest . r ( 1 ) ; final com . github . davidmoten . rtree3d . Mbr r2 = com . github . davidmoten . rtree3d . QuadraticSplitterTest . r ( 2 ) ; final com . github . davidmoten . ... | org . junit . Assert . assertEquals ( r1 , r ) |
getSecond_A$Calendar_60 ( ) { java . lang . Integer expected = 0 ; java . util . Calendar arg0 = java . util . Calendar . getInstance ( ) ; arg0 . set ( Calendar . SECOND , 60 ) ; java . lang . Integer actual = com . github . seratch . taskun . util . CalendarUtil . getSecond ( arg0 ) ; "<AssertPlaceHolder>" ; } getSec... | org . junit . Assert . assertEquals ( expected , actual ) |
test42createXPermMapNull ( ) { org . mockito . Mockito . when ( xUserMgr . createXPermMap ( null ) ) . thenReturn ( null ) ; org . apache . ranger . view . VXPermMap retVxGroup = xUserRest . createXPermMap ( null ) ; org . mockito . Mockito . verify ( xUserMgr ) . createXPermMap ( null ) ; "<AssertPlaceHolder>" ; } cre... | org . junit . Assert . assertNull ( retVxGroup ) |
testGetFile ( ) { java . io . InputStream is = new java . io . FileInputStream ( new java . io . java . io . File ( "src/main/resources/test-files/image.jpg" ) ) ; eu . dime . ps . storage . datastore . DataStoreTest . dataStore . addFile ( "12345" , "uri://testfile2" , is ) ; "<AssertPlaceHolder>" ; java . io . InputS... | org . junit . Assert . assertTrue ( eu . dime . ps . storage . datastore . DataStoreTest . dataStore . fileExists ( "uri://testfile2" ) ) |
testBucketBatch ( ) { byte [ ] TABLE = org . apache . hadoop . hbase . util . Bytes . toBytes ( "testBucketBatch" ) ; org . apache . hadoop . hbase . client . HTable ht = org . apache . hadoop . hbase . client . TestHTableUtil . TEST_UTIL . createTable ( TABLE , org . apache . hadoop . hbase . client . TestHTableUtil .... | org . junit . Assert . assertEquals ( count , rows . size ( ) ) |
testFinish ( ) { java . io . File tempZipFile = new java . io . File ( _tempZipFilePath ) ; com . liferay . portal . kernel . zip . ZipWriter zipWriter = new com . liferay . portal . zip . ZipWriterImpl ( tempZipFile ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "This<sp>is<sp... | org . junit . Assert . assertArrayEquals ( com . liferay . portal . kernel . util . FileUtil . getBytes ( tempZipFile ) , bytes ) |
fromObjectIntProcedure ( ) { com . gs . collections . api . list . ImmutableList < java . lang . String > expectedResults = Lists . immutable . of ( "zero0" , "one1" , "two2" ) ; com . gs . collections . api . list . MutableList < java . lang . String > actualResults = Lists . mutable . of ( ) ; com . gs . collections ... | org . junit . Assert . assertEquals ( expectedResults , actualResults ) |
emptyTag ( ) { java . lang . String xml = "<empty<sp>/>" ; com . tickaroo . tikxml . XmlReader reader = com . tickaroo . tikxml . TestUtils . readerFrom ( xml ) ; reader . beginElement ( ) ; "<AssertPlaceHolder>" ; reader . nextElementName ( ) ; reader . endElement ( ) ; } hasAttribute ( ) { int p = peeked ; if ( p == ... | org . junit . Assert . assertFalse ( reader . hasAttribute ( ) ) |
get_A$Request_followRedirects ( ) { com . m3 . curly . com . m3 . curly . Request request = new com . m3 . curly . Request ( "http://localhost:8812/" ) . setFollowRedirects ( true ) ; com . m3 . curly . Response response = com . m3 . curly . com . m3 . curly . HTTP . get ( request ) ; "<AssertPlaceHolder>" ; } getStatu... | org . junit . Assert . assertThat ( response . getStatus ( ) , is ( 200 ) ) |
command_help ( ) { com . asakusafw . utils . jcommander . JCommanderWrapper < java . util . function . Supplier < java . lang . String > > commander = new com . asakusafw . utils . jcommander . JCommanderWrapper ( "PG" , new com . asakusafw . utils . jcommander . JCommanderWrapperTest . Cmd ( "R" ) ) ; commander . addC... | org . junit . Assert . assertThat ( result , is ( java . util . Optional . empty ( ) ) ) |
testInSubQuery ( ) { com . j256 . ormlite . table . TableInfo < com . j256 . ormlite . stmt . WhereTest . ForeignFoo , java . lang . Integer > tableInfo = new com . j256 . ormlite . table . TableInfo < com . j256 . ormlite . stmt . WhereTest . ForeignFoo , java . lang . Integer > ( databaseType , com . j256 . ormlite .... | org . junit . Assert . assertEquals ( sb . toString ( ) , whereSb . toString ( ) ) |
selectedPoolsShouldMonotonicallyDescreaseInWeightWhenContinuouslyRemoved ( ) { givenAFileWithAReplicaOnAllResilientPools ( ) ; givenTagConstraintsOn ( "hostname" , "rack" ) ; givenThePoolInfoForThisFile ( ) ; do { whenTheExtractorIsCalledForTheSetOfLocationsToRemove ( ) ; andThenAPoolIsRandomlySelectedAndRemoved ( ) ; ... | org . junit . Assert . assertTrue ( theWeightsAreMonotonicallyDecreasing ( ) ) |
testValueOnEmptyChildFiresImmediately ( ) { com . google . firebase . database . DatabaseReference ref = com . google . firebase . testing . IntegrationTestUtils . getRandomNode ( com . google . firebase . database . integration . EventTestIT . masterApp ) ; new com . google . firebase . database . future . ReadFuture ... | org . junit . Assert . assertNull ( snap . getValue ( ) ) |
testReadRepException ( ) { org . pentaho . di . trans . steps . xmloutput . XMLOutputMeta xmlOutputMeta = new org . pentaho . di . trans . steps . xmloutput . XMLOutputMeta ( ) ; org . pentaho . di . repository . Repository rep = mock ( org . pentaho . di . repository . Repository . class ) ; org . pentaho . metastore ... | org . junit . Assert . assertEquals ( "encoding<sp>exception" , e . getCause ( ) . getMessage ( ) ) |
testCanReadAceNode ( ) { org . apache . jackrabbit . oak . spi . security . authorization . permission . TreePermission tp = getTreePermission ( accessSession , root . getTree ( org . apache . jackrabbit . oak . security . authorization . permission . RepoPolicyTreePermissionTest . REPO_POLICY_PATH ) . getChildren ( ) ... | org . junit . Assert . assertTrue ( tp . canRead ( ) ) |
skipImplicit ( ) { org . arend . typechecking . visitor . CheckTypeVisitor . Result result = typeCheckExpr ( "\\lam<sp>x<sp>=><sp>x" , org . arend . ExpressionFactory . Pi ( singleParams ( false , java . util . Collections . singletonList ( null ) , Nat ( ) ) , org . arend . ExpressionFactory . Pi ( singleParams ( true... | org . junit . Assert . assertNotNull ( result ) |
testDisassociateTrustBundleFromDomain_unknownDomain_assertException ( ) { boolean exceptionOccured = false ; final javax . persistence . EntityManager mgr = mock ( javax . persistence . EntityManager . class ) ; final org . nhindirect . config . store . dao . DomainDao domainDao = mock ( org . nhindirect . config . sto... | org . junit . Assert . assertTrue ( exceptionOccured ) |
testFailingStep ( ) { mockBaseWizard . setAllStepsPass ( false ) ; "<AssertPlaceHolder>" ; } runSteps ( ) { for ( org . meridor . perspective . shell . interactive . wizard . WizardScreen wizardScreen : this ) { org . meridor . perspective . shell . interactive . wizard . Step currentStep = wizardScreen . getStep ( get... | org . junit . Assert . assertThat ( mockBaseWizard . runSteps ( ) , org . hamcrest . Matchers . is ( false ) ) |
getAll ( ) { int count = org . slim3 . datastore . Datastore . query ( slim3 . demo . model . Blog . class ) . count ( ) ; slim3 . demo . model . Blog blog = new slim3 . demo . model . Blog ( ) ; org . slim3 . datastore . Datastore . put ( blog ) ; "<AssertPlaceHolder>" ; } getAll ( ) { int count = org . slim3 . datast... | org . junit . Assert . assertThat ( service . getAll ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( ( count + 1 ) ) ) |
getDeletionReason ( ) { manageReviewCtrl . setDeletionReason ( "Reason" ) ; java . lang . String result = manageReviewCtrl . getDeletionReason ( ) ; "<AssertPlaceHolder>" ; } getDeletionReason ( ) { return deletionReason ; } | org . junit . Assert . assertEquals ( "Reason" , result ) |
testLong2 ( ) { java . lang . Long l = executeBackAndForth ( 10000000000L , testcase . function . Long . class ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( "RuleItem{" + "rule_id='" ) + ( rule_id ) ) + '\'' ) + ",<sp>item_id='" ) + ( item_id ) ) + '\'' ) + ",<sp>warning_value='" ) + ( war... | org . junit . Assert . assertEquals ( java . lang . String . valueOf ( 10000000000L ) , l . toString ( ) ) |
testGetParameters ( ) { java . lang . String zipCode = "house" 3 ; java . lang . String street = "street" ; java . lang . String house = "house" 1 ; java . lang . String apartment = "appartment<sp>1" ; java . util . Date begDate = new java . util . Date ( ) ; java . util . Date endDate = new java . util . Date ( ) ; ja... | org . junit . Assert . assertEquals ( expected , actual ) |
testIsConnected ( ) { when ( serverProperties . getPing ( ) ) . thenReturn ( new org . bff . javampd . server . ServerProperties ( ) . getPing ( ) ) ; when ( mpdCommandExecutor . sendCommand ( serverProperties . getPing ( ) ) ) . thenReturn ( new java . util . ArrayList ( ) ) ; org . bff . javampd . server . MPD mpd = ... | org . junit . Assert . assertTrue ( mpd . isConnected ( ) ) |
passthroughInboundPatientDiscovery ( ) { org . hl7 . v3 . PRPAIN201305UV02 request = new org . hl7 . v3 . PRPAIN201305UV02 ( ) ; gov . hhs . fha . nhinc . common . nhinccommon . AssertionType assertion = new gov . hhs . fha . nhinc . common . nhinccommon . AssertionType ( ) ; org . hl7 . v3 . PRPAIN201306UV02 expectedR... | org . junit . Assert . assertSame ( expectedResponse , actualResponse ) |
testSetSupportedCountries_negative ( ) { org . oscm . domobjects . Organization org = new org . oscm . domobjects . Organization ( ) ; org . setSupportedCountry ( new org . oscm . domobjects . SupportedCountry ( "DE" ) ) ; org . setSupportedCountry ( new org . oscm . domobjects . SupportedCountry ( "DE" ) ) ; "<AssertP... | org . junit . Assert . assertEquals ( 1 , org . getSupportedCountryCodes ( ) . size ( ) ) |
testSetAlreadyCreated ( ) { linkInformation . setAlreadyCreated ( true ) ; "<AssertPlaceHolder>" ; } isAlreadyCreated ( ) { return alreadyCreated ; } | org . junit . Assert . assertThat ( linkInformation . isAlreadyCreated ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
test ( ) { redis . clients . jedis . ShardedJedis jedis = pool . getResource ( ) ; java . lang . String keys = "name" ; java . lang . String value = "snowolf" ; jedis . del ( keys ) ; jedis . set ( keys , value ) ; java . lang . String v = jedis . get ( keys ) ; System . out . println ( v ) ; pool . returnResource ( je... | org . junit . Assert . assertEquals ( value , v ) |
testValidateUrl_Localhost8080 ( ) { boolean result = org . oscm . validator . ADMValidator . isUrl ( "http://localhost:8080" ) ; "<AssertPlaceHolder>" ; } isUrl ( java . lang . String ) { return org . oscm . validator . ADMValidator . URL_VALIDATOR . isValid ( value ) ; } | org . junit . Assert . assertTrue ( result ) |
testDirAnnotation ( ) { "<AssertPlaceHolder>" ; } getTestDir ( ) { java . io . File testDir = org . apache . hadoop . test . TestDirHelper . TEST_DIR_TL . get ( ) ; if ( testDir == null ) { throw new java . lang . IllegalStateException ( "This<sp>test<sp>does<sp>not<sp>use<sp>@TestDir" ) ; } return testDir ; } | org . junit . Assert . assertNotNull ( org . apache . hadoop . test . TestDirHelper . getTestDir ( ) ) |
createHashMap_capacity ( ) { java . util . Map < java . lang . String , java . lang . Integer > map = createHashMap ( 2 ) ; "<AssertPlaceHolder>" ; } createHashMap ( int ) { return new java . util . HashMap < K , V > ( initialCapacity ) ; } | org . junit . Assert . assertSame ( java . util . HashMap . class , map . getClass ( ) ) |
testConvertToAvro ( ) { long expected = 123456789L ; org . talend . daikon . avro . converter . AvroConverter < java . util . Date , java . lang . Long > converter = new org . talend . codegen . converter . DateLogicalTimestampConverter ( ) ; long actual = converter . convertToAvro ( new java . util . Date ( 123456789L... | org . junit . Assert . assertEquals ( expected , actual ) |
saveUser ( ) { java . lang . String salt = cn . hutool . core . util . IdUtil . fastSimpleUUID ( ) ; com . xkcoding . orm . mybatis . entity . User user = com . xkcoding . orm . mybatis . entity . User . builder ( ) . name ( "testSave3" ) . password ( cn . hutool . crypto . SecureUtil . md5 ( ( "123456" + salt ) ) ) . ... | org . junit . Assert . assertEquals ( 1 , i ) |
insideSzeneBoundariesTest_OutOfSceneBounds ( ) { double [ ] size = new double [ ] { 512 , 512 , 512 } ; de . biomedical_imaging . traJ . simulation . AnomalousDiffusionScene s = new de . biomedical_imaging . traJ . simulation . AnomalousDiffusionScene ( size , 3 ) ; double [ ] obstaclePosition = new double [ ] { 127 , ... | org . junit . Assert . assertFalse ( result ) |
primFloatParamShouldHandleNull ( ) { create ( "primFloatParam" ) . invoke ( mockController , context ) ; verify ( mockController ) . primFloatParam ( 0 ) ; "<AssertPlaceHolder>" ; } hasViolations ( ) { return ! ( this . violations . isEmpty ( ) ) ; } | org . junit . Assert . assertFalse ( validation . hasViolations ( ) ) |
scaleAddIntVector3DVector3D ( ) { org . arakhne . afc . math . geometry . d3 . continuous . Vector3f v1 = new org . arakhne . afc . math . geometry . d3 . continuous . Vector3f ( this . random . nextDouble ( ) , this . random . nextDouble ( ) , this . random . nextDouble ( ) ) ; org . arakhne . afc . math . geometry . ... | org . junit . Assert . assertTrue ( scalarSum . equals ( v1 ) ) |
testNoContentType ( ) { java . lang . String body = "a=1&b=2" ; java . lang . String queryString = "c=3&d=4" ; org . springframework . mock . web . MockHttpServletRequest req = makeRequest ( body , queryString ) ; req . setContentType ( null ) ; java . io . BufferedReader br = req . getReader ( ) ; while ( ( br . readL... | org . junit . Assert . assertEquals ( 0 , params . size ( ) ) |
testCreateBackupFromDatabaseObject ( ) { org . sagebionetworks . repo . model . dbo . persistence . subscription . DBOSubscription dbo = new org . sagebionetworks . repo . model . dbo . persistence . subscription . DBOSubscription ( ) ; dbo . setId ( 1L ) ; dbo . setObjectId ( 2L ) ; dbo . setObjectType ( SubscriptionO... | org . junit . Assert . assertTrue ( dbo2 . getObjectType ( ) . equals ( SubscriptionObjectType . THREAD . name ( ) ) ) |
testExceptionInValidateDuringBindDoesNotThrow ( ) { org . glassfish . hk2 . api . ServiceLocator locator = org . glassfish . hk2 . tests . locator . utilities . LocatorHelper . getServiceLocator ( org . glassfish . hk2 . tests . locator . negative . validation . ValidationServiceImpl . class ) ; org . glassfish . hk2 .... | org . junit . Assert . assertNull ( ss ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.