input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testExcelExportOperation ( ) { org . nuxeo . ecm . automation . OperationContext ctx = new org . nuxeo . ecm . automation . OperationContext ( session ) ; org . nuxeo . ecm . core . api . Blob export = ( ( org . nuxeo . ecm . core . api . Blob ) ( automationService . run ( ctx , "testExportExcel" ) ) ) ; "<AssertPlaceHolder>" ; } getLength ( ) { return blob . getLength ( ) ; }
org . junit . Assert . assertTrue ( ( ( export . getLength ( ) ) > 0 ) )
injectionPoint ( ) { final java . util . Collection < javax . enterprise . inject . spi . InjectionPoint > points = new java . util . ArrayList ( ) ; addExtension ( new javax . enterprise . inject . spi . Extension ( ) { void add ( @ javax . enterprise . event . Observes final javax . enterprise . inject . spi . AfterBeanDiscovery afterBeanDiscovery ) { afterBeanDiscovery . addBean ( ) . id ( "v1" ) . types ( java . lang . String . class , java . lang . Object . class ) . createWith ( ( c ) -> "ok" ) . beanClass ( org . apache . webbeans . test . events . container . WildcardExtensionMatchingTest . MyBean . class ) . qualifiers ( javax . enterprise . inject . literal . NamedLiteral . of ( "v1" ) ) . scope ( javax . enterprise . context . Dependent . class ) ; afterBeanDiscovery . addBean ( ) . id ( "v2" ) . types ( org . apache . webbeans . test . events . container . Boolean . class , java . lang . Object . class ) . createWith ( ( c ) -> 1 ) . beanClass ( org . apache . webbeans . test . events . container . WildcardExtensionMatchingTest . MyBean . class ) . qualifiers ( javax . enterprise . inject . literal . NamedLiteral . of ( "v2" ) ) . scope ( javax . enterprise . context . Dependent . class ) ; } private void processInjectionPoint ( @ javax . enterprise . event . Observes final javax . enterprise . inject . spi . ProcessInjectionPoint < ? , ? extends java . lang . String > event ) { points . add ( event . getInjectionPoint ( ) ) ; } } ) ; addInterceptor ( org . apache . webbeans . test . events . container . WildcardExtensionMatchingTest . MyInterceptor . class ) ; startContainer ( org . apache . webbeans . test . events . container . WildcardExtensionMatchingTest . MyBean . class ) ; "<AssertPlaceHolder>" ; } size ( ) { return 1 ; }
org . junit . Assert . assertEquals ( 1 , points . size ( ) )
testBadAuth ( ) { org . geoserver . security . keycloak . GeoServerKeycloakFilter filter = new org . geoserver . security . keycloak . GeoServerKeycloakFilter ( ) ; filter . initializeFromConfig ( config ) ; java . lang . String auth_header = "bearer<sp>this.is.not.a.valid.token" ; when ( request . getHeader ( HttpHeaders . AUTHORIZATION ) ) . thenReturn ( auth_header ) ; when ( request . getHeaders ( HttpHeaders . AUTHORIZATION ) ) . thenReturn ( java . util . Collections . enumeration ( java . util . Collections . singleton ( auth_header ) ) ) ; when ( response . getStatus ( ) ) . thenReturn ( HttpStatus . UNAUTHORIZED . value ( ) ) ; filter . doFilter ( request , response , chain ) ; org . mockito . ArgumentCaptor < org . springframework . security . web . AuthenticationEntryPoint > aep = org . mockito . ArgumentCaptor . forClass ( org . springframework . security . web . AuthenticationEntryPoint . class ) ; verify ( request ) . setAttribute ( eq ( org . geoserver . security . keycloak . GeoServerKeycloakFilterTest . AEP_HEADER ) , aep . capture ( ) ) ; aep . getValue ( ) . commence ( request , response , null ) ; verify ( chain ) . doFilter ( request , response ) ; verify ( response ) . setStatus ( HttpStatus . FORBIDDEN . value ( ) ) ; org . springframework . security . core . Authentication authn = org . springframework . security . core . context . SecurityContextHolder . getContext ( ) . getAuthentication ( ) ; "<AssertPlaceHolder>" ; } getAuthentication ( ) { org . springframework . security . core . Authentication auth = org . springframework . security . core . context . SecurityContextHolder . getContext ( ) . getAuthentication ( ) ; if ( ( ( auth != null ) && ( ( auth . getAuthorities ( ) . size ( ) ) == 1 ) ) && ( "ROLE_ANONYMOUS" . equals ( auth . getAuthorities ( ) . iterator ( ) . next ( ) . getAuthority ( ) ) ) ) return null ; return auth ; }
org . junit . Assert . assertNull ( authn )
testZeroPort ( ) { org . jboss . resteasy . plugins . server . netty . NettyJaxrsServer server = new org . jboss . resteasy . plugins . server . netty . NettyJaxrsServer ( ) ; server . setPort ( 0 ) ; server . start ( ) ; int ip = server . getPort ( ) ; server . stop ( ) ; "<AssertPlaceHolder>" ; } stop ( ) { org . jboss . resteasy . plugins . server . sun . http . HttpServerContainer . LOG . info ( Messages . MESSAGES . embeddedContainerStop ( ) ) ; if ( ( org . jboss . resteasy . plugins . server . sun . http . HttpServerContainer . sun ) != null ) { try { org . jboss . resteasy . plugins . server . sun . http . HttpServerContainer . sun . stop ( ) ; } catch ( java . lang . Exception e ) { } } org . jboss . resteasy . plugins . server . sun . http . HttpServerContainer . sun = null ; }
org . junit . Assert . assertTrue ( ( ip != 0 ) )
testBuildWithDisabledStatusCosntraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . publicactivity . PublicActivityType context = new org . lnu . is . domain . publicactivity . PublicActivityType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>PublicActivityType<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . publicactivity . PublicActivityType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
givenAuthor_whenDeleting_thenWeLostHisDetails ( ) { com . baeldung . apachecayenne . persistent . Author author = com . baeldung . apachecayenne . CayenneOperationLiveTest . context . newObject ( com . baeldung . apachecayenne . persistent . Author . class ) ; author . setName ( "Paul" ) ; com . baeldung . apachecayenne . CayenneOperationLiveTest . context . commitChanges ( ) ; com . baeldung . apachecayenne . persistent . Author savedAuthor = org . apache . cayenne . query . ObjectSelect . query ( com . baeldung . apachecayenne . persistent . Author . class ) . where ( Author . NAME . eq ( "Paul" ) ) . selectOne ( com . baeldung . apachecayenne . CayenneOperationLiveTest . context ) ; if ( savedAuthor != null ) { com . baeldung . apachecayenne . CayenneOperationLiveTest . context . deleteObjects ( author ) ; com . baeldung . apachecayenne . CayenneOperationLiveTest . context . commitChanges ( ) ; } com . baeldung . apachecayenne . persistent . Author expectedAuthor = org . apache . cayenne . query . ObjectSelect . query ( com . baeldung . apachecayenne . persistent . Author . class ) . where ( Author . NAME . eq ( "Paul" ) ) . selectOne ( com . baeldung . apachecayenne . CayenneOperationLiveTest . context ) ; "<AssertPlaceHolder>" ; } query ( com . baeldung . graphql . PostDao ) { return new com . baeldung . graphql . Query ( postDao ) ; }
org . junit . Assert . assertNull ( expectedAuthor )
testValidatePropertyWithMissingName ( ) { descriptor . getPersistenceUnit ( ) . addProperty ( new org . kie . workbench . common . screens . datamodeller . model . persistence . Property ( null , "someValue" ) ) ; java . util . List < org . guvnor . common . services . shared . validation . model . ValidationMessage > result = validator . validate ( path , descriptor ) ; org . guvnor . common . services . shared . validation . model . ValidationMessage expectedMessage ; expectedMessage = org . kie . workbench . common . screens . datamodeller . backend . server . validation . PersistenceDescriptorValidationMessages . newErrorMessage ( PersistenceDescriptorValidationMessages . INDEXED_PROPERTY_NAME_EMPTY_ID , java . text . MessageFormat . format ( PersistenceDescriptorValidationMessages . INDEXED_PROPERTY_NAME_EMPTY , "3" ) , "3" ) ; "<AssertPlaceHolder>" ; } contains ( T ) { return registryMap . containsKey ( keyProvider . apply ( item ) ) ; }
org . junit . Assert . assertTrue ( result . contains ( expectedMessage ) )
testStartSignalEventHashCode ( ) { org . kie . workbench . common . stunner . bpmn . definition . StartSignalEvent a = new org . kie . workbench . common . stunner . bpmn . definition . StartSignalEvent ( ) ; org . kie . workbench . common . stunner . bpmn . definition . StartSignalEvent b = new org . kie . workbench . common . stunner . bpmn . definition . StartSignalEvent ( ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return ( getPath ( ) ) != null ? getPath ( ) . hashCode ( ) : 0 ; }
org . junit . Assert . assertEquals ( a . hashCode ( ) , b . hashCode ( ) )
testListeners ( ) { org . apache . catalina . core . TestAsyncContextImpl . resetTracker ( ) ; org . apache . catalina . startup . Tomcat tomcat = getTomcatInstance ( ) ; org . apache . catalina . Context ctx = tomcat . addContext ( "" , null ) ; org . apache . catalina . core . TestAsyncContextImpl . TrackingServlet tracking = new org . apache . catalina . core . TestAsyncContextImpl . TrackingServlet ( ) ; org . apache . catalina . Wrapper wrapper = org . apache . catalina . startup . Tomcat . addServlet ( ctx , "tracking" , tracking ) ; wrapper . setAsyncSupported ( true ) ; ctx . addServletMappingDecoded ( "/stage1" , "tracking" ) ; org . apache . catalina . core . TestAsyncContextImpl . TimeoutServlet timeout = new org . apache . catalina . core . TestAsyncContextImpl . TimeoutServlet ( Boolean . TRUE , null ) ; org . apache . catalina . Wrapper wrapper2 = org . apache . catalina . startup . Tomcat . addServlet ( ctx , "timeout" , timeout ) ; wrapper2 . setAsyncSupported ( true ) ; ctx . addServletMappingDecoded ( "/stage2" , "timeout" ) ; org . apache . catalina . valves . TesterAccessLogValve alv = new org . apache . catalina . valves . TesterAccessLogValve ( ) ; ctx . getPipeline ( ) . addValve ( alv ) ; tomcat . start ( ) ; java . lang . StringBuilder url = new java . lang . StringBuilder ( 48 ) ; url . append ( "http://localhost:" ) ; url . append ( getPort ( ) ) ; url . append ( "/stage1" ) ; getUrl ( url . toString ( ) ) ; java . lang . String expectedTrack = "DispatchingServletGet-DispatchingServletGet-" + ( "onStartAsync-TimeoutServletGet-onStartAsync-onTimeout-" + "onComplete-" ) ; int count = 0 ; while ( ( ! ( expectedTrack . equals ( org . apache . catalina . core . TestAsyncContextImpl . getTrack ( ) ) ) ) && ( count < 100 ) ) { java . lang . Thread . sleep ( 50 ) ; count ++ ; } "<AssertPlaceHolder>" ; alv . validateAccessLog ( 1 , 200 , org . apache . catalina . core . TestAsyncContextImpl . TimeoutServlet . ASYNC_TIMEOUT , ( ( ( org . apache . catalina . core . TestAsyncContextImpl . TimeoutServlet . ASYNC_TIMEOUT ) + ( org . apache . catalina . core . TestAsyncContextImpl . TIMEOUT_MARGIN ) ) + ( org . apache . catalina . core . TestAsyncContextImpl . REQUEST_TIME ) ) ) ; } getTrack ( ) { return org . apache . catalina . core . TestAsyncContextImpl . tracker . toString ( ) ; }
org . junit . Assert . assertEquals ( expectedTrack , org . apache . catalina . core . TestAsyncContextImpl . getTrack ( ) )
testLog1pExpm1 ( ) { double [ ] epsilon = new double [ ] { 6.0E-17 , 3.0E-16 , 5.0E-16 , 9.0E-16 , 6.0E-15 } ; for ( int maxOrder = 0 ; maxOrder < 5 ; ++ maxOrder ) { org . hipparchus . analysis . differentiation . DSFactory factory = new org . hipparchus . analysis . differentiation . DSFactory ( 1 , maxOrder ) ; for ( double x = 0.1 ; x < 1.2 ; x += 0.001 ) { org . hipparchus . analysis . differentiation . DerivativeStructure dsX = factory . variable ( 0 , x ) ; org . hipparchus . analysis . differentiation . DerivativeStructure rebuiltX = dsX . expm1 ( ) . log1p ( ) ; org . hipparchus . analysis . differentiation . DerivativeStructure zero = rebuiltX . subtract ( dsX ) ; for ( int n = 0 ; n <= maxOrder ; ++ n ) { "<AssertPlaceHolder>" ; } } } } getPartialDerivative ( int [ ] ) { return data [ getFactory ( ) . getCompiler ( ) . getPartialDerivativeIndex ( orders ) ] ; }
org . junit . Assert . assertEquals ( 0.0 , zero . getPartialDerivative ( n ) , epsilon [ n ] )
testOkLeeg ( ) { final nl . moderniseringgba . isc . esb . message . sync . impl . BlokkeringInfoAntwoordBericht blokkeringInfoAntwoord = new nl . moderniseringgba . isc . esb . message . sync . impl . BlokkeringInfoAntwoordBericht ( ) ; blokkeringInfoAntwoord . setStatus ( StatusType . OK ) ; blokkeringInfoAntwoord . setPersoonsaanduiding ( null ) ; final java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; parameters . put ( "blokkeringInfoAntwoordBericht" , blokkeringInfoAntwoord ) ; final java . lang . String result = subject . execute ( parameters ) ; "<AssertPlaceHolder>" ; } execute ( java . util . Map ) { nl . bzk . migratiebrp . isc . jbpm . uc1003 . MaakZoekPersoonBerichtAction . LOG . debug ( "execute(parameters={})" , parameters ) ; final java . lang . Long berichtId = ( ( java . lang . Long ) ( parameters . get ( "input" ) ) ) ; final nl . bzk . migratiebrp . bericht . model . lo3 . Lo3Bericht input = ( ( nl . bzk . migratiebrp . bericht . model . lo3 . Lo3Bericht ) ( berichtenDao . leesBericht ( berichtId ) ) ) ; final nl . bzk . migratiebrp . bericht . model . sync . SyncBericht verzoek = maakZoekPersoonVerzoekBericht ( input ) ; final java . lang . Long verzoekId = berichtenDao . bewaarBericht ( verzoek ) ; final java . util . Map < java . lang . String , java . lang . Object > result = new java . util . HashMap ( ) ; result . put ( "zoekPersoonVerzoek" , verzoekId ) ; nl . bzk . migratiebrp . isc . jbpm . uc1003 . MaakZoekPersoonBerichtAction . LOG . debug ( "result:<sp>{}" , result ) ; return result ; }
org . junit . Assert . assertEquals ( null , result )
testCreateSettingsPanel ( ) { System . out . println ( "createSettingsPanel" ) ; kg . apc . jmeter . vizualizers . TransactionsPerSecondGui instance = new kg . apc . jmeter . vizualizers . TransactionsPerSecondGui ( ) ; kg . apc . jmeter . vizualizers . JSettingsPanel result = instance . createSettingsPanel ( ) ; "<AssertPlaceHolder>" ; } createSettingsPanel ( ) { return new kg . apc . jmeter . vizualizers . JSettingsPanel ( this , ( ( ( ( ( ( ( JSettingsPanel . TIMELINE_OPTION ) | ( JSettingsPanel . GRADIENT_OPTION ) ) | ( JSettingsPanel . FINAL_ZEROING_OPTION ) ) | ( JSettingsPanel . LIMIT_POINT_OPTION ) ) | ( JSettingsPanel . MAXY_OPTION ) ) | ( JSettingsPanel . RELATIVE_TIME_OPTION ) ) | ( JSettingsPanel . MARKERS_OPTION ) ) ) ; }
org . junit . Assert . assertNotNull ( result )
test_partner_settings_new_relic_patch ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method . PATCH ) ; request . setEndpoint ( "partner_settings/new_relic" ) ; request . setBody ( "{\"enable_subuser_statistics\":true,\"enabled\":true,\"license_key\":\"\"}" ) ; com . sendgrid . Response response = sg . api ( request ) ; "<AssertPlaceHolder>" ; } api ( com . sendgrid . Request ) { com . sendgrid . Request req = new com . sendgrid . Request ( ) ; req . setMethod ( request . getMethod ( ) ) ; req . setBaseUri ( this . host ) ; req . setEndpoint ( ( ( ( "/" + ( version ) ) + "/" ) + ( request . getEndpoint ( ) ) ) ) ; req . setBody ( request . getBody ( ) ) ; for ( Map . Entry < java . lang . String , java . lang . String > header : this . requestHeaders . entrySet ( ) ) { req . addHeader ( header . getKey ( ) , header . getValue ( ) ) ; } for ( Map . Entry < java . lang . String , java . lang . String > queryParam : request . getQueryParams ( ) . entrySet ( ) ) { req . addQueryParam ( queryParam . getKey ( ) , queryParam . getValue ( ) ) ; } return makeCall ( req ) ; }
org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) )
renderConfluencePage_asciiDocWithTipContentAndTitle_returnsConfluencePageContentWithTipMacroWithContentAndTitle ( ) { java . lang . String adocContent = "[TIP]\n" + ( ( ( ".Tip<sp>Title\n" + "====\n" ) + "Some<sp>tip.\n" ) + "[TIP]\n" 0 ) ; org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePage asciidocConfluencePage = org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePage . newAsciidocConfluencePage ( asciidocPage ( org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePageTest . prependTitle ( adocContent ) ) , org . sahli . asciidoc . confluence . publisher . converter . UTF_8 , org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePageTest . TEMPLATES_FOLDER , org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePageTest . dummyAssetsTargetPath ( ) ) ; java . lang . String expectedContent = "<ac:structured-macro<sp>ac:name=\"tip\">" + ( ( "<ac:parameter<sp>ac:name=\"title\">Tip<sp>Title</ac:parameter>" + "<ac:rich-text-body><p>Some<sp>tip.</p></ac:rich-text-body>" ) + "</ac:structured-macro>" ) ; "<AssertPlaceHolder>" ; } content ( ) { return this . htmlContent ; }
org . junit . Assert . assertThat ( asciidocConfluencePage . content ( ) , org . hamcrest . Matchers . is ( expectedContent ) )
trimGenericsAreaIfNestedGenericsExists_A$String_StringIsEmpty ( ) { java . lang . String target_ = "" ; java . lang . String actual = org . junithelper . core . extractor . ArgExtractorHelper . trimGenericsAreaIfNestedGenericsExists ( target_ ) ; java . lang . String expected = "" ; "<AssertPlaceHolder>" ; } trimGenericsAreaIfNestedGenericsExists ( java . lang . String ) { org . junithelper . core . util . Assertion . on ( "target" ) . mustNotBeNull ( target ) ; if ( target . matches ( ( ( ( org . junithelper . core . constant . RegExp . Anything_OneOrMore_Min ) + ( org . junithelper . core . extractor . ArgExtractorHelper . NESTED_GENERICS_MARK ) ) + ( org . junithelper . core . constant . RegExp . Anything_OneOrMore_Min ) ) ) ) { return target . replaceAll ( RegExp . Generics , StringValue . Empty ) ; } return target ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
testEnqueueCanTransmit ( ) { final org . opendaylight . controller . cluster . access . concepts . Request < ? , ? > request = new org . opendaylight . controller . cluster . access . commands . TransactionPurgeRequest ( TRANSACTION_IDENTIFIER , 0L , probe . ref ( ) ) ; final java . util . function . Consumer < org . opendaylight . controller . cluster . access . concepts . Response < ? , ? > > callback = createConsumerMock ( ) ; final long now = org . opendaylight . controller . cluster . access . client . TransmittingTransmitQueueTest . now ( ) ; queue . enqueueOrForward ( new org . opendaylight . controller . cluster . access . client . ConnectionEntry ( request , callback , now ) , now ) ; final org . opendaylight . controller . cluster . access . concepts . RequestEnvelope requestEnvelope = probe . expectMsgClass ( org . opendaylight . controller . cluster . access . concepts . RequestEnvelope . class ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return builder . message ; }
org . junit . Assert . assertEquals ( request , requestEnvelope . getMessage ( ) )
testLaunch ( ) { java . lang . String fileName = "target/test-classes/example-app.json" ; java . lang . String appName = "example-app" ; long lifetime = 3600L ; java . lang . String queue = "default" ; try { int result = org . apache . hadoop . yarn . service . client . TestApiServiceClient . asc . actionLaunch ( fileName , appName , lifetime , queue ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException | org . apache . hadoop . yarn . exceptions . YarnException e ) { org . junit . Assert . fail ( ) ; } } actionLaunch ( java . lang . String , java . lang . String , java . lang . Long , java . lang . String ) { int result = EXIT_SUCCESS ; try { org . apache . hadoop . yarn . service . api . records . Service service = loadAppJsonFromLocalFS ( fileName , appName , lifetime , queue ) ; java . lang . String buffer = jsonSerDeser . toJson ( service ) ; com . sun . jersey . api . client . ClientResponse response = getApiClient ( ) . post ( com . sun . jersey . api . client . ClientResponse . class , buffer ) ; result = processResponse ( response ) ; } catch ( java . lang . Exception e ) { org . apache . hadoop . yarn . service . client . ApiServiceClient . LOG . error ( "Fail<sp>to<sp>launch<sp>application:<sp>" , e ) ; result = EXIT_EXCEPTION_THROWN ; } return result ; }
org . junit . Assert . assertEquals ( org . apache . hadoop . yarn . service . client . EXIT_SUCCESS , result )
testBuildJobTag ( ) { boolean isTag = true ; com . kylenicholls . stash . parameterizedbuilds . item . Job actual = new com . kylenicholls . stash . parameterizedbuilds . item . Job . JobBuilder ( 0 ) . isTag ( isTag ) . build ( ) ; "<AssertPlaceHolder>" ; } getIsTag ( ) { return isTag ; }
org . junit . Assert . assertEquals ( isTag , actual . getIsTag ( ) )
testMissendeReferentieExceptieConstructorMetBericht ( ) { final nl . bzk . brp . dataaccess . exceptie . VerplichteDataNietAanwezigExceptie exceptie = new nl . bzk . brp . dataaccess . exceptie . VerplichteDataNietAanwezigExceptie ( nl . bzk . brp . dataaccess . exceptie . VerplichteDataNietAanwezigExceptieTest . TEST ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; }
org . junit . Assert . assertEquals ( nl . bzk . brp . dataaccess . exceptie . VerplichteDataNietAanwezigExceptieTest . TEST , exceptie . getMessage ( ) )
testJAXBTypeRepresentationMediaType ( ) { initiateWebApplication ( com . sun . jersey . impl . entity . EntityTypesTest . JAXBTypeResourceMediaType . class ) ; com . sun . jersey . api . client . WebResource r = resource ( "/" ) ; com . sun . jersey . impl . entity . JAXBBean in = new com . sun . jersey . impl . entity . JAXBBean ( "CONTENT" ) ; com . sun . jersey . impl . entity . JAXBBeanType out = r . entity ( in , "application/foo+xml" ) . post ( com . sun . jersey . impl . entity . JAXBBeanType . class ) ; "<AssertPlaceHolder>" ; } post ( java . lang . String ) { return content ; }
org . junit . Assert . assertEquals ( in . value , out . value )
testMultipleOutputsLayer ( ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; org . deeplearning4j . nn . conf . ComputationGraphConfiguration conf = new org . deeplearning4j . nn . conf . NeuralNetConfiguration . Builder ( ) . seed ( 12345 ) . optimizationAlgo ( OptimizationAlgorithm . STOCHASTIC_GRADIENT_DESCENT ) . dist ( new org . deeplearning4j . nn . conf . distribution . NormalDistribution ( 0 , 1 ) ) . updater ( new org . nd4j . linalg . learning . config . NoOp ( ) ) . activation ( Activation . TANH ) . graphBuilder ( ) . addInputs ( "i0" ) . addLayer ( "d0" , new org . deeplearning4j . gradientcheck . DenseLayer . Builder ( ) . nIn ( 2 ) . nOut ( 2 ) . build ( ) , "i0" ) . addLayer ( "d1" , new org . deeplearning4j . gradientcheck . DenseLayer . Builder ( ) . nIn ( 2 ) . nOut ( 2 ) . build ( ) , "d0" ) . addLayer ( "d2" , new org . deeplearning4j . gradientcheck . DenseLayer . Builder ( ) . nIn ( 2 ) . nOut ( 2 ) . build ( ) , "d0" ) . addLayer ( "d3" , new org . deeplearning4j . gradientcheck . DenseLayer . Builder ( ) . nIn ( 2 ) . nOut ( 2 ) . build ( ) , "d0" ) . addLayer ( "out" , new org . deeplearning4j . gradientcheck . OutputLayer . Builder ( ) . lossFunction ( LossFunctions . LossFunction . MSE ) . nIn ( 6 ) . nOut ( 2 ) . build ( ) , "d1" , "d2" , "d3" ) . setOutputs ( "out" ) . build ( ) ; org . deeplearning4j . nn . graph . ComputationGraph graph = new org . deeplearning4j . nn . graph . ComputationGraph ( conf ) ; graph . init ( ) ; int [ ] minibatchSizes = new int [ ] { 1 , 3 } ; for ( int mb : minibatchSizes ) { org . nd4j . linalg . api . ndarray . INDArray input = org . nd4j . linalg . factory . Nd4j . rand ( mb , 2 ) ; org . nd4j . linalg . api . ndarray . INDArray out = org . nd4j . linalg . factory . Nd4j . rand ( mb , 2 ) ; java . lang . String msg = "testMultipleOutputsLayer()<sp>-<sp>minibatchSize<sp>=<sp>" + mb ; if ( org . deeplearning4j . gradientcheck . GradientCheckTestsComputationGraph . PRINT_RESULTS ) { System . out . println ( msg ) ; for ( int j = 0 ; j < ( graph . getNumLayers ( ) ) ; j ++ ) System . out . println ( ( ( ( "Layer<sp>" + j ) + "<sp>#<sp>params:<sp>" ) + ( graph . getLayer ( j ) . numParams ( ) ) ) ) ; } boolean gradOK = org . deeplearning4j . gradientcheck . GradientCheckUtil . checkGradients ( graph , org . deeplearning4j . gradientcheck . GradientCheckTestsComputationGraph . DEFAULT_EPS , org . deeplearning4j . gradientcheck . GradientCheckTestsComputationGraph . DEFAULT_MAX_REL_ERROR , org . deeplearning4j . gradientcheck . GradientCheckTestsComputationGraph . DEFAULT_MIN_ABS_ERROR , org . deeplearning4j . gradientcheck . GradientCheckTestsComputationGraph . PRINT_RESULTS , org . deeplearning4j . gradientcheck . GradientCheckTestsComputationGraph . RETURN_ON_FIRST_FAILURE , new org . nd4j . linalg . api . ndarray . INDArray [ ] { input } , new org . nd4j . linalg . api . ndarray . INDArray [ ] { out } ) ; "<AssertPlaceHolder>" ; org . deeplearning4j . TestUtils . testModelSerialization ( graph ) ; } } checkGradients ( org . deeplearning4j . nn . multilayer . MultiLayerNetwork , double , double , double , boolean , boolean , org . nd4j . linalg . api . ndarray . INDArray , org . nd4j . linalg . api . ndarray . INDArray ) { return org . deeplearning4j . gradientcheck . GradientCheckUtil . checkGradients ( mln , epsilon , maxRelError , minAbsoluteError , print , exitOnFirstError , input , labels , null , null ) ; }
org . junit . Assert . assertTrue ( msg , gradOK )
testAsbr ( ) { ospfDeviceTed . setAsbr ( true ) ; "<AssertPlaceHolder>" ; } asbr ( ) { return asbr ; }
org . junit . Assert . assertThat ( ospfDeviceTed . asbr ( ) , org . hamcrest . CoreMatchers . is ( true ) )
shouldFormatDateReturnEmptyStringForNull ( ) { final java . lang . String result = com . qcadoo . localization . api . utils . DateUtils . toDateString ( null ) ; "<AssertPlaceHolder>" ; } toDateString ( java . util . Date ) { return com . qcadoo . localization . api . utils . DateUtils . formatDate ( date , com . qcadoo . localization . api . utils . DateUtils . L_DATE_FORMAT ) ; }
org . junit . Assert . assertEquals ( "" , result )
getPassThru ( ) { java . lang . Object object = new java . lang . Object ( ) ; "<AssertPlaceHolder>" ; } getPassThru ( ) { java . lang . Object object = new java . lang . Object ( ) ; org . junit . Assert . assertSame ( object , org . eclipse . collections . impl . block . factory . Functions . getPassThru ( ) . valueOf ( object ) ) ; }
org . junit . Assert . assertSame ( object , org . eclipse . collections . impl . block . factory . Functions . getPassThru ( ) . valueOf ( object ) )
testRootElement ( ) { de . lessvoid . nifty . controls . dynamic . ScreenCreator createWithId = new de . lessvoid . nifty . controls . dynamic . ScreenCreator ( "myid" ) ; de . lessvoid . nifty . screen . Screen screen = createWithId . create ( niftyMock ) ; "<AssertPlaceHolder>" ; } getRootElement ( ) { if ( ( rootElement ) == null ) { throw new java . lang . IllegalStateException ( "Requested<sp>root<sp>element<sp>before<sp>it<sp>was<sp>set." ) ; } return rootElement ; }
org . junit . Assert . assertEquals ( rootElement , screen . getRootElement ( ) )
shouldSetContextOnViewElements ( ) { com . redhat . darcy . ui . api . ElementContext mockContext = mock ( com . redhat . darcy . ui . api . ElementContext . class ) ; com . redhat . darcy . ui . internal . DefaultElementSelection selection = new com . redhat . darcy . ui . internal . DefaultElementSelection ( mockContext ) ; com . redhat . darcy . ui . testing . doubles . FakeCustomElement customElement = selection . viewOfType ( FakeCustomElement :: new , mock ( com . redhat . darcy . ui . api . Locator . class ) ) ; "<AssertPlaceHolder>" ; } getContext ( ) { return context ; }
org . junit . Assert . assertSame ( mockContext , customElement . getContext ( ) )
shouldAcceptPort ( ) { lb = new org . openstack . atlas . api . validation . validators . LoadBalancer ( ) ; lb . setPort ( 80 ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( lb , org . openstack . atlas . api . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultList . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( result . passedValidation ( ) )
testShiftVertexNumParamsFalse ( ) { org . deeplearning4j . nn . conf . graph . ShiftVertex sv = new org . deeplearning4j . nn . conf . graph . ShiftVertex ( 0.7 ) ; "<AssertPlaceHolder>" ; } numParams ( int ) { return 0 ; }
org . junit . Assert . assertEquals ( 0 , sv . numParams ( false ) )
findAllTest ( ) { java . util . List < java . lang . String > resultFindAll = cn . hutool . core . util . ReUtil . findAll ( "\\w{2}" , content , 0 , new java . util . ArrayList < java . lang . String > ( ) ) ; java . util . ArrayList < java . lang . String > expected = cn . hutool . core . collection . CollectionUtil . newArrayList ( "ZZ" , "Za" , "aa" , "bb" , "bc" , "cc" , "12" , "34" ) ; "<AssertPlaceHolder>" ; } findAll ( java . lang . String , java . lang . CharSequence , int , T extends java . util . Collection ) { if ( null == regex ) { return collection ; } return cn . hutool . core . util . ReUtil . findAll ( java . util . regex . Pattern . compile ( regex , Pattern . DOTALL ) , content , group , collection ) ; }
org . junit . Assert . assertEquals ( expected , resultFindAll )
testFindByPrimaryKeyExisting ( ) { com . liferay . document . library . kernel . model . DLFileVersion newDLFileVersion = addDLFileVersion ( ) ; com . liferay . document . library . kernel . model . DLFileVersion existingDLFileVersion = _persistence . findByPrimaryKey ( newDLFileVersion . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingDLFileVersion , newDLFileVersion )
testEncryptDirectReference ( ) { org . apache . cxf . service . Service service = createService ( ) ; java . util . Map < java . lang . String , java . lang . Object > inProperties = new java . util . HashMap ( ) ; inProperties . put ( ConfigurationConstants . ACTION , ConfigurationConstants . ENCRYPT ) ; inProperties . put ( ConfigurationConstants . PW_CALLBACK_REF , new org . apache . cxf . ws . security . wss4j . TestPwdCallback ( ) ) ; inProperties . put ( ConfigurationConstants . DEC_PROP_FILE , "insecurity.properties" ) ; org . apache . cxf . ws . security . wss4j . WSS4JInInterceptor inInterceptor = new org . apache . cxf . ws . security . wss4j . WSS4JInInterceptor ( inProperties ) ; service . getInInterceptors ( ) . add ( inInterceptor ) ; org . apache . cxf . ws . security . wss4j . Echo echo = createClientProxy ( ) ; org . apache . cxf . endpoint . Client client = org . apache . cxf . frontend . ClientProxy . getClient ( echo ) ; client . getInInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingInInterceptor ( ) ) ; client . getOutInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingOutInterceptor ( ) ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties properties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; java . util . List < org . apache . wss4j . stax . ext . WSSConstants . Action > actions = new java . util . ArrayList ( ) ; actions . add ( XMLSecurityConstants . ENCRYPT ) ; properties . setActions ( actions ) ; properties . setEncryptionUser ( "myalias" ) ; properties . setEncryptionKeyIdentifier ( WSSecurityTokenConstants . KEYIDENTIFIER_SECURITY_TOKEN_DIRECT_REFERENCE ) ; properties . setEncryptionSymAlgorithm ( XMLSecurityConstants . NS_XENC_AES128 ) ; java . util . Properties cryptoProperties = org . apache . wss4j . common . crypto . CryptoFactory . getProperties ( "outsecurity.properties" , this . getClass ( ) . getClassLoader ( ) ) ; properties . setEncryptionCryptoProperties ( cryptoProperties ) ; properties . setCallbackHandler ( new org . apache . cxf . ws . security . wss4j . TestPwdCallback ( ) ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ohandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ( properties ) ; client . getOutInterceptors ( ) . add ( ohandler ) ; "<AssertPlaceHolder>" ; } echo ( int ) { return i ; }
org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) )
testFlowStepWithNoData ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/no_step_data_flow.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . SlangSource . fromFile ( resource ) ) ; "<AssertPlaceHolder>" ; exception . expect ( io . cloudslang . lang . compiler . RuntimeException . class ) ; exception . expectMessage ( "Step:<sp>step1<sp>has<sp>no<sp>data" ) ; throw result . getErrors ( ) . get ( 0 ) ; } getErrors ( ) { return errors ; }
org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) )
testIsListening_trueAfterAddListener ( ) { org . eclipse . swt . widgets . Listener listener = mock ( org . eclipse . swt . widgets . Listener . class ) ; widget . addListener ( SWT . Resize , listener ) ; "<AssertPlaceHolder>" ; } isListening ( int ) { checkWidget ( ) ; return ( eventTable ) == null ? false : eventTable . hooks ( eventType ) ; }
org . junit . Assert . assertTrue ( widget . isListening ( SWT . Resize ) )
testInboundDoubleHappyPathRegister ( ) { final int numShardsToExpect = java . lang . Integer . parseInt ( Utils . DEFAULT_TOTAL_SHARDS ) ; final java . lang . String groupName = "testInboundDoubleHappyPathRegister" ; try ( final net . dempsy . router . RoutingStrategy . Inbound ib1 = new net . dempsy . router . RoutingInboundManager ( ) . getAssociatedInstance ( ( ( ( net . dempsy . router . group . ClusterGroupInbound . class . getPackage ( ) . getName ( ) ) + ":" ) + groupName ) ) ; final net . dempsy . router . RoutingStrategy . Inbound ib2 = new net . dempsy . router . RoutingInboundManager ( ) . getAssociatedInstance ( ( ( ( net . dempsy . router . group . ClusterGroupInbound . class . getPackage ( ) . getName ( ) ) + ":" ) + groupName ) ) ) { final net . dempsy . config . ClusterId clusterId = new net . dempsy . config . ClusterId ( "test" , "test" ) ; final net . dempsy . transport . NodeAddress node1Addr = new net . dempsy . router . group . TestGroupRoutingStrategy . DummyNodeAddress ( "node1" ) ; final net . dempsy . router . group . intern . GroupDetails gd1 = new net . dempsy . router . group . intern . GroupDetails ( groupName , node1Addr ) ; final net . dempsy . router . RoutingStrategy . ContainerAddress node1Ca = new net . dempsy . router . RoutingStrategy . ContainerAddress ( node1Addr , 0 ) ; final net . dempsy . router . shardutils . Utils < net . dempsy . router . group . intern . GroupDetails > utils = new net . dempsy . router . shardutils . Utils ( infra , groupName , gd1 ) ; ib1 . setContainerDetails ( clusterId , node1Ca , ( l , m ) -> { } ) ; ib1 . start ( infra ) ; final net . dempsy . transport . NodeAddress node2Addr = new net . dempsy . router . group . TestGroupRoutingStrategy . DummyNodeAddress ( "node2" ) ; final net . dempsy . router . RoutingStrategy . ContainerAddress node2Ca = new net . dempsy . router . RoutingStrategy . ContainerAddress ( node2Addr , 0 ) ; ib2 . setContainerDetails ( clusterId , node2Ca , ( l , m ) -> { } ) ; try ( final net . dempsy . cluster . ClusterInfoSession session2 = sessFact . createSession ( ) ) { ib2 . start ( new net . dempsy . util . TestInfrastructure ( session2 , infra . getScheduler ( ) ) ) ; "<AssertPlaceHolder>" ; net . dempsy . router . group . TestGroupRoutingStrategy . checkForShardDistribution ( session , utils , numShardsToExpect , 2 ) ; disruptor . accept ( session2 ) ; net . dempsy . router . group . TestGroupRoutingStrategy . checkForShardDistribution ( session , utils , numShardsToExpect , 2 ) ; session2 . close ( ) ; net . dempsy . router . group . TestGroupRoutingStrategy . checkForShardDistribution ( session , utils , numShardsToExpect , 1 ) ; } } } waitForShards ( net . dempsy . cluster . ClusterInfoSession , net . dempsy . router . shardutils . Utils , int ) { return poll ( ( o ) -> { try { return ( getCurrentShards ( utils ) . size ( ) ) == shardCount ; } catch ( final e ) { return false ; } } ) ; }
org . junit . Assert . assertTrue ( net . dempsy . router . group . TestGroupRoutingStrategy . waitForShards ( session , utils , numShardsToExpect ) )
testGetModified ( ) { final java . util . Date modified = new java . util . Date ( ) ; com . github . sardine . DavResource folder = new com . github . sardine . DavResourceTest . Builder ( "/test/path/" ) . modifiedOn ( modified ) . build ( ) ; "<AssertPlaceHolder>" ; } getModified ( ) { return this . props . modified ; }
org . junit . Assert . assertEquals ( modified , folder . getModified ( ) )
testResourceLoadingNotNormalizedNoClass ( ) { java . net . URL url = org . reficio . ws . common . ResourceUtils . getResourceWithAbsolutePackagePath ( "org/../org/reficio/../reficio/ws/common/test/" , "soapEncoding.xsd" ) ; "<AssertPlaceHolder>" ; } getResourceWithAbsolutePackagePath ( java . lang . String , java . lang . String ) { return org . reficio . ws . common . ResourceUtils . getResourceWithAbsolutePackagePath ( org . reficio . ws . common . ResourceUtils . class , absolutePackagePath , resourceName ) ; }
org . junit . Assert . assertNotNull ( url )
testGetMessage ( ) { "<AssertPlaceHolder>" ; } getMessage ( ) { return this . toString ( ) ; }
org . junit . Assert . assertEquals ( this . message , this . e . getMessage ( ) )
testForNameEnumeration ( ) { for ( org . jscep . transport . request . Operation op : org . jscep . transport . request . Operation . values ( ) ) { "<AssertPlaceHolder>" ; } } forName ( java . lang . String ) { if ( name == null ) { throw new java . lang . NullPointerException ( ) ; } for ( org . jscep . transport . request . Operation op : org . jscep . transport . request . Operation . values ( ) ) { if ( op . name . equals ( name ) ) { return op ; } } throw new java . lang . IllegalArgumentException ( ( name + "<sp>not<sp>found" ) ) ; }
org . junit . Assert . assertThat ( op , org . hamcrest . CoreMatchers . is ( org . jscep . transport . request . Operation . forName ( op . getName ( ) ) ) )
shouldReturnDefaultFlipConditionEvaluatorGivenAnnotationsOfTypeFlipOnOffIsProvided ( ) { java . lang . annotation . Annotation [ ] annotations = new java . lang . annotation . Annotation [ 1 ] ; org . powermock . api . mockito . PowerMockito . mockStatic ( org . flips . utils . AnnotationUtils . class ) ; when ( org . flips . utils . AnnotationUtils . isMetaAnnotationDefined ( annotations [ 0 ] , org . flips . annotation . FlipOnOff . class ) ) . thenReturn ( false ) ; org . flips . model . FlipConditionEvaluator flipConditionEvaluator = flipConditionEvaluatorFactory . buildFlipConditionEvaluator ( annotations ) ; "<AssertPlaceHolder>" ; org . powermock . api . mockito . PowerMockito . verifyStatic ( ) ; org . flips . utils . AnnotationUtils . isMetaAnnotationDefined ( annotations [ 0 ] , org . flips . annotation . FlipOnOff . class ) ; } buildFlipConditionEvaluator ( java . lang . annotation . Annotation [ ] ) { org . flips . model . FlipConditionEvaluatorFactory . logger . debug ( "Using<sp>FlipConditionEvaluatorFactory<sp>to<sp>build<sp>condition<sp>Evaluator<sp>for<sp>{}" , java . util . Arrays . toString ( annotations ) ) ; if ( ( annotations . length ) == 0 ) return org . flips . model . FlipConditionEvaluatorFactory . emptyFlipConditionEvaluator ; return new org . flips . model . DefaultFlipConditionEvaluator ( applicationContext , featureContext , annotations ) ; }
org . junit . Assert . assertTrue ( ( flipConditionEvaluator instanceof org . flips . model . DefaultFlipConditionEvaluator ) )
testPublicNetworkPublicNode ( ) { org . neuro4j . workflow . FlowContext logicContext = executeFlow ( "org.neuro4j.flows.network.NetworkTestFlow-StartNode1" ) ; java . lang . String var1 = ( ( java . lang . String ) ( logicContext . get ( "value1" ) ) ) ; "<AssertPlaceHolder>" ; } get ( org . neuro4j . workflow . loader . WorkflowLoader ) { if ( ( workflow ) != null ) { org . neuro4j . workflow . cache . ConcurrentMapWorkflowCache . logger . debug ( "Found<sp>in<sp>cache:<sp>{}" , location ) ; return workflow ; } synchronized ( lock ) { if ( ( workflow ) != null ) { org . neuro4j . workflow . cache . ConcurrentMapWorkflowCache . logger . debug ( "Found<sp>in<sp>cache:<sp>{}" , location ) ; return workflow ; } org . neuro4j . workflow . cache . ConcurrentMapWorkflowCache . logger . debug ( "Loading<sp>to<sp>cache:<sp>{}" , location ) ; workflow = loader . load ( location ) ; } return workflow ; }
org . junit . Assert . assertEquals ( var1 , "test" )
testDataDrivenTest ( ) { java . io . File dir = tempDir ( ) ; tempScript ( "suite.mts" , "Test<sp>foo.mt<sp>RunWith<sp>data.csv" , dir ) ; tempScript ( "data.csv" , "header\nrow1\nrow2\nrow3" , dir ) ; com . gorillalogic . monkeytalk . processor . SuiteFlattener flattener = new com . gorillalogic . monkeytalk . processor . SuiteFlattener ( dir ) ; "<AssertPlaceHolder>" ; } flatten ( java . lang . String ) { if ( filename == null ) { return com . gorillalogic . monkeytalk . processor . SuiteFlattener . BAD_FILENAME ; } java . util . List < com . gorillalogic . monkeytalk . Command > commands = world . getSuite ( filename ) ; if ( commands == null ) { if ( filename . toLowerCase ( ) . endsWith ( CommandWorld . SCRIPT_EXT ) ) { return com . gorillalogic . monkeytalk . processor . SuiteFlattener . BAD_SUITE ; } return com . gorillalogic . monkeytalk . processor . SuiteFlattener . SUITE_NOT_FOUND ; } else if ( ( commands . size ( ) ) == 0 ) { return 0 ; } int i = 0 ; for ( com . gorillalogic . monkeytalk . Command cmd : commands ) { if ( "test.run" . equalsIgnoreCase ( cmd . getCommandName ( ) ) ) { i ++ ; } else if ( "test.runwith" . equalsIgnoreCase ( cmd . getCommandName ( ) ) ) { if ( ( cmd . getArgs ( ) . size ( ) ) == 0 ) { i ++ ; } else { java . lang . String datafile = cmd . getArgs ( ) . get ( 0 ) ; java . util . List < java . util . Map < java . lang . String , java . lang . String > > data = world . getData ( datafile ) ; if ( data == null ) { i ++ ; } else if ( ( data . size ( ) ) == 0 ) { i ++ ; } else { i += data . size ( ) ; } } } else if ( "suite.run" . equalsIgnoreCase ( cmd . getCommandName ( ) ) ) { i += flatten ( cmd . getMonkeyId ( ) ) ; } } return i ; }
org . junit . Assert . assertThat ( flattener . flatten ( "suite.mts" ) , org . hamcrest . CoreMatchers . is ( 3 ) )
expiredHealthCheckTest ( ) { com . navercorp . pinpoint . test . server . TestServerMessageListenerFactory testServerMessageListenerFactory = new com . navercorp . pinpoint . test . server . TestServerMessageListenerFactory ( TestServerMessageListenerFactory . HandshakeType . DUPLEX , true ) ; com . navercorp . pinpoint . test . server . TestServerMessageListenerFactory . TestServerMessageListener serverMessageListener = testServerMessageListenerFactory . create ( ) ; com . navercorp . pinpoint . test . server . TestPinpointServerAcceptor testPinpointServerAcceptor = new com . navercorp . pinpoint . test . server . TestPinpointServerAcceptor ( testServerMessageListenerFactory ) ; int bindPort = testPinpointServerAcceptor . bind ( ) ; com . navercorp . pinpoint . test . client . TestRawSocket testRawSocket = new com . navercorp . pinpoint . test . client . TestRawSocket ( ) ; try { testRawSocket . connect ( bindPort ) ; java . lang . Thread . sleep ( ( ( 35 * 60 ) * 1000 ) ) ; sendPingAndReceivePongPacket ( testRawSocket , new com . navercorp . pinpoint . rpc . packet . PingPayloadPacket ( 1 , ( ( byte ) ( 1 ) ) , ( ( byte ) ( 1 ) ) ) ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { } finally { testRawSocket . close ( ) ; testPinpointServerAcceptor . close ( ) ; } "<AssertPlaceHolder>" ; } hasReceivedPing ( ) { return ( handlePingCount . get ( ) ) > 0 ; }
org . junit . Assert . assertFalse ( serverMessageListener . hasReceivedPing ( ) )
testMath74 ( ) { fr . inria . main . evolution . AstorMain main1 = new fr . inria . main . evolution . AstorMain ( ) ; java . lang . String dep = new java . io . File ( "5" 0 ) . getAbsolutePath ( ) ; java . io . File out = new java . io . File ( fr . inria . astor . core . setup . ConfigurationProperties . getProperty ( "workingDirectory" ) ) ; java . lang . String [ ] args = new java . lang . String [ ] { "/target/classes" 4 , dep , "/target/classes" 6 , "-maxtime" 4 , "-failing" , "-maxtime" 0 , "/target/classes" 3 , new java . io . File ( "-maxtime" 1 ) . getAbsolutePath ( ) , "-package" , "/target/classes" 7 , "-maxtime" 9 , "5" 1 , "/target/classes" 2 , "-maxtime" 6 , "-binjavafolder" , "/target/classes" , "-maxtime" 7 , "5" 3 , "/target/classes" 5 , "5" , "/target/classes" 8 , "-maxtime" 3 , "-out" , out . getAbsolutePath ( ) , "/target/classes" 0 , "/target/classes" 9 , "5" 2 , "-maxtime" 5 , "/target/classes" 1 , "-maxtime" 8 , "-stopfirst" , "-maxtime" 2 , "-maxtime" , "2" } ; System . out . println ( java . util . Arrays . toString ( args ) ) ; main1 . execute ( args ) ; java . util . List < fr . inria . astor . core . entities . ProgramVariant > solutions = main1 . getEngine ( ) . getSolutions ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { for ( java . lang . CharSequence part : parts ) { if ( ( part . length ( ) ) > 0 ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( solutions . isEmpty ( ) )
reoccurringMismatchCopiesFirstSeenDateTime ( ) { openMismatch . setObservedDateTime ( java . time . LocalDateTime . now ( ) ) ; gov . nysenate . openleg . service . spotcheck . DeNormSpotCheckMismatch reoccurringMismatch = createMismatch ( SpotCheckMismatchType . BILL_ACTIVE_AMENDMENT , MismatchState . OPEN ) ; reoccurringMismatch . setObservedDateTime ( java . time . LocalDateTime . now ( ) . plusHours ( 1 ) ) ; reoccurringMismatch = gov . nysenate . openleg . service . spotcheck . base . MismatchUtils . updateFirstSeenDateTime ( com . google . common . collect . Lists . newArrayList ( reoccurringMismatch ) , com . google . common . collect . Lists . newArrayList ( openMismatch ) ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getFirstSeenDateTime ( ) { return firstSeenDateTime ; }
org . junit . Assert . assertThat ( reoccurringMismatch . getFirstSeenDateTime ( ) , org . hamcrest . core . Is . is ( openMismatch . getFirstSeenDateTime ( ) ) )
testAddActionConfigurationReturnsSameUiInstance ( ) { com . eclipsesource . tabris . ui . UIConfiguration configuration = new com . eclipsesource . tabris . ui . UIConfiguration ( ) ; com . eclipsesource . tabris . ui . UIConfiguration actualConf = configuration . addActionConfiguration ( new com . eclipsesource . tabris . ui . ActionConfiguration ( "foo" , com . eclipsesource . tabris . internal . ui . TestAction . class ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertSame ( configuration , actualConf )
testCreateDatabase ( ) { try { com . fit2cloud . aliyun . rds . model . request . CreateDatabaseRequest request = new com . fit2cloud . aliyun . rds . model . request . CreateDatabaseRequest ( ) ; request . setDBInstanceId ( dBInstanceId ) ; request . setCharacterSetName ( CharacterSet . MYSQL_UTF8 ) ; request . setDBDescription ( "test<sp>description" ) ; request . setDBName ( dbName ) ; com . fit2cloud . aliyun . Response response = client . createDatabase ( request ) ; System . out . println ( ( "testCreateDatabase<sp>::<sp>" + ( new com . google . gson . Gson ( ) . toJson ( response ) ) ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } } createDatabase ( com . fit2cloud . aliyun . rds . model . request . CreateDatabaseRequest ) { return gson . fromJson ( request . execute ( "CreateDatabase" , createDatabaseRequest . toMap ( ) ) , com . fit2cloud . aliyun . Response . class ) ; }
org . junit . Assert . assertTrue ( true )
testGetReaction_int ( ) { org . openscience . cdk . interfaces . IReactionSet reactionSet = ( ( org . openscience . cdk . interfaces . IReactionSet ) ( newChemObject ( ) ) ) ; reactionSet . addReaction ( reactionSet . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IReaction . class ) ) ; reactionSet . addReaction ( reactionSet . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IReaction . class ) ) ; reactionSet . addReaction ( reactionSet . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IReaction . class ) ) ; reactionSet . addReaction ( reactionSet . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IReaction . class ) ) ; for ( int i = 0 ; i < ( reactionSet . getReactionCount ( ) ) ; i ++ ) { "<AssertPlaceHolder>" ; } } getReaction ( int ) { return reactions [ number ] ; }
org . junit . Assert . assertNotNull ( reactionSet . getReaction ( i ) )
testCreate ( ) { org . oscarehr . hospitalReportManager . model . HRMCategory entity = new org . oscarehr . hospitalReportManager . model . HRMCategory ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
org . junit . Assert . assertNotNull ( entity . getId ( ) )
testExceptionInInitializerError ( ) { java . lang . SecurityException securityException = new java . lang . SecurityException ( ) ; try ( com . liferay . portal . kernel . test . SwappableSecurityManager swappableSecurityManager = new com . liferay . portal . kernel . test . SwappableSecurityManager ( ) { @ com . liferay . petra . reflect . Override public void checkPermission ( java . security . Permission permission ) { java . lang . String name = permission . getName ( ) ; if ( name . equals ( "suppressAccessChecks" ) ) { throw securityException ; } } } ) { swappableSecurityManager . install ( ) ; java . lang . Class . forName ( com . liferay . petra . reflect . ReflectionUtil . class . getName ( ) ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . ExceptionInInitializerError eiie ) { "<AssertPlaceHolder>" ; } } getCause ( ) { return _cause ; }
org . junit . Assert . assertSame ( securityException , eiie . getCause ( ) )
givenClassWithContexts_ContextHierarchiesCountValidatorReportsNoError ( ) { org . junit . runners . model . TestClass testClass = de . bechte . junit . runners . model . TestClassPool . forClass ( de . bechte . junit . stubs . ContextTestClassStub . class ) ; java . util . List < java . lang . Throwable > errors = new java . util . ArrayList < java . lang . Throwable > ( ) ; ChildrenCountValidator . CONTEXT_HIERARCHIES . validate ( testClass , errors ) ; "<AssertPlaceHolder>" ; } validate ( org . junit . runners . model . TestClass , java . util . List ) { if ( childResolver . getChildren ( testClass ) . isEmpty ( ) ) errors . add ( new java . lang . Exception ( errorMessage ) ) ; }
org . junit . Assert . assertThat ( errors , is ( empty ( ) ) )
testDoNotUseIndexesWithNoNullValueSupport ( ) { final com . orientechnologies . orient . core . index . OIndexUnique expectedResult = mockUniqueIndex ( ) ; final java . util . List < com . orientechnologies . orient . core . index . OIndex < ? > > indexes = java . util . Arrays . < com . orientechnologies . orient . core . index . OIndex < ? > > asList ( mockUniqueCompositeHashIndex ( ) , mockUniqueCompositeIndex ( ) , expectedResult ) ; final com . orientechnologies . orient . core . index . OIndex < ? > result = com . orientechnologies . orient . core . sql . OChainedIndexProxy . findBestIndex ( indexes ) ; "<AssertPlaceHolder>" ; } findBestIndex ( java . lang . Iterable ) { com . orientechnologies . orient . core . index . OIndex < ? > bestIndex = null ; for ( com . orientechnologies . orient . core . index . OIndex < ? > index : indexes ) { if ( ( com . orientechnologies . orient . core . sql . OChainedIndexProxy . priorityOfUsage ( index ) ) > ( com . orientechnologies . orient . core . sql . OChainedIndexProxy . priorityOfUsage ( bestIndex ) ) ) bestIndex = index ; } return bestIndex ; }
org . junit . Assert . assertSame ( result , expectedResult )
autoCompleteNothing ( ) { java . util . Set < java . lang . String > nodes = new java . util . HashSet ( ) ; nodes . add ( "node1" ) ; java . lang . String query = "matchNothing" ; java . util . List < org . batfish . datamodel . answers . AutocompleteSuggestion > suggestions = org . batfish . datamodel . questions . NodesSpecifier . autoComplete ( query , nodes , null ) ; "<AssertPlaceHolder>" ; } hasSize ( org . hamcrest . Matcher ) { return new org . batfish . datamodel . matchers . RowsMatchersImpl . HasSize ( subMatcher ) ; }
org . junit . Assert . assertThat ( suggestions , org . hamcrest . Matchers . hasSize ( 0 ) )
deseriarlize ( ) { final com . arangodb . velocypack . VPackBuilder builder = new com . arangodb . velocypack . VPackBuilder ( ) . add ( ValueType . OBJECT ) . add ( "foo" , "bar" ) . close ( ) ; final com . arangodb . entity . BaseDocument doc = com . arangodb . util . ArangoSerializationTest . util . deserialize ( builder . slice ( ) , com . arangodb . entity . BaseDocument . class ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { return properties . get ( key ) ; }
org . junit . Assert . assertThat ( doc . getAttribute ( "foo" ) . toString ( ) , org . hamcrest . Matchers . is ( "bar" ) )
testSimple ( ) { java . lang . Object obj = new java . lang . Object ( ) ; org . hudsonci . utils . id . OID oid = org . hudsonci . utils . id . OID . get ( obj ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( ( this ) == ( org . hudsonci . utils . id . OID . NULL ) ) { return null ; } return java . lang . String . format ( "%s@%x" , type , hash ) ; }
org . junit . Assert . assertEquals ( obj . toString ( ) , oid . toString ( ) )
testGetRelatedQueriesSuggestionsEmptyByDefault ( ) { com . liferay . portal . search . web . internal . suggestions . display . context . SuggestionsPortletDisplayContext suggestionsPortletDisplayContext = _displayBuilder . build ( ) ; java . util . List < com . liferay . portal . search . web . internal . suggestions . display . context . SuggestionDisplayContext > suggestionDisplayContexts = suggestionsPortletDisplayContext . getRelatedQueriesSuggestions ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( suggestionDisplayContexts . isEmpty ( ) )
shouldFailToDisconnect ( ) { doThrow ( new javax . jms . JMSException ( "test" ) ) . when ( xaConnection ) . close ( ) ; connectionManager . connect ( ) ; connectionManager . disconnect ( ) ; verify ( xaConnection , times ( 1 ) ) . close ( ) ; "<AssertPlaceHolder>" ; } isConnected ( ) { return ( ( connection ) != null ) && ( ( session ) != null ) ; }
org . junit . Assert . assertFalse ( connectionManager . isConnected ( ) )
testVerify_allowed_host_session ( ) { javax . net . ssl . SSLSession session = mock ( javax . net . ssl . SSLSession . class ) ; when ( wrappedVerifier . verify ( "one" , session ) ) . thenReturn ( false ) ; "<AssertPlaceHolder>" ; verifyNoMoreInteractions ( wrappedVerifier ) ; } verify ( java . lang . String , java . security . cert . X509Certificate ) { if ( allowedHosts . contains ( host ) ) { return ; } else { verifier . verify ( host , cert ) ; } }
org . junit . Assert . assertTrue ( verifier . verify ( "one" , session ) )
testBasicOperation ( ) { org . apache . usergrid . security . KeyPair kp = io . jsonwebtoken . impl . crypto . RsaProvider . generateKeyPair ( 1024 ) ; org . apache . usergrid . security . PublicKey publicKey = kp . getPublic ( ) ; org . apache . usergrid . security . PrivateKey privateKey = kp . getPrivate ( ) ; org . apache . usergrid . security . sso . ApigeeSSO2Provider provider = new org . apache . usergrid . security . MockApigeeSSO2Provider ( ) ; provider . setManagement ( org . apache . usergrid . security . ApigeeSSO2ProviderIT . setup . getMgmtSvc ( ) ) ; provider . setPublicKey ( publicKey ) ; org . apache . usergrid . persistence . entities . User user = createUser ( ) ; long exp = ( java . lang . System . currentTimeMillis ( ) ) + 10000 ; org . apache . usergrid . security . Map < java . lang . String , java . lang . Object > claims = createClaims ( user . getUsername ( ) , user . getEmail ( ) , exp ) ; java . lang . String token = org . apache . usergrid . security . Jwts . builder ( ) . setClaims ( claims ) . signWith ( SignatureAlgorithm . RS256 , privateKey ) . compact ( ) ; org . apache . usergrid . security . tokens . TokenInfo tokenInfo = provider . validateAndReturnTokenInfo ( token , 86400L ) ; "<AssertPlaceHolder>" ; } validateAndReturnTokenInfo ( java . lang . String , long ) { org . apache . usergrid . management . UserInfo userInfo = validateAndReturnUserInfo ( token , ttl ) ; if ( userInfo == null ) { throw new org . apache . usergrid . management . exceptions . ExternalSSOProviderAdminUserNotFoundException ( ( "Unable<sp>to<sp>load<sp>user<sp>from<sp>token:<sp>" + token ) ) ; } return new org . apache . usergrid . security . tokens . TokenInfo ( org . apache . usergrid . utils . UUIDUtils . newTimeUUID ( ) , "access" , 1 , 1 , 1 , ttl , new org . apache . usergrid . security . AuthPrincipalInfo ( org . apache . usergrid . security . AuthPrincipalType . ADMIN_USER , userInfo . getUuid ( ) , org . apache . usergrid . corepersistence . util . CpNamingUtils . MANAGEMENT_APPLICATION_ID ) , null ) ; }
org . junit . Assert . assertNotNull ( tokenInfo )
testAbsoluteURI ( ) { java . io . File tazbm = new java . io . File ( org . geoserver . web . wicket . FileExistsValidatorTest . root , "wcs/BlueMarble.tiff" ) ; org . geoserver . web . StringValidatable validatable = new org . geoserver . web . StringValidatable ( tazbm . toURI ( ) . toString ( ) ) ; org . geoserver . web . wicket . FileExistsValidatorTest . validator . validate ( validatable ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return errorList . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( validatable . isValid ( ) )
testLocalResource ( ) { org . nuxeo . ecm . core . schema . DocumentType dt = sm . getDocumentType ( "MyFolder" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( "MyFolder" , dt . getName ( ) )
testGetSumOfFileSizes ( ) { tableIndexDAO . deleteEntityData ( mockProgressCallback , com . google . common . collect . Lists . newArrayList ( 2L , 3L ) ) ; java . lang . Long parentOneId = 333L ; java . lang . Long parentTwoId = 222L ; org . sagebionetworks . repo . model . table . EntityDTO file1 = createEntityDTO ( 2L , EntityType . file , 2 ) ; file1 . setParentId ( parentOneId ) ; org . sagebionetworks . repo . model . table . EntityDTO file2 = createEntityDTO ( 3L , EntityType . file , 3 ) ; file2 . setParentId ( parentTwoId ) ; tableIndexDAO . addEntityData ( mockProgressCallback , com . google . common . collect . Lists . newArrayList ( file1 , file2 ) ) ; long fileSizes = tableIndexDAO . getSumOfFileSizes ( com . google . common . collect . Lists . newArrayList ( file1 . getId ( ) , file2 . getId ( ) ) ) ; "<AssertPlaceHolder>" ; } getFileSizeBytes ( ) { return this . fileSizeBytes ; }
org . junit . Assert . assertEquals ( ( ( file1 . getFileSizeBytes ( ) ) + ( file2 . getFileSizeBytes ( ) ) ) , fileSizes )
verifySha1IdWithEnv ( ) { final java . util . Map < java . lang . String , java . lang . String > env = com . google . common . collect . ImmutableMap . of ( "FOO" , "BAR" ) ; final java . util . Map < java . lang . String , java . lang . Object > expectedConfig = map ( "command" , java . util . Arrays . asList ( "foo" , "bar" ) , "name" 1 , "foobar:4711" , "name" , "name" 0 , "version" , "17" , "name" 2 , env ) ; final java . lang . String expectedInput = "foozbarz:17:" + ( hex ( com . spotify . helios . common . Json . sha1digest ( expectedConfig ) ) ) ; final java . lang . String expectedDigest = hex ( com . spotify . helios . common . Hash . sha1digest ( expectedInput . getBytes ( com . spotify . helios . common . descriptors . UTF_8 ) ) ) ; final com . spotify . helios . common . descriptors . JobId expectedId = com . spotify . helios . common . descriptors . JobId . fromString ( ( "foozbarz:17:" + expectedDigest ) ) ; final com . spotify . helios . common . descriptors . Job job = com . spotify . helios . common . descriptors . Job . newBuilder ( ) . setCommand ( java . util . Arrays . asList ( "foo" , "bar" ) ) . setImage ( "foobar:4711" ) . setName ( "name" 0 ) . setVersion ( "17" ) . setEnv ( env ) . build ( ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( expectedId , job . getId ( ) )
testAddGetMessageWhenMaxPutNumber ( ) { userMessageList = new java . util . ArrayList < com . xiaomi . infra . galaxy . talos . producer . UserMessage > ( ) ; userMessageList . add ( userMessage1 ) ; userMessageList . add ( userMessage2 ) ; userMessageList . add ( userMessage3 ) ; messageList = new java . util . ArrayList < com . xiaomi . infra . galaxy . talos . thrift . Message > ( ) ; messageList . add ( com . xiaomi . infra . galaxy . talos . producer . PartitionMessageQueueTest . msg ) ; messageList . add ( com . xiaomi . infra . galaxy . talos . producer . PartitionMessageQueueTest . msg ) ; messageList . add ( com . xiaomi . infra . galaxy . talos . producer . PartitionMessageQueueTest . msg ) ; doNothing ( ) . when ( producer ) . increaseBufferedCount ( 3 , ( ( com . xiaomi . infra . galaxy . talos . producer . PartitionMessageQueueTest . msgStr . length ( ) ) * 3 ) ) ; doReturn ( true ) . when ( producer ) . isActive ( ) ; doNothing ( ) . when ( producer ) . decreaseBufferedCount ( 3 , ( ( com . xiaomi . infra . galaxy . talos . producer . PartitionMessageQueueTest . msgStr . length ( ) ) * 3 ) ) ; partitionMessageQueue . addMessage ( userMessageList ) ; "<AssertPlaceHolder>" ; org . mockito . InOrder inOrder = inOrder ( producer ) ; inOrder . verify ( producer , times ( 1 ) ) . increaseBufferedCount ( 3 , ( ( com . xiaomi . infra . galaxy . talos . producer . PartitionMessageQueueTest . msgStr . length ( ) ) * 3 ) ) ; inOrder . verify ( producer ) . isActive ( ) ; inOrder . verify ( producer , times ( 1 ) ) . decreaseBufferedCount ( 3 , ( ( com . xiaomi . infra . galaxy . talos . producer . PartitionMessageQueueTest . msgStr . length ( ) ) * 3 ) ) ; inOrder . verifyNoMoreInteractions ( ) ; } getMessageList ( ) { return messageList ; }
org . junit . Assert . assertEquals ( messageList . size ( ) , partitionMessageQueue . getMessageList ( ) . size ( ) )
testStripSuffixAppendedWithMultipleCharacterValue ( ) { java . lang . String fileName = _fileImpl . appendParentheticalSuffix ( "test.jsp" , "1!$eae1" ) ; "<AssertPlaceHolder>" ; } stripParentheticalSuffix ( java . lang . String ) { return com . liferay . portal . kernel . util . FileUtil . getFile ( ) . stripParentheticalSuffix ( fileName ) ; }
org . junit . Assert . assertEquals ( "test.jsp" , _fileImpl . stripParentheticalSuffix ( fileName ) )
testFileUpload ( ) { java . io . File t = com . ibm . sbt . services . client . connections . files . java . io . File . createTempFile ( com . ibm . sbt . services . client . connections . files . FileServiceTest . TEST_NAME , "txt" ) ; t . deleteOnExit ( ) ; java . io . FileOutputStream s = new java . io . FileOutputStream ( t ) ; s . write ( com . ibm . sbt . services . client . connections . files . FileServiceTest . TEST_CONTENT . getBytes ( ) ) ; s . flush ( ) ; s . close ( ) ; java . io . FileInputStream inputStream = new java . io . FileInputStream ( t ) ; com . ibm . sbt . services . client . connections . files . File entry = fileService . uploadFile ( inputStream , t . getName ( ) , com . ibm . sbt . services . client . connections . files . FileServiceTest . TEST_CONTENT . length ( ) ) ; "<AssertPlaceHolder>" ; fileService . deleteFile ( entry . getFileId ( ) ) ; } getCategory ( ) { return getAsString ( FileEntryXPath . Category ) ; }
org . junit . Assert . assertNotNull ( entry . getCategory ( ) )
sendSignalToIntermediateCatchEventWithoutTenantIdForNonTenant ( ) { testRule . deploy ( org . camunda . bpm . engine . test . api . multitenancy . MultiTenancySignalReceiveTest . SIGNAL_CATCH_PROCESS ) ; engineRule . getRuntimeService ( ) . createProcessInstanceByKey ( "signalCatch" ) . execute ( ) ; engineRule . getRuntimeService ( ) . createSignalEvent ( "signal" ) . send ( ) ; org . camunda . bpm . engine . task . TaskQuery query = engineRule . getTaskService ( ) . createTaskQuery ( ) ; "<AssertPlaceHolder>" ; } count ( ) { this . resultType = org . camunda . bpm . engine . impl . AbstractNativeQuery . ResultType . COUNT ; if ( ( commandExecutor ) != null ) { return ( ( java . lang . Long ) ( commandExecutor . execute ( this ) ) ) ; } return executeCount ( org . camunda . bpm . engine . impl . context . Context . getCommandContext ( ) , getParameterMap ( ) ) ; }
org . junit . Assert . assertThat ( query . count ( ) , org . hamcrest . CoreMatchers . is ( 1L ) )
testMinWithValidRange2 ( ) { org . apache . hadoop . hbase . client . coprocessor . AggregationClient aClient = new org . apache . hadoop . hbase . client . coprocessor . AggregationClient ( org . apache . hadoop . hbase . coprocessor . TestAggregateProtocol . conf ) ; org . apache . hadoop . hbase . client . Scan scan = new org . apache . hadoop . hbase . client . Scan ( ) ; scan . addColumn ( org . apache . hadoop . hbase . coprocessor . TestAggregateProtocol . TEST_FAMILY , org . apache . hadoop . hbase . coprocessor . TestAggregateProtocol . TEST_QUALIFIER ) ; scan . setStartRow ( org . apache . hadoop . hbase . coprocessor . TestAggregateProtocol . ROWS [ 5 ] ) ; scan . setStopRow ( org . apache . hadoop . hbase . coprocessor . TestAggregateProtocol . ROWS [ 15 ] ) ; final org . apache . hadoop . hbase . coprocessor . ColumnInterpreter < java . lang . Long , java . lang . Long > ci = new org . apache . hadoop . hbase . client . coprocessor . LongColumnInterpreter ( ) ; long min = aClient . min ( org . apache . hadoop . hbase . coprocessor . TestAggregateProtocol . TEST_TABLE , ci , scan ) ; "<AssertPlaceHolder>" ; } min ( byte [ ] , org . apache . hadoop . hbase . coprocessor . ColumnInterpreter , org . apache . hadoop . hbase . client . Scan ) { validateParameters ( scan ) ; class MinCallBack implements org . apache . hadoop . hbase . client . coprocessor . Batch . Callback < R > { private R min = null ; public R getMinimum ( ) { return min ; } @ org . apache . hadoop . hbase . client . coprocessor . Override public synchronized void update ( byte [ ] region , byte [ ] row , R result ) { min = ( ( ( min ) == null ) || ( ( result != null ) && ( ( ci . compare ( result , min ) ) < 0 ) ) ) ? result : min ; } } MinCallBack minCallBack = new MinCallBack ( ) ; org . apache . hadoop . hbase . client . HTable table = null ; try { table = new org . apache . hadoop . hbase . client . HTable ( conf , tableName ) ; table . coprocessorExec ( org . apache . hadoop . hbase . coprocessor . AggregateProtocol . class , scan . getStartRow ( ) , scan . getStopRow ( ) , new Batch . Call < org . apache . hadoop . hbase . coprocessor . AggregateProtocol , R > ( ) { @ java . lang . Override public org . apache . hadoop . hbase . client . coprocessor . R call ( org . apache . hadoop . hbase . coprocessor . AggregateProtocol instance ) throws java . io . IOException { return instance . getMin ( ci , scan ) ; } } , minCallBack ) ; } finally { if ( table != null ) { table . close ( ) ; } } org . apache . hadoop . hbase . client . coprocessor . AggregationClient . log . debug ( ( "Min<sp>fom<sp>all<sp>regions<sp>is:<sp>" + ( minCallBack . getMinimum ( ) ) ) ) ; return minCallBack . getMinimum ( ) ; }
org . junit . Assert . assertEquals ( 5 , min )
validateNewTestcaseSituationOutput ( ) { nl . basjes . parse . useragent . debug . UserAgentAnalyzerTester uaa = nl . basjes . parse . useragent . debug . UserAgentAnalyzerTester . newBuilder ( ) . delayInitialization ( ) . hideMatcherLoadStats ( ) . dropTests ( ) . build ( ) ; uaa . setShowMatcherStats ( true ) ; uaa . keepTests ( ) ; uaa . loadResources ( "classpath*:**/CheckNewTestcaseOutput.yaml" ) ; "<AssertPlaceHolder>" ; } runTests ( boolean , boolean ) { return runTests ( showAll , failOnUnexpected , null , false , false ) ; }
org . junit . Assert . assertTrue ( uaa . runTests ( false , true ) )
testUpdateContainerRuleConfigWhenKieScannerStatusIsStarted ( ) { final org . kie . server . controller . impl . service . SpecManagementServiceImpl specManagementService = ( ( org . kie . server . controller . impl . service . SpecManagementServiceImpl ) ( this . specManagementService ) ) ; final org . kie . server . controller . impl . service . RuleConfig ruleConfig = mock ( org . kie . server . controller . impl . service . RuleConfig . class ) ; final org . kie . server . controller . impl . service . ServerTemplate serverTemplate = mock ( org . kie . server . controller . impl . service . ServerTemplate . class ) ; final org . kie . server . controller . impl . service . ContainerSpec containerSpec = mock ( org . kie . server . controller . impl . service . ContainerSpec . class ) ; final java . lang . Long interval = 1L ; final java . util . List < ? > expectedContainers = mock ( java . util . List . class ) ; doReturn ( interval ) . when ( ruleConfig ) . getPollInterval ( ) ; doReturn ( KieScannerStatus . STARTED ) . when ( ruleConfig ) . getScannerStatus ( ) ; doReturn ( expectedContainers ) . when ( kieServerInstanceManager ) . startScanner ( serverTemplate , containerSpec , interval ) ; final java . util . List < org . kie . server . controller . api . model . runtime . Container > actualContainers = specManagementService . updateContainerRuleConfig ( ruleConfig , serverTemplate , containerSpec ) ; "<AssertPlaceHolder>" ; } updateContainerRuleConfig ( org . kie . server . controller . impl . service . RuleConfig , org . kie . server . controller . impl . service . ServerTemplate , org . kie . server . controller . impl . service . ContainerSpec ) { final java . lang . Long interval = ruleConfig . getPollInterval ( ) ; final org . kie . server . api . model . KieScannerStatus status = ruleConfig . getScannerStatus ( ) ; switch ( status ) { case STARTED : return kieServerInstanceManager . startScanner ( serverTemplate , containerSpec , interval ) ; case STOPPED : return kieServerInstanceManager . stopScanner ( serverTemplate , containerSpec ) ; default : return new java . util . ArrayList ( ) ; } }
org . junit . Assert . assertEquals ( expectedContainers , actualContainers )
shouldCalculateCorrectNumberOfCoveredBlocksWhenMultiplesClassesHaveCoverage ( ) { this . testee = new org . pitest . coverage . CoverageResult ( null , 0 , true , java . util . Arrays . asList ( makeCoverage ( "foo" , 42 ) , makeCoverage ( "bar" , 42 ) ) ) ; "<AssertPlaceHolder>" ; } getNumberOfCoveredBlocks ( ) { return this . visitedBlocks . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , this . testee . getNumberOfCoveredBlocks ( ) )
testPronounResolutionTwoSentence ( ) { java . lang . String text = "John<sp>went<sp>to<sp>see<sp>Lucy<sp>at<sp>the<sp>weekend.<sp>That<sp>was<sp>the<sp>first<sp>time<sp>that<sp>he<sp>saw<sp>her<sp>there." ; jCas . setDocumentText ( text ) ; uk . gov . dstl . baleen . types . common . Person john = new uk . gov . dstl . baleen . types . common . Person ( jCas ) ; john . setBegin ( text . indexOf ( "John" ) ) ; john . setEnd ( ( ( john . getBegin ( ) ) + ( "John" . length ( ) ) ) ) ; john . addToIndexes ( ) ; uk . gov . dstl . baleen . types . common . Person lucy = new uk . gov . dstl . baleen . types . common . Person ( jCas ) ; lucy . setBegin ( text . indexOf ( "Lucy" ) ) ; lucy . setEnd ( ( ( lucy . getBegin ( ) ) + ( "Lucy" . length ( ) ) ) ) ; lucy . addToIndexes ( ) ; processJCas ( ) ; processJCasWithSieve ( 10 ) ; java . util . List < uk . gov . dstl . baleen . types . semantic . ReferenceTarget > targets = new java . util . ArrayList ( org . apache . uima . fit . util . JCasUtil . select ( jCas , uk . gov . dstl . baleen . types . semantic . ReferenceTarget . class ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( ( int ) ( flattened ( ) . count ( ) ) ) ; }
org . junit . Assert . assertEquals ( 2 , targets . size ( ) )
testTitle ( ) { org . geotools . data . DataAccessFactory . Param param = new org . geotools . data . DataAccessFactory . Param ( "abc" , java . lang . String . class , new org . geotools . util . SimpleInternationalString ( "the<sp>title" ) , new org . geotools . util . SimpleInternationalString ( "the<sp>description" ) , true , 1 , 1 , null , null ) ; org . geoserver . web . data . store . ParamInfo pi = new org . geoserver . web . data . store . ParamInfo ( param ) ; "<AssertPlaceHolder>" ; } getTitle ( ) { if ( ! ( queryDef . getTitle ( ) . isEmpty ( ) ) ) { return queryDef . getTitle ( ) . get ( 0 ) . getValue ( ) ; } return null ; }
org . junit . Assert . assertEquals ( "the<sp>title" , pi . getTitle ( ) )
extensionsCountIsCorrect ( ) { "<AssertPlaceHolder>" ; } getExtensionsCount ( ) { return ( certificate . getCriticalExtensionOIDs ( ) . size ( ) ) + ( certificate . getNonCriticalExtensionOIDs ( ) . size ( ) ) ; }
org . junit . Assert . assertEquals ( 7 , certificate . getExtensionsCount ( ) )
shouldCountSlidingWindowContents ( ) { java . lang . String queryGetAll = ( ( ( "REGISTER<sp>QUERY<sp>PIPPO<sp>AS<sp>SELECT<sp>(COUNT(*)<sp>AS<sp>?tot)<sp>FROM<sp>STREAM<sp><http://myexample.org/stream><sp>[RANGE<sp>" + ( width ) ) + "s<sp>STEP<sp>" ) + ( slide ) ) + "s]<sp>WHERE<sp>{<sp>?S<sp>?P<sp>?O<sp>}" ; System . out . println ( queryGetAll ) ; engine . registerStream ( streamGenerator ) ; eu . larkc . csparql . core . engine . CsparqlQueryResultProxy c1 = null ; try { c1 = engine . registerQuery ( queryGetAll , false ) ; } catch ( java . text . ParseException e ) { e . printStackTrace ( ) ; } eu . larkc . csparql . utils . Counter formatter = new eu . larkc . csparql . utils . Counter ( ) ; c1 . addObserver ( formatter ) ; streamGenerator . run ( ) ; java . util . List < java . lang . Integer > actual = formatter . getResults ( ) ; "<AssertPlaceHolder>" ; } getResults ( ) { return counts ; }
org . junit . Assert . assertEquals ( expected , actual )
testDimension ( ) { com . pengyifan . commons . math . SparseRealVector v = new com . pengyifan . commons . math . SparseRealVector ( 10 ) ; "<AssertPlaceHolder>" ; } getDimension ( ) { return dimension ; }
org . junit . Assert . assertEquals ( 10 , v . getDimension ( ) )
getContextWithSkipTest ( ) { java . util . List < com . groupon . lex . metrics . timeseries . TimeSeriesCollection > entries = history . getContext ( org . joda . time . Duration . standardMinutes ( 5 ) , ExpressionLookBack . EMPTY , TimeSeriesMetricFilter . ALL_GROUPS ) . map ( Context :: getTSData ) . map ( TimeSeriesCollectionPair :: getCurrentCollection ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } get ( int ) { if ( ( n < 0 ) || ( n >= ( size ( ) ) ) ) throw new java . util . NoSuchElementException ( ( ( ( ( "index<sp>" + n ) + "<sp>out<sp>of<sp>bounds<sp>[0.." ) + ( size ( ) ) ) + ")" ) ) ; return ( begin ) + n ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( data . get ( 0 ) , data . get ( 5 ) , data . get ( 10 ) ) , entries )
testComparatorReduceCommonStartButLastLineNoEol ( ) { org . eclipse . jgit . diff . RawText a ; org . eclipse . jgit . diff . RawText b ; org . eclipse . jgit . diff . Edit e ; a = new org . eclipse . jgit . diff . RawText ( "start" . getBytes ( "UTF-8" ) ) ; b = new org . eclipse . jgit . diff . RawText ( "start<sp>of<sp>line" . getBytes ( "UTF-8" ) ) ; e = new org . eclipse . jgit . diff . Edit ( 0 , 1 , 0 , 1 ) ; e = RawTextComparator . DEFAULT . reduceCommonStartEnd ( a , b , e ) ; "<AssertPlaceHolder>" ; } reduceCommonStartEnd ( org . eclipse . jgit . diff . RawText , org . eclipse . jgit . diff . RawText , org . eclipse . jgit . diff . Edit ) { if ( ( ( e . beginA ) == ( e . endA ) ) || ( ( e . beginB ) == ( e . endB ) ) ) return e ; byte [ ] aRaw = a . content ; byte [ ] bRaw = b . content ; int aPtr = a . lines . get ( ( ( e . beginA ) + 1 ) ) ; int bPtr = a . lines . get ( ( ( e . beginB ) + 1 ) ) ; int aEnd = a . lines . get ( ( ( e . endA ) + 1 ) ) ; int bEnd = b . lines . get ( ( ( e . endB ) + 1 ) ) ; if ( ( ( ( aPtr < 0 ) || ( bPtr < 0 ) ) || ( aEnd > ( aRaw . length ) ) ) || ( bEnd > ( bRaw . length ) ) ) throw new java . lang . ArrayIndexOutOfBoundsException ( ) ; while ( ( ( aPtr < aEnd ) && ( bPtr < bEnd ) ) && ( ( aRaw [ aPtr ] ) == ( bRaw [ bPtr ] ) ) ) { aPtr ++ ; bPtr ++ ; } while ( ( ( aPtr < aEnd ) && ( bPtr < bEnd ) ) && ( ( aRaw [ ( aEnd - 1 ) ] ) == ( bRaw [ ( bEnd - 1 ) ] ) ) ) { aEnd -- ; bEnd -- ; } e . beginA = org . eclipse . jgit . diff . RawTextComparator . findForwardLine ( a . lines , e . beginA , aPtr ) ; e . beginB = org . eclipse . jgit . diff . RawTextComparator . findForwardLine ( b . lines , e . beginB , bPtr ) ; e . endA = org . eclipse . jgit . diff . RawTextComparator . findReverseLine ( a . lines , e . endA , aEnd ) ; final boolean partialA = aEnd < ( a . lines . get ( ( ( e . endA ) + 1 ) ) ) ; if ( partialA ) bEnd += ( a . lines . get ( ( ( e . endA ) + 1 ) ) ) - aEnd ; e . endB = org . eclipse . jgit . diff . RawTextComparator . findReverseLine ( b . lines , e . endB , bEnd ) ; if ( ( ! partialA ) && ( bEnd < ( b . lines . get ( ( ( e . endB ) + 1 ) ) ) ) ) ( e . endA ) ++ ; return super . reduceCommonStartEnd ( a , b , e ) ; }
org . junit . Assert . assertEquals ( new org . eclipse . jgit . diff . Edit ( 0 , 1 , 0 , 1 ) , e )
shouldInterruptWhile ( ) { final javax . script . ScriptEngine engine = new org . apache . tinkerpop . gremlin . groovy . jsr223 . GremlinGroovyScriptEngine ( new org . apache . tinkerpop . gremlin . groovy . jsr223 . ThreadInterruptGroovyCustomizer ( ) ) ; final java . util . concurrent . atomic . AtomicBoolean asserted = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; final java . lang . Thread t = new java . lang . Thread ( ( ) -> { try { engine . eval ( "s<sp>=<sp>System.currentTimeMillis();\nwhile((System.currentTimeMillis()<sp>-<sp>s)<sp><<sp>10000)<sp>{}" ) ; } catch ( se ) { asserted . set ( ( ( org . apache . tinkerpop . gremlin . groovy . jsr223 . se . getCause ( ) . getCause ( ) ) instanceof java . lang . InterruptedException ) ) ; } } ) ; t . start ( ) ; java . lang . Thread . sleep ( 100 ) ; t . interrupt ( ) ; while ( t . isAlive ( ) ) { } "<AssertPlaceHolder>" ; } get ( ) { return this . t ; }
org . junit . Assert . assertTrue ( asserted . get ( ) )
synchronizePropery_alwaysMode ( ) { com . vaadin . flow . dom . DomListenerRegistration registration = ns . add ( "foo" , com . vaadin . flow . internal . nodefeature . ElementListenersTest . noOp ) . setDisabledUpdateMode ( DisabledUpdateMode . ALWAYS ) ; registration . synchronizeProperty ( "name" ) ; "<AssertPlaceHolder>" ; } getPropertySynchronizationMode ( java . lang . String ) { assert propertyName != null ; if ( ( listeners ) == null ) { return null ; } return listeners . values ( ) . stream ( ) . flatMap ( List :: stream ) . filter ( ( wrapper ) -> wrapper . isPropertySynchronized ( propertyName ) ) . map ( ( wrapper ) -> wrapper . mode ) . reduce ( DisabledUpdateMode :: mostPermissive ) . orElse ( null ) ; }
org . junit . Assert . assertSame ( DisabledUpdateMode . ALWAYS , ns . getPropertySynchronizationMode ( "name" ) )
getIndexIdsShouldIncludeIdsLessThan2ToThe32 ( ) { int maxIndex = ( ( int ) ( 1L << 31 ) ) - 1 ; array . put ( maxIndex , array , "a" ) ; "<AssertPlaceHolder>" ; } getIndexIds ( ) { java . lang . Object [ ] ids = getIds ( ) ; java . util . List < java . lang . Integer > indices = new java . util . ArrayList < java . lang . Integer > ( ids . length ) ; for ( java . lang . Object id : ids ) { int int32Id = org . mozilla . javascript . ScriptRuntime . toInt32 ( id ) ; if ( ( int32Id >= 0 ) && ( org . mozilla . javascript . ScriptRuntime . toString ( int32Id ) . equals ( org . mozilla . javascript . ScriptRuntime . toString ( id ) ) ) ) { indices . add ( int32Id ) ; } } return indices . toArray ( new java . lang . Integer [ indices . size ( ) ] ) ; }
org . junit . Assert . assertThat ( array . getIndexIds ( ) , org . hamcrest . core . Is . is ( new java . lang . Integer [ ] { maxIndex } ) )
getCurrency_EmptyIsoCode ( ) { org . oscm . internal . vo . VOPriceModel priceModel = new org . oscm . internal . vo . VOPriceModel ( ) ; "<AssertPlaceHolder>" ; } getCurrency ( ) { return vo . getCurrency ( ) ; }
org . junit . Assert . assertEquals ( "" , priceModel . getCurrency ( ) )
testRewritePomUnmappedProfile ( ) { java . util . List < org . apache . maven . project . MavenProject > reactorProjects = createReactorProjects ( "internal-snapshot-profile" ) ; org . apache . maven . shared . release . config . ReleaseDescriptorBuilder builder = createUnmappedConfiguration ( reactorProjects , "internal-snapshot-profile" ) ; try { phase . execute ( org . apache . maven . shared . release . config . ReleaseUtils . buildReleaseDescriptor ( builder ) , new org . apache . maven . shared . release . env . DefaultReleaseEnvironment ( ) , reactorProjects ) ; org . junit . Assert . fail ( "Should<sp>have<sp>thrown<sp>an<sp>exception" ) ; } catch ( org . apache . maven . shared . release . ReleaseFailureException e ) { "<AssertPlaceHolder>" ; } } buildReleaseDescriptor ( org . apache . maven . shared . release . config . ReleaseDescriptorBuilder ) { return builder . build ( ) ; }
org . junit . Assert . assertTrue ( true )
setAdminPasswordAsSysAdmin ( ) { java . lang . String username = clientSetup . getUsername ( ) ; java . lang . String password = clientSetup . getPassword ( ) ; org . apache . usergrid . rest . management . Map < java . lang . String , java . lang . Object > passwordPayload = new org . apache . usergrid . rest . management . HashMap < java . lang . String , java . lang . Object > ( ) ; passwordPayload . put ( "newpassword" , "testPassword" ) ; management . token ( ) . setToken ( clientSetup . getSuperuserToken ( ) ) ; management . users ( ) . user ( username ) . password ( ) . post ( passwordPayload ) ; this . waitForQueueDrainAndRefreshIndex ( ) ; "<AssertPlaceHolder>" ; try { management . token ( ) . post ( false , org . apache . usergrid . rest . management . Token . class , new org . apache . usergrid . rest . management . Token ( username , password ) , null ) ; org . junit . Assert . fail ( "We<sp>shouldn't<sp>be<sp>able<sp>to<sp>get<sp>a<sp>token<sp>using<sp>the<sp>old<sp>password" ) ; } catch ( javax . ws . rs . ClientErrorException uie ) { errorParse ( 400 , "invalid_grant" , uie ) ; } } token ( ) { org . apache . usergrid . rest . management . Token myToken = management . token ( ) . get ( new org . apache . usergrid . rest . management . QueryParameters ( ) . addParam ( "grant_type" , "password" ) . addParam ( "username" , clientSetup . getEmail ( ) ) . addParam ( "password" , clientSetup . getPassword ( ) ) ) ; java . lang . String token = myToken . getAccessToken ( ) ; org . junit . Assert . assertNotNull ( token ) ; org . apache . usergrid . rest . management . Organization payload = new org . apache . usergrid . rest . management . Organization ( ) ; org . apache . usergrid . rest . management . Map < java . lang . String , java . lang . Object > properties = new org . apache . usergrid . rest . management . HashMap < java . lang . String , java . lang . Object > ( ) ; properties . put ( "securityLevel" , 5 ) ; payload . put ( OrganizationsResource . ORGANIZATION_PROPERTIES , properties ) ; management . orgs ( ) . org ( clientSetup . getOrganizationName ( ) ) . put ( payload ) ; java . lang . String obj = management . token ( ) . get ( java . lang . String . class , new org . apache . usergrid . rest . management . QueryParameters ( ) . addParam ( "access_token" , token ) ) ; org . junit . Assert . assertTrue ( ( ( obj . indexOf ( "securityLevel" ) ) > 0 ) ) ; }
org . junit . Assert . assertNotNull ( management . token ( ) . post ( false , org . apache . usergrid . rest . management . Token . class , new org . apache . usergrid . rest . management . Token ( username , "testPassword" ) , null ) )
testReadAllWithSmallSize ( ) { for ( int i = 10 ; i <= 10000 ; i *= 10 ) { byte [ ] input = randomBytes ( i ) ; byte [ ] output = edu . umd . cs . findbugs . io . IO . readAll ( new java . io . ByteArrayInputStream ( input ) , ( i - 9 ) ) ; "<AssertPlaceHolder>" ; } } readAll ( java . io . InputStream , int ) { try { if ( size == 0 ) { throw new java . lang . IllegalArgumentException ( ) ; } byte [ ] result = new byte [ size ] ; int pos = 0 ; while ( true ) { int sz ; while ( ( sz = in . read ( result , pos , ( size - pos ) ) ) > 0 ) { pos += sz ; } if ( pos < size ) { return edu . umd . cs . findbugs . io . IO . copyOf ( result , pos ) ; } int nextByte = in . read ( ) ; if ( nextByte == ( - 1 ) ) { return result ; } size = ( size * 2 ) + 500 ; result = edu . umd . cs . findbugs . io . IO . copyOf ( result , size ) ; result [ ( pos ++ ) ] = ( ( byte ) ( nextByte ) ) ; } } finally { edu . umd . cs . findbugs . io . IO . close ( in ) ; } }
org . junit . Assert . assertArrayEquals ( input , output )
testPi ( ) { "<AssertPlaceHolder>" ; } pi ( ) { return com . couchbase . client . java . query . dsl . Expression . x ( "PI()" ) ; }
org . junit . Assert . assertEquals ( "PI()" , pi ( ) . toString ( ) )
testFeedForwardWithKey ( ) { org . deeplearning4j . nn . conf . MultiLayerConfiguration conf = new org . deeplearning4j . nn . conf . NeuralNetConfiguration . Builder ( ) . weightInit ( WeightInit . XAVIER ) . list ( ) . layer ( 0 , new org . deeplearning4j . spark . impl . multilayer . DenseLayer . Builder ( ) . nIn ( 4 ) . nOut ( 3 ) . build ( ) ) . layer ( 1 , new org . deeplearning4j . spark . impl . multilayer . OutputLayer . Builder ( LossFunctions . LossFunction . MCXENT ) . nIn ( 3 ) . nOut ( 3 ) . activation ( Activation . SOFTMAX ) . build ( ) ) . build ( ) ; org . deeplearning4j . nn . multilayer . MultiLayerNetwork net = new org . deeplearning4j . nn . multilayer . MultiLayerNetwork ( conf ) ; net . init ( ) ; org . nd4j . linalg . dataset . api . iterator . DataSetIterator iter = new org . deeplearning4j . datasets . iterator . impl . IrisDataSetIterator ( 150 , 150 ) ; org . nd4j . linalg . dataset . api . DataSet ds = iter . next ( ) ; org . deeplearning4j . spark . impl . multilayer . List < org . nd4j . linalg . api . ndarray . INDArray > expected = new org . deeplearning4j . spark . impl . multilayer . ArrayList ( ) ; org . deeplearning4j . spark . impl . multilayer . List < scala . Tuple2 < java . lang . Integer , org . nd4j . linalg . api . ndarray . INDArray > > mapFeatures = new org . deeplearning4j . spark . impl . multilayer . ArrayList ( ) ; int count = 0 ; int arrayCount = 0 ; org . deeplearning4j . spark . impl . multilayer . Random r = new org . deeplearning4j . spark . impl . multilayer . Random ( 12345 ) ; while ( count < 150 ) { int exampleCount = ( r . nextInt ( 5 ) ) + 1 ; if ( ( count + exampleCount ) > 150 ) exampleCount = 150 - count ; org . nd4j . linalg . api . ndarray . INDArray subset = ds . getFeatures ( ) . get ( org . nd4j . linalg . indexing . NDArrayIndex . interval ( count , ( count + exampleCount ) ) , org . nd4j . linalg . indexing . NDArrayIndex . all ( ) ) ; expected . add ( net . output ( subset , false ) ) ; mapFeatures . add ( new scala . Tuple2 ( arrayCount , subset ) ) ; arrayCount ++ ; count += exampleCount ; } org . apache . spark . api . java . JavaPairRDD < java . lang . Integer , org . nd4j . linalg . api . ndarray . INDArray > rdd = sc . parallelizePairs ( mapFeatures ) ; org . deeplearning4j . spark . impl . multilayer . SparkDl4jMultiLayer multiLayer = new org . deeplearning4j . spark . impl . multilayer . SparkDl4jMultiLayer ( sc , net , null ) ; org . deeplearning4j . spark . impl . multilayer . Map < java . lang . Integer , org . nd4j . linalg . api . ndarray . INDArray > map = multiLayer . feedForwardWithKey ( rdd , 16 ) . collectAsMap ( ) ; for ( int i = 0 ; i < ( expected . size ( ) ) ; i ++ ) { org . nd4j . linalg . api . ndarray . INDArray exp = expected . get ( i ) ; org . nd4j . linalg . api . ndarray . INDArray act = map . get ( i ) ; "<AssertPlaceHolder>" ; } } get ( int ) { return objects . get ( i ) ; }
org . junit . Assert . assertEquals ( exp , act )
testMatch06 ( ) { boolean matchResult = resultNamePatternMatcher . matchesEndToEnd ( "69A" ) ; "<AssertPlaceHolder>" ; } matchesEndToEnd ( java . lang . String ) { return pattern . matcher ( input ) . matches ( ) ; }
org . junit . Assert . assertTrue ( matchResult )
test ( ) { try ( java . io . InputStream is = part . getInputStream ( ) ) { byte [ ] content = org . apache . commons . io . IOUtils . toByteArray ( is ) ; "<AssertPlaceHolder>" ; } } getInputStream ( ) { return part . getInputStream ( ) ; }
org . junit . Assert . assertArrayEquals ( bytes , content )
test3 ( ) { symbolic_examples . symbolic_example_7 . NopolExample ex = new symbolic_examples . symbolic_example_7 . NopolExample ( ) ; "<AssertPlaceHolder>" ; } isPrime ( int ) { if ( a < 0 ) { return false ; } int intermediaire = a % 2 ; if ( intermediaire == 0 ) return false ; int sqrtMiddle = ( ( int ) ( ( java . lang . Math . sqrt ( a ) ) / 2 ) ) ; for ( int i = 3 ; i <= sqrtMiddle ; i += 2 ) { int tmp = a % i ; if ( tmp == 0 ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( ex . isPrime ( 5 ) )
test9 ( ) { System . out . print ( "-991231.2123123123123123122349872e123" 0 ) ; final java . lang . Object [ ] objects = new java . lang . Object [ 8 ] ; objects [ 0 ] = new java . util . Date ( ) ; objects [ 1 ] = new java . util . TreeMap ( ) ; objects [ 2 ] = new java . math . BigInteger ( "39852357023498572034958723495872349582305" ) ; objects [ 3 ] = new java . math . BigInteger ( "-39852357023498572034958723495872349582305" ) ; objects [ 4 ] = new java . math . BigDecimal ( "-991231.2123123123123123122349872e123" ) ; objects [ 5 ] = new java . math . BigInteger [ ] { new java . math . BigInteger ( "-39852357023498572034958723495872349582305" ) , new java . math . BigInteger ( "3498572034958723495872349582305" ) , new java . math . BigInteger ( "-991231.2123123123123123122349872e123" 1 ) , new java . math . BigInteger ( "44" ) } ; objects [ 6 ] = new java . math . BigDecimal [ ] { new java . math . BigDecimal ( "3.14159265" ) , new java . math . BigDecimal ( "0" ) , new java . math . BigDecimal ( "-9999999999999999999999999999999999.999999e999" ) } ; objects [ 7 ] = "The<sp>End" ; final com . persistit . Value value = new com . persistit . Value ( _persistit ) ; value . put ( objects ) ; final java . lang . Object objects2 = value . get ( ) ; "<AssertPlaceHolder>" ; System . out . println ( "-<sp>done" ) ; } equals ( java . lang . StringBuilder , java . lang . StringBuilder ) { final int size = sb1 . length ( ) ; if ( size != ( sb2 . length ( ) ) ) { return false ; } for ( int i = 0 ; i < size ; i ++ ) { if ( ( sb1 . charAt ( i ) ) != ( sb2 . charAt ( i ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( equals ( objects2 , objects ) )
testPrepareInputsNoFiles ( ) { java . util . Map < java . lang . String , java . io . Serializable > rawInputs = new java . util . HashMap ( ) ; rawInputs . put ( "myVariable" , 1 ) ; java . util . Map < java . lang . String , java . io . Serializable > inputs = bonitaApiUtil . prepareInputs ( processDefinition , rawInputs ) ; "<AssertPlaceHolder>" ; } size ( ) { return results . size ( ) ; }
org . junit . Assert . assertEquals ( rawInputs . size ( ) , inputs . size ( ) )
testSynchronizeWithExceptionInUnlock ( ) { java . util . concurrent . locks . Lock [ ] locks = new java . util . concurrent . locks . Lock [ 10 ] ; for ( int i = 0 ; i < ( locks . length ) ; i ++ ) locks [ i ] = mock ( java . util . concurrent . locks . Lock . class ) ; java . lang . RuntimeException ex = new java . lang . RuntimeException ( ) ; doThrow ( ex ) . when ( locks [ 5 ] ) . unlock ( ) ; try { org . apache . ignite . ml . inference . storage . model . DefaultModelStorage . synchronize ( ( ) -> { } , locks ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } for ( java . util . concurrent . locks . Lock lock : locks ) { verify ( lock , times ( 1 ) ) . lock ( ) ; verify ( lock , times ( 1 ) ) . unlock ( ) ; verifyNoMoreInteractions ( lock ) ; } } fail ( ) { throw new org . apache . ignite . internal . processors . query . IgniteSQLException ( "SQL<sp>function<sp>fail<sp>for<sp>test<sp>purpuses" ) ; }
org . junit . Assert . assertEquals ( ex , e )
test_fixed_stream2 ( ) { java . math . BigDecimal testValue = new java . math . BigDecimal ( "471.1" ) ; org . omg . CORBA . Any any = setup . getClientOrb ( ) . create_any ( ) ; any . type ( setup . getClientOrb ( ) . create_fixed_tc ( ( ( short ) ( 4 ) ) , ( ( short ) ( 1 ) ) ) ) ; ( ( org . jacorb . orb . CDROutputStream ) ( any . create_output_stream ( ) ) ) . write_fixed ( testValue , ( ( short ) ( 4 ) ) , ( ( short ) ( 1 ) ) ) ; "<AssertPlaceHolder>" ; } extract_fixed ( ) { checkExtract ( TCKind . _tk_fixed , "Cannot<sp>extract<sp>fixed" ) ; checkNull ( ) ; if ( ( value ) instanceof java . math . BigDecimal ) { return ( ( java . math . BigDecimal ) ( value ) ) ; } else if ( ( value ) instanceof org . omg . CORBA . FixedHolder ) { return ( ( org . omg . CORBA . FixedHolder ) ( value ) ) . value ; } else if ( ( value ) instanceof org . jacorb . orb . CDROutputStream ) { final org . jacorb . orb . CDRInputStream inputStream = ( ( org . jacorb . orb . CDRInputStream ) ( create_input_stream ( ) ) ) ; try { return inputStream . read_fixed ( typeCode . fixed_digits ( ) , typeCode . fixed_scale ( ) ) ; } catch ( org . omg . CORBA . TypeCodePackage . BadKind e ) { throw new org . omg . CORBA . INTERNAL ( "should<sp>not<sp>happen" ) ; } finally { inputStream . close ( ) ; } } else { throw new org . omg . CORBA . INTERNAL ( ( "Encountered<sp>unexpected<sp>type<sp>of<sp>value:<sp>" + ( value . getClass ( ) ) ) ) ; } }
org . junit . Assert . assertEquals ( testValue , any . extract_fixed ( ) )
checkTime5 ( ) { com . alibaba . fastjson . parser . JSONScanner objectUnderTest = ( ( com . alibaba . fastjson . parser . JSONScanner ) ( com . diffblue . deeptestutils . Reflector . getInstance ( "com.alibaba.fastjson.parser.JSONScanner" ) ) ) ; objectUnderTest . hasSpecial = false ; objectUnderTest . token = 0 ; objectUnderTest . locale = null ; objectUnderTest . np = 0 ; objectUnderTest . features = 0 ; com . diffblue . deeptestutils . Reflector . setField ( objectUnderTest , "text" , "" ) ; objectUnderTest . calendar = null ; objectUnderTest . matchStat = 0 ; objectUnderTest . bp = 0 ; com . diffblue . deeptestutils . Reflector . setField ( objectUnderTest , "len" , 0 ) ; objectUnderTest . stringDefaultValue = "" ; objectUnderTest . pos = 0 ; objectUnderTest . sp = 0 ; objectUnderTest . sbuf = null ; objectUnderTest . ch = '
org . junit . Assert . assertEquals ( false , retval )
lastSeenIsUpdated ( ) { org . pdfsam . module . ModuleUsage victim = org . pdfsam . module . ModuleUsage . fistUsage ( "ChuckNorris" ) . inc ( ) ; long lastSeen = victim . getLastSeen ( ) ; java . lang . Thread . sleep ( 100 ) ; "<AssertPlaceHolder>" ; } inc ( ) { ( this . totalUsed ) ++ ; setLastSeen ( java . lang . System . currentTimeMillis ( ) ) ; return this ; }
org . junit . Assert . assertTrue ( ( ( victim . inc ( ) . getLastSeen ( ) ) > lastSeen ) )
testFlattenedNullifyNullifyDeleteRules ( ) { org . apache . cayenne . testdo . inheritance_flat . User user = context . newObject ( org . apache . cayenne . testdo . inheritance_flat . User . class ) ; user . setName ( "test_user" ) ; org . apache . cayenne . testdo . inheritance_flat . Group group = context . newObject ( org . apache . cayenne . testdo . inheritance_flat . Group . class ) ; group . setName ( "test_group" ) ; group . addToGroupMembers ( user ) ; context . commitChanges ( ) ; context . deleteObjects ( user ) ; "<AssertPlaceHolder>" ; context . commitChanges ( ) ; context . deleteObjects ( group ) ; context . commitChanges ( ) ; } getGroupMembers ( ) { return ( ( java . util . List < org . apache . cayenne . testdo . inheritance_flat . Role > ) ( readProperty ( "groupMembers" ) ) ) ; }
org . junit . Assert . assertTrue ( group . getGroupMembers ( ) . isEmpty ( ) )
testGetGlobalVariables_1005_58 ( ) { byte [ ] bytes = encoder . encodeVariableCounters ( 1005 , 58 ) ; byte [ ] expected = new byte [ ] { ( ( byte ) ( 237 ) ) , ( ( byte ) ( 235 ) ) } ; "<AssertPlaceHolder>" ; } encodeVariableCounters ( int , int ) { byte [ ] bytes = new byte [ 2 ] ; bytes [ 0 ] = ( ( byte ) ( globalVariables & 255 ) ) ; bytes [ 1 ] = ( ( byte ) ( ( ( globalVariables & 768 ) > > 8 ) | ( ( localVariables & 63 ) << 2 ) ) ) ; return bytes ; }
org . junit . Assert . assertArrayEquals ( expected , bytes )
checkTheAnnotatedInterfaceMustExtendSubsystem ( ) { java . util . HashMap < java . lang . String , java . lang . Class > scanResult = subsystemDiscovery . discoverSubsystems ( asList ( "org.chorusbdd.chorus.subsystem.badmockdoesnotextendsubsystem" ) , chorusLog ) ; verify ( chorusLog ) . warn ( "The<sp>interface<sp>annotated<sp>with<sp>SubsystemConfig<sp>must<sp>extends<sp>the<sp>interface<sp>Subsystem,<sp>[org.chorusbdd.chorus.subsystem.badmockdoesnotextendsubsystem.BadMockSubsystem]<sp>will<sp>not<sp>be<sp>initialized" ) ; "<AssertPlaceHolder>" ; } size ( ) { return state . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , scanResult . size ( ) )
testChangedMembersGroup ( ) { java . util . Set < java . lang . String > members1 = new java . util . HashSet < java . lang . String > ( ) ; java . util . Set < java . lang . String > members2 = new java . util . HashSet < java . lang . String > ( ) ; java . lang . String situation = "@work" ; members1 . add ( "user1" ) ; members1 . add ( "user2" ) ; members1 . add ( "user3" ) ; members1 . add ( "user4" ) ; members1 . add ( "user5" ) ; members1 . add ( "user6" ) ; members1 . add ( "user7" ) ; members2 . add ( "user1" ) ; members2 . add ( "user2" ) ; members2 . add ( "user4" ) ; members2 . add ( "user5" ) ; members2 . add ( "user6" ) ; members2 . add ( "user7" ) ; members2 . add ( "user8" ) ; eu . dime . ps . controllers . context . raw . data . ContextGroup oldGroup = new eu . dime . ps . controllers . context . raw . data . ContextGroup ( members1 , situation ) ; eu . dime . ps . controllers . context . raw . data . ContextGroup newGroup = new eu . dime . ps . controllers . context . raw . data . ContextGroup ( members2 , situation ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( o instanceof eu . dime . ps . controllers . placeprocessor . PlaceKey ) { eu . dime . ps . controllers . placeprocessor . PlaceKey p = ( ( eu . dime . ps . controllers . placeprocessor . PlaceKey ) ( o ) ) ; return ( p . guid . equalsIgnoreCase ( this . guid ) ) && ( ( p . tenant . doubleValue ( ) ) == ( this . tenant . doubleValue ( ) ) ) ; } else return false ; }
org . junit . Assert . assertTrue ( newGroup . equals ( oldGroup ) )
createTimerWithPeriod_discountEndCheckTimerCreated ( ) { tm . createTimerWithPeriod ( tss , TimerType . DISCOUNT_END_CHECK , 0L , Period . DAY ) ; "<AssertPlaceHolder>" ; } getTimers ( ) { return java . util . Collections . emptyList ( ) ; }
org . junit . Assert . assertEquals ( 1 , tss . getTimers ( ) . size ( ) )