input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
noAllowedHeaders ( ) { java . util . List < java . lang . String > headers = null ; java . lang . String expected = com . airhacks . cors . CorsResponseFilter . DEFAULT_ALLOWED_HEADERS ; java . lang . String actual = cut . createHeaderList ( headers , com . airhacks . cors . CorsResponseFilter . DEFAULT_ALLOWED_HEADERS... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . dynamic . data . mapping . model . DDMContent > ddmContents = _persistence . fetchByPrima... | org . junit . Assert . assertTrue ( ddmContents . isEmpty ( ) ) |
testRenderDataUnchanged ( ) { registerDataKeys ( new java . lang . String [ ] { "foo" } ) ; column . setData ( "foo" , "string" ) ; org . eclipse . rap . rwt . testfixture . internal . Fixture . markInitialized ( display ) ; org . eclipse . rap . rwt . testfixture . internal . Fixture . markInitialized ( column ) ; org... | org . junit . Assert . assertEquals ( 0 , message . getOperationCount ( ) ) |
shouldBuildQueryWithHashBuild ( ) { org . springframework . data . couchbase . core . query . N1qlJoin joinDefinition = org . springframework . data . couchbase . core . convert . join . N1qlJoinResolverTest . createAnnotation ( "A=B" , "" , "" , "" , HashSide . BUILD , new java . lang . String [ 0 ] ) ; org . springfr... | org . junit . Assert . assertEquals ( statement , expected ) |
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . blade . samples . servicebuilder . model . Foo . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testCorruptedData ( ) { org . apache . flink . runtime . zookeeper . ZooKeeperStateHandleStoreTest . LongStateStorage stateStorage = new org . apache . flink . runtime . zookeeper . ZooKeeperStateHandleStoreTest . LongStateStorage ( ) ; org . apache . flink . runtime . zookeeper . ZooKeeperStateHandleStore < java . lan... | org . junit . Assert . assertEquals ( expected , actual ) |
lookupBpmPlatformXml ( ) { javax . naming . Context context = new javax . naming . InitialContext ( ) ; context . bind ( ( "java:comp/env/" + ( BPM_PLATFORM_XML_LOCATION ) ) , org . camunda . bpm . container . impl . jmx . deployment . BpmPlatformXmlLocationTest . BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION ) ; java . net ... | org . junit . Assert . assertEquals ( new java . io . File ( org . camunda . bpm . container . impl . jmx . deployment . BpmPlatformXmlLocationTest . BPM_PLATFORM_XML_FILE_ABSOLUTE_LOCATION ) . toURI ( ) . toURL ( ) , url ) |
testCreateHospitalDischargeMedicationsSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . ihe . HospitalDischargeMedicationsSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . ihe . builder . IHEBuilderFactory . createHo... | org . junit . Assert . assertNotNull ( section ) |
testGetHttpStatus ( ) { int someHttpStatus = 200 ; errorCode = new org . talend . components . marklogic . exceptions . MarkLogicErrorCode ( "some<sp>code" , someHttpStatus , "some<sp>entry" ) ; "<AssertPlaceHolder>" ; } getHttpStatus ( ) { return httpStatus ; } | org . junit . Assert . assertEquals ( someHttpStatus , errorCode . getHttpStatus ( ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . bookmarks . model . BookmarksFolder . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection (... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
beforeAllAttempts ( ) { org . apache . shiro . authc . AuthenticationInfo authenticationInfo = strategy . beforeAllAttempts ( null , null ) ; "<AssertPlaceHolder>" ; } beforeAllAttempts ( java . util . Collection , org . apache . shiro . authc . pam . AuthenticationToken ) { return new org . apache . shiro . authc . pa... | org . junit . Assert . assertNull ( authenticationInfo ) |
testGetActiveListeners ( ) { final org . bonitasoft . engine . tracking . FlushEventListener listener1 = mock ( org . bonitasoft . engine . tracking . FlushEventListener . class ) ; when ( listener1 . getName ( ) ) . thenReturn ( "listener1" ) ; when ( listener1 . isActive ( ) ) . thenReturn ( true ) ; final org . boni... | org . junit . Assert . assertEquals ( 1 , tracker . getActiveFlushEventListeners ( ) . size ( ) ) |
testFindByPrimaryKeyExisting ( ) { com . liferay . portal . tools . service . builder . test . model . LVEntryLocalization newLVEntryLocalization = addLVEntryLocalization ( ) ; com . liferay . portal . tools . service . builder . test . model . LVEntryLocalization existingLVEntryLocalization = _persistence . findByPrim... | org . junit . Assert . assertEquals ( existingLVEntryLocalization , newLVEntryLocalization ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . portal . workflow . kaleo . model . KaleoTimerInstanceToken > kaleoTimerInstanceTokens = ... | org . junit . Assert . assertTrue ( kaleoTimerInstanceTokens . isEmpty ( ) ) |
write ( ) { com . asakusafw . runtime . io . json . value . BooleanOptionPropertyAdapter adapter = builder . build ( ) ; com . asakusafw . runtime . io . json . value . MockValue writer = new com . asakusafw . runtime . io . json . value . MockValue ( ) ; adapter . write ( new com . asakusafw . runtime . value . Boolea... | org . junit . Assert . assertThat ( writer . get ( ) , is ( false ) ) |
testNoObserverProvider ( ) { org . apache . fluo . api . config . FluoConfiguration fc = new org . apache . fluo . api . config . FluoConfiguration ( ) ; "<AssertPlaceHolder>" ; } getObserverProvider ( ) { return getString ( org . apache . fluo . api . config . FluoConfiguration . OBSERVER_PROVIDER , org . apache . flu... | org . junit . Assert . assertEquals ( "" , fc . getObserverProvider ( ) ) |
testAddFacetToBatch_nullFacet ( ) { com . google . cloud . tools . eclipse . appengine . facets . FacetUtil facetUtil = new com . google . cloud . tools . eclipse . appengine . facets . FacetUtil ( mockFacetedProject ) ; try { facetUtil . addFacetToBatch ( null , null ) ; org . junit . Assert . fail ( ) ; } catch ( jav... | org . junit . Assert . assertNotNull ( ex . getMessage ( ) ) |
testMethod ( ) { final boolean [ ] result = new boolean [ ] { false } ; edu . rice . pcdp . PCDP . finish ( ( ) -> { result [ 0 ] = new edu . rice . pcdp . future . TestFuture1 ( ) . run ( ) ; } ) ; "<AssertPlaceHolder>" ; } run ( ) { edu . rice . pcdp . PCDP . finish ( ( ) -> { final int acc0 = 1 ; async ( ( ) -> { in... | org . junit . Assert . assertEquals ( true , result [ 0 ] ) |
testBeansProjectDescriptionWriterWithMixedAutoConfigs ( ) { beansProject . addConfig ( "basic-bean-config.xml" , IBeansConfig . Type . MANUAL ) ; beansProject . addConfig ( "java:org.test.spring.SimpleConfigurationClass" , IBeansConfig . Type . MANUAL ) ; java . io . ByteArrayOutputStream os = new java . io . ByteArray... | org . junit . Assert . assertTrue ( matcher . find ( ) ) |
testEndpointCreated ( ) { java . util . Map < java . lang . String , java . lang . Object > params = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . lang . String uri = "zeromq:tcp://localhost:5555" ; java . lang . String remaining = "tcp://localhost:5555" ; org . apacheextras . c... | org . junit . Assert . assertNotNull ( endpoint ) |
testGetToken ( ) { org . apache . hadoop . security . authentication . server . AuthenticationFilter filter = new org . apache . hadoop . security . authentication . server . AuthenticationFilter ( ) ; try { javax . servlet . FilterConfig config = org . mockito . Mockito . mock ( javax . servlet . FilterConfig . class ... | org . junit . Assert . assertEquals ( token . toString ( ) , newToken . toString ( ) ) |
test_IncrementalIndex1 ( ) { org . terrier . realtime . incremental . IncrementalIndex index = org . terrier . realtime . incremental . IncrementalIndex . get ( ApplicationSetup . TERRIER_INDEX_PATH , ApplicationSetup . TERRIER_INDEX_PREFIX ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String , java . lang . String... | org . junit . Assert . assertNotNull ( index ) |
createServiceDirectly_getExts ( ) { templateService = new com . alibaba . citrus . service . template . impl . TemplateServiceImpl ( ) ; templateService . afterPropertiesSet ( ) ; "<AssertPlaceHolder>" ; } getSupportedExtensions ( ) { return engineMappings . keySet ( ) . toArray ( new java . lang . String [ engineMappi... | org . junit . Assert . assertArrayEquals ( new java . lang . String [ 0 ] , templateService . getSupportedExtensions ( ) ) |
testConstructors ( ) { gov . sandia . cognition . learning . algorithm . clustering . cluster . DefaultIncrementalClusterCreator < java . lang . Object > instance = new gov . sandia . cognition . learning . algorithm . clustering . cluster . DefaultIncrementalClusterCreator < java . lang . Object > ( ) ; "<AssertPlaceH... | org . junit . Assert . assertNotNull ( instance ) |
testRemoteHostConverter ( ) { ch . qos . logback . access . pattern . RemoteHostConverter converter = new ch . qos . logback . access . pattern . RemoteHostConverter ( ) ; converter . start ( ) ; java . lang . String result = converter . convert ( event ) ; "<AssertPlaceHolder>" ; } getRemoteHost ( ) { if ( ( remoteHos... | org . junit . Assert . assertEquals ( request . getRemoteHost ( ) , result ) |
testGetStreamContentsWithIllegalStateException ( ) { java . io . InputStream is = new java . io . PipedInputStream ( ) ; java . lang . String result = org . jinstagram . http . StreamUtils . getStreamContents ( is ) ; "<AssertPlaceHolder>" ; } getStreamContents ( java . io . InputStream ) { org . jinstagram . utils . P... | org . junit . Assert . assertNotNull ( result ) |
createInflater_fullBuilder ( ) { final java . lang . Object controller = new java . lang . Object ( ) ; final org . vaadin . teemu . clara . inflater . filter . AttributeFilter filter1 = new org . vaadin . teemu . clara . ClaraBuilderTest . DummyAttributeFilter ( ) ; final org . vaadin . teemu . clara . inflater . filt... | org . junit . Assert . assertNotNull ( inflater ) |
shouldWorkWithClass ( ) { final java . lang . Class clazz = java . lang . String . class ; final java . lang . String asString = org . openspotlight . common . util . Conversion . convert ( clazz , java . lang . String . class ) ; final java . lang . Class asClass = org . openspotlight . common . util . Conversion . co... | org . junit . Assert . assertThat ( ( asClass == clazz ) , org . hamcrest . core . Is . is ( true ) ) |
testCommand ( ) { java . lang . String cmd = ( com . intuit . karate . FileUtils . isWindows ( ) ) ? "print<sp>\"hello\"" : "ls" ; com . intuit . karate . shell . CommandThread command = new com . intuit . karate . shell . CommandThread ( null , null , "target/command.log" , new java . io . File ( "src" ) , cmd , "-al"... | org . junit . Assert . assertEquals ( exitCode , 0 ) |
testAddChild ( ) { final org . kie . workbench . common . dmn . client . decision . DecisionNavigatorItem item = new org . kie . workbench . common . dmn . client . decision . DecisionNavigatorItem ( "item" ) ; final org . kie . workbench . common . dmn . client . decision . DecisionNavigatorItem child = new org . kie ... | org . junit . Assert . assertEquals ( expectedChildren , item . getChildren ( ) ) |
deleteDirectoryWithPersistedWritesInProgress ( ) { final alluxio . AlluxioURI testFolder = new alluxio . AlluxioURI ( "/testFolder" ) ; mFileSystem . createDirectory ( testFolder , alluxio . grpc . CreateDirectoryPOptions . newBuilder ( ) . setWriteType ( WritePType . CACHE_THROUGH ) . build ( ) ) ; alluxio . client . ... | org . junit . Assert . assertFalse ( mFileSystem . exists ( new alluxio . AlluxioURI ( "/testFolder" ) ) ) |
testCountByJpaQueryParameters ( ) { org . hisp . dhis . dataelement . DataElement dataElementA = createDataElement ( 'A' ) ; org . hisp . dhis . dataelement . DataElement dataElementB = createDataElement ( 'B' ) ; dataElementStore . save ( dataElementA ) ; dataElementStore . save ( dataElementB ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertEquals ( 2 , dataElementStore . getCount ( ) ) |
recordIsAddedAndSent ( ) { com . telefonica . iot . cygnus . backends . kafka . KafkaBackendImpl backendImpl = new com . telefonica . iot . cygnus . backends . kafka . KafkaBackendImpl ( "0.0.0.0:9092" , null ) ; backendImpl . setKafkaProducer ( mockKafkaProducer ) ; System . out . println ( ( ( getTestTraceHead ( "[Ka... | org . junit . Assert . assertTrue ( true ) |
shouldReturnAllEnquiriesCreatedByUser ( ) { java . lang . String enquiryJSON1 = "{\"enquirer_name\":\"sam<sp>fisher\",\"name\":\"foo<sp>bar\",\"nationality\":\"ugandan\"," + "\"created_by\":\"field<sp>worker\",\"synced\":\"false\",<sp>\"created_organisation\":\"TW\"}" ; java . lang . String enquiryJSON2 = "{\"enquirer_... | org . junit . Assert . assertEquals ( 2 , enquiryRepository . size ( ) ) |
dataTypeRequired3 ( ) { org . diirt . support . ca . JCAChannelHandler handler = new org . diirt . support . ca . JCAChannelHandler ( "test.RTYP" , dataSource ) ; when ( dataSource . isRtypValueOnly ( ) ) . thenReturn ( Boolean . FALSE ) ; when ( channel . getFieldType ( ) ) . thenReturn ( DBR_String . TYPE ) ; when ( ... | org . junit . Assert . assertThat ( type , equalTo ( DBR_TIME_String . TYPE ) ) |
testBootstrap ( ) { final java . net . InetSocketAddress addr = com . allanbank . mongodb . client . connection . rs . ReplicaSetConnectionFactoryTest . ourServer . getInetSocketAddress ( ) ; final java . lang . String serverName = com . allanbank . mongodb . util . ServerNameUtils . normalize ( addr ) ; final com . al... | org . junit . Assert . assertEquals ( 2 , servers . size ( ) ) |
testSession ( ) { com . baifendian . swordfish . dao . mapper . SessionMapper mapper = com . baifendian . swordfish . dao . datasource . DatabaseConfigurationTest . sqlSession . getMapper ( com . baifendian . swordfish . dao . mapper . SessionMapper . class ) ; com . baifendian . swordfish . dao . model . Session userS... | org . junit . Assert . assertEquals ( userSession2 . getId ( ) , userSession . getId ( ) ) |
flatMap ( ) { io . trane . future . Future < java . lang . Integer > future = io . trane . future . Future . value ( 1 ) . flatMap ( ( i ) -> io . trane . future . Future . value ( ( i + 1 ) ) ) ; "<AssertPlaceHolder>" ; } get ( io . trane . future . Future ) { return future . get ( Duration . ZERO ) ; } | org . junit . Assert . assertEquals ( new java . lang . Integer ( 2 ) , get ( future ) ) |
testGerritIdWithinText ( ) { setText ( ( "abc<sp>I" + ( org . eclipse . egit . internal . mylyn . CommitHyperlinkDetectorTest . EXAMPLE_ID ) ) ) ; org . eclipse . jface . text . hyperlink . IHyperlink [ ] hyperlinks = detectHyperlinks ( 5 , textViewer . getDocument ( ) . getLength ( ) ) ; "<AssertPlaceHolder>" ; } getD... | org . junit . Assert . assertNull ( hyperlinks ) |
testCreateBusinessObjectFormatDuplicatePartitionColumns ( ) { org . finra . herd . model . api . xml . BusinessObjectFormatCreateRequest request = businessObjectFormatServiceTestHelper . createBusinessObjectFormatCreateRequest ( org . finra . herd . service . NAMESPACE , org . finra . herd . service . BDEF_NAME , org .... | org . junit . Assert . assertEquals ( expectedErrorMessage , e . getMessage ( ) ) |
schedulingAJobWithoutEventListenerShouldRunThatJobAtTheExpectedTime ( ) { org . silverpeas . core . scheduler . trigger . JobTrigger trigger = org . silverpeas . core . scheduler . trigger . JobTrigger . triggerEvery ( 1 , TimeUnit . SECOND ) ; scheduler . scheduleJob ( new org . silverpeas . core . scheduler . Job ( o... | org . junit . Assert . assertThat ( isJobExecuted ( ) , is ( true ) ) |
getUserMembershipsOfGroup ( ) { final org . bonitasoft . engine . identity . model . SUserMembership userMembership = mock ( org . bonitasoft . engine . identity . model . SUserMembership . class ) ; when ( persistenceService . selectList ( org . bonitasoft . engine . identity . recorder . SelectDescriptorBuilder . get... | org . junit . Assert . assertEquals ( userMembership , userMemberships . get ( 0 ) ) |
shouldRejectIPv6String ( ) { bli . setIpVersion ( IpVersion . IPV6 ) ; bli . setCidrBlock ( "::" ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = bv . validate ( bli , org . openstack . atlas . api . mgmt . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } resultMessage ( o... | org . junit . Assert . assertFalse ( resultMessage ( result , org . openstack . atlas . api . mgmt . validation . validators . POST ) , result . passedValidation ( ) ) |
persistEventOnArrival ( ) { org . apache . servicecomb . pack . alpha . core . TxEvent [ ] events = new org . apache . servicecomb . pack . alpha . core . TxEvent [ ] { newEvent ( org . apache . servicecomb . pack . alpha . core . SagaStartedEvent ) , newEvent ( org . apache . servicecomb . pack . alpha . core . TxStar... | org . junit . Assert . assertThat ( this . events , org . hamcrest . Matchers . contains ( events ) ) |
saveConcept_shouldAddNewConceptName ( ) { org . openmrs . Concept concept = conceptService . getConcept ( 3 ) ; org . openmrs . ConceptName name = new org . openmrs . ConceptName ( "new<sp>name" , java . util . Locale . US ) ; concept . addName ( name ) ; conceptService . saveConcept ( concept ) ; "<AssertPlaceHolder>"... | org . junit . Assert . assertNotNull ( name . getConceptNameId ( ) ) |
testDecodeBSONSPEC1 ( ) { byte [ ] bson = new byte [ ] { ( ( byte ) ( 22 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 2 ) ) , 'h' , 'e' , 'l' , 'l' , 'o' , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 6 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , ( ( byte ) ( 0 ) ) , 'w' , 'o' , 'r' , 'l' ... | org . junit . Assert . assertEquals ( expected , json ) |
testGetAllElementsWithViewRestrictedByGroupAndAPreAggregationFilter ( ) { final uk . gov . gchq . gaffer . graph . Graph graph = uk . gov . gchq . gaffer . mapstore . impl . GetAllElementsHandlerTest . getGraph ( ) ; final uk . gov . gchq . gaffer . operation . impl . add . AddElements addElements = new uk . gov . gchq... | org . junit . Assert . assertEquals ( expectedResults , resultsSet ) |
whenSavingProduct_thenAvailableOnRetrieval ( ) { final com . baeldung . spring . data . solr . model . Product product = new com . baeldung . spring . data . solr . model . Product ( ) ; product . setId ( "P000089998" ) ; product . setName ( "Desk" ) ; productRepository . save ( product ) ; final com . baeldung . sprin... | org . junit . Assert . assertEquals ( product . getId ( ) , retrievedProduct . getId ( ) ) |
formatacceptXMLXML ( ) { com . fujitsu . dc . core . rs . odata . ODataEntityResource odataEntityResource = new com . fujitsu . dc . core . rs . odata . ODataEntityResource ( ) ; javax . ws . rs . core . MediaType type = odataEntityResource . decideOutputFormat ( MediaType . APPLICATION_XML , null ) ; "<AssertPlaceHold... | org . junit . Assert . assertEquals ( MediaType . APPLICATION_ATOM_XML_TYPE , type ) |
shouldSerializeToXml ( ) { final java . lang . String xml = "<url>v37.0/limits/</url>" 0 + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<url>v37.0/limits/</url>" 1 + "<url>v37.0/limits/</url>" 2 ) + "<Name>NewAcc... | org . junit . Assert . assertEquals ( "<Name>NewAccountName</Name>" 6 , xml , serialized ) |
floatValidationShouldWork ( ) { when ( context . getParameter ( "param1" ) ) . thenReturn ( "blah" ) ; create ( "floatParam" ) . invoke ( mockController , context ) ; verify ( mockController ) . floatParam ( null ) ; "<AssertPlaceHolder>" ; } hasFieldViolation ( java . lang . String ) { return ! ( this . getFieldViolat... | org . junit . Assert . assertTrue ( validation . hasFieldViolation ( "param1" ) ) |
whenPDRouteRouteAndNewDeliveryFitsIn_itShouldReturnFulfilled ( ) { stateManager . informInsertionStarts ( java . util . Arrays . asList ( pickup_delivery_route ) , java . util . Collections . < com . graphhopper . jsprit . core . problem . constraint . Job > emptyList ( ) ) ; com . graphhopper . jsprit . core . problem... | org . junit . Assert . assertTrue ( loadconstraint . fulfilled ( context ) ) |
testAppendMultipleEvents ( ) { int numEvents = 3 ; for ( int i = 0 ; i < numEvents ; i ++ ) { ch . qos . logback . classic . spi . ILoggingEvent event = createLoggingEvent ( ) ; appender . append ( event ) ; } java . sql . Statement stmt = connectionSource . getConnection ( ) . createStatement ( ) ; java . sql . Result... | org . junit . Assert . assertEquals ( numEvents , count ) |
classpathWithExistingDirIsValid ( ) { com . facebook . buck . jvm . java . ClasspathChecker classpathChecker = new com . facebook . buck . jvm . java . ClasspathChecker ( "/" , ":" , Paths :: get , ( dir ) -> dir . equals ( java . nio . file . Paths . get ( "exists" ) ) , ( file ) -> false , ( path , glob ) -> com . go... | org . junit . Assert . assertThat ( classpathChecker . validateClasspath ( "exists" ) , org . hamcrest . Matchers . is ( true ) ) |
testConvert ( ) { java . lang . String source = "some/path" ; com . box . l10n . mojito . converter . StringToPathConverter instance = new com . box . l10n . mojito . converter . StringToPathConverter ( ) ; java . nio . file . Path result = instance . convert ( source ) ; "<AssertPlaceHolder>" ; } toString ( ) { return... | org . junit . Assert . assertEquals ( source , result . toString ( ) ) |
testParseNegativeZ ( ) { java . lang . String source = ( ( ( ( ( "{1" + ( getDecimalCharacter ( ) ) ) + "2323;<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "4343;<sp>-1" ) + ( getDecimalCharacter ( ) ) ) + "6333}" ; org . apache . commons . math4 . linear . ArrayRealVector expected = new org . apache . commons . math4 . l... | org . junit . Assert . assertEquals ( expected , actual ) |
testCorrelationId ( ) { java . lang . String correlationId = "abc" ; com . workiva . frugal . FContext ctx = new com . workiva . frugal . FContext ( correlationId ) ; "<AssertPlaceHolder>" ; } getCorrelationId ( ) { return requestHeaders . get ( com . workiva . frugal . FContext . CID_HEADER ) ; } | org . junit . Assert . assertEquals ( correlationId , ctx . getCorrelationId ( ) ) |
should_return_true_if_array_is_null ( ) { "<AssertPlaceHolder>" ; } isNullOrEmpty ( T [ ] ) { return ( array == null ) || ( ! ( org . fest . util . Arrays . hasElements ( array ) ) ) ; } | org . junit . Assert . assertTrue ( org . fest . util . Arrays . isNullOrEmpty ( null ) ) |
testGetPolicyGroups_exceptionInQuery_assertException ( ) { final javax . persistence . EntityManager manager = mock ( javax . persistence . EntityManager . class ) ; doThrow ( new java . lang . RuntimeException ( "Just<sp>Passing<sp>Through" ) ) . when ( manager ) . createQuery ( ( ( java . lang . String ) ( any ( ) ) ... | org . junit . Assert . assertTrue ( exceptionOccured ) |
testScriptLoadAndScriptExists ( ) { java . lang . String sha1 = jedisCluster . scriptLoad ( "return<sp>redis.call('get','foo')" , "key1" ) ; "<AssertPlaceHolder>" ; } scriptExists ( java . lang . String , java . lang . String [ ] ) { return new redis . clients . jedis . JedisClusterCommand < java . util . List < java .... | org . junit . Assert . assertTrue ( jedisCluster . scriptExists ( sha1 , "key1" ) ) |
testGivenMOKSellWithOneLOBuyWhenQuantityOfMOKOrderIsSmaller ( ) { vn . com . vndirect . exchangesimulator . model . NewOrderSingle order = vn . com . vndirect . exchangesimulator . matching . OrderFactory . createLOBuy ( "VND" , 1000 , 13000 ) ; sm . push ( order ) ; vn . com . vndirect . exchangesimulator . model . Ne... | org . junit . Assert . assertEquals ( 2 , reports . size ( ) ) |
testExistsZipFullVpc ( ) { setFunctionFound ( true ) ; setVpcEnabled ( java . util . Collections . singletonList ( "subnet1" ) , java . util . Collections . singletonList ( "secgroup1" ) ) ; java . lang . Boolean result = lambdaDeployService . deployLambda ( getDeployConfig ( ) , getFunctionCode ( ) , UpdateModeValue .... | org . junit . Assert . assertTrue ( result ) |
testConstructorCenter4 ( ) { de . nx42 . maps4cim . util . gis . Coordinate center = new de . nx42 . maps4cim . util . gis . Coordinate ( 48.0 , 10.0 ) ; de . nx42 . maps4cim . util . gis . Area result = new de . nx42 . maps4cim . util . gis . Area ( center , 100.0 , 65.0 , de . nx42 . maps4cim . util . gis . UnitOfLen... | org . junit . Assert . assertEquals ( expResult , result ) |
backhaulViolationAtAct5_shouldWork ( ) { buildAnotherScenarioWithOnlyOneVehicleAndWithoutAnyConstraintsBefore ( ) ; com . graphhopper . jsprit . core . analysis . SolutionAnalyser analyser = new com . graphhopper . jsprit . core . analysis . SolutionAnalyser ( vrp , solution , vrp . getTransportCosts ( ) ) ; com . grap... | org . junit . Assert . assertTrue ( violation ) |
setCodeHex ( ) { org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveUserCodeCommandClass cls = ( ( org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveUserCodeCommandClass ) ( getCommandClass ( CommandClass . COMMAND_CLASS_USER_CODE ) ) ) ; byte [ ] expectedResponse = ne... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( msg , expectedResponse ) ) |
testInstance ( ) { org . irods . jargon . core . connection . IRODSAccount irodsAccount = org . irods . jargon . usertagging . FreeTaggingServiceImplTest . testingPropertiesHelper . buildIRODSAccountFromTestProperties ( org . irods . jargon . usertagging . FreeTaggingServiceImplTest . testingProperties ) ; org . irods ... | org . junit . Assert . assertNotNull ( freeTaggingService ) |
testDoNotReuseDefaultDose ( ) { org . drugis . addis . presentation . wizard . TreatmentCategorizationWizardPresentation pm1 = new org . drugis . addis . presentation . wizard . TreatmentCategorizationWizardPresentation ( org . drugis . addis . entities . treatment . TreatmentCategorization . createDefault ( ) , d_doma... | org . junit . Assert . assertFalse ( pm2 . getDoseUnit ( ) . equals ( pm1 . getDoseUnit ( ) ) ) |
when_tryProcess4_then_delegatesToTryProcess ( ) { boolean done = p . tryProcess4 ( com . hazelcast . jet . core . AbstractProcessorTest . MOCK_ITEM ) ; "<AssertPlaceHolder>" ; p . validateReceptionOfItem ( com . hazelcast . jet . core . AbstractProcessorTest . ORDINAL_4 , com . hazelcast . jet . core . AbstractProcesso... | org . junit . Assert . assertTrue ( done ) |
shouldDoDefaultFormat ( ) { java . lang . String expectedString = getExpectedString ( ) ; java . lang . String inputString = "SELECT<sp>*<sp>FROM<sp>TABLE1<sp>t<sp>WHERE<sp>a<sp>><sp>100<sp>AND<sp>b<sp>BETWEEN<sp>12<sp>AND<sp>45;<sp>SELECT<sp>t.*,<sp>j1.x,<sp>j2.y<sp>FROM<sp>TABLE1<sp>t<sp>JOIN<sp>JT1<sp>j1<sp>ON<sp>j1... | org . junit . Assert . assertEquals ( expectedString , formattedString ) |
testReadBooleanFalse ( ) { write ( "False" ) ; "<AssertPlaceHolder>" ; } readBoolean ( ) { return org . kocakosm . pitaya . util . Booleans . valueOf ( org . kocakosm . pitaya . io . Scanf . readString ( ) ) ; } | org . junit . Assert . assertEquals ( false , org . kocakosm . pitaya . io . Scanf . readBoolean ( ) ) |
testLookupByChallengeExactMatch ( ) { dispatch . register ( "http://localhost:8000" , sampleHandler ) ; org . kaazing . net . auth . ChallengeHandler ChallengeHandler2 = dispatch . lookup ( new org . kaazing . net . auth . ChallengeRequest ( "http://localhost:8000" , "test_challenge<sp>foo" ) ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertSame ( sampleHandler , ChallengeHandler2 ) |
tMockery ( ) { mockery . checking ( new org . jmock . Expectations ( ) { { one ( myMock ) . isAwesome ( ) ; will ( returnValue ( true ) ) ; } } ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( myMock . isAwesome ( ) ) |
getAllTypeLibraries_forContent ( ) { boolean libraryFound = false ; java . util . List < org . ebayopensource . turmeric . common . config . TypeLibraryType > list = org . ebayopensource . turmeric . tools . library . TypeLibraryRegistryInterfaceTest . m_soaTypeRegistry . getAllTypeLibraries ( ) ; for ( org . ebayopens... | org . junit . Assert . assertTrue ( libraryFound ) |
testTestWhenFalse ( ) { org . apache . commons . functor . Function < java . lang . Object , java . lang . Boolean > f = new org . apache . commons . functor . adapter . PredicateFunction < java . lang . Object > ( org . apache . commons . functor . core . Constant . FALSE ) ; "<AssertPlaceHolder>" ; } evaluate ( java ... | org . junit . Assert . assertEquals ( Boolean . FALSE , f . evaluate ( null ) ) |
callerContextDifferentFromRequestedClassLoaderReturnsCurrentClassLoader ( ) { javax . servlet . ServletContext context = mock ( javax . servlet . ServletContext . class ) ; when ( context . getMajorVersion ( ) ) . thenReturn ( 3 ) ; when ( context . getClassLoader ( ) ) . thenThrow ( new java . lang . SecurityException... | org . junit . Assert . assertEquals ( resolver . getClassLoader ( ) , java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) ) |
testOngeldigeAangewezenObjectOfVoorkomen ( ) { final nl . bzk . brp . bijhouding . bericht . model . BijhoudingPersoon partner = mock ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingPersoon . class ) ; when ( bericht . getEntiteitVoorObjectSleutel ( nl . bzk . brp . bijhouding . bericht . model . Bijhouding... | org . junit . Assert . assertNull ( actie . getOngeldigAangewezenObjectOfVoorkomen ( ) ) |
testGenerateOutputValuesNoCacheNoCalc ( ) { org . pentaho . di . trans . steps . univariatestats . FieldIndex fieldIndex = new org . pentaho . di . trans . steps . univariatestats . FieldIndex ( ) ; java . lang . Object [ ] outputValues = fieldIndex . generateOutputValues ( new org . pentaho . di . trans . steps . univ... | org . junit . Assert . assertEquals ( 0 , outputValues . length ) |
rollback_tableItemChanged_discardsChanges ( ) { java . lang . Object last = container . lastItemId ( ) ; container . getContainerProperty ( last , NAME ) . setValue ( "foo" ) ; container . rollback ( ) ; "<AssertPlaceHolder>" ; } getContainerProperty ( java . lang . Object , java . lang . Object ) { com . vaadin . v7 .... | org . junit . Assert . assertFalse ( "foo" . equals ( container . getContainerProperty ( container . lastItemId ( ) , NAME ) . getValue ( ) ) ) |
testVisualStyleDestroyedEvent ( ) { final org . cytoscape . view . vizmap . events . VisualStyleAboutToBeRemovedEvent event = new org . cytoscape . view . vizmap . events . VisualStyleAboutToBeRemovedEvent ( manager , style ) ; "<AssertPlaceHolder>" ; } getVisualStyleToBeRemoved ( ) { return removedStyle ; } | org . junit . Assert . assertEquals ( style , event . getVisualStyleToBeRemoved ( ) ) |
testJDKVersionAlternative ( ) { fr . inria . main . evolution . AstorMain main1 = new fr . inria . main . evolution . AstorMain ( ) ; java . lang . String dep = new java . io . File ( "/target/classes" 9 ) . getAbsolutePath ( ) ; java . lang . String [ ] args = new java . lang . String [ ] { "jvm4evosuitetestexecution"... | org . junit . Assert . assertEquals ( jdk , jdkaltern ) |
test_LabelsPerWorker ( ) { java . util . HashMap < java . lang . String , java . lang . Double > workerQuality = summaryResultsParser . getWorkerQuality ( ) ; double noAssignedLabels = 0.0 ; java . util . Collection < com . datascience . core . base . LObject < java . lang . String > > objects = data . getObjects ( ) ;... | org . junit . Assert . assertEquals ( expectedNoLabelsPerWorker , actualNoLabelsPerWorker ) |
shouldGetNoActionsWhenLastOpenedFileIsActive ( ) { configureOpenedEditors ( ) ; java . util . List < org . eclipse . che . ide . statepersistance . dto . ActionDescriptor > actionDescriptors = component . getActions ( org . eclipse . che . ide . statepersistance . ActiveFilePersistenceComponentTest . PROJECT_PATH ) ; "... | org . junit . Assert . assertTrue ( actionDescriptors . isEmpty ( ) ) |
test500DoesLockdown ( ) { stubForProject1Store ( 500 ) ; verifyProject1PostRequestCount ( 0 ) ; verifyStoredEventCount ( 0 ) ; io . sentry . SentryClient client = io . sentry . SentryClientFactory . sentryClient ( ) ; client . sendMessage ( "Test" ) ; verifyProject1PostRequestCount ( 1 ) ; verifyStoredEventCount ( 0 ) ... | org . junit . Assert . assertTrue ( isLockedDown ( client ) ) |
testNonExistentSubProcess ( ) { java . lang . String nonExistentSubProcessName = "nonexistent.process" ; org . jbpm . ruleflow . core . RuleFlowProcess process = new org . jbpm . ruleflow . core . RuleFlowProcess ( ) ; process . setId ( "org.drools.core.process.process" ) ; process . setName ( "Process" ) ; org . jbpm ... | org . junit . Assert . assertTrue ( re . getMessage ( ) . contains ( nonExistentSubProcessName ) ) |
should_not_collapse_nonoverlapping ( ) { int k = 4 ; java . util . List < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > input = new java . util . ArrayList < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > ( ) ; input . add ( KPN ( k , "GTAC" , 2 , 10 , false ) ) ; input . add ( KPN ( ... | org . junit . Assert . assertEquals ( 3 , result . size ( ) ) |
testKillApplicationsOfDifferentEndStates ( ) { org . apache . hadoop . yarn . client . cli . ApplicationCLI cli = createAndGetAppCLI ( ) ; org . apache . hadoop . yarn . api . records . ApplicationId applicationId1 = org . apache . hadoop . yarn . api . records . ApplicationId . newInstance ( 1234 , 5 ) ; org . apache ... | org . junit . Assert . assertEquals ( 0 , result ) |
test_GetRadioButton_By_Name ( ) { when ( element . findFirst ( mmarquee . automation . BaseAutomationTest . isTreeScope ( TreeScope . Descendants ) , any ( ) ) ) . thenReturn ( targetElement ) ; mmarquee . automation . controls . AutomationRadioButton radio = spyWndw . getRadioButton ( mmarquee . automation . controls ... | org . junit . Assert . assertEquals ( targetElement , radio . getElement ( ) ) |
testFilterNonNullIterableWithNonNullFilter ( ) { final java . lang . Iterable < java . lang . String > inputs = java . util . Arrays . asList ( "a" , "" , null , "b" ) ; final java . util . List < ? extends java . lang . String > results = org . springframework . roo . support . util . CollectionUtils . filter ( inputs... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "a" , "b" ) , results ) |
jsonArrayCoercionOfStatic ( ) { org . json . JSONArray result = evaluate ( "first,second" , org . json . JSONArray . class ) ; org . json . JSONArray expected = new org . json . JSONArray ( "['first',<sp>'second']" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return jsonString ; } | org . junit . Assert . assertEquals ( expected . toString ( ) , result . toString ( ) ) |
toString_shouldDelegateToUnderlyingCharSequence ( ) { android . text . SpannedString spannedString = new android . text . SpannedString ( "foo" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( "AndroidSandbox[SDK<sp>" + ( sdk ) ) + "]" ; } | org . junit . Assert . assertEquals ( "foo" , spannedString . toString ( ) ) |
test ( ) { org . slc . sli . modeling . docgen . Documentation < org . slc . sli . modeling . uml . Type > resultsByFile = org . slc . sli . modeling . docgen . DocumentationReader . readDocumentation ( org . slc . sli . modeling . docgen . DocumentationReaderTest . DOMAIN_FILE , this . modelIndex ) ; org . slc . sli .... | org . junit . Assert . assertEquals ( resultsByFile . getDomains ( ) . toString ( ) , resultsByFilename . getDomains ( ) . toString ( ) ) |
shouldExportBooleanFieldQueryWithAllOptions ( ) { com . couchbase . client . java . search . queries . BooleanFieldQuery fts = com . couchbase . client . java . search . SearchQuery . booleanField ( true ) . boost ( 1.5 ) . field ( "field" ) ; com . couchbase . client . java . search . SearchQuery query = new com . cou... | org . junit . Assert . assertEquals ( expected , query . export ( ) ) |
applyMaterieelFormeelGeldigHistorieVormFormeel_PeilmomentVoorTsReg_AfnemerInd ( ) { nl . bzk . brp . domain . leveringmodel . MetaGroep . Builder groepBuilder = new nl . bzk . brp . domain . leveringmodel . MetaGroep . Builder ( null ) ; groepBuilder . metGroepElement ( Element . PERSOON_AFNEMERINDICATIE_STANDAARD . ge... | org . junit . Assert . assertThat ( apply , org . hamcrest . core . Is . is ( false ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . calendar . model . Calendar newCalendar = addCalendar ( ) ; com . liferay . calendar . model . Calendar existingCalendar = _persistence . fetchByPrimaryKey ( newCalendar . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; } | org . junit . Assert . assertEquals ( existingCalendar , newCalendar ) |
testDuring ( ) { org . joda . time . DateTime startDate = new org . joda . time . DateTime ( 2013 , 5 , 1 , 0 , 0 , 0 , 0 ) ; org . joda . time . DateTime endDate = new org . joda . time . DateTime ( 2013 , 12 , 31 , 0 , 0 , 0 , 0 ) ; org . codice . ddf . spatial . ogc . csw . catalog . common . CswSourceConfiguration ... | org . junit . Assert . assertEquals ( testResponse , cqlText ) |
testIsEmptyOnNullValue ( ) { "<AssertPlaceHolder>" ; } isEmpty ( ) { return new com . annimon . stream . test . hamcrest . DoubleStreamMatcher . IsEmptyMatcher ( ) ; } | org . junit . Assert . assertThat ( null , com . annimon . stream . test . hamcrest . DoubleStreamMatcher . isEmpty ( ) ) |
testHasNotType ( ) { org . apache . tinkerpop . gremlin . process . traversal . dsl . graph . GraphTraversal < org . apache . tinkerpop . gremlin . structure . Element , org . apache . tinkerpop . gremlin . structure . Element > expected = org . mockito . Mockito . mock ( org . apache . tinkerpop . gremlin . process . ... | org . junit . Assert . assertSame ( expected , actual ) |
testBase64RoundTrip ( ) { for ( int i = 0 ; i < 100 ; i ++ ) { java . lang . String in = java . util . UUID . randomUUID ( ) . toString ( ) ; byte [ ] bytesIn = in . getBytes ( ) ; java . lang . String base64 = com . gorillalogic . monkeytalk . utils . Base64 . encodeBytes ( bytesIn ) ; byte [ ] bytesOut = com . gorill... | org . junit . Assert . assertThat ( out , org . hamcrest . CoreMatchers . is ( in ) ) |
testExtractor_autoboxingDouble ( ) { uk . co . rockstable . experiements . codegen . reflection . func . domain . DomainObject domainObject = new uk . co . rockstable . experiements . codegen . reflection . func . domain . DomainObject ( null , 0 ) ; uk . co . rockstable . experiements . codegen . reflection . extracto... | org . junit . Assert . assertEquals ( ( ( java . lang . Double ) ( Double . MAX_VALUE ) ) , extractedDouble ) |
negativeLength ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; int length = 255 ; baos . write ( new byte [ ] { ( ( byte ) ( length ) ) } ) ; "<AssertPlaceHolder>" ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < length ; i ++ ) { ... | org . junit . Assert . assertTrue ( ( ( baos . toByteArray ( ) [ 0 ] ) < 0 ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.