input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
users ( ) { facebook . setMockJSON ( "mock_json/user/users.json" ) ; java . util . List < facebook4j . User > users = facebook . getUsers ( "4" , "BillGates" ) ; "<AssertPlaceHolder>" ; } size ( ) { return value . size ( ) ; } | org . junit . Assert . assertThat ( users . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) ) |
gettersSucceed ( ) { com . microsoft . azure . sdk . iot . provisioning . service . configs . QuerySpecification querySpecification = new com . microsoft . azure . sdk . iot . provisioning . service . configs . QuerySpecification ( tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . QuerySpecificationTest . VALID_QUERY ) ; "<AssertPlaceHolder>" ; } getQuery ( ) { return query . toString ( ) ; } | org . junit . Assert . assertEquals ( tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . QuerySpecificationTest . VALID_QUERY , querySpecification . getQuery ( ) ) |
test_multi_dim_array ( ) { int [ ] [ ] arr = new int [ ] [ ] { new int [ ] { 11 , 22 , 44 } , new int [ ] { 1 , 2 , 34 } } ; int [ ] [ ] arr2 = ( ( int [ ] [ ] ) ( org . mapdb . elsa . ElsaSerializerBaseTest . clone ( arr ) ) ) ; "<AssertPlaceHolder>" ; } clone ( E ) { return org . mapdb . elsa . ElsaSerializerBaseTest . clonePojo ( value ) ; } | org . junit . Assert . assertArrayEquals ( arr , arr2 ) |
when_shipmentroute_pastMaxLoatAtAct3ShouldBe15 ( ) { stateManager . informInsertionStarts ( java . util . Arrays . asList ( shipment_route ) , java . util . Collections . < jsprit . core . algorithm . state . Job > emptyList ( ) ) ; jsprit . core . algorithm . state . Capacity atAct = stateManager . getActivityState ( shipment_route . getActivities ( ) . get ( 2 ) , InternalStates . PAST_MAXLOAD , jsprit . core . algorithm . state . Capacity . class ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 15 , atAct . get ( 0 ) ) |
testNieuweSituatieZonderDatumEindeStandaardGroep ( ) { final nl . bzk . brp . model . bericht . kern . HuwelijkGeregistreerdPartnerschapBericht huwelijk = new nl . bzk . brp . model . bericht . kern . HuwelijkBericht ( ) ; huwelijk . setStandaard ( new nl . bzk . brp . model . bericht . kern . RelatieStandaardGroepBericht ( ) ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteits = new nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . huwelijkgeregistreerdpartnerschap . acties . registratieeindehuwelijkpartnerschap . BRBY0455 ( ) . voerRegelUit ( null , huwelijk , maakActie ( 20130101 ) , null ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( berichtEntiteits . isEmpty ( ) ) |
testConvertToAvroBytes ( ) { byte [ ] expected = new byte [ ] { 0 , 1 , 2 , 3 } ; org . talend . daikon . avro . converter . AvroConverter < java . lang . Object , java . lang . Object > converter = org . talend . codegen . converter . IdentityConverter . getInstance ( ) ; byte [ ] actual = ( ( byte [ ] ) ( converter . convertToAvro ( expected ) ) ) ; "<AssertPlaceHolder>" ; } convertToAvro ( java . math . BigDecimal ) { return value . toString ( ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
putReturnsPassedInObject ( ) { java . lang . Integer firstObject = 1 ; java . lang . Object returnedObject = this . staticPool . put ( firstObject ) ; "<AssertPlaceHolder>" ; } put ( T ) { int index = this . index ( key ) ; java . lang . Object cur = this . table [ index ] ; if ( cur == null ) { this . table [ index ] = com . gs . collections . impl . set . strategy . mutable . UnifiedSetWithHashingStrategy . toSentinelIfNull ( key ) ; if ( ( ++ ( this . occupied ) ) > ( this . maxSize ) ) { this . rehash ( ) ; } return key ; } if ( ( cur instanceof com . gs . collections . impl . set . strategy . mutable . UnifiedSetWithHashingStrategy . ChainedBucket ) || ( ! ( this . nonNullTableObjectEquals ( cur , key ) ) ) ) { return this . chainedPut ( key , index ) ; } return this . nonSentinel ( cur ) ; } | org . junit . Assert . assertSame ( returnedObject , firstObject ) |
findsCustomerByLastame ( ) { example . complete . Customer customer = customerManagement . registerCustomer ( "Dave" , "Matthews" , java . time . LocalDate . of ( 1967 , 1 , 9 ) ) ; java . util . Collection < example . complete . Customer > result = customerManagement . findByLastname ( "ma" ) ; "<AssertPlaceHolder>" ; } findByLastname ( java . lang . String ) { return customers . findByLastnameContainingIgnoreCase ( lastname ) ; } | org . junit . Assert . assertThat ( result , contains ( customer ) ) |
urlTest ( ) { java . io . File file1 = java . io . File . createTempFile ( "file1" , ".txt" ) ; java . io . File archive = java . io . File . createTempFile ( "archive" , ".zip" ) ; file1 . deleteOnExit ( ) ; archive . deleteOnExit ( ) ; java . net . URL url1 = file1 . toURI ( ) . toURL ( ) ; java . net . URL urlArchive = archive . toURI ( ) . toURL ( ) ; org . geotoolkit . nio . ZipUtilities . zip ( archive . toPath ( ) , ZipOutputStream . DEFLATED , 9 , org . geotoolkit . nio . ZipUtilitiesTest . CHECKSUM , java . nio . file . Paths . get ( url1 . toURI ( ) ) ) ; org . geotoolkit . nio . ZipUtilities . unzip ( java . nio . file . Paths . get ( urlArchive . toURI ( ) ) , org . geotoolkit . nio . ZipUtilitiesTest . CHECKSUM ) ; java . util . List < java . lang . String > zipContent = org . geotoolkit . nio . ZipUtilitiesTest . listContent ( archive ) ; "<AssertPlaceHolder>" ; } get ( int ) { return values . get ( i ) ; } | org . junit . Assert . assertEquals ( zipContent . get ( 0 ) , file1 . getName ( ) ) |
testExp ( ) { final net . imglib2 . type . numeric . integer . LongType in = new net . imglib2 . type . numeric . integer . LongType ( 1234567890 ) ; final net . imglib2 . type . numeric . real . DoubleType out = new net . imglib2 . type . numeric . real . DoubleType ( ) ; ops . run ( net . imagej . ops . math . UnaryRealTypeMath . Exp . class , out , in ) ; "<AssertPlaceHolder>" ; } get ( ) { for ( int d = 0 ; d < ( position . length ) ; d ++ ) { blockPos [ d ] = ( position [ d ] ) / ( blockSize [ d ] ) ; blockOffset [ d ] = ( position [ d ] ) % ( blockSize [ d ] ) ; } final int blockIndex = net . imglib2 . util . IntervalIndexer . positionToIndex ( blockPos , blockDims ) ; final int shuffledBlockIndex = blockIndices [ blockIndex ] ; net . imglib2 . util . IntervalIndexer . indexToPosition ( shuffledBlockIndex , blockDims , shuffledBlockPos ) ; for ( int d = 0 ; d < ( position . length ) ; d ++ ) { final long pd = ( ( shuffledBlockPos [ d ] ) * ( blockSize [ d ] ) ) + ( blockOffset [ d ] ) ; imageRA . setPosition ( pd , d ) ; } return imageRA . get ( ) ; } | org . junit . Assert . assertEquals ( out . get ( ) , java . lang . Math . exp ( 1234567890 ) , 0.0 ) |
testRedirectToLogout ( ) { com . streamsets . lib . security . http . SSOService ssoService = org . mockito . Mockito . mock ( com . streamsets . lib . security . http . SSOService . class ) ; org . mockito . Mockito . when ( ssoService . getLogoutUrl ( ) ) . thenReturn ( "http://foo/logout" ) ; com . streamsets . lib . security . http . SSOUserAuthenticator authenticator = new com . streamsets . lib . security . http . SSOUserAuthenticator ( ssoService , conf ) ; javax . servlet . http . HttpServletResponse res = org . mockito . Mockito . mock ( javax . servlet . http . HttpServletResponse . class ) ; org . eclipse . jetty . server . Authentication auth = authenticator . redirectToLogout ( res ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( res ) . sendRedirect ( org . mockito . Mockito . eq ( ssoService . getLogoutUrl ( ) ) ) ; } redirectToLogout ( javax . servlet . http . HttpServletResponse ) { java . lang . String urlToLogout = getSsoService ( ) . getLogoutUrl ( ) ; try { com . streamsets . lib . security . http . SSOUserAuthenticator . LOG . debug ( "Redirecting<sp>to<sp>logout<sp>'{}'" , urlToLogout ) ; httpRes . sendRedirect ( urlToLogout ) ; return org . eclipse . jetty . server . Authentication . SEND_SUCCESS ; } catch ( java . io . IOException ex ) { throw new org . eclipse . jetty . security . ServerAuthException ( com . streamsets . pipeline . api . impl . Utils . format ( "Could<sp>not<sp>redirect<sp>to<sp>'{}':<sp>{}" , urlToLogout , ex . toString ( ) , ex ) ) ; } } | org . junit . Assert . assertEquals ( Authentication . SEND_SUCCESS , auth ) |
concurrentAddChild ( ) { org . apache . jackrabbit . oak . api . ContentSession s1 = repository . login ( null , null ) ; try { org . apache . jackrabbit . oak . api . Root r1 = s1 . getLatestRoot ( ) ; org . apache . jackrabbit . oak . api . Tree t1 = r1 . getTree ( "/" ) ; t1 . addChild ( "node1" ) ; t1 . addChild ( "node2" ) ; t1 . addChild ( "node3" ) ; r1 . commit ( ) ; org . apache . jackrabbit . oak . api . ContentSession s2 = repository . login ( null , null ) ; try { org . apache . jackrabbit . oak . api . Root r2 = s2 . getLatestRoot ( ) ; org . apache . jackrabbit . oak . api . Tree t2 = r2 . getTree ( "/" ) ; t1 = r1 . getTree ( "/" ) ; t1 . addChild ( "node4" ) ; r1 . commit ( ) ; t2 . addChild ( "node5" ) ; r2 . commit ( ) ; r1 = s1 . getLatestRoot ( ) ; t1 = r1 . getTree ( "/" ) ; java . util . Set < java . lang . String > names = com . google . common . collect . Sets . newHashSet ( ) ; for ( org . apache . jackrabbit . oak . api . Tree t : t1 . getChildren ( ) ) { names . add ( t . getName ( ) ) ; } "<AssertPlaceHolder>" ; } finally { s2 . close ( ) ; } } finally { s1 . close ( ) ; } } getName ( ) { return journalNamePrefix ; } | org . junit . Assert . assertEquals ( com . google . common . collect . Sets . newHashSet ( "node1" , "node2" , "node3" , "node4" , "node5" ) , names ) |
testAbr ( ) { ospfDeviceTed . setAbr ( true ) ; "<AssertPlaceHolder>" ; } abr ( ) { return abr ; } | org . junit . Assert . assertThat ( ospfDeviceTed . abr ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
shouldAcceptValidCluster ( ) { org . openstack . atlas . api . validation . results . ValidatorResult result = cTest . validate ( cluster , org . openstack . atlas . api . mgmt . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results . ValidatorResult , java . lang . Enum ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ! ( result . passedValidation ( ) ) ) { java . util . List < org . openstack . atlas . api . validation . results . ExpectationResult > ers = result . getValidationResults ( ) ; sb . append ( java . lang . String . format ( "ON<sp>%s<sp>result.withMessage([" , ctx . toString ( ) ) ) ; for ( org . openstack . atlas . api . validation . results . ExpectationResult er : ers ) { sb . append ( java . lang . String . format ( "%s" , er . getMessage ( ) ) ) ; sb . append ( "])" ) ; } } else { sb . append ( java . lang . String . format ( "On<sp>%s<sp>All<sp>Expectations<sp>PASSED\n" , ctx . toString ( ) ) ) ; } return sb . toString ( ) ; } | org . junit . Assert . assertTrue ( resultMessage ( result , org . openstack . atlas . api . mgmt . validation . validators . POST ) , result . passedValidation ( ) ) |
testDetectBatchStepType ( ) { for ( org . opendaylight . openflowplugin . impl . services . batch . BatchStepType stepType : org . opendaylight . openflowplugin . impl . services . batch . BatchStepType . values ( ) ) { org . opendaylight . openflowplugin . impl . util . FlatBatchUtilTest . LOG . debug ( "checking<sp>detection<sp>of:<sp>{}" , stepType ) ; final org . opendaylight . yang . gen . v1 . urn . opendaylight . flat . batch . service . rev160321 . process . flat . batch . input . Batch batch = createBatch ( stepType ) ; final org . opendaylight . openflowplugin . impl . services . batch . BatchStepType actualType = org . opendaylight . openflowplugin . impl . util . FlatBatchUtil . detectBatchStepType ( batch . getBatchChoice ( ) ) ; "<AssertPlaceHolder>" ; } } detectBatchStepType ( T extends org . opendaylight . yang . gen . v1 . urn . opendaylight . flat . batch . service . rev160321 . process . flat . batch . input . batch . BatchChoice ) { final org . opendaylight . openflowplugin . impl . services . batch . BatchStepType type ; final java . lang . Class < ? extends org . opendaylight . yangtools . yang . binding . DataContainer > implementedInterface = batchCase . implementedInterface ( ) ; if ( org . opendaylight . yang . gen . v1 . urn . opendaylight . flat . batch . service . rev160321 . process . flat . batch . input . batch . batch . choice . FlatBatchAddFlowCase . class . equals ( implementedInterface ) ) { type = org . opendaylight . openflowplugin . impl . services . batch . BatchStepType . FLOW_ADD ; } else if ( org . opendaylight . yang . gen . v1 . urn . opendaylight . flat . batch . service . rev160321 . process . flat . batch . input . batch . batch . choice . FlatBatchRemoveFlowCase . class . equals ( implementedInterface ) ) { type = org . opendaylight . openflowplugin . impl . services . batch . BatchStepType . FLOW_REMOVE ; } else if ( org . opendaylight . yang . gen . v1 . urn . opendaylight . flat . batch . service . rev160321 . process . flat . batch . input . batch . batch . choice . FlatBatchUpdateFlowCase . class . equals ( implementedInterface ) ) { type = org . opendaylight . openflowplugin . impl . services . batch . BatchStepType . FLOW_UPDATE ; } else if ( org . opendaylight . yang . gen . v1 . urn . opendaylight . flat . batch . service . rev160321 . process . flat . batch . input . batch . batch . choice . FlatBatchAddGroupCase . class . equals ( implementedInterface ) ) { type = org . opendaylight . openflowplugin . impl . services . batch . BatchStepType . GROUP_ADD ; } else if ( org . opendaylight . yang . gen . v1 . urn . opendaylight . flat . batch . service . rev160321 . process . flat . batch . input . batch . batch . choice . FlatBatchRemoveGroupCase . class . equals ( implementedInterface ) ) { type = org . opendaylight . openflowplugin . impl . services . batch . BatchStepType . GROUP_REMOVE ; } else if ( org . opendaylight . yang . gen . v1 . urn . opendaylight . flat . batch . service . rev160321 . process . flat . batch . input . batch . batch . choice . FlatBatchUpdateGroupCase . class . equals ( implementedInterface ) ) { type = org . opendaylight . openflowplugin . impl . services . batch . BatchStepType . GROUP_UPDATE ; } else if ( org . opendaylight . yang . gen . v1 . urn . opendaylight . flat . batch . service . rev160321 . process . flat . batch . input . batch . batch . choice . FlatBatchAddMeterCase . class . equals ( implementedInterface ) ) { type = org . opendaylight . openflowplugin . impl . services . batch . BatchStepType . METER_ADD ; } else if ( org . opendaylight . yang . gen . v1 . urn . opendaylight . flat . batch . service . rev160321 . process . flat . batch . input . batch . batch . choice . FlatBatchRemoveMeterCase . class . equals ( implementedInterface ) ) { type = org . opendaylight . openflowplugin . impl . services . batch . BatchStepType . METER_REMOVE ; } else if ( org . opendaylight . yang . gen . v1 . urn . opendaylight . flat . batch . service . rev160321 . process . flat . batch . input . batch . batch . choice . FlatBatchUpdateMeterCase . class . equals ( implementedInterface ) ) { type = org . opendaylight . openflowplugin . impl . services . batch . BatchStepType . METER_UPDATE ; } else { throw new java . lang . IllegalArgumentException ( ( "Unsupported<sp>batch<sp>obtained:<sp>" + implementedInterface ) ) ; } return type ; } | org . junit . Assert . assertEquals ( stepType , actualType ) |
testCanTranslateToClassesWithProtectedNoArgConstructor ( ) { com . codiform . moo . TranslationConstructionTest . Source source = new com . codiform . moo . TranslationConstructionTest . Source ( "Translate<sp>to<sp>Class<sp>with<sp>Protected<sp>Constructor" ) ; com . codiform . moo . TranslationConstructionTest . ProtectedDestination destination = com . codiform . moo . curry . Translate . to ( com . codiform . moo . TranslationConstructionTest . ProtectedDestination . class ) . from ( source ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( "Translate<sp>to<sp>Class<sp>with<sp>Protected<sp>Constructor" , destination . getName ( ) ) |
testCodeStandaloneExpFromStandalone ( ) { de . vksi . c4j . internal . compiler . StandaloneExp standaloneExp = de . vksi . c4j . internal . compiler . StandaloneExp . CodeStandaloneExp . fromStandalone ( "someCode" , false ) ; "<AssertPlaceHolder>" ; } getCode ( ) { return exp . getCode ( ) ; } | org . junit . Assert . assertEquals ( "someCode" , standaloneExp . getCode ( ) ) |
testExtractPathFromFtpUrlWithPlusCharacters ( ) { final java . net . URL url = new java . net . URL ( "ftp://user001:secretpassword@private.ftp-servers.example.com/my+directory/my+file.txt" ) ; final java . lang . String expected = "/my<sp>directory/my<sp>file.txt" ; "<AssertPlaceHolder>" ; } extractPath ( java . net . URL ) { java . lang . String urlPath = url . getPath ( ) ; if ( urlPath . startsWith ( "jar:" ) ) { urlPath = urlPath . substring ( 4 ) ; } if ( urlPath . startsWith ( "file:" ) ) { urlPath = urlPath . substring ( 5 ) ; } final int bangIndex = urlPath . indexOf ( '!' ) ; if ( bangIndex > 0 ) { urlPath = urlPath . substring ( 0 , bangIndex ) ; } final java . lang . String protocol = url . getProtocol ( ) ; final java . util . List < java . lang . String > neverDecode = java . util . Arrays . asList ( org . apache . logging . log4j . core . config . plugins . util . ResolverUtil . VFS , org . apache . logging . log4j . core . config . plugins . util . ResolverUtil . VFSZIP , org . apache . logging . log4j . core . config . plugins . util . ResolverUtil . BUNDLE_RESOURCE ) ; if ( neverDecode . contains ( protocol ) ) { return urlPath ; } final java . lang . String cleanPath = new java . net . URI ( urlPath ) . getPath ( ) ; if ( new java . io . File ( cleanPath ) . exists ( ) ) { return cleanPath ; } return java . net . URLDecoder . decode ( urlPath , StandardCharsets . UTF_8 . name ( ) ) ; } | org . junit . Assert . assertEquals ( expected , new org . apache . logging . log4j . core . config . plugins . util . ResolverUtil ( ) . extractPath ( url ) ) |
jsonObject_notEqual_messageType ( ) { org . oscm . json . JsonObject jsonObject1 = givenJsonObject ( ) ; org . oscm . json . JsonObject jsonObject2 = givenJsonObject ( ) ; jsonObject2 . setMessageType ( MessageType . INIT_MESSAGE ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( org . oscm . converter . utils . Pair . getClass ( ) ) != ( o . getClass ( ) ) ) ) { return false ; } org . oscm . converter . utils . Pair < ? , ? > pair = ( ( org . oscm . converter . utils . Pair < ? , ? > ) ( o ) ) ; return ( first . equals ( pair . first ) ) && ( second . equals ( pair . second ) ) ; } | org . junit . Assert . assertFalse ( jsonObject1 . equals ( jsonObject2 ) ) |
runTransactionInTransaction ( ) { final com . sun . sgs . service . TransactionProxy proxy = serverNode . getProxy ( ) ; com . sun . sgs . kernel . KernelRunnable task = new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) throws com . sun . sgs . impl . kernel . Exception { final com . sun . sgs . service . Transaction t = proxy . getCurrentTransaction ( ) ; txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) throws com . sun . sgs . impl . kernel . Exception { com . sun . sgs . service . Transaction t2 = proxy . getCurrentTransaction ( ) ; "<AssertPlaceHolder>" ; } } , taskOwner ) ; } } ; txnScheduler . runTask ( task , taskOwner ) ; } equals ( java . lang . Object ) { return ( ( o != null ) && ( ( getClass ( ) ) == ( o . getClass ( ) ) ) ) && ( ( ( ( com . sun . sgs . test . app . util . TestScalableHashMap . Foo ) ( o ) ) . i ) == ( i ) ) ; } | org . junit . Assert . assertTrue ( t . equals ( t2 ) ) |
isUserRoleAssignmentInPeriod_OnPeriodEndTime ( ) { org . oscm . billingservice . business . calculation . revenue . model . UserRoleAssignment userRoleAssignment = new org . oscm . billingservice . business . calculation . revenue . model . UserRoleAssignment ( java . lang . Long . valueOf ( 10000 ) , org . oscm . test . DateTimeHandling . calculateMillis ( "2013-04-10<sp>00:00:00" ) , org . oscm . test . DateTimeHandling . calculateMillis ( "2013-04-10<sp>00:00:01" ) ) ; boolean result = calculator . isUserRoleAssignmentInPeriod ( userRoleAssignment , org . oscm . test . DateTimeHandling . calculateMillis ( "2013-04-05<sp>00:00:00" ) , org . oscm . test . DateTimeHandling . calculateMillis ( "2013-04-10<sp>00:00:00" ) ) ; "<AssertPlaceHolder>" ; } calculateMillis ( java . lang . String ) { return org . oscm . test . DateTimeHandling . parseToCalendar ( dateSource ) . getTimeInMillis ( ) ; } | org . junit . Assert . assertFalse ( result ) |
renderer ( ) { org . jooby . Route . Collection col = new org . jooby . Route . Collection ( new org . jooby . Route . Definition ( "*" , "*" , ( req , rsp , chain ) -> { } ) ) . renderer ( "json" ) ; "<AssertPlaceHolder>" ; } renderer ( ) { new org . jooby . test . MockUnit ( org . jooby . Env . class , org . jooby . View . class , org . thymeleaf . context . Context . class ) . expect ( ( unit ) -> { org . thymeleaf . TemplateEngine engine = unit . powerMock ( . class ) ; unit . registerMock ( . class , engine ) ; } ) . expect ( viewName ( "index" ) ) . expect ( ( unit ) -> { org . jooby . Renderer . Context ctx = unit . get ( . class ) ; expect ( ctx . locals ( ) ) . andReturn ( new org . jooby . thymeleaf . HashMap < > ( com . google . common . collect . ImmutableMap . of ( "_vname" , "index" ) ) ) ; } ) . expect ( ( unit ) -> { org . jooby . thymeleaf . Thlxss xss = unit . constructor ( . class ) . args ( . class ) . build ( unit . get ( . class ) ) ; java . util . Map model = unit . mock ( . class ) ; expect ( model . putIfAbsent ( "_vname" , "index" ) ) . andReturn ( null ) ; expect ( model . putIfAbsent ( "xss" , xss ) ) . andReturn ( null ) ; org . jooby . View view = unit . get ( . class ) ; expect ( view . model ( ) ) . andReturn ( model ) ; org . jooby . Renderer . Context ctx = unit . get ( . class ) ; expect ( ctx . locale ( ) ) . andReturn ( Locale . CANADA ) ; org . thymeleaf . context . Context context = unit . constructor ( . class ) . args ( . class , . class ) . build ( Locale . CANADA , model ) ; org . thymeleaf . TemplateEngine engine = unit . get ( . class ) ; expect ( engine . process ( "index" , context ) ) . andReturn ( "..." ) ; expect ( ctx . type ( MediaType . html ) ) . andReturn ( ctx ) ; ctx . send ( "..." ) ; } ) . run ( ( unit ) -> { org . jooby . thymeleaf . ThlEngine engine = new org . jooby . thymeleaf . ThlEngine ( unit . get ( . class ) , unit . get ( . class ) ) ; engine . render ( unit . get ( . class ) , unit . get ( . class ) ) ; assertEquals ( "thymeleaf" , engine . name ( ) ) ; } ) ; } | org . junit . Assert . assertEquals ( "json" , col . renderer ( ) ) |
testGetForwardRequest ( ) { com . github . kristofa . test . http . FullHttpRequestImpl inputRequest = new com . github . kristofa . test . http . FullHttpRequestImpl ( ) ; inputRequest . domain ( "www.testservice.com" ) ; inputRequest . port ( 8080 ) ; inputRequest . path ( "/resource" ) ; inputRequest . content ( data ) ; inputRequest . method ( Method . POST ) ; com . github . kristofa . test . http . FullHttpRequestImpl expectedRequest = new com . github . kristofa . test . http . FullHttpRequestImpl ( ) ; expectedRequest . domain ( targetDomain ) ; expectedRequest . port ( targetPort ) ; expectedRequest . path ( "/resource" ) ; expectedRequest . content ( data ) ; expectedRequest . method ( Method . POST ) ; expectedRequest . httpMessageHeader ( com . github . kristofa . test . http . HOST , ( ( ( targetDomain ) + ':' ) + ( targetPort ) ) ) ; com . github . kristofa . test . http . FullHttpRequest passthroughRequest = requestBuilder . getForwardRequest ( inputRequest ) ; "<AssertPlaceHolder>" ; } getForwardRequest ( com . github . kristofa . test . http . FullHttpRequest ) { com . github . kristofa . test . http . FullHttpRequestImpl result = new com . github . kristofa . test . http . FullHttpRequestImpl ( request ) ; result . domain ( targetDomain ) ; result . port ( targetPort ) ; result . httpMessageHeader ( com . github . kristofa . test . http . HOST , ( ( ( targetDomain ) + ':' ) + ( targetPort ) ) ) ; return result ; } | org . junit . Assert . assertEquals ( expectedRequest , passthroughRequest ) |
hasColumnDefinitionsWithActionColumn ( ) { final org . drools . workbench . models . guided . dtable . shared . model . ActionInsertFactCol52 action = new org . drools . workbench . models . guided . dtable . shared . model . ActionInsertFactCol52 ( ) ; action . setFactType ( "FactType" ) ; action . setFactField ( "field" ) ; dtPresenter . getModel ( ) . getActionCols ( ) . add ( action ) ; "<AssertPlaceHolder>" ; } hasColumnDefinitions ( ) { final boolean hasAttributeCols = ( model . getAttributeCols ( ) . size ( ) ) > 0 ; final boolean hasMetadataCols = ( model . getMetadataCols ( ) . size ( ) ) > 0 ; final boolean hasConditionCols = ( model . getConditionsCount ( ) ) > 0 ; final boolean hasActionCols = ( model . getActionCols ( ) . size ( ) ) > 0 ; return ( ( hasAttributeCols || hasConditionCols ) || hasActionCols ) || hasMetadataCols ; } | org . junit . Assert . assertTrue ( dtPresenter . hasColumnDefinitions ( ) ) |
shouldNotRemoveTagKbd ( ) { java . lang . String html = "<kbd>shift</kbd>" ; java . lang . String sanitized = htmlSanitizer . sanitize ( html ) . getText ( ) ; "<AssertPlaceHolder>" ; } getText ( ) { return text ; } | org . junit . Assert . assertEquals ( html , sanitized ) |
test ( ) { connect ( ) ; for ( org . zkoss . zktest . zats . ztl . JQuery button : jq ( ".z-button" ) ) { click ( button ) ; waitResponse ( ) ; org . zkoss . zktest . zats . ztl . JQuery panelBody = jq ( ".z-panel-body" ) ; int height = 0 ; for ( org . zkoss . zktest . zats . ztl . JQuery child : panelBody . children ( ) ) { height += child . outerHeight ( ) ; } "<AssertPlaceHolder>" ; } } height ( ) { return org . zkoss . zktest . zats . WebDriverTestCase . parseInt ( org . zkoss . zktest . zats . WebDriverTestCase . getEval ( ( ( _out . toString ( ) ) + ".height()" ) ) ) ; } | org . junit . Assert . assertEquals ( panelBody . height ( ) , height ) |
testHeadBucket ( ) { javax . ws . rs . core . Response response = bucketEndpoint . head ( bucketName ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return this . status ; } | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testParameterParser ( ) { final org . apache . reef . tang . formats . ParameterParser p = new org . apache . reef . tang . formats . ParameterParser ( ) ; p . addParser ( org . apache . reef . tang . implementation . java . TestParameterParser . FooParser . class ) ; final org . apache . reef . tang . implementation . java . TestParameterParser . Foo f = p . parse ( org . apache . reef . tang . implementation . java . TestParameterParser . Foo . class , "woot" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . Class , java . lang . String ) { if ( c . isEnum ( ) ) { return parseEnum ( c , s ) ; } final java . lang . Class < ? > d = org . apache . reef . tang . util . ReflectionUtilities . boxClass ( c ) ; for ( final java . lang . reflect . Type e : org . apache . reef . tang . util . ReflectionUtilities . classAndAncestors ( d ) ) { final java . lang . String name = org . apache . reef . tang . util . ReflectionUtilities . getFullName ( e ) ; if ( parsers . containsKey ( name ) ) { final T ret = parse ( name , s ) ; if ( c . isAssignableFrom ( ret . getClass ( ) ) ) { return ret ; } else { throw new java . lang . ClassCastException ( ( ( ( "Cannot<sp>cast<sp>from<sp>" + ( ret . getClass ( ) ) ) + "<sp>to<sp>" ) + c ) ) ; } } } return parse ( org . apache . reef . tang . util . ReflectionUtilities . getFullName ( d ) , s ) ; } | org . junit . Assert . assertEquals ( f . s , "woot" ) |
runTest ( ) { boolean result = checkNoError ( "Social_Profiles_Get_My_Profile" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
shouldReturnFalseWhenUserNotLoggedIn ( ) { given ( securityService . getCurrentUserId ( ) ) . willReturn ( null ) ; boolean result = draftDocumentsNotificationService . shouldNotifyCurrentUser ( ) ; verify ( securityService ) . getCurrentUserId ( ) ; verify ( securityService , never ( ) ) . hasCurrentUserRole ( com . qcadoo . mes . materialFlowResources . service . DraftDocumentsNotificationService . ROLE_DOCUMENTS_NOTIFICATION ) ; "<AssertPlaceHolder>" ; } shouldNotifyCurrentUser ( ) { java . lang . Long currentUserId = securityService . getCurrentUserId ( ) ; return ( ( currentUserId != null ) && ( securityService . hasCurrentUserRole ( com . qcadoo . mes . materialFlowResources . service . DraftDocumentsNotificationService . ROLE_DOCUMENTS_NOTIFICATION ) ) ) && ( ( countDraftDocumentsForUser ( currentUserId ) ) > 0 ) ; } | org . junit . Assert . assertFalse ( result ) |
parseSubredditsJson ( ) { java . util . List < com . cd . reddit . json . mapping . RedditSubreddit > parsedTypes = null ; java . io . InputStream jsonStream = this . getClass ( ) . getResourceAsStream ( "/subreddits-popular.json" ) ; testParser = new com . cd . reddit . json . jackson . RedditJsonParser ( convertStreamToString ( jsonStream ) ) ; try { parsedTypes = testParser . parseSubreddits ( ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } for ( com . cd . reddit . json . mapping . RedditType parsedType : parsedTypes ) { System . out . println ( parsedType . toString ( ) ) ; } "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; java . lang . String nl = java . lang . System . getProperty ( "line.separator" ) ; builder . append ( "---<sp>PATH<sp>SEGMENTS<sp>---" ) ; builder . append ( nl ) ; for ( java . lang . String seg : pathSegments ) { builder . append ( seg ) ; builder . append ( nl ) ; } builder . append ( nl ) ; builder . append ( "---<sp>QUERY<sp>PARAMS<sp>---" ) ; builder . append ( nl ) ; if ( ( queryParams ) != null ) { for ( Map . Entry < java . lang . String , java . lang . String > entry : queryParams . entrySet ( ) ) { builder . append ( ( ( ( entry . getKey ( ) ) + "<sp>=<sp>" ) + ( entry . getValue ( ) ) ) ) ; builder . append ( nl ) ; } builder . append ( nl ) ; } builder . append ( "---<sp>FORM<sp>PARAMS<sp>---" ) ; builder . append ( nl ) ; if ( ( formParams ) != null ) { for ( Map . Entry < java . lang . String , java . lang . String > entry : formParams . entrySet ( ) ) { builder . append ( ( ( ( entry . getKey ( ) ) + "<sp>=<sp>" ) + ( entry . getValue ( ) ) ) ) ; builder . append ( nl ) ; } builder . append ( nl ) ; } return builder . toString ( ) ; } | org . junit . Assert . assertEquals ( true , ( ( parsedTypes . get ( 0 ) ) instanceof com . cd . reddit . json . mapping . RedditSubreddit ) ) |
testUpdate ( ) { customer . setCustomerId ( 9L ) ; values . add ( "Katlea" ) ; int result = cdao . update ( 9L , "Update<sp>customer<sp>set<sp>company=?<sp>where<sp>CustomerId=?" , values ) ; "<AssertPlaceHolder>" ; } update ( long , java . lang . String , java . util . ArrayList ) { int result = 0 ; try ( java . sql . Connection conn = ds . getConnection ( ) ; java . sql . PreparedStatement pStatement = conn . prepareStatement ( sql ) ) { int i ; int j ; for ( i = 1 , j = 0 ; i <= ( data . size ( ) ) ; i ++ , j ++ ) { if ( data . get ( j ) . getClass ( ) . equals ( java . lang . String . class ) ) { pStatement . setString ( i , ( ( java . lang . String ) ( data . get ( j ) ) ) ) ; } else if ( data . get ( j ) . getClass ( ) . equals ( g7w14 . persistence . Long . class ) ) { long l = ( ( java . lang . Long ) ( data . get ( j ) ) ) . longValue ( ) ; pStatement . setLong ( i , l ) ; } } pStatement . setLong ( i , id ) ; result = pStatement . executeUpdate ( ) ; } return result ; } | org . junit . Assert . assertTrue ( ( result == 1 ) ) |
testUserJavaBean1 ( ) { testcase . function . User7 u7 = new testcase . function . User7 ( ) ; u7 . putInnerBoolean ( true ) ; testcase . function . User7 result = executeBackAndForth ( u7 , testcase . function . User7 . class ) ; "<AssertPlaceHolder>" ; } findInnerBoolean ( ) { return innerUser . getB ( ) ; } | org . junit . Assert . assertEquals ( true , result . findInnerBoolean ( ) ) |
testGetS3KeyPrefixTrimParameters ( ) { businessObjectDataServiceTestHelper . createDatabaseEntitiesForGetS3KeyPrefixTesting ( false ) ; java . util . List < org . finra . herd . model . api . xml . SchemaColumn > testPartitionColumns = schemaColumnDaoTestHelper . getTestPartitionColumns ( ) ; java . lang . String testPartitionKey = testPartitionColumns . get ( 0 ) . getName ( ) ; java . util . List < org . finra . herd . model . api . xml . SchemaColumn > testSubPartitionColumns = testPartitionColumns . subList ( 1 , ( ( org . finra . herd . service . SUBPARTITION_VALUES . size ( ) ) + 1 ) ) ; org . finra . herd . model . api . xml . S3KeyPrefixInformation resultS3KeyPrefixInformation = storageUnitService . getS3KeyPrefix ( new org . finra . herd . model . api . xml . BusinessObjectDataKey ( addWhitespace ( org . finra . herd . service . NAMESPACE ) , addWhitespace ( org . finra . herd . service . BDEF_NAME ) , addWhitespace ( org . finra . herd . service . FORMAT_USAGE_CODE ) , addWhitespace ( org . finra . herd . service . FORMAT_FILE_TYPE_CODE ) , FORMAT_VERSION , addWhitespace ( org . finra . herd . service . PARTITION_VALUE ) , addWhitespace ( org . finra . herd . service . SUBPARTITION_VALUES ) , DATA_VERSION ) , addWhitespace ( testPartitionKey ) , addWhitespace ( org . finra . herd . service . STORAGE_NAME ) , false ) ; java . lang . String expectedS3KeyPrefix = getExpectedS3KeyPrefix ( org . finra . herd . service . NAMESPACE , org . finra . herd . service . DATA_PROVIDER_NAME , org . finra . herd . service . BDEF_NAME , org . finra . herd . service . FORMAT_USAGE_CODE , org . finra . herd . service . FORMAT_FILE_TYPE_CODE , org . finra . herd . service . FORMAT_VERSION , testPartitionKey , org . finra . herd . service . PARTITION_VALUE , testSubPartitionColumns . toArray ( new org . finra . herd . model . api . xml . SchemaColumn [ testSubPartitionColumns . size ( ) ] ) , org . finra . herd . service . SUBPARTITION_VALUES . toArray ( new java . lang . String [ org . finra . herd . service . SUBPARTITION_VALUES . size ( ) ] ) , org . finra . herd . service . DATA_VERSION ) ; "<AssertPlaceHolder>" ; } size ( ) { return org . finra . herd . service . helper . NotificationMessageInMemoryQueue . QUEUE . get ( ) . size ( ) ; } | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . S3KeyPrefixInformation ( expectedS3KeyPrefix ) , resultS3KeyPrefixInformation ) |
testStoreInstanceResources_inexistingDirectory ( ) { net . roboconf . core . model . beans . Instance instance = new net . roboconf . core . model . beans . Instance ( "whatever" ) . component ( new net . roboconf . core . model . beans . Component ( "comp" ) ) ; java . util . Map < ? , ? > map = net . roboconf . core . utils . ResourceUtils . storeInstanceResources ( new java . io . File ( "file/does/not/exist" ) , instance ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . map . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , map . size ( ) ) |
testFindType09 ( ) { org . dresdenocl . model . IModel model ; model = org . dresdenocl . modelbus . test . ModelBusTestUtility . getUML2Model ( "resources/models/model01.uml" ) ; java . util . List < java . lang . String > path ; path = new java . util . ArrayList < java . lang . String > ( ) ; path . add ( ModelConstants . ROOT_PACKAGE_NAME ) ; path . add ( "Type2" ) ; org . dresdenocl . pivotmodel . Type type ; type = model . findType ( path ) ; "<AssertPlaceHolder>" ; } findType ( java . util . List ) { if ( org . dresdenocl . model . base . AbstractModel . LOGGER . isDebugEnabled ( ) ) { org . dresdenocl . model . base . AbstractModel . LOGGER . debug ( ( "findType()<sp>-<sp>exit<sp>-<sp>return<sp>value=" + result ) ) ; } return result ; } | org . junit . Assert . assertNull ( type ) |
testGetValue_Gets_Value_From_Value_Pattern ( ) { mmarquee . automation . AutomationElement element = org . mockito . Mockito . mock ( mmarquee . automation . AutomationElement . class ) ; mmarquee . automation . pattern . Value value = org . mockito . Mockito . mock ( mmarquee . automation . pattern . Value . class ) ; when ( element . getClassName ( ) ) . thenReturn ( AutomationPasswordEditBox . CLASS_NAME ) ; when ( value . isAvailable ( ) ) . thenReturn ( true ) ; when ( value . value ( ) ) . thenReturn ( "VALUE" ) ; mmarquee . automation . uiautomation . IUIAutomation mocked_automation = org . mockito . Mockito . mock ( mmarquee . automation . uiautomation . IUIAutomation . class ) ; mmarquee . automation . UIAutomation instance = new mmarquee . automation . UIAutomation ( mocked_automation ) ; mmarquee . automation . controls . AutomationPasswordEditBox control = new mmarquee . automation . controls . AutomationPasswordEditBox ( new mmarquee . automation . controls . ElementBuilder ( element ) . addPattern ( value ) . automation ( instance ) ) ; java . lang . String val = control . getValue ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { final mmarquee . automation . pattern . Value valuePattern = requestAutomationPattern ( mmarquee . automation . pattern . Value . class ) ; if ( valuePattern . isAvailable ( ) ) { return valuePattern . value ( ) ; } else { throw new mmarquee . automation . pattern . PatternNotFoundException ( "Cannot<sp>get<sp>value" ) ; } } | org . junit . Assert . assertTrue ( val . equals ( "VALUE" ) ) |
testWithTEUnsupported ( ) { getTomcatInstanceTestWebapp ( false , true ) ; java . lang . String request = ( ( ( ( ( ( ( ( ( ( "POST<sp>/echo-params.jsp<sp>HTTP/1.1" + ( org . apache . catalina . startup . SimpleHttpClient . CRLF ) ) + "Host:<sp>any" ) + ( org . apache . catalina . startup . SimpleHttpClient . CRLF ) ) + "Transfer-encoding:<sp>unsupported" ) + ( org . apache . catalina . startup . SimpleHttpClient . CRLF ) ) + "Content-Length:<sp>9" ) + ( org . apache . catalina . startup . SimpleHttpClient . CRLF ) ) + "Content-Type:<sp>application/x-www-form-urlencoded" ) + ( org . apache . catalina . startup . SimpleHttpClient . CRLF ) ) + ( org . apache . catalina . startup . SimpleHttpClient . CRLF ) ) + "test=data" ; org . apache . coyote . http11 . TestAbstractHttp11Processor . Client client = new org . apache . coyote . http11 . TestAbstractHttp11Processor . Client ( getPort ( ) ) ; client . setRequest ( new java . lang . String [ ] { request } ) ; client . connect ( ) ; client . processRequest ( ) ; "<AssertPlaceHolder>" ; } isResponse501 ( ) { return getResponseLine ( ) . startsWith ( org . apache . catalina . startup . SimpleHttpClient . FAIL_501 ) ; } | org . junit . Assert . assertTrue ( client . isResponse501 ( ) ) |
testEmptyMidIsNotValid ( ) { "<AssertPlaceHolder>" ; } isValid ( java . lang . String ) { if ( ( metadataIdentificationString == null ) || ( ( metadataIdentificationString . length ( ) ) <= ( org . springframework . roo . metadata . MetadataIdentificationUtils . MID_PREFIX_LENGTH ) ) ) { return false ; } for ( int i = 0 ; i < ( org . springframework . roo . metadata . MetadataIdentificationUtils . MID_PREFIX_LENGTH ) ; i ++ ) { if ( ( metadataIdentificationString . charAt ( i ) ) != ( org . springframework . roo . metadata . MetadataIdentificationUtils . MID_PREFIX_CHARACTERS [ i ] ) ) { return false ; } } return true ; } | org . junit . Assert . assertFalse ( org . springframework . roo . metadata . MetadataIdentificationUtils . isValid ( "" ) ) |
testSelection ( ) { org . apache . hadoop . fs . slive . ConfigExtractor extractor = getTestConfig ( false ) ; org . apache . hadoop . fs . slive . WeightSelector selector = new org . apache . hadoop . fs . slive . WeightSelector ( extractor , org . apache . hadoop . fs . slive . TestSlive . rnd ) ; int expected = org . apache . hadoop . fs . slive . Constants . OperationType . values ( ) . length ; org . apache . hadoop . fs . slive . Operation op = null ; java . util . Set < java . lang . String > types = new java . util . HashSet < java . lang . String > ( ) ; org . apache . hadoop . fs . FileSystem fs = org . apache . hadoop . fs . FileSystem . get ( extractor . getConfig ( ) ) ; while ( true ) { op = selector . select ( 1 , 1 ) ; if ( op == null ) { break ; } op . run ( fs ) ; types . add ( op . getType ( ) ) ; } "<AssertPlaceHolder>" ; } size ( ) { return blocks . size ( ) ; } | org . junit . Assert . assertEquals ( types . size ( ) , expected ) |
testSpeedStrToGigabitsUnknown ( ) { long result = com . emc . storageos . driver . dellsc . scapi . SizeUtil . speedStrToGigabits ( "Unknown" ) ; "<AssertPlaceHolder>" ; } speedStrToGigabits ( java . lang . String ) { java . lang . Long gbits = 0L ; try { if ( ( "Unknown" . equals ( speedStr ) ) || ( com . emc . storageos . driver . dellsc . scapi . SizeUtil . EMPTY_STR . equals ( speedStr ) ) ) { return gbits ; } java . lang . String [ ] parts = speedStr . split ( "<sp>" ) ; gbits = new java . math . BigDecimal ( parts [ 0 ] ) . longValue ( ) ; if ( ( parts . length ) > 1 ) { if ( "Mbps" . equals ( parts [ 1 ] ) ) { gbits = gbits / ( com . emc . storageos . driver . dellsc . scapi . SizeUtil . KB ) ; } } } catch ( java . lang . Exception e ) { java . lang . String failureMsg = java . lang . String . format ( "Error<sp>converting<sp>speed<sp>value<sp>(%s)<sp>to<sp>Giagabits" , speedStr ) ; com . emc . storageos . driver . dellsc . scapi . SizeUtil . LOG . warn ( failureMsg , e ) ; } return gbits ; } | org . junit . Assert . assertTrue ( ( result == 0 ) ) |
testIsValidVersionString ( ) { java . lang . String [ ] validVersions = new java . lang . String [ ] { "4" , "4.2" , "4.2.2" , "4_rc1" , "4.2_rc1" , "4.2.2_rc1" , "r9c" , "r10e-rc4" } ; for ( java . lang . String validVersion : validVersions ) { "<AssertPlaceHolder>" ; } } isValidVersionString ( java . lang . String ) { return com . facebook . buck . util . VersionStringComparator . VERSION_STRING_PATTERN . matcher ( str ) . matches ( ) ; } | org . junit . Assert . assertTrue ( validVersion , com . facebook . buck . util . VersionStringComparator . isValidVersionString ( validVersion ) ) |
runTest ( ) { boolean result = checkNoError ( "Social_Communities_Get_Bookmarks" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
canProcessFailed ( ) { kong . unirest . PagedList < java . lang . String > list = new kong . unirest . PagedList ( ) ; list . addAll ( asList ( mkRequest ( "foo" ) , mkRequest ( null ) , mkRequest ( "baz" ) ) ) ; final java . util . List < java . lang . String > processed = new java . util . ArrayList ( ) ; list . ifFailure ( ( e ) -> processed . add ( e . getBody ( ) ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return kong . unirest . Unirest . primaryInstance . get ( url ) ; } | org . junit . Assert . assertEquals ( null , processed . get ( 0 ) ) |
auditOffForInboundPDDeferredReq ( ) { 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 . MCCIIN000002UV01 expectedResponse = new org . hl7 . v3 . MCCIIN000002UV01 ( ) ; gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . proxy . AdapterPatientDiscoveryDeferredReqProxyObjectFactory adapterFactory = mock ( gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . proxy . AdapterPatientDiscoveryDeferredReqProxyObjectFactory . class ) ; gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . proxy . AdapterPatientDiscoveryDeferredReqProxy adapterProxy = mock ( gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . proxy . AdapterPatientDiscoveryDeferredReqProxy . class ) ; gov . hhs . fha . nhinc . patientdiscovery . audit . PatientDiscoveryDeferredRequestAuditLogger auditLogger = getAuditLogger ( false ) ; java . util . Properties webContextProperties = new java . util . Properties ( ) ; when ( adapterFactory . getAdapterPatientDiscoveryDeferredReqProxy ( ) ) . thenReturn ( adapterProxy ) ; when ( adapterProxy . processPatientDiscoveryAsyncReq ( request , assertion ) ) . thenReturn ( expectedResponse ) ; gov . hhs . fha . nhinc . patientdiscovery . inbound . deferred . request . PassthroughInboundPatientDiscoveryDeferredRequest passthroughPatientDiscovery = new gov . hhs . fha . nhinc . patientdiscovery . inbound . deferred . request . PassthroughInboundPatientDiscoveryDeferredRequest ( adapterFactory , auditLogger ) ; org . hl7 . v3 . MCCIIN000002UV01 actualResponse = passthroughPatientDiscovery . respondingGatewayPRPAIN201305UV02 ( request , assertion , webContextProperties ) ; "<AssertPlaceHolder>" ; verify ( mockEJBLogger , never ( ) ) . auditResponseMessage ( eq ( request ) , eq ( actualResponse ) , eq ( assertion ) , isNull ( gov . hhs . fha . nhinc . common . nhinccommon . NhinTargetSystemType . class ) , eq ( NhincConstants . AUDIT_LOG_INBOUND_DIRECTION ) , eq ( NhincConstants . AUDIT_LOG_NHIN_INTERFACE ) , eq ( Boolean . FALSE ) , eq ( webContextProperties ) , eq ( NhincConstants . PATIENT_DISCOVERY_DEFERRED_REQ_SERVICE_NAME ) , any ( gov . hhs . fha . nhinc . patientdiscovery . audit . transform . PatientDiscoveryDeferredRequestAuditTransforms . class ) ) ; } respondingGatewayPRPAIN201305UV02 ( org . hl7 . v3 . PRPAIN201305UV02 , gov . hhs . fha . nhinc . common . nhinccommon . AssertionType , java . util . Properties ) { org . hl7 . v3 . PRPAIN201306UV02 response = process ( body , assertion , webContextProperties ) ; auditResponse ( body , response , assertion , webContextProperties ) ; return response ; } | org . junit . Assert . assertSame ( expectedResponse , actualResponse ) |
testIsEmpty ( ) { final java . io . File emptyFile = new java . io . File ( getClass ( ) . getResource ( "/emptyfile.jtl" ) . toURI ( ) ) ; final boolean result = hudson . plugins . performance . parsers . JMeterParser . isXmlFile ( emptyFile ) ; "<AssertPlaceHolder>" ; } isXmlFile ( java . io . File ) { try ( java . io . FileReader fr = new java . io . FileReader ( file ) ; java . io . BufferedReader reader = new java . io . BufferedReader ( fr ) ) { java . lang . String line ; boolean isXml = false ; while ( ( line = reader . readLine ( ) ) != null ) { if ( ( line . trim ( ) . length ( ) ) == 0 ) { continue ; } if ( line . toLowerCase ( ) . trim ( ) . startsWith ( "<?xml<sp>" ) ) { isXml = true ; } break ; } return isXml ; } } | org . junit . Assert . assertFalse ( result ) |
testSerialization ( ) { org . streaminer . stream . cardinality . HyperLogLog hll = new org . streaminer . stream . cardinality . HyperLogLog ( 8 ) ; hll . offer ( "a" ) ; hll . offer ( "b" ) ; hll . offer ( "c" ) ; hll . offer ( "d" ) ; hll . offer ( "e" ) ; org . streaminer . stream . cardinality . HyperLogLog hll2 = HyperLogLog . Builder . build ( hll . getBytes ( ) ) ; "<AssertPlaceHolder>" ; } cardinality ( ) { org . streaminer . stream . cardinality . HashMap < java . lang . Integer , java . lang . Integer > results = new org . streaminer . stream . cardinality . HashMap < java . lang . Integer , java . lang . Integer > ( ) ; for ( int i = 0 ; i < ( numMedians ) ; i ++ ) { int currentGuess = ( ( int ) ( ( buffers . get ( i ) . size ( ) ) * ( java . lang . Math . pow ( 2 , limits . get ( i ) ) ) ) ) ; if ( ! ( results . containsKey ( currentGuess ) ) ) { results . put ( currentGuess , 1 ) ; } else { int currentCount = results . get ( currentGuess ) ; results . put ( currentGuess , ( currentCount + 1 ) ) ; } } int finalEstimate = 0 ; int highestVote = 0 ; for ( Map . Entry < java . lang . Integer , java . lang . Integer > pair : results . entrySet ( ) ) { int possibleAnswer = pair . getValue ( ) ; if ( possibleAnswer > highestVote ) { highestVote = possibleAnswer ; finalEstimate = pair . getKey ( ) ; } } return finalEstimate ; } | org . junit . Assert . assertEquals ( hll . cardinality ( ) , hll2 . cardinality ( ) ) |
testEventComplete ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; org . glassfish . admin . rest . ProgressStatusEventTest . writer . writeTo ( org . glassfish . admin . rest . ProgressStatusEventTest . EVENT_COMPLETE , null , null , null , MediaType . APPLICATION_JSON_TYPE , null , baos ) ; baos . close ( ) ; java . io . ByteArrayInputStream bais = new java . io . ByteArrayInputStream ( baos . toByteArray ( ) ) ; org . glassfish . api . admin . progress . ProgressStatusEvent event = org . glassfish . admin . rest . ProgressStatusEventTest . reader . readFrom ( bais , MediaType . APPLICATION_JSON ) ; "<AssertPlaceHolder>" ; } readFrom ( java . io . InputStream , java . lang . String ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; com . sun . enterprise . util . io . FileUtils . copy ( is , baos , 0 ) ; java . lang . String str = baos . toString ( "UTF-8" ) ; try ( javax . json . stream . JsonParser parser = javax . json . Json . createParser ( new java . io . StringReader ( str ) ) ) { parser . next ( ) ; javax . json . JsonObject json = parser . getObject ( ) ; return com . sun . enterprise . admin . remote . reader . AdminCommandStateJsonProprietaryReader . readAdminCommandState ( json ) ; } catch ( javax . json . JsonException ex ) { com . sun . enterprise . admin . remote . reader . AdminCommandStateJsonProprietaryReader . LoggerRef . logger . log ( Level . SEVERE , AdminLoggerInfo . mUnexpectedException , ex ) ; throw new java . io . IOException ( ex ) ; } } | org . junit . Assert . assertEquals ( event , org . glassfish . admin . rest . ProgressStatusEventTest . EVENT_COMPLETE ) |
testClientSessionGetName ( ) { final java . lang . String name = "clientname" ; com . sun . sgs . test . impl . service . session . TestClientSessionServiceImplv4 . DummyClient client = createDummyClient ( name ) ; try { client . connect ( serverNode . getAppPort ( ) ) ; "<AssertPlaceHolder>" ; txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) { com . sun . sgs . test . impl . service . session . TestClientSessionServiceImplv4 . DummyAppListener appListener = getAppListener ( ) ; java . util . Set < com . sun . sgs . app . ClientSession > sessions = appListener . getSessions ( ) ; if ( sessions . isEmpty ( ) ) { org . junit . Assert . fail ( "appListener<sp>contains<sp>no<sp>client<sp>sessions!" ) ; } for ( com . sun . sgs . app . ClientSession session : appListener . getSessions ( ) ) { if ( session . getName ( ) . equals ( name ) ) { System . err . println ( "names<sp>match" ) ; return ; } else { org . junit . Assert . fail ( ( ( ( "Expected<sp>session<sp>name:<sp>" + name ) + ",<sp>got:<sp>" ) + ( session . getName ( ) ) ) ) ; } } org . junit . Assert . fail ( "expected<sp>disconnected<sp>session" ) ; } } , taskOwner ) ; } finally { client . disconnect ( ) ; } } login ( ) { return login ( true ) ; } | org . junit . Assert . assertTrue ( client . login ( ) ) |
testEmptyBannedCommands ( ) { org . bukkit . event . player . PlayerCommandPreprocessEvent e = new org . bukkit . event . player . PlayerCommandPreprocessEvent ( player , "/blah" ) ; world . bentobox . bentobox . listeners . BannedVisitorCommands bvc = new world . bentobox . bentobox . listeners . BannedVisitorCommands ( plugin ) ; bvc . onVisitorCommand ( e ) ; "<AssertPlaceHolder>" ; } isCancelled ( ) { return cancelled ; } | org . junit . Assert . assertFalse ( e . isCancelled ( ) ) |
testNoIndentation ( ) { buffer . write ( "A<sp>string" ) ; buffer . newline ( ) ; buffer . write ( "more<sp>string" ) ; buffer . write ( 's' ) ; buffer . newline ( ) ; java . lang . String expected = "" + ( "A<sp>string\n" + "more<sp>strings\n" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return "++" + ( getValue ( ) . toString ( ) ) ; } | org . junit . Assert . assertEquals ( expected , buffer . toString ( ) ) |
testUpdateRole ( ) { org . musicrecital . model . Role role = dao . getRoleByName ( "ROLE_USER" ) ; role . setDescription ( "test<sp>descr" ) ; dao . save ( role ) ; flush ( ) ; role = dao . getRoleByName ( "ROLE_USER" ) ; "<AssertPlaceHolder>" ; } getDescription ( ) { return this . description ; } | org . junit . Assert . assertEquals ( "test<sp>descr" , role . getDescription ( ) ) |
testRemoveGroupRuleFromPolicy ( ) { try { java . lang . String expectedPolicy = readPolicy ( "policy-24" ) ; java . lang . String builtPolicy = org . qualipso . factory . security . pap . PAPServiceHelper . removeRuleFromPolicy ( org . qualipso . factory . security . pap . PAPServiceHelper . addRuleToPolicy ( org . qualipso . factory . security . pap . PAPServiceHelper . buildOwnerPolicy ( "1" , "/profiles/jayblanc" , "/projects/project1" ) , "/projects/project1/groups/developers" , new java . lang . String [ ] { "read" , "update" } ) , "/projects/project1/groups/developers" ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } catch ( org . qualipso . factory . security . pap . PAPServiceException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } buildOwnerPolicy ( java . lang . String , java . lang . String , java . lang . String ) { try { return org . qualipso . factory . security . pap . PAPServiceHelper . buildPolicy ( policyId , subject , object , null ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } return "" ; } | org . junit . Assert . assertEquals ( expectedPolicy , builtPolicy ) |
testMissedDoubleMatchWithInvalidValue ( ) { org . graylog2 . plugin . streams . StreamRule rule = getSampleRule ( ) ; rule . setValue ( "LOL<sp>I<sp>AM<sp>NOT<sp>EVEN<sp>A<sp>NUMBER" ) ; org . graylog2 . plugin . Message msg = getSampleMessage ( ) ; msg . addField ( "something" , "-9001.42" ) ; org . graylog2 . streams . matchers . StreamRuleMatcher matcher = getMatcher ( rule ) ; "<AssertPlaceHolder>" ; } match ( org . graylog2 . plugin . Message , org . graylog2 . plugin . streams . StreamRule ) { java . lang . Double msgVal = getDouble ( msg . getField ( rule . getField ( ) ) ) ; if ( msgVal == null ) { return false ; } java . lang . Double ruleVal = getDouble ( rule . getValue ( ) ) ; if ( ruleVal == null ) { return false ; } return ( rule . getInverted ( ) ) ^ ( msgVal > ruleVal ) ; } | org . junit . Assert . assertFalse ( matcher . match ( msg , rule ) ) |
testCalendarParameter ( ) { java . util . Calendar c = java . util . Calendar . getInstance ( ) ; java . util . Date r = c . getTime ( ) ; org . ocpsoft . prettytime . PrettyTime t = new org . ocpsoft . prettytime . PrettyTime ( ) ; t . setLocale ( Locale . ENGLISH ) ; t . setReference ( r ) ; c . add ( Calendar . YEAR , ( - 1 ) ) ; "<AssertPlaceHolder>" ; } format ( org . ocpsoft . prettytime . Duration ) { return ( duration . getQuantityRounded ( 50 ) ) + "<sp>minut" ; } | org . junit . Assert . assertEquals ( "1" , t . format ( c ) ) |
testCreateNodeResultRetryBecomeActive ( ) { mockNoPriorActive ( ) ; elector . joinElection ( data ) ; elector . processResult ( Code . CONNECTIONLOSS . intValue ( ) , org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME , mockZK , org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME ) ; elector . processResult ( Code . CONNECTIONLOSS . intValue ( ) , org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME , mockZK , org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME ) ; elector . processResult ( Code . CONNECTIONLOSS . intValue ( ) , org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME , mockZK , org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME ) ; elector . processResult ( Code . CONNECTIONLOSS . intValue ( ) , org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME , mockZK , org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME ) ; org . mockito . Mockito . verify ( mockApp , org . mockito . Mockito . times ( 1 ) ) . notifyFatalError ( ( ( ( ( "Received<sp>create<sp>error<sp>from<sp>Zookeeper.<sp>code:CONNECTIONLOSS<sp>" + "for<sp>path<sp>" ) + ( org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME ) ) + ".<sp>" ) + "Not<sp>retrying<sp>further<sp>znode<sp>create<sp>connection<sp>errors." ) ) ; elector . joinElection ( data ) ; "<AssertPlaceHolder>" ; elector . processResult ( Code . CONNECTIONLOSS . intValue ( ) , org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME , mockZK , org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME ) ; elector . processResult ( Code . NODEEXISTS . intValue ( ) , org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME , mockZK , org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME ) ; verifyExistCall ( 1 ) ; org . apache . zookeeper . data . Stat stat = new org . apache . zookeeper . data . Stat ( ) ; stat . setEphemeralOwner ( 1L ) ; org . mockito . Mockito . when ( mockZK . getSessionId ( ) ) . thenReturn ( 1L ) ; elector . processResult ( Code . OK . intValue ( ) , org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME , mockZK , stat ) ; org . mockito . Mockito . verify ( mockApp , org . mockito . Mockito . times ( 1 ) ) . becomeActive ( ) ; verifyExistCall ( 1 ) ; org . mockito . Mockito . verify ( mockZK , org . mockito . Mockito . times ( 6 ) ) . create ( org . apache . hadoop . ha . TestActiveStandbyElector . ZK_LOCK_NAME , data , Ids . OPEN_ACL_UNSAFE , CreateMode . EPHEMERAL , elector , mockZK ) ; } notifyFatalError ( java . lang . String ) { rm . getRMContext ( ) . getDispatcher ( ) . getEventHandler ( ) . handle ( new org . apache . hadoop . yarn . server . resourcemanager . RMFatalEvent ( RMFatalEventType . EMBEDDED_ELECTOR_FAILED , errorMessage ) ) ; } | org . junit . Assert . assertEquals ( 2 , count ) |
testGetParametersWithDisabledSecurity ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . Long personId = 1L ; org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; person . setId ( personId ) ; java . lang . Long languageId = 2L ; org . lnu . is . domain . language . Language language = new org . lnu . is . domain . language . Language ( ) ; language . setId ( languageId ) ; java . lang . String firstName = "first<sp>name" ; java . lang . String fatherName = "father<sp>name" ; org . lnu . is . domain . person . name . PersonName entity = new org . lnu . is . domain . person . name . PersonName ( ) ; entity . setPerson ( person ) ; entity . setLanguage ( language ) ; entity . setFirstName ( firstName ) ; entity . setFatherName ( fatherName ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "person" , person ) ; expected . put ( "language" , language ) ; expected . put ( "firstName" , firstName ) ; expected . put ( "fatherName" , fatherName ) ; when ( languageDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( language ) ; when ( personDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( person ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; verify ( languageDao ) . getEntityById ( languageId ) ; verify ( personDao ) . getEntityById ( personId ) ; "<AssertPlaceHolder>" ; } getEntityById ( KEY ) { org . lnu . is . dao . dao . DefaultDao . LOG . info ( "Getting<sp>{}.entity<sp>wit<sp>id" , getEntityClass ( ) . getSimpleName ( ) , id ) ; return persistenceManager . findById ( getEntityClass ( ) , id ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
parseWithHostAndPortAndPath ( ) { final com . azure . common . implementation . http . UrlBuilder builder = com . azure . common . implementation . http . UrlBuilder . parse ( "www.bing.com:1234/my/path" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . value ; } | org . junit . Assert . assertEquals ( "www.bing.com:1234/my/path" , builder . toString ( ) ) |
testCreate ( ) { initializeExpectedBucket ( 5 ) ; com . google . cloud . storage . BlobInfo info = com . google . cloud . storage . BlobInfo . newBuilder ( "b" , "n" ) . setContentType ( com . google . cloud . storage . BucketTest . CONTENT_TYPE ) . build ( ) ; com . google . cloud . storage . Blob expectedBlob = new com . google . cloud . storage . Blob ( serviceMockReturnsOptions , new com . google . cloud . storage . BlobInfo . BuilderImpl ( info ) ) ; byte [ ] content = new byte [ ] { 13 , 14 , 10 , 13 } ; expect ( storage . getOptions ( ) ) . andReturn ( mockOptions ) ; expect ( storage . create ( info , content ) ) . andReturn ( expectedBlob ) ; replay ( storage ) ; initializeBucket ( ) ; com . google . cloud . storage . Blob blob = bucket . create ( "n" , content , com . google . cloud . storage . BucketTest . CONTENT_TYPE ) ; "<AssertPlaceHolder>" ; } create ( java . lang . String , com . google . protobuf . ByteString , com . google . cloud . bigtable . data . v2 . models . Mutation ) { return new com . google . cloud . bigtable . data . v2 . models . RowMutation ( tableId , key , mutation ) ; } | org . junit . Assert . assertEquals ( expectedBlob , blob ) |
testValidateFailure ( ) { org . dayatang . persistence . test . domain . Dictionary dictionary = new org . dayatang . persistence . test . domain . Dictionary ( "" , "" , gender ) ; try { dictionary . save ( ) ; repository . flush ( ) ; org . junit . Assert . fail ( "" ) ; } catch ( javax . validation . ValidationException e ) { System . out . println ( e . getMessage ( ) ) ; "<AssertPlaceHolder>" ; } } getMessage ( ) { messages = org . dayatang . i18n . support . MyResourceBundleI18nService . getAccessor ( ) ; java . lang . String msg = messages . getMessage ( "hi" , "" , Locale . ENGLISH ) ; org . junit . Assert . assertEquals ( "hello" , msg ) ; msg = messages . getMessage ( "hi" , "" , Locale . SIMPLIFIED_CHINESE ) ; org . junit . Assert . assertEquals ( "" , msg ) ; msg = messages . getMessage ( "hi_" , "" ) ; org . junit . Assert . assertEquals ( "" , msg ) ; } | org . junit . Assert . assertTrue ( true ) |
testStartServiceFailure ( ) { assumeNonMaprProfile ( ) ; try ( final com . dremio . datastore . KVStoreProvider kvstore = new com . dremio . datastore . LocalKVStoreProvider ( com . dremio . test . DremioTest . CLASSPATH_SCAN_RESULT , null , true , false ) ) { com . dremio . service . SingletonRegistry registry = new com . dremio . service . SingletonRegistry ( ) ; registry . bind ( com . dremio . datastore . KVStoreProvider . class , kvstore ) ; kvstore . start ( ) ; registry . start ( ) ; com . dremio . provision . service . ProvisioningService service = new com . dremio . provision . service . ProvisioningServiceImpl ( com . dremio . config . DremioConfig . create ( ) , registry . provider ( com . dremio . datastore . KVStoreProvider . class ) , org . mockito . Mockito . mock ( com . dremio . common . nodes . NodeProvider . class ) , com . dremio . test . DremioTest . CLASSPATH_SCAN_RESULT ) ; service . start ( ) ; final com . dremio . provision . ClusterConfig clusterConfig = new com . dremio . provision . ClusterConfig ( ) ; clusterConfig . setName ( "DremioDaemon" ) ; clusterConfig . setClusterType ( ClusterType . YARN ) ; clusterConfig . setClusterSpec ( new com . dremio . provision . ClusterSpec ( ) . setMemoryMBOffHeap ( 4096 ) . setMemoryMBOnHeap ( 4096 ) . setContainerCount ( 2 ) . setVirtualCoreCount ( 2 ) ) ; java . util . List < com . dremio . provision . Property > propertyList = new java . util . ArrayList ( ) ; propertyList . add ( new com . dremio . provision . Property ( FS_DEFAULT_NAME_KEY , "hdfs://name-node:8020" ) ) ; propertyList . add ( new com . dremio . provision . Property ( RM_HOSTNAME , "resource-manager" ) ) ; propertyList . add ( new com . dremio . provision . Property ( com . dremio . config . DremioConfig . DIST_WRITE_PATH_STRING , "pdfs:///data/mydata/pdfs" ) ) ; clusterConfig . setSubPropertyList ( propertyList ) ; try { service . createCluster ( clusterConfig ) ; org . junit . Assert . fail ( "Should<sp>not<sp>be<sp>able<sp>to<sp>create<sp>cluster" ) ; } catch ( java . lang . Exception phe ) { } "<AssertPlaceHolder>" ; } } getClustersInfo ( ) { java . lang . Iterable < Map . Entry < com . dremio . provision . ClusterId , com . dremio . provision . Cluster > > clusters = store . find ( ) ; return com . google . common . collect . Iterables . transform ( clusters , new com . dremio . provision . service . ProvisioningServiceImpl . InfoFunctionTransformer ( ) ) ; } | org . junit . Assert . assertEquals ( false , service . getClustersInfo ( ) . iterator ( ) . hasNext ( ) ) |
splitEmptyPath ( ) { final java . lang . String path = "" ; final java . lang . String [ ] tokens = org . sentilo . platform . server . request . RequestUtils . splitPath ( path ) ; "<AssertPlaceHolder>" ; } splitPath ( java . lang . String ) { org . springframework . util . Assert . isTrue ( ( ( org . springframework . util . StringUtils . hasText ( path ) ) && ( path . startsWith ( org . sentilo . platform . server . request . RequestUtils . TOKEN_PATH_SEPARATOR ) ) ) , "Invalid<sp>path<sp>value.<sp>Must<sp>start<sp>with<sp>/" ) ; return path . split ( org . sentilo . platform . server . request . RequestUtils . TOKEN_PATH_SEPARATOR ) ; } | org . junit . Assert . assertEquals ( ( 4 + 1 ) , tokens . length ) |
valueToString ( ) { "<AssertPlaceHolder>" ; expectFacetsErrorInValueToString ( instance , "longtext" , null , null , null , null , null ) ; expectFacetsErrorInValueToString ( instance , "text" , null , 3 , null , null , null ) ; expectFacetsErrorInValueToString ( instance , "schrg" , null , null , null , null , null ) ; expectFacetsErrorInValueToString ( instance , "schrg" , null , null , null , null , false ) ; } valueToString ( java . lang . Object , java . lang . Boolean , java . lang . Integer , java . lang . Integer , java . lang . Integer , java . lang . Boolean ) { return getUnderlyingType ( ) . valueToString ( value , isNullable , ( maxLength == null ? getMaxLength ( ) : maxLength ) , ( precision == null ? getPrecision ( ) : precision ) , ( scale == null ? getScale ( ) : scale ) , ( isUnicode == null ? isUnicode ( ) : isUnicode ) ) ; } | org . junit . Assert . assertEquals ( "text" , instance . valueToString ( "text" , null , null , null , null , null ) ) |
upgradeToVrc2Test ( ) { javax . xml . bind . JAXBContext jaxbContext1 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . record . summary_rc1 . ActivitiesSummary . class ) ; javax . xml . bind . JAXBContext jaxbContext2 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . record . summary_rc1 . ActivitiesSummary . class ) ; javax . xml . bind . Unmarshaller jaxbUnmarshaller1 = jaxbContext1 . createUnmarshaller ( ) ; javax . xml . bind . Unmarshaller jaxbUnmarshaller2 = jaxbContext2 . createUnmarshaller ( ) ; java . io . InputStream rc1Stream = org . orcid . record_2_0 . ConvertVrc1ToVrc2Test . class . getClassLoader ( ) . getResourceAsStream ( "test-activities-2.0_rc1.xml" ) ; java . io . InputStream rc2Stream = org . orcid . record_2_0 . ConvertVrc1ToVrc2Test . class . getClassLoader ( ) . getResourceAsStream ( "test-activities-2.0_rc2.xml" ) ; org . orcid . jaxb . model . record . summary_rc1 . ActivitiesSummary rc1Activities = ( ( org . orcid . jaxb . model . record . summary_rc1 . ActivitiesSummary ) ( jaxbUnmarshaller1 . unmarshal ( rc1Stream ) ) ) ; org . orcid . jaxb . model . record . summary_rc2 . ActivitiesSummary rc2Activities1 = ( ( org . orcid . jaxb . model . record . summary_rc2 . ActivitiesSummary ) ( jaxbUnmarshaller2 . unmarshal ( rc2Stream ) ) ) ; org . orcid . core . version . V2Convertible result = versionConverterV2_0_rc1ToV2_0_rc2 . upgrade ( new org . orcid . core . version . V2Convertible ( rc1Activities , "v2_rc1" ) ) ; org . orcid . jaxb . model . record . summary_rc2 . ActivitiesSummary rc2Activities2 = ( ( org . orcid . jaxb . model . record . summary_rc2 . ActivitiesSummary ) ( result . getObjectToConvert ( ) ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return value ; } | org . junit . Assert . assertEquals ( rc2Activities1 . toString ( ) , rc2Activities2 . toString ( ) ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . LayoutVersion > layoutVersions = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( layoutVersions . isEmpty ( ) ) |
testString2Byte_1 ( ) { try { javax . jms . Message message = senderSession . createMessage ( ) ; message . setStringProperty ( "prop" , "0" ) ; "<AssertPlaceHolder>" ; } catch ( javax . jms . JMSException e ) { fail ( e ) ; } } getByteProperty ( java . lang . String ) { java . lang . Object prop = properties . get ( name ) ; if ( ! ( prop instanceof java . lang . Byte ) ) { throw new javax . jms . JMSException ( "Not<sp>byte" ) ; } return ( ( java . lang . Byte ) ( properties . get ( name ) ) ) . byteValue ( ) ; } | org . junit . Assert . assertEquals ( ( ( byte ) ( 0 ) ) , message . getByteProperty ( "prop" ) ) |
testCreate ( ) { org . oscarehr . common . model . RemoteAttachments ql = new org . oscarehr . common . model . RemoteAttachments ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( ql ) ; dao . persist ( ql ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; } | org . junit . Assert . assertNotNull ( ql . getId ( ) ) |
testGetElementCount ( ) { "<AssertPlaceHolder>" ; } getElementCount ( ) { return 4 ; } | org . junit . Assert . assertThat ( body . getElementCount ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 4 ) ) ) |
testCard ( ) { it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . players . Player p = new it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . players . Player ( ) ; p . setID ( ) ; for ( it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . objectsOfGame . Card c : it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . objectsOfGame . Card . values ( ) ) { p . addCard ( c ) ; "<AssertPlaceHolder>" ; } } getCards ( ) { return territorialCards ; } | org . junit . Assert . assertTrue ( p . getCards ( ) . contains ( c ) ) |
testNullDnsServer ( ) { java . lang . String host = org . apache . hadoop . net . DNS . getDefaultHost ( getLoopbackInterface ( ) , null ) ; "<AssertPlaceHolder>" ; } getDefaultHost ( java . lang . String ) { return org . apache . hadoop . net . DNS . getDefaultHost ( strInterface , null , false ) ; } | org . junit . Assert . assertThat ( host , org . hamcrest . core . Is . is ( org . apache . hadoop . net . DNS . getDefaultHost ( getLoopbackInterface ( ) ) ) ) |
persisteerPersoonslijstAnummerVervangenIllegalArgument ( ) { org . mockito . Mockito . when ( dynamischeStamtabelRepositoryMock . getPartijByCode ( BrpPartijCode . MIGRATIEVOORZIENING . getWaarde ( ) ) ) . thenReturn ( new nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Partij ( "Migratievoorziening" , BrpPartijCode . MIGRATIEVOORZIENING . getWaarde ( ) ) ) ; org . mockito . Mockito . when ( dynamischeStamtabelRepositoryMock . getNationaliteitByNationaliteitcode ( ( ( short ) ( 1 ) ) ) ) . thenReturn ( new nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Nationaliteit ( "One" , ( ( short ) ( 1 ) ) ) ) ; final long anummer = 1234567890L ; try { service . persisteerPersoonslijst ( maakBrpPersoonslijst ( ) , anummer , false , lo3Bericht ) ; } catch ( final java . lang . IllegalArgumentException iae ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; } | org . junit . Assert . assertNull ( iae . getMessage ( ) ) |
testAdvancedReplacewith ( ) { java . util . Map < java . lang . String , java . lang . String > valueProperties = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; valueProperties . put ( "Amount" , "3,000,000" ) ; valueProperties . put ( "Task" , "Develop" ) ; valueProperties . put ( "Status" 1 , "Status" 2 ) ; valueProperties . put ( "Status" 0 , "14:30" ) ; valueProperties . put ( "Status" , "true" ) ; java . util . Map < java . lang . String , java . lang . String > typeProperties = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; typeProperties . put ( "Amount" , "float" ) ; typeProperties . put ( "Task" , "Status" 3 ) ; typeProperties . put ( "Status" 1 , "date" ) ; typeProperties . put ( "Status" 0 , "time" ) ; typeProperties . put ( "Status" , "Status" 4 ) ; for ( java . lang . String key : valueProperties . keySet ( ) ) { java . lang . String value = valueProperties . get ( key ) ; org . odftoolkit . simple . common . navigation . TextNavigation navigate = new org . odftoolkit . simple . common . navigation . TextNavigation ( key , doc ) ; while ( navigate . hasNext ( ) ) { org . odftoolkit . simple . common . navigation . CellSelection selection = ( ( org . odftoolkit . simple . common . navigation . CellSelection ) ( navigate . nextSelection ( ) ) ) ; try { selection . advancedReplaceWith ( value ) ; java . lang . String valueType = selection . getCell ( ) . getValueType ( ) ; "<AssertPlaceHolder>" ; } catch ( org . odftoolkit . simple . common . navigation . InvalidNavigationException e ) { e . printStackTrace ( ) ; } } } } get ( int ) { return m_nodeList . item ( index ) ; } | org . junit . Assert . assertEquals ( typeProperties . get ( key ) , valueType ) |
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMSST icmsst = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemImpostoICMSST ( ) ; icmsst . setSituacaoTributaria ( NFNotaInfoImpostoTributacaoICMS . COM_REDUCAO_BASE_CALCULO ) ; icmsst . setOrigem ( NFOrigem . NACIONAL ) ; icmsst . setValorBCICMSSTRetidoUFRemetente ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icmsst . setValorBCICMSSTUFDestino ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icmsst . setValorICMSSTRetidoUFRemetente ( new java . math . BigDecimal ( "999999999999.99" ) ) ; icmsst . setValorICMSSTUFDestino ( new java . math . BigDecimal ( "999999999999.99" ) ) ; final java . lang . String xmlEsperado = "<NFNotaInfoItemImpostoICMSST><orig>0</orig><CST>20</CST><vBCSTRet>999999999999.99</vBCSTRet><vICMSSTRet>999999999999.99</vICMSSTRet><vBCSTDest>999999999999.99</vBCSTDest><vICMSSTDest>999999999999.99</vICMSSTDest></NFNotaInfoItemImpostoICMSST>" ; "<AssertPlaceHolder>" ; } toString ( ) { return this . getDescricao ( ) ; } | org . junit . Assert . assertEquals ( xmlEsperado , icmsst . toString ( ) ) |
testRedistributeWithPreparedAndRestart ( ) { startServers ( 0 ) ; setupSessionFactory ( 0 , isNetty ( ) ) ; createQueue ( 0 , "queues.testaddress" , "queue0" , null , true ) ; org . apache . activemq . artemis . api . core . client . ClientSession session0 = sfs [ 0 ] . createSession ( false , false , false ) ; org . apache . activemq . artemis . api . core . client . ClientProducer prod0 = session0 . createProducer ( "queues.testaddress" ) ; for ( int i = 0 ; i < 100 ; i ++ ) { org . apache . activemq . artemis . api . core . client . ClientMessage msg = session0 . createMessage ( true ) ; msg . putIntProperty ( "key" , i ) ; prod0 . send ( msg ) ; session0 . commit ( ) ; } session0 . close ( ) ; session0 = sfs [ 0 ] . createSession ( true , false , false ) ; org . apache . activemq . artemis . api . core . client . ClientConsumer consumer0 = session0 . createConsumer ( "queue0" ) ; session0 . start ( ) ; java . util . ArrayList < javax . transaction . xa . Xid > xids = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 100 ; i ++ ) { javax . transaction . xa . Xid xid = newXID ( ) ; session0 . start ( xid , XAResource . TMNOFLAGS ) ; org . apache . activemq . artemis . api . core . client . ClientMessage msg = consumer0 . receive ( 5000 ) ; msg . acknowledge ( ) ; session0 . end ( xid , XAResource . TMSUCCESS ) ; session0 . prepare ( xid ) ; xids . add ( xid ) ; } session0 . close ( ) ; sfs [ 0 ] . close ( ) ; sfs [ 0 ] = null ; servers [ 0 ] . stop ( ) ; servers [ 0 ] = null ; setServer ( MessageLoadBalancingType . ON_DEMAND , 0 ) ; startServers ( 1 , 2 ) ; setupSessionFactory ( 1 , isNetty ( ) ) ; setupSessionFactory ( 2 , isNetty ( ) ) ; org . apache . activemq . artemis . api . core . client . ClientSession session1 = sfs [ 1 ] . createSession ( false , false ) ; createQueue ( 1 , "queues.testaddress" , "queue0" , null , true ) ; createQueue ( 2 , "queues.testaddress" , "queue0" , null , true ) ; session1 . start ( ) ; org . apache . activemq . artemis . api . core . client . ClientConsumer consumer1 = session1 . createConsumer ( "queue0" ) ; startServers ( 0 ) ; setupSessionFactory ( 0 , isNetty ( ) ) ; waitForBindings ( 0 , "queues.testaddress" , 1 , 0 , true ) ; waitForBindings ( 0 , "queues.testaddress" , 2 , 1 , false ) ; waitForBindings ( 1 , "queues.testaddress" , 1 , 1 , true ) ; waitForBindings ( 2 , "queues.testaddress" , 1 , 0 , true ) ; waitForBindings ( 1 , "queues.testaddress" , 2 , 0 , false ) ; waitForBindings ( 2 , "queues.testaddress" , 2 , 1 , false ) ; session0 = sfs [ 0 ] . createSession ( true , false , false ) ; for ( javax . transaction . xa . Xid xid : xids ) { session0 . rollback ( xid ) ; } for ( int i = 0 ; i < 100 ; i ++ ) { org . apache . activemq . artemis . api . core . client . ClientMessage msg = consumer1 . receive ( 15000 ) ; "<AssertPlaceHolder>" ; msg . acknowledge ( ) ; } session1 . commit ( ) ; } receive ( long ) { session . lock ( ) ; try { if ( ActiveMQRALogger . LOGGER . isTraceEnabled ( ) ) { ActiveMQRALogger . LOGGER . trace ( ( ( ( "receive<sp>" + ( this ) ) + "<sp>timeout=" ) + timeout ) ) ; } checkState ( ) ; javax . jms . Message message = consumer . receive ( timeout ) ; if ( ActiveMQRALogger . LOGGER . isTraceEnabled ( ) ) { ActiveMQRALogger . LOGGER . trace ( ( ( ( "received<sp>" + ( this ) ) + "<sp>result=" ) + message ) ) ; } if ( message == null ) { return null ; } else { return wrapMessage ( message ) ; } } finally { session . unlock ( ) ; } } | org . junit . Assert . assertNotNull ( msg ) |
plControleBijhoudingsPartijOngelijkNok ( ) { final nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst dbPersoonslijst = new nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstBuilder ( ) . build ( ) ; setup ( java . util . Collections . singletonList ( dbPersoonslijst ) , java . util . Collections . singletonList ( dbPersoonslijst ) , true , true , true , false , true , true , true , true , true , true , true , true , true ) ; "<AssertPlaceHolder>" ; } setup ( java . util . List , java . util . List , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean , boolean ) { org . mockito . Mockito . when ( plZoekerObvActueelAnummer . zoek ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) ) ) . thenReturn ( plZoekerObvActueelAnummerResult ) ; org . mockito . Mockito . when ( plZoekerObvActueelBsn . zoek ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) ) ) . thenReturn ( plZoekerObvActueelBsnResult ) ; org . mockito . Mockito . when ( lijstControleEen . controleer ( org . mockito . Matchers . anyListOf ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( lijstControleEenResult ) ; org . mockito . Mockito . when ( plControleGevondenBlokkeringssituatieIsJuist . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultControleBijhoudingssituatie ) ; org . mockito . Mockito . when ( plControleBijhoudingsPartijGelijkVerzendendeGemeente . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultControleVerzendendeGemeente ) ; org . mockito . Mockito . when ( plControleBijhoudingsPartijOngelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleBijhoudingsPartijOngelijkResult ) ; org . mockito . Mockito . when ( plControleBijhoudingsPartijGelijkRni . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleBijhoudingsPartijOngelijkRniResult ) ; org . mockito . Mockito . when ( plControleVorigAnummerGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleVorigAnummerGelijkResult ) ; org . mockito . Mockito . when ( plControleHistorieAnummerGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleHistorieAnummerGelijkResult ) ; org . mockito . Mockito . when ( plControleDezelfdePersoon . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleDezelfdePersoonResult ) ; org . mockito . Mockito . when ( plControleActueelBsnGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleActueelBsnGelijkResult ) ; org . mockito . Mockito . when ( lijstControleGeen . controleer ( org . mockito . Matchers . anyListOf ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( lijstControleGeenResult ) ; org . mockito . Mockito . when ( plControleAangebodenAdressenGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleGevondenAdressenKomenVoorInHistorieAangebodenAdressenResult ) ; org | org . junit . Assert . assertFalse ( subject . controleer ( new nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext ( null , null , null , null ) ) ) |
testBasicExpiresParse ( ) { final org . apache . hc . client5 . http . impl . cookie . BasicClientCookie cookie = new org . apache . hc . client5 . http . impl . cookie . BasicClientCookie ( "name" , "value" ) ; final org . apache . hc . client5 . http . cookie . CookieAttributeHandler h = new org . apache . hc . client5 . http . impl . cookie . BasicExpiresHandler ( new java . lang . String [ ] { org . apache . hc . client5 . http . utils . DateUtils . PATTERN_RFC1123 } ) ; final java . text . DateFormat dateformat = new java . text . SimpleDateFormat ( org . apache . hc . client5 . http . utils . DateUtils . PATTERN_RFC1123 , java . util . Locale . US ) ; dateformat . setTimeZone ( DateUtils . GMT ) ; final java . util . Date now = new java . util . Date ( ) ; h . parse ( cookie , dateformat . format ( now ) ) ; "<AssertPlaceHolder>" ; } getExpiryDate ( ) { return cookieExpiryDate ; } | org . junit . Assert . assertNotNull ( cookie . getExpiryDate ( ) ) |
testIsTarGz_1 ( ) { java . lang . String componentExtension = ".tar.gz" ; boolean result = com . impetus . ankush . common . utils . FileNameUtils . isTarGz ( componentExtension ) ; "<AssertPlaceHolder>" ; } isTarGz ( java . lang . String ) { return ( componentExtension . equals ( new java . lang . String ( com . impetus . ankush . common . utils . FileNameUtils . TAR_GZ ) ) ) || ( componentExtension . equals ( new java . lang . String ( com . impetus . ankush . common . utils . FileNameUtils . TGZ ) ) ) ; } | org . junit . Assert . assertEquals ( true , result ) |
testGetRestrictionForMultiValued2 ( ) { org . apache . jackrabbit . oak . spi . security . authorization . restriction . Restriction singleNameRestr = createRestriction ( AccessControlConstants . REP_NT_NAMES , new javax . jcr . Value [ ] { nameValue } ) ; org . apache . jackrabbit . oak . spi . security . authorization . accesscontrol . ACE ace = createEntry ( com . google . common . collect . ImmutableSet . of ( singleNameRestr ) ) ; javax . jcr . Value val = ace . getRestriction ( AccessControlConstants . REP_NT_NAMES ) ; "<AssertPlaceHolder>" ; } getRestriction ( java . lang . String ) { for ( org . apache . jackrabbit . oak . spi . security . authorization . restriction . Restriction restriction : restrictions ) { java . lang . String jcrName = getJcrName ( restriction ) ; if ( jcrName . equals ( restrictionName ) ) { if ( restriction . getDefinition ( ) . getRequiredType ( ) . isArray ( ) ) { java . util . List < javax . jcr . Value > values = org . apache . jackrabbit . oak . plugins . value . ValueFactoryImpl . createValues ( restriction . getProperty ( ) , namePathMapper ) ; switch ( values . size ( ) ) { case 1 : return values . get ( 0 ) ; default : throw new javax . jcr . ValueFormatException ( "Attempt<sp>to<sp>retrieve<sp>single<sp>value<sp>from<sp>multivalued<sp>property" ) ; } } else { return org . apache . jackrabbit . oak . plugins . value . ValueFactoryImpl . createValue ( restriction . getProperty ( ) , namePathMapper ) ; } } } return null ; } | org . junit . Assert . assertEquals ( nameValue , val ) |
testUpdateSecurityRole ( ) { org . finra . herd . model . api . xml . SecurityRoleUpdateRequest securityRoleUpdateRequest = new org . finra . herd . model . api . xml . SecurityRoleUpdateRequest ( DESCRIPTION ) ; org . finra . herd . model . api . xml . SecurityRoleKey securityRoleKey = new org . finra . herd . model . api . xml . SecurityRoleKey ( SECURITY_ROLE ) ; org . finra . herd . model . api . xml . SecurityRole securityRole = new org . finra . herd . model . api . xml . SecurityRole ( SECURITY_ROLE , DESCRIPTION ) ; when ( securityRoleService . updateSecurityRole ( securityRoleKey , securityRoleUpdateRequest ) ) . thenReturn ( securityRole ) ; org . finra . herd . model . api . xml . SecurityRole result = securityRoleRestController . updateSecurityRole ( org . finra . herd . rest . SECURITY_ROLE , securityRoleUpdateRequest ) ; "<AssertPlaceHolder>" ; verify ( securityRoleService ) . updateSecurityRole ( securityRoleKey , securityRoleUpdateRequest ) ; verifyNoMoreInteractions ( securityRoleService ) ; } updateSecurityRole ( java . lang . String , org . finra . herd . model . api . xml . SecurityRoleUpdateRequest ) { return securityRoleService . updateSecurityRole ( new org . finra . herd . model . api . xml . SecurityRoleKey ( securityRoleName ) , securityRoleUpdateRequest ) ; } | org . junit . Assert . assertEquals ( securityRole , result ) |
testCipherEncryptionWithDefaults ( ) { org . pentaho . platform . engine . security . CipherEncryptionService service = new org . pentaho . platform . engine . security . CipherEncryptionService ( ) ; service . afterPropertiesSet ( ) ; java . lang . String stringToEncrypt = "String<sp>To<sp>Encrypt" ; java . lang . String encryptedStringExpected = "R1pxG/vXQU8ezFM5VE644dqQxCKNP+Ap" ; java . lang . String encryptedStringActual = service . encrypt ( stringToEncrypt ) ; "<AssertPlaceHolder>" ; } encrypt ( java . lang . String ) { try { javax . crypto . Cipher encCipher = javax . crypto . Cipher . getInstance ( secretKey . getAlgorithm ( ) ) ; encCipher . init ( Cipher . ENCRYPT_MODE , secretKey , paramSpec ) ; byte [ ] toEncryptBytes = clearPassword . getBytes ( org . pentaho . platform . util . messages . LocaleHelper . getSystemEncoding ( ) ) ; byte [ ] encBytes = encCipher . doFinal ( toEncryptBytes ) ; byte [ ] base64Bytes = org . apache . commons . codec . binary . Base64 . encodeBase64 ( encBytes ) ; return new java . lang . String ( base64Bytes ) ; } catch ( java . lang . Exception ex ) { throw new org . pentaho . platform . api . util . PasswordServiceException ( ex ) ; } } | org . junit . Assert . assertEquals ( encryptedStringExpected , encryptedStringActual ) |
checkHandlesMoveColumnsToWithMultipleMetadata ( ) { final org . drools . workbench . screens . guided . dtable . client . widget . table . model . synchronizers . impl . BaseSynchronizer . MoveColumnToMetaData md0 = mock ( BaseSynchronizer . MoveColumnToMetaData . class ) ; final org . drools . workbench . screens . guided . dtable . client . widget . table . model . synchronizers . impl . BaseSynchronizer . MoveColumnToMetaData md1 = mock ( BaseSynchronizer . MoveColumnToMetaData . class ) ; final org . drools . workbench . screens . guided . dtable . client . widget . table . model . synchronizers . impl . LimitedEntryBRLActionColumnSynchronizer synchronizer = new org . drools . workbench . screens . guided . dtable . client . widget . table . model . synchronizers . impl . LimitedEntryBRLActionColumnSynchronizer ( ) ; when ( md0 . getColumn ( ) ) . thenReturn ( mock ( org . drools . workbench . models . guided . dtable . shared . model . LimitedEntryBRLActionColumn . class ) ) ; when ( md1 . getColumn ( ) ) . thenReturn ( mock ( org . drools . workbench . models . guided . dtable . shared . model . LimitedEntryBRLActionColumn . class ) ) ; "<AssertPlaceHolder>" ; } handlesMoveColumnsTo ( java . util . List ) { return isBRLFragment ( metaData ) ; } | org . junit . Assert . assertFalse ( synchronizer . handlesMoveColumnsTo ( new java . util . ArrayList < org . drools . workbench . screens . guided . dtable . client . widget . table . model . synchronizers . impl . BaseSynchronizer . MoveColumnToMetaData > ( ) { { add ( md0 ) ; add ( md1 ) ; } } ) ) |
testUserReference ( ) { java . lang . String content = "--[[User:User<sp>name]]" ; java . lang . String expected = "User<sp>name" ; java . lang . String actual = _translate ( content ) ; "<AssertPlaceHolder>" ; } _translate ( com . liferay . portal . kernel . exception . PortalException ) { if ( portalException instanceof com . liferay . dynamic . data . mapping . exception . StorageFieldRequiredException ) { return new com . liferay . dynamic . data . mapping . kernel . StorageFieldRequiredException ( portalException . getMessage ( ) , portalException . getCause ( ) ) ; } return portalException ; } | org . junit . Assert . assertEquals ( expected , actual ) |
validate_startPeriodAndLimitIsSet_returnTrue ( ) { chargingSchedulePeriod . setStartPeriod ( 42 ) ; chargingSchedulePeriod . setLimit ( 4.2 ) ; boolean isValid = chargingSchedulePeriod . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { return true ; } | org . junit . Assert . assertThat ( isValid , org . hamcrest . CoreMatchers . is ( true ) ) |
testCatchException_Obj_noExceptionThrown ( ) { java . util . List < java . lang . String > list = new java . util . ArrayList ( ) ; com . googlecode . catchexception . CatchException . catchException ( list :: size ) ; "<AssertPlaceHolder>" ; } caughtException ( ) { return com . googlecode . catchexception . ExceptionHolder . get ( ) ; } | org . junit . Assert . assertNull ( com . googlecode . catchexception . CatchException . caughtException ( ) ) |
defaultHandler ( ) { final java . util . List < nl . pvdberg . pnet . packet . Packet > receivedPackets = new java . util . ArrayList < nl . pvdberg . pnet . packet . Packet > ( ) ; packetDistributer . addHandler ( nl . pvdberg . pnet . event . PacketDistributerTest . packet1 . getPacketID ( ) , new nl . pvdberg . pnet . event . PacketHandler ( ) { @ nl . pvdberg . pnet . event . Override public void handlePacket ( final nl . pvdberg . pnet . packet . Packet p , final nl . pvdberg . pnet . client . Client c ) throws java . io . IOException { receivedPackets . add ( p ) ; } } ) ; packetDistributer . setDefaultHandler ( new nl . pvdberg . pnet . event . PacketHandler ( ) { @ nl . pvdberg . pnet . event . Override public void handlePacket ( final nl . pvdberg . pnet . packet . Packet p , final nl . pvdberg . pnet . client . Client c ) throws java . io . IOException { receivedPackets . add ( p ) ; } } ) ; packetDistributer . onReceive ( nl . pvdberg . pnet . event . PacketDistributerTest . packet2 , null ) ; "<AssertPlaceHolder>" ; } onReceive ( nl . pvdberg . pnet . packet . Packet , nl . pvdberg . pnet . client . Client ) { if ( ( clientListener ) != null ) clientListener . onReceive ( p , this ) ; } | org . junit . Assert . assertTrue ( ( ( receivedPackets . size ( ) ) == 1 ) ) |
testPowerLevelStaticAccess ( ) { for ( com . digi . xbee . api . models . PowerLevel powerLevel : powerLevelValues ) "<AssertPlaceHolder>" ; } get ( int ) { com . digi . xbee . api . models . PowerLevel powerLevel = com . digi . xbee . api . models . PowerLevel . lookupTable . get ( value ) ; if ( powerLevel != null ) return powerLevel ; return com . digi . xbee . api . models . PowerLevel . LEVEL_UNKNOWN ; } | org . junit . Assert . assertEquals ( powerLevel , com . digi . xbee . api . models . PowerLevel . get ( powerLevel . getValue ( ) ) ) |
validate_chargingRateUnitAndChargingSchedulePeriodIsSet_returnTrue ( ) { eu . chargetime . ocpp . model . core . ChargingSchedulePeriod chargingSchedulePeriod = mock ( eu . chargetime . ocpp . model . core . ChargingSchedulePeriod . class ) ; chargingSchedule . setChargingRateUnit ( ChargingRateUnitType . W ) ; chargingSchedule . setChargingSchedulePeriod ( aList ( chargingSchedulePeriod ) ) ; when ( chargingSchedulePeriod . validate ( ) ) . thenReturn ( true ) ; boolean isValid = chargingSchedule . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { return true ; } | org . junit . Assert . assertThat ( isValid , org . hamcrest . CoreMatchers . is ( true ) ) |
dzvoknumuri ( ) { java . util . LinkedList < lv . semti . morphology . Testi . Word > tokens ; tokens = lv . semti . morphology . Testi . Splitting . tokenize ( lv . semti . morphology . Testi . TokenizeTest . loctjs , "16A" , false ) ; "<AssertPlaceHolder>" ; } size ( ) { return attributes . entrySet ( ) . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , tokens . size ( ) ) |
testDatumEindeHuwelijkIsNietGelijkAanDatumAanvangActie ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteits = new nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . huwelijkgeregistreerdpartnerschap . acties . registratieeindehuwelijkpartnerschap . BRBY0455 ( ) . voerRegelUit ( null , maakHuwelijkBericht ( 20130201 ) , maakActie ( 20130101 ) , null ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; } | org . junit . Assert . assertFalse ( berichtEntiteits . isEmpty ( ) ) |
testValuesAndFromString ( ) { for ( org . pentaho . bigdata . api . pig . PigService . ExecutionMode executionMode : PigService . ExecutionMode . values ( ) ) { "<AssertPlaceHolder>" ; } } values ( ) { return toMap ( ) . values ( ) ; } | org . junit . Assert . assertEquals ( executionMode , PigService . ExecutionMode . valueOf ( executionMode . name ( ) ) ) |
testSystemPlugins ( ) { java . util . List < org . apache . drill . common . scanner . persistence . AnnotatedClassDescriptor > annotatedClasses = org . apache . drill . common . scanner . TestClassPathScanner . result . getAnnotatedClasses ( org . apache . drill . exec . store . SystemPlugin . class . getName ( ) ) ; java . util . List < org . apache . drill . common . scanner . persistence . AnnotatedClassDescriptor > foundPlugins = annotatedClasses . stream ( ) . filter ( ( a ) -> ( . class . getName ( ) . equals ( a . getClassName ( ) ) ) || ( . class . getName ( ) . equals ( a . getClassName ( ) ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { fail ( "size()" ) ; return - 1 ; } | org . junit . Assert . assertEquals ( 2 , foundPlugins . size ( ) ) |
matchPartialIdTrue ( ) { java . lang . String xmlString = "<xml><doc><id>US123456789</id></doc></xml>" ; gov . uspto . bulkdata . find . PatternXpathValueRegex pattern = new gov . uspto . bulkdata . find . PatternXpathValueRegex ( "//doc/id" , "^US1234.+" ) ; gov . uspto . bulkdata . find . PatternMatcher matcher = new gov . uspto . bulkdata . find . PatternMatcher ( ) ; matcher . add ( pattern ) ; "<AssertPlaceHolder>" ; } match ( java . lang . String ) { if ( xmlDocStr == null ) { return false ; } javax . xml . parsers . DocumentBuilderFactory dbfact = javax . xml . parsers . DocumentBuilderFactory . newInstance ( ) ; dbfact . setAttribute ( "http://apache.org/xml/features/nonvalidating/load-external-dtd" , false ) ; try { javax . xml . parsers . DocumentBuilder builder = dbfact . newDocumentBuilder ( ) ; org . xml . sax . InputSource inputSource = new org . xml . sax . InputSource ( new java . io . StringReader ( xmlDocStr ) ) ; org . w3c . dom . Document document = builder . parse ( inputSource ) ; javax . xml . xpath . XPathFactory fact = javax . xml . xpath . XPathFactory . newInstance ( ) ; javax . xml . xpath . XPath xpath = fact . newXPath ( ) ; java . lang . String value = ( ( java . lang . String ) ( xpath . evaluate ( xPathExpression , document , XPathConstants . STRING ) ) ) ; java . util . regex . Matcher matcher = regexPattern . matcher ( value ) ; if ( matcher . matches ( ) ) { return true ; } } catch ( javax . xml . xpath . XPathExpressionException e ) { gov . uspto . bulkdata . find . MatchValueRegex . LOGGER . error ( "XML<sp>XPathExpressionException<sp>on<sp>doc:{}" , xmlDocStr , e ) ; return false ; } catch ( javax . xml . parsers . ParserConfigurationException e ) { gov . uspto . bulkdata . find . MatchValueRegex . LOGGER . error ( "XML<sp>ParserConfigurationException" , e ) ; return false ; } catch ( org . xml . sax . SAXException e ) { gov . uspto . bulkdata . find . MatchValueRegex . LOGGER . error ( "XML<sp>SAXException<sp>on<sp>doc:{}" , xmlDocStr , e ) ; return false ; } catch ( java . io . IOException e ) { gov . uspto . bulkdata . find . MatchValueRegex . LOGGER . error ( "IOException" , e ) ; return false ; } return false ; } | org . junit . Assert . assertEquals ( true , matcher . match ( xmlString ) ) |
searchTest1 ( ) { java . lang . String input = "a" ; java . lang . String userName = "Admin" ; java . lang . String userFullName = "XWiki:XWiki.Admin" ; org . json . JSONArray resultsArray = new org . json . JSONArray ( ) ; java . util . List < java . lang . String > usersList = new java . util . LinkedList < java . lang . String > ( ) ; usersList . add ( userFullName ) ; org . json . JSONObject resultItem = new org . json . JSONObject ( ) ; resultItem . put ( "id" , userFullName ) ; resultItem . put ( "value" , userName ) ; resultItem . put ( "description" , userFullName ) ; resultItem . put ( "info" , userName ) ; resultsArray . put ( resultItem ) ; org . xwiki . query . Query q = mock ( org . xwiki . query . Query . class ) ; when ( q . bindValue ( "input" , ( ( "%%" + input ) + "%%" ) ) ) . thenReturn ( q ) ; when ( q . < java . lang . String > execute ( ) ) . thenReturn ( usersList ) ; org . xwiki . query . QueryManager qm = this . mocker . getInstance ( org . xwiki . query . QueryManager . class ) ; when ( qm . createQuery ( org . phenotips . groups . internal . UsersAndGroupsTest . usersQueryString , Query . XWQL ) ) . thenReturn ( q ) ; org . xwiki . users . User u = mock ( org . xwiki . users . User . class ) ; when ( u . getName ( ) ) . thenReturn ( userName ) ; when ( u . getUsername ( ) ) . thenReturn ( userFullName ) ; org . xwiki . users . UserManager um = this . mocker . getInstance ( org . xwiki . users . UserManager . class ) ; when ( um . getUser ( userFullName ) ) . thenReturn ( u ) ; org . json . JSONObject expectedResult = new org . json . JSONObject ( ) ; expectedResult . put ( "matched" , resultsArray ) ; java . lang . String searchResult = this . mocker . getComponentUnderTest ( ) . search ( input , 10 , true , false , true ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( getId ( ) ) + "[" ) + ( getType ( ) . getName ( ) ) ) + "]" ; } | org . junit . Assert . assertEquals ( expectedResult . toString ( ) , searchResult ) |
whenUpdatingProduct_thenChangeAvailableOnRetrieval ( ) { final com . baeldung . spring . data . solr . model . Product product = new com . baeldung . spring . data . solr . model . Product ( ) ; product . setId ( "P0001" ) ; product . setName ( "T-Shirt" ) ; productRepository . save ( product ) ; product . setName ( "Shirt" ) ; productRepository . save ( product ) ; final com . baeldung . spring . data . solr . model . Product retrievedProduct = productRepository . findOne ( product . getId ( ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( product . getName ( ) , retrievedProduct . getName ( ) ) |
testInference ( ) { org . aksw . gerbil . semantic . subclass . SubClassInferencer inferencer = org . aksw . gerbil . semantic . subclass . SimpleSubClassInferencerFactory . createInferencer ( org . aksw . gerbil . semantic . kb . SimpleSubClassInferencerTest . createModel ( ) ) ; org . aksw . gerbil . semantic . subclass . ClassSet classes = new org . aksw . gerbil . semantic . subclass . SimpleClassSet ( ) ; inferencer . inferSubClasses ( classUri , classes , new org . aksw . gerbil . semantic . subclass . SimpleClassNodeFactory ( ) ) ; org . aksw . gerbil . semantic . subclass . ClassNode node ; for ( int i = 0 ; i < ( expectedNodes . length ) ; ++ i ) { node = classes . getNode ( expectedNodes [ i ] . getUris ( ) . iterator ( ) . next ( ) ) ; "<AssertPlaceHolder>" ; } } next ( ) { if ( hasNext ( ) ) { org . aksw . gerbil . semantic . subclass . ClassNode node = ( ( org . aksw . gerbil . semantic . subclass . ClassNode ) ( ( ( java . lang . Object [ ] ) ( nodes . keys ) ) [ position ] ) ) ; moveToNextNode ( ) ; return node ; } else { return null ; } } | org . junit . Assert . assertEquals ( expectedNodes [ i ] , node ) |
testRequestWithEmptyFinishedTimeBeginQuery ( ) { org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest request = org . apache . hadoop . yarn . server . resourcemanager . webapp . ApplicationsRequestBuilder . create ( ) . withFinishTimeBegin ( "" ) . build ( ) ; org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest expectedRequest = getDefaultRequest ( ) ; "<AssertPlaceHolder>" ; } getDefaultRequest ( ) { org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest req = org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest . newInstance ( ) ; req . setStartRange ( 0 , Long . MAX_VALUE ) ; req . setFinishRange ( 0 , Long . MAX_VALUE ) ; return req ; } | org . junit . Assert . assertEquals ( expectedRequest , request ) |
testInstantiation ( ) { final java . lang . reflect . Constructor < org . zapodot . junit . db . internal . ConnectionInterceptor > constructor = org . zapodot . junit . db . internal . ConnectionInterceptor . class . getDeclaredConstructor ( ) ; constructor . setAccessible ( true ) ; "<AssertPlaceHolder>" ; constructor . setAccessible ( false ) ; } | org . junit . Assert . assertNotNull ( constructor . newInstance ( ) ) |
testGetDurabilityFromClient ( ) { final com . allanbank . mongodb . Durability defaultDurability = com . allanbank . mongodb . Durability . journalDurable ( 1234 ) ; expect ( myMockClient . getDefaultDurability ( ) ) . andReturn ( defaultDurability ) ; replay ( ) ; final com . allanbank . mongodb . Durability result = myTestInstance . getDurability ( ) ; "<AssertPlaceHolder>" ; verify ( ) ; } getDurability ( ) { com . allanbank . mongodb . Durability result = myDurability ; if ( result == null ) { result = myDatabase . getDurability ( ) ; } return result ; } | org . junit . Assert . assertSame ( defaultDurability , result ) |
MustInCorrectPrepareWhenFieldInThrowInvalidArgumentException ( ) { info . smart_tools . smartactors . iobject . iobject . IObject query = mock ( info . smart_tools . smartactors . iobject . iobject . IObject . class ) ; info . smart_tools . smartactors . iobject . iobject . IObject queryForNestedTask = mock ( info . smart_tools . smartactors . iobject . iobject . IObject . class ) ; info . smart_tools . smartactors . iobject . iobject . IObject filterObject = mock ( info . smart_tools . smartactors . iobject . iobject . IObject . class ) ; info . smart_tools . smartactors . ioc . ikey . IKey iObjectKey = mock ( info . smart_tools . smartactors . ioc . ikey . IKey . class ) ; when ( info . smart_tools . smartactors . ioc . named_keys_storage . Keys . getOrAdd ( "info.smart_tools.smartactors.iobject.iobject.IObject" ) ) . thenReturn ( iObjectKey ) ; when ( info . smart_tools . smartactors . ioc . ioc . IOC . resolve ( iObjectKey ) ) . thenReturn ( queryForNestedTask ) . thenReturn ( filterObject ) ; when ( tokenField . in ( query ) ) . thenThrow ( new info . smart_tools . smartactors . base . exception . invalid_argument_exception . InvalidArgumentException ( "" ) ) ; try { testTask . prepare ( query ) ; } catch ( info . smart_tools . smartactors . database . interfaces . idatabase_task . exception . TaskPrepareException e ) { verifyStatic ( times ( 2 ) ) ; info . smart_tools . smartactors . ioc . named_keys_storage . Keys . getOrAdd ( "info.smart_tools.smartactors.iobject.iobject.IObject" ) ; verifyStatic ( times ( 2 ) ) ; info . smart_tools . smartactors . ioc . ioc . IOC . resolve ( iObjectKey ) ; verify ( tokenField ) . in ( query ) ; return ; } "<AssertPlaceHolder>" ; } in ( info . smart_tools . smartactors . iobject . iobject . IObject ) { if ( null == obj ) { throw new info . smart_tools . smartactors . base . exception . invalid_argument_exception . InvalidArgumentException ( "Argument<sp>should<sp>not<sp>be<sp>null." ) ; } java . lang . Object value = obj . getValue ( fieldName ) ; if ( null == value ) { return null ; } return ( ( T ) ( value ) ) ; } | org . junit . Assert . assertTrue ( false ) |
testComparator ( ) { java . util . List < java . lang . String > list = java . util . Arrays . asList ( "1.15" , "1.5" , "1.0.10" , "1.0" , "1.0.5" ) ; java . util . Collections . sort ( list , io . fabric8 . api . VersionSequence . getComparator ( ) ) ; "<AssertPlaceHolder>" ; } getComparator ( ) { return new java . util . Comparator < java . lang . String > ( ) { @ io . fabric8 . api . Override public int compare ( java . lang . String thisId , java . lang . String thatId ) { io . fabric8 . api . VersionSequence thisSeq = new io . fabric8 . api . VersionSequence ( thisId ) ; io . fabric8 . api . VersionSequence thatSeq = new io . fabric8 . api . VersionSequence ( thatId ) ; return thisSeq . compareTo ( thatSeq ) ; } } ; } | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "1.0" , "1.0.5" , "1.0.10" , "1.5" , "1.15" ) , list ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.