input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
shouldReturnTrueWhenGivenAValidMinimalLoadBalancer ( ) { org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( lb , org . openstack . atlas . api . validation . validators . POST ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultList . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( result . passedValidation ( ) )
sideOperation ( ) { when ( tupleMock . getValueByField ( "pass" ) ) . thenReturn ( 9 ) ; eu . icolumbo . breeze . SpringBolt subject = new eu . icolumbo . breeze . SpringBolt ( eu . icolumbo . breeze . TestBean . class , "nop()" ) ; subject . setPassThroughFields ( "pass" ) ; subject . setDoAnchor ( false ) ; run ( subject ) ; verify ( outputFieldsDeclarerMock ) . declareStream ( eq ( "default" ) , outputFieldsCaptor . capture ( ) ) ; "<AssertPlaceHolder>" ; org . mockito . InOrder order = inOrder ( outputCollectorMock ) ; order . verify ( outputCollectorMock ) . emit ( "default" , asList ( ( ( java . lang . Object ) ( 9 ) ) ) ) ; order . verify ( outputCollectorMock ) . ack ( tupleMock ) ; order . verifyNoMoreInteractions ( ) ; } run ( eu . icolumbo . breeze . SpringBolt ) { subject . setApplicationContext ( applicationContextMock ) ; subject . prepare ( stormConf , topologyContextMock , outputCollectorMock ) ; subject . declareOutputFields ( outputFieldsDeclarerMock ) ; subject . execute ( tupleMock ) ; }
org . junit . Assert . assertEquals ( asList ( "pass" ) , outputFieldsCaptor . getValue ( ) . toList ( ) )
removeUserVerifierByIdTest ( ) { org . kaaproject . kaa . common . dto . user . UserVerifierDto verifierDto = generateUserVerifierDto ( null , null ) ; verifierService . removeUserVerifierById ( verifierDto . getId ( ) ) ; org . kaaproject . kaa . common . dto . user . UserVerifierDto found = verifierService . findUserVerifierById ( verifierDto . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertNull ( found )
flatten ( ) { io . divide . dao . TestObject1 to1 = io . divide . dao . DAOTest . testObject1 ; io . divide . dao . orientdb . ODocumentWrapper wrapper = new io . divide . dao . orientdb . ODocumentWrapper ( to1 ) ; io . divide . dao . TestObject1 to2 = wrapper . toObject ( io . divide . dao . TestObject1 . class ) ; "<AssertPlaceHolder>" ; } toObject ( java . lang . Class ) { try { java . lang . reflect . Constructor < B > constructor ; constructor = type . getDeclaredConstructor ( ) ; constructor . setAccessible ( true ) ; B b = constructor . newInstance ( ) ; io . divide . client . cache . Map user_data = ( ( io . divide . client . cache . Map ) ( io . divide . shared . util . ReflectionUtils . getObjectField ( b , TransientObject . USER_DATA ) ) ) ; io . divide . client . cache . Map meta_data = ( ( io . divide . client . cache . Map ) ( io . divide . shared . util . ReflectionUtils . getObjectField ( b , TransientObject . META_DATA ) ) ) ; user_data . clear ( ) ; meta_data . clear ( ) ; recursiveLoad ( "user_data" , user_data ) ; recursiveLoad ( "meta_data" , meta_data ) ; return b ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; return null ; } }
org . junit . Assert . assertEquals ( to1 , to2 )
testGet ( ) { com . google . cloud . resourcemanager . testing . LocalResourceManagerHelperTest . rpc . create ( com . google . cloud . resourcemanager . testing . LocalResourceManagerHelperTest . COMPLETE_PROJECT ) ; com . google . api . services . cloudresourcemanager . model . Project returnedProject = com . google . cloud . resourcemanager . testing . LocalResourceManagerHelperTest . rpc . get ( com . google . cloud . resourcemanager . testing . LocalResourceManagerHelperTest . COMPLETE_PROJECT . getProjectId ( ) , com . google . cloud . resourcemanager . testing . LocalResourceManagerHelperTest . EMPTY_RPC_OPTIONS ) ; compareReadWriteFields ( com . google . cloud . resourcemanager . testing . LocalResourceManagerHelperTest . COMPLETE_PROJECT , returnedProject ) ; com . google . cloud . resourcemanager . testing . LocalResourceManagerHelperTest . RESOURCE_MANAGER_HELPER . removeProject ( com . google . cloud . resourcemanager . testing . LocalResourceManagerHelperTest . COMPLETE_PROJECT . getProjectId ( ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String , java . lang . String [ ] ) { com . google . api . services . cloudresourcemanager . model . Project project = projects . get ( projectId ) ; if ( project != null ) { try { return new com . google . cloud . resourcemanager . testing . LocalResourceManagerHelper . Response ( HTTP_OK , com . google . cloud . resourcemanager . testing . LocalResourceManagerHelper . jsonFactory . toString ( com . google . cloud . resourcemanager . testing . LocalResourceManagerHelper . extractFields ( project , fields ) ) ) ; } catch ( java . io . IOException e ) { return com . google . cloud . resourcemanager . testing . LocalResourceManagerHelper . Error . INTERNAL_ERROR . response ( ( "Error<sp>when<sp>serializing<sp>project<sp>" + ( project . getProjectId ( ) ) ) ) ; } } else { return com . google . cloud . resourcemanager . testing . LocalResourceManagerHelper . Error . PERMISSION_DENIED . response ( ( ( "Project<sp>" + projectId ) + "<sp>not<sp>found." ) ) ; } }
org . junit . Assert . assertNull ( com . google . cloud . resourcemanager . testing . LocalResourceManagerHelperTest . rpc . get ( com . google . cloud . resourcemanager . testing . LocalResourceManagerHelperTest . COMPLETE_PROJECT . getProjectId ( ) , com . google . cloud . resourcemanager . testing . LocalResourceManagerHelperTest . EMPTY_RPC_OPTIONS ) )
deserializersTestsTraversalMetrics ( ) { final org . apache . tinkerpop . gremlin . tinkergraph . structure . TinkerGraph tg = org . apache . tinkerpop . gremlin . tinkergraph . structure . TinkerFactory . createModern ( ) ; final org . apache . tinkerpop . gremlin . structure . io . GraphWriter writer = getWriter ( defaultMapperV2d0 ) ; final org . apache . tinkerpop . gremlin . structure . io . GraphReader reader = getReader ( defaultMapperV2d0 ) ; final org . apache . tinkerpop . gremlin . process . traversal . util . TraversalMetrics tm = tg . traversal ( ) . V ( 1 ) . as ( "a" ) . has ( "name" ) . as ( "b" ) . out ( "knows" ) . out ( "created" ) . as ( "c" ) . has ( "name" , "ripple" ) . values ( "name" ) . as ( "d" ) . identity ( ) . as ( "e" ) . profile ( ) . next ( ) ; try ( final java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ) { writer . writeObject ( out , tm ) ; final java . lang . String json = out . toString ( ) ; final org . apache . tinkerpop . gremlin . process . traversal . util . TraversalMetrics traversalMetricsRead = ( ( org . apache . tinkerpop . gremlin . process . traversal . util . TraversalMetrics ) ( reader . readObject ( new java . io . ByteArrayInputStream ( json . getBytes ( ) ) , java . lang . Object . class ) ) ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( ( "Should<sp>not<sp>have<sp>thrown<sp>exception:<sp>" + ( e . getMessage ( ) ) ) ) ; } } toString ( ) { return ( ( "Gremlin<sp>Server<sp>-<sp>[" + ( this . currentCluster ) ) + "]" ) + ( getSessionStringSegment ( ) ) ; }
org . junit . Assert . assertTrue ( tm . toString ( ) . equals ( traversalMetricsRead . toString ( ) ) )
testText ( ) { view . setText ( "sample" ) ; "<AssertPlaceHolder>" ; } getText ( ) { java . lang . CharSequence text = getEditTextView ( ) . getText ( ) ; return text == null ? null : text . toString ( ) ; }
org . junit . Assert . assertThat ( view . getText ( ) , org . hamcrest . CoreMatchers . equalTo ( "sample" ) )
testGeoServerStyleActionConfigurationAliased ( ) { java . lang . Boolean configurationAliasRegistered = false ; java . lang . Class configurationClass = it . geosolutions . geobatch . geoserver . style . GeoServerStyleConfiguration . class ; java . util . Iterator < java . util . Map . Entry < java . lang . String , java . lang . Class < ? > > > it = aliasRegistry . iterator ( ) ; while ( it . hasNext ( ) ) { java . util . Map . Entry < java . lang . String , java . lang . Class < ? > > alias = it . next ( ) ; it . geosolutions . geobatch . annotations . Action action = ( ( it . geosolutions . geobatch . annotations . Action ) ( it . geosolutions . geobatch . geoserver . style . GeoServerStyleAction . class . getAnnotations ( ) [ 0 ] ) ) ; java . lang . String configurationAlias = action . configurationAlias ( ) ; if ( ( configurationAlias == null ) || ( configurationAlias . isEmpty ( ) ) ) { configurationAlias = configurationClass . getSimpleName ( ) ; } if ( ( alias . getKey ( ) . equals ( configurationAlias ) ) && ( alias . getValue ( ) . equals ( configurationClass ) ) ) { configurationAliasRegistered = true ; break ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } if ( ( it . geosolutions . geobatch . flow . event . generator . file . FileBasedEventGenerator . getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } it . geosolutions . geobatch . flow . event . generator . file . FileBasedEventGenerator < it . geosolutions . filesystemmonitor . monitor . FileSystemEvent > other = null ; if ( obj instanceof it . geosolutions . geobatch . flow . event . generator . file . FileBasedEventGenerator ) { other = ( ( it . geosolutions . geobatch . flow . event . generator . file . FileBasedEventGenerator ) ( obj ) ) ; } else { throw new java . lang . IllegalArgumentException ( "The<sp>object<sp>is<sp>not<sp>a<sp>FileBasedEventGenerator." ) ; } if ( ( fsMonitor ) == null ) { if ( ( other . fsMonitor ) != null ) { return false ; } } else if ( ! ( fsMonitor . equals ( other . fsMonitor ) ) ) { return false ; } if ( ( watchDirectory ) == null ) { if ( ( other . watchDirectory ) != null ) { return false ; } } else if ( ! ( watchDirectory . equals ( other . watchDirectory ) ) ) { return false ; } if ( ( wildCard ) == null ) { if ( ( other . wildCard ) != null ) { return false ; } } else if ( ! ( wildCard . equals ( other . wildCard ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( configurationAliasRegistered )
testBuildContainerCallsPostConstructionActions ( ) { final com . picocontainer . script . PostBuildContainerAction action = context . mock ( com . picocontainer . script . PostBuildContainerAction . class ) ; context . checking ( new org . jmock . Expectations ( ) { { oneOf ( action ) . onNewContainer ( simpleContainer ) ; } } ) ; com . picocontainer . PicoContainer pico = toTest . setPostBuildAction ( action ) . buildContainer ( this . parentContainer , "SOME_SCOPE" , false ) ; "<AssertPlaceHolder>" ; } buildContainer ( java . io . Reader , com . picocontainer . PicoContainer , java . lang . Object ) { return new com . picocontainer . script . groovy . GroovyContainerBuilder ( script , getClass ( ) . getClassLoader ( ) ) . buildContainer ( parent , scope , true ) ; }
org . junit . Assert . assertNotNull ( pico )
testBelongsTo ( ) { org . eclipse . core . runtime . jobs . Job installJob = new com . google . cloud . tools . eclipse . sdk . internal . CloudSdkModifyJobTest . FakeModifyJob ( false ) ; "<AssertPlaceHolder>" ; } belongsTo ( java . lang . Object ) { return ( super . belongsTo ( family ) ) || ( family == ( com . google . cloud . tools . eclipse . sdk . internal . CloudSdkModifyJob . CLOUD_SDK_MODIFY_JOB_FAMILY ) ) ; }
org . junit . Assert . assertTrue ( installJob . belongsTo ( CloudSdkModifyJob . CLOUD_SDK_MODIFY_JOB_FAMILY ) )
invokeAnyShouldPropagateContext ( ) { final java . util . concurrent . Callable < java . lang . String > callable = TEST_KEY :: get ; final java . lang . String result = io . grpc . Context . current ( ) . withValue ( com . spotify . styx . util . TEST_KEY , "foobar" ) . call ( ( ) -> sut . invokeAny ( java . util . List . of ( callable ) ) ) ; "<AssertPlaceHolder>" ; } is ( com . spotify . styx . api . Api$Version ) { return new org . hamcrest . TypeSafeMatcher < com . spotify . styx . api . Api . Version > ( ) { @ com . spotify . styx . api . Override protected boolean matchesSafely ( com . spotify . styx . api . Api . Version item ) { return ( item . ordinal ( ) ) == ( version . ordinal ( ) ) ; } @ com . spotify . styx . api . Override public void describeTo ( org . hamcrest . Description description ) { description . appendText ( "Version<sp>can<sp>only<sp>be" ) ; description . appendValue ( version ) ; } } ; }
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( "foobar" ) )
test ( ) { org . zstack . header . configuration . DiskOfferingInventory inv = new org . zstack . header . configuration . DiskOfferingInventory ( ) ; inv . setDiskSize ( SizeUnit . GIGABYTE . toByte ( 10 ) ) ; inv . setName ( "Test" ) ; inv . setDescription ( "Test" ) ; inv = api . addDiskOffering ( inv ) ; org . zstack . header . configuration . DiskOfferingVO vo = dbf . findByUuid ( inv . getUuid ( ) , org . zstack . header . configuration . DiskOfferingVO . class ) ; "<AssertPlaceHolder>" ; } getDiskSize ( ) { return diskSize ; }
org . junit . Assert . assertEquals ( SizeUnit . GIGABYTE . toByte ( 10 ) , vo . getDiskSize ( ) )
testOnConditionChangeWhenConditionNotSelected ( ) { when ( functionSearchSelectionHandler . getSelectedKey ( ) ) . thenReturn ( null ) ; when ( translationService . getValue ( org . kie . workbench . common . stunner . bpmn . client . forms . fields . conditionEditor . SimpleConditionEditorPresenter . FUNCTION_NOT_SELECTED_ERROR ) ) . thenReturn ( org . kie . workbench . common . stunner . bpmn . client . forms . fields . conditionEditor . SimpleConditionEditorPresenterTest . TRANSLATED_MESSAGE ) ; presenter . onConditionChange ( ) ; verify ( view ) . clearConditionError ( ) ; verify ( view ) . setConditionError ( org . kie . workbench . common . stunner . bpmn . client . forms . fields . conditionEditor . SimpleConditionEditorPresenterTest . TRANSLATED_MESSAGE ) ; "<AssertPlaceHolder>" ; verify ( paramInstance , never ( ) ) . get ( ) ; } isValid ( ) { return getRecordEngine ( ) . isValid ( getRecord ( ) ) ; }
org . junit . Assert . assertFalse ( presenter . isValid ( ) )
testDefaultPrincipalConfiguration ( ) { org . apache . jackrabbit . oak . spi . security . principal . PrincipalConfiguration defaultConfig = securityProvider . getConfiguration ( org . apache . jackrabbit . oak . spi . security . principal . PrincipalConfiguration . class ) ; "<AssertPlaceHolder>" ; } getConfiguration ( java . lang . Class ) { if ( ( org . apache . jackrabbit . oak . spi . security . authentication . AuthenticationConfiguration . class ) == configClass ) { return ( ( T ) ( new org . apache . jackrabbit . oak . spi . security . authentication . OpenAuthenticationConfiguration ( ) ) ) ; } else if ( ( org . apache . jackrabbit . oak . spi . security . authorization . AuthorizationConfiguration . class ) == configClass ) { return ( ( T ) ( new org . apache . jackrabbit . oak . spi . security . authorization . OpenAuthorizationConfiguration ( ) ) ) ; } else { throw new java . lang . IllegalArgumentException ( ( "Unsupported<sp>security<sp>configuration<sp>class<sp>" + configClass ) ) ; } }
org . junit . Assert . assertNull ( defaultConfig )
whenResourceIsRetrieved_thenUriToGetAllResourcesIsDiscoverable ( ) { final java . lang . String uriOfExistingResource = com . baeldung . common . web . AbstractDiscoverabilityLiveTest . createAsUri ( ) ; final io . restassured . response . Response getResponse = io . restassured . RestAssured . get ( uriOfExistingResource ) ; final java . lang . String uriToAllResources = com . baeldung . web . util . HTTPLinkHeaderUtil . extractURIByRel ( getResponse . getHeader ( "Link" ) , "collection" ) ; final io . restassured . response . Response getAllResponse = io . restassured . RestAssured . get ( uriToAllResources ) ; "<AssertPlaceHolder>" ; } getStatusCode ( ) { return statusCode ; }
org . junit . Assert . assertThat ( getAllResponse . getStatusCode ( ) , com . baeldung . common . web . AbstractDiscoverabilityLiveTest . is ( 200 ) )
testGetSubMapNullKeys ( ) { java . util . Map < java . lang . String , java . lang . Integer > map = com . feilong . core . util . MapUtil . newHashMap ( ) ; map . put ( "a" , 3007 ) ; map . put ( "b" , 3001 ) ; map . put ( "c" , 3001 ) ; map . put ( "d" , 3003 ) ; "<AssertPlaceHolder>" ; } getSubMap ( java . util . Map , K [ ] ) { if ( com . feilong . core . Validator . isNullOrEmpty ( keys ) ) { return map ; } return com . feilong . core . util . MapUtil . getSubMap ( map , toSet ( keys ) ) ; }
org . junit . Assert . assertEquals ( map , com . feilong . core . util . MapUtil . getSubMap ( map , ( ( java . lang . String [ ] ) ( null ) ) ) )
shouldConstructorCreateAValidSolution ( ) { int permutationLength = 20 ; org . uma . jmetal . problem . impl . AbstractIntegerPermutationProblem problem = new org . uma . jmetal . solution . impl . DefaultIntegerPermutationSolutionTest . MockIntegerPermutationProblem ( permutationLength ) ; org . uma . jmetal . solution . PermutationSolution < java . lang . Integer > solution = problem . createSolution ( ) ; java . util . List < java . lang . Integer > values = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < ( problem . getNumberOfVariables ( ) ) ; i ++ ) { values . add ( solution . getVariableValue ( i ) ) ; } java . util . Collections . sort ( values ) ; java . util . List < java . lang . Integer > expectedList = new java . util . ArrayList ( permutationLength ) ; for ( int i = 0 ; i < permutationLength ; i ++ ) { expectedList . add ( i ) ; } "<AssertPlaceHolder>" ; } toArray ( ) { return map . values ( ) . toArray ( ) ; }
org . junit . Assert . assertArrayEquals ( expectedList . toArray ( ) , values . toArray ( ) )
testCxDxClientSessionStartsIdleState ( ) { org . jdiameter . api . cxdx . ClientCxDxSession session = getAppSession ( org . jdiameter . api . cxdx . ClientCxDxSession . class , new org . jdiameter . common . impl . app . cxdx . CxDxSessionFactoryImpl ( org . mobicents . diameter . stack . sessions . SessionsWithAppIdTest . sessionFactory ) , org . mobicents . diameter . stack . sessions . SessionsWithAppIdTest . CXDX_APPID ) ; org . jdiameter . common . api . app . cxdx . CxDxSessionState state = session . getState ( org . jdiameter . common . api . app . cxdx . CxDxSessionState . class ) ; "<AssertPlaceHolder>" ; } getState ( java . lang . Class ) { switch ( stack . getState ( ) ) { case IDLE : return ( ( E ) ( org . jdiameter . api . PeerState . DOWN ) ) ; case CONFIGURED : return ( ( E ) ( org . jdiameter . api . PeerState . INITIAL ) ) ; case STARTED : return ( ( E ) ( org . jdiameter . api . PeerState . OKAY ) ) ; case STOPPED : return ( ( E ) ( org . jdiameter . api . PeerState . SUSPECT ) ) ; } return ( ( E ) ( org . jdiameter . api . PeerState . DOWN ) ) ; }
org . junit . Assert . assertEquals ( state . IDLE , state )
shouldConvertStatusCode ( ) { simplehttp . HttpResponse response = handler . handleResponse ( anApacheOkResponse ) ; "<AssertPlaceHolder>" ; } status ( int ) { return simplehttp . matchers . HttpResponseStatusCodeMatcher . status ( status ) ; }
org . junit . Assert . assertThat ( response , status ( 200 ) )
testGetImportedFromTable ( ) { classUnderTest . setImportedFromTable ( "aTestString" ) ; "<AssertPlaceHolder>" ; } getImportedFromTable ( ) { return importedFromTable ; }
org . junit . Assert . assertEquals ( "aTestString" , classUnderTest . getImportedFromTable ( ) )
testGetParametersWithDefaultEntityAndDisabledDetaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . order . Order entity = new org . lnu . is . domain . order . Order ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
testLangProfileStringInt ( ) { com . optimaize . langdetect . cybozu . util . LangProfile profile = new com . optimaize . langdetect . cybozu . util . LangProfile ( "en" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( profile . getName ( ) , "en" )
testloadMultiDic ( ) { info . bbd . analyzer . mmseg4j . core . Dictionary dic = info . bbd . analyzer . mmseg4j . core . Dictionary . getInstance ( ) ; "<AssertPlaceHolder>" ; } match ( char [ ] ) { return this . match ( charArray , 0 , charArray . length , null ) ; }
org . junit . Assert . assertTrue ( dic . match ( "" ) )
testFindChildren_noMatch ( ) { byte [ ] oidByteArray = de . persosim . simulator . utils . HexString . toByteArray ( "FF" ) ; de . persosim . simulator . protocols . Oid anonymousTypeOid = new de . persosim . simulator . protocols . GenericOid ( oidByteArray ) ; de . persosim . simulator . cardobjects . OidIdentifier oidIdentifier = new de . persosim . simulator . cardobjects . OidIdentifier ( anonymousTypeOid ) ; java . util . Collection < de . persosim . simulator . cardobjects . CardObject > cardObjects = masterFile . findChildren ( oidIdentifier ) ; "<AssertPlaceHolder>" ; } findChildren ( de . persosim . simulator . cardobjects . CardObjectIdentifier [ ] ) { if ( ( containedFile ) == null ) { throw new de . persosim . simulator . exception . ISO7816Exception ( de . persosim . simulator . platform . Iso7816 . SW_6A88_REFERENCE_DATA_NOT_FOUND , "Wraper<sp>object<sp>not<sp>correctly<sp>initialized" ) ; } return containedFile . findChildren ( cardObjectIdentifiers ) ; }
org . junit . Assert . assertEquals ( 0 , cardObjects . size ( ) )
test0DivideXMatrix ( ) { org . ujmp . core . Matrix m1 = createMatrixWithAnnotation ( 5 , 7 ) ; org . ujmp . core . Matrix m2 = createMatrixWithAnnotation ( 5 , 7 ) ; m2 . randn ( Ret . ORIG ) ; org . ujmp . core . Matrix m3 = m1 . divide ( m2 ) ; "<AssertPlaceHolder>" ; if ( m1 instanceof org . ujmp . core . interfaces . Erasable ) { ( ( org . ujmp . core . interfaces . Erasable ) ( m1 ) ) . erase ( ) ; } if ( m2 instanceof org . ujmp . core . interfaces . Erasable ) { ( ( org . ujmp . core . interfaces . Erasable ) ( m2 ) ) . erase ( ) ; } if ( m3 instanceof org . ujmp . core . interfaces . Erasable ) { ( ( org . ujmp . core . interfaces . Erasable ) ( m3 ) ) . erase ( ) ; } } getLabel ( ) { java . lang . Object o = getLabelObject ( ) ; if ( o == null ) { return null ; } if ( o instanceof java . lang . String ) { return ( ( java . lang . String ) ( o ) ) ; } if ( o instanceof org . ujmp . core . interfaces . HasLabel ) { return ( ( org . ujmp . core . interfaces . HasLabel ) ( o ) ) . getLabel ( ) ; } return o . toString ( ) ; }
org . junit . Assert . assertTrue ( getLabel ( ) , m3 . isEmpty ( ) )
testdataSolverConfigWithClassLoader ( ) { java . lang . ClassLoader classLoader = new org . optaplanner . core . api . solver . DivertingClassLoader ( getClass ( ) . getClassLoader ( ) ) ; org . optaplanner . core . api . solver . SolverFactory < org . optaplanner . core . impl . testdata . domain . TestdataSolution > solverFactory = org . optaplanner . core . api . solver . SolverFactory . createFromXmlResource ( "divertThroughClassLoader/org/optaplanner/core/api/solver/classloaderTestdataSolverConfig.xml" , classLoader ) ; org . optaplanner . core . api . solver . Solver < org . optaplanner . core . impl . testdata . domain . TestdataSolution > solver = solverFactory . buildSolver ( ) ; "<AssertPlaceHolder>" ; } buildSolver ( ) { if ( ( solverConfig ) == null ) { throw new java . lang . IllegalStateException ( ( ( ( "The<sp>solverConfig<sp>(" + ( solverConfig ) ) + ")<sp>is<sp>null," ) + "<sp>call<sp>configure(...)<sp>first." ) ) ; } return solverConfig . buildSolver ( solverConfigContext ) ; }
org . junit . Assert . assertNotNull ( solver )
testBadId ( ) { com . amadeus . session . SessionConfiguration sc = new com . amadeus . session . SessionConfiguration ( ) ; sc . setSessionIdName ( "somesession" ) ; cookieSessionTracking . configure ( sc ) ; com . amadeus . session . RequestWithSession request = mock ( com . amadeus . session . RequestWithSession . class , withSettings ( ) . extraInterfaces ( javax . servlet . http . HttpServletRequest . class ) ) ; javax . servlet . http . HttpServletRequest hsr = ( ( javax . servlet . http . HttpServletRequest ) ( request ) ) ; when ( hsr . getCookies ( ) ) . thenReturn ( new javax . servlet . http . Cookie [ ] { new javax . servlet . http . Cookie ( "somession" , "1234" ) } ) ; "<AssertPlaceHolder>" ; } retrieveId ( com . amadeus . session . RequestWithSession ) { java . lang . String requestUri = ( ( javax . servlet . http . HttpServletRequest ) ( request ) ) . getRequestURI ( ) ; int sessionIdStart = requestUri . toLowerCase ( ) . lastIndexOf ( sessionIdPathItem ) ; if ( sessionIdStart > ( - 1 ) ) { sessionIdStart += sessionIdPathItem . length ( ) ; java . lang . String sessionId = clean ( requestUri . substring ( sessionIdStart ) ) ; if ( sessionId != null ) { return new com . amadeus . session . servlet . IdAndSource ( sessionId , isCookieTracking ( ) ) ; } else { return null ; } } if ( ( this . nextSessionTracking ) != null ) { return this . nextSessionTracking . retrieveId ( request ) ; } return null ; }
org . junit . Assert . assertNull ( cookieSessionTracking . retrieveId ( request ) )
testVersionArg ( ) { liquibase . integration . commandline . Main . run ( new java . lang . String [ ] { "--version" } ) ; "<AssertPlaceHolder>" ; } run ( java . lang . String [ ] ) { return liquibase . integration . commandline . Scope . child ( null , liquibase . integration . commandline . Collections . singletonMap ( Scope . Attr . logService . name ( ) , new liquibase . integration . commandline . CommandLineLoggerService ( ) ) , new liquibase . integration . commandline . Scope . ScopedRunnerWithReturn < java . lang . Integer > ( ) { @ java . lang . Override public java . lang . Integer run ( ) throws java . lang . Exception { liquibase . logging . Logger log = liquibase . integration . commandline . Scope . getCurrentScope ( ) . getLog ( . class ) ; boolean outputLoggingEnabled = false ; try { liquibase . configuration . GlobalConfiguration globalConfiguration = liquibase . configuration . LiquibaseConfiguration . getInstance ( ) . getConfiguration ( . class ) ; if ( ! ( globalConfiguration . getShouldRun ( ) ) ) { log . warning ( LogType . USER_MESSAGE , java . lang . String . format ( liquibase . integration . commandline . Main . coreBundle . getString ( "did.not.run.because.param.was.set.to.false" ) , liquibase . configuration . LiquibaseConfiguration . getInstance ( ) . describeValueLookupLogic ( globalConfiguration . getProperty ( GlobalConfiguration . SHOULD_RUN ) ) ) ) ; return 0 ; } liquibase . integration . commandline . Main main = new liquibase . integration . commandline . Main ( ) ; log . info ( LogType . USER_MESSAGE , liquibase . integration . commandline . CommandLineUtils . getBanner ( ) ) ; if ( ( args . length == 1 ) && ( ( "--" + OPTIONS . HELP ) . equals ( args [ 0 ] ) ) ) { main . printHelp ( System . out ) ; return 0 ; } else if ( ( args . length == 1 ) && ( ( "--" + OPTIONS . VERSION ) . equals ( args [ 0 ] ) ) ) { log . info ( LogType . USER_MESSAGE , java . lang . String . format ( liquibase . integration . commandline . Main . coreBundle . getString ( "version.number" ) , ( ( liquibase . util . LiquibaseUtil . getBuildVersion ( ) ) + ( liquibase . util . StreamUtil . getLineSeparator ( ) ) ) ) ) ; return 0 ; } try { main . parseOptions ( args ) ; } catch ( e ) { log . warning ( LogType . USER_MESSAGE , liquibase . integration . commandline . Main . coreBundle . getString ( "how.to.display.help" ) ) ; throw liquibase . integration . commandline . e ; } List < java . lang . String > setupMessages = main . checkSetup ( ) ; if ( ! ( setupMessages . isEmpty ( ) ) ) { main . printHelp ( setupMessages , System . err ) ; return 1 ; } main . applyDefaults ( ) ; liquibase . integration . commandline . Scope . child ( Scope . Attr . resourceAccessor , new liquibase . resource . ClassLoaderResourceAccessor ( main . configureClassLoader ( ) ) , ( ) -> { main . doMigration ( ) ; if ( COMMANDS . UPDATE . equals ( main . command ) ) { log . info ( LogType . USER_MESSAGE , liquibase . integration . commandline . Main . coreBundle . getString ( "update.successful" ) ) ; } else if ( ( main . command . startsWith ( COMMANDS . ROLLBACK ) ) && ( ! ( main . command . endsWith ( "SQL" ) ) ) ) { log . info ( LogType . USER_MESSAGE , liquibase . integration . commandline . Main . coreBundle . getString ( "rollback.successful" ) ) ; } else if ( ! ( main . command . endsWith ( "SQL" ) ) ) { log . info ( LogType . USER_MESSAGE , java . lang . String . format ( liquibase . integration . commandline . Main . coreBundle . getString ( "command.successful" ) , main . command ) ) ; } } ) ; } catch ( e ) { java . lang . String message = liquibase . integration . commandline . e . getMessage ( ) ; if ( ( liquibase . integration . commandline . e . getCause ( ) ) != null ) { message = liquibase . integration . commandline . e . getCause ( ) . getMessage ( ) ; } if ( message == null ) { message = liquibase . integration . commandline . Main . coreBundle . getString ( "unknown.reason" ) ; } try { if ( ( liquibase . integration . commandline . e . getCause ( ) ) instanceof liquibase . integration . commandline . ValidationFailedException ) { ( ( liquibase . integration . commandline . ValidationFailedException ) ( liquibase . integration . commandline . e . getCause ( ) ) ) . printDescriptiveError ( System . out ) ; } else { log . severe ( LogType . USER_MESSAGE , java . lang . String . format ( liquibase . integration . commandline . Main . coreBundle . getString ( "unexpected.error" ) , message ) , liquibase . integration . commandline . e ) ; log . severe ( LogType . USER_MESSAGE , generateLogLevelWarningMessage ( outputLoggingEnabled ) ) ; } } catch ( e1 ) { liquibase . integration . commandline . e1 . printStackTrace ( ) ; } throw new < liquibase . integration . commandline . e > liquibase . integration . commandline . LiquibaseException ( java . lang . String . format ( liquibase . integration . commandline . Main . coreBundle . getString ( "unexpected.error" ) , message ) ) ; } return 0 ; } } )
org . junit . Assert . assertTrue ( true )
dataPointsArrayFieldMayContainNullValue ( ) { java . util . List < org . junit . contrib . theories . PotentialAssignment > valueSources = allMemberValuesFor ( org . junit . contrib . tests . theories . internal . AllMembersSupplierTest . HasDataPointsFieldWithNullValue . class , java . lang . Object . class ) ; "<AssertPlaceHolder>" ; } size ( ) { checkClosed ( ) ; return list . size ( ) ; }
org . junit . Assert . assertThat ( valueSources . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) )
testSecondChildBean ( ) { final org . apache . commons . beanutils2 . bugs . RootBean bean = new org . apache . commons . beanutils2 . bugs . SecondChildBean ( ) ; final java . lang . Class < ? > propertyType = org . apache . commons . beanutils2 . PropertyUtils . getPropertyType ( bean , "file[0]" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return this . name ; }
org . junit . Assert . assertEquals ( java . lang . String . class . getName ( ) , propertyType . getName ( ) )
hashEqualsHashOfKey ( ) { com . ontology2 . bakemono . joins . TaggedTextItem k1 = new com . ontology2 . bakemono . joins . TaggedTextItem ( new org . apache . hadoop . io . Text ( "Doctor<sp>Funkenstein" ) , new org . apache . hadoop . io . VIntWritable ( 33550336 ) ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return getNode ( ) . hashCode ( ) ; }
org . junit . Assert . assertEquals ( new org . apache . hadoop . io . Text ( "Doctor<sp>Funkenstein" ) . hashCode ( ) , k1 . hashCode ( ) )
testGetRecommendation ( ) { java . util . List < java . lang . String > agents = new java . util . ArrayList < java . lang . String > ( ) ; java . util . List < java . lang . String > things = new java . util . ArrayList < java . lang . String > ( ) ; java . util . List < eu . dime . commons . dto . TrustWarning > warnings = trustEngine . getRecommendation ( agents , things ) ; "<AssertPlaceHolder>" ; } getRecommendation ( java . util . List , java . util . List ) { java . util . List < eu . dime . commons . dto . TrustWarning > warnings = new java . util . ArrayList < eu . dime . commons . dto . TrustWarning > ( ) ; java . util . List < org . ontoware . rdf2go . model . node . URI > resolvedList = new java . util . ArrayList < org . ontoware . rdf2go . model . node . URI > ( ) ; for ( java . lang . String thing : sharedThings ) { org . ontoware . rdf2go . model . node . URI thing_uri = new org . ontoware . rdf2go . model . node . impl . URIImpl ( thing ) ; try { if ( getResourceStore ( ) . isTypedAs ( thing_uri , PPO . PrivacyPreference ) ) { resolvedList . addAll ( getAllItemsInDataboxAsURI ( thing_uri ) ) ; } else { resolvedList . add ( thing_uri ) ; } } catch ( eu . dime . ps . semantic . exception . NotFoundException e1 ) { logger . info ( ( "Could<sp>not<sp>find<sp>resource.<sp>" + thing ) ) ; } eu . dime . commons . dto . TrustWarning tmpRec = null ; for ( org . ontoware . rdf2go . model . node . URI resUri : resolvedList ) { for ( java . lang . String agent : agents ) { try { tmpRec = getSimpleRecommendation ( new org . ontoware . rdf2go . model . node . impl . URIImpl ( agent ) , resUri ) ; if ( tmpRec != null ) { warnings . add ( tmpRec ) ; } } catch ( eu . dime . ps . controllers . trustengine . exception . PrivacyValueNotValidException e ) { logger . error ( "Could<sp>not<sp>calculate<sp>recommendations." , e ) ; return null ; } catch ( eu . dime . ps . controllers . trustengine . exception . TrustValueNotValidException e ) { logger . error ( "Could<sp>not<sp>calculate<sp>recommendations." , e ) ; return null ; } catch ( java . lang . ClassCastException e ) { logger . error ( "Could<sp>not<sp>calculate<sp>recommendations." , e ) ; return null ; } } } } return sortWarnings ( warnings ) ; }
org . junit . Assert . assertNotNull ( warnings )
testByteArrayPayload ( ) { byte [ ] sentPayload = new byte [ ] { 0 , 1 , 2 , 3 , 4 } ; com . google . appengine . api . taskqueue . Queue queue = com . google . appengine . api . taskqueue . QueueFactory . getDefaultQueue ( ) ; queue . add ( withPayload ( sentPayload , "application/octet-stream" ) ) ; sync ( ) ; byte [ ] receivedPayload = org . jboss . test . capedwarf . tasks . support . DefaultQueueServlet . getLastRequest ( ) . getBody ( ) ; "<AssertPlaceHolder>" ; } getBody ( ) { return body ; }
org . junit . Assert . assertArrayEquals ( sentPayload , receivedPayload )
notInRing ( ) { org . openscience . cdk . isomorphism . matchers . Expr actual = org . openscience . cdk . smarts . SmartsExprReadTest . getBondExpr ( "*!@*" ) ; org . openscience . cdk . isomorphism . matchers . Expr expected = org . openscience . cdk . smarts . SmartsExprReadTest . expr ( org . openscience . cdk . smarts . IS_IN_CHAIN ) ; "<AssertPlaceHolder>" ; } expr ( org . openscience . cdk . isomorphism . matchers . Expr$Type ) { return new org . openscience . cdk . isomorphism . matchers . Expr ( type ) ; }
org . junit . Assert . assertThat ( expected , org . hamcrest . CoreMatchers . is ( actual ) )
sortTest ( ) { int [ ] input = new int [ ] { 29 , 10 , 14 , 37 , 13 } ; int [ ] output = new int [ ] { 10 , 13 , 14 , 29 , 37 } ; chapter3 . bubblesort . BubbleSort bubbleSort = new chapter3 . bubblesort . ILhyunBubbleSort ( ) ; int [ ] result = bubbleSort . sort ( input ) ; for ( int i = 0 ; i < ( input . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } sort ( int [ ] ) { int p = 0 ; int r = ( input . length ) - 1 ; this . mergeSort ( input , p , r ) ; return input ; }
org . junit . Assert . assertThat ( result [ i ] , org . hamcrest . CoreMatchers . is ( output [ i ] ) )
testSetPositionLongArray ( ) { final long [ ] initial = new long [ ] { 532 , 632 , 987421 } ; final long [ ] displacement = new long [ ] { 85 , 8643 , - 973 } ; final net . imglib2 . Point p = new net . imglib2 . Point ( initial ) ; p . setPosition ( displacement ) ; for ( int i = 0 ; i < ( initial . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } getLongPosition ( int ) { return source . getLongPosition ( d ) ; }
org . junit . Assert . assertEquals ( p . getLongPosition ( i ) , displacement [ i ] )
testToBytePrimitiveFromByte ( ) { java . lang . Object result = com . orientechnologies . orient . core . metadata . schema . OType . convert ( ( ( byte ) ( 10 ) ) , Byte . TYPE ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . Class ) { if ( iValue == null ) return null ; if ( iTargetClass == null ) return iValue ; if ( iValue . getClass ( ) . equals ( iTargetClass ) ) return iValue ; if ( iTargetClass . isAssignableFrom ( iValue . getClass ( ) ) ) return iValue ; try { if ( ( iValue instanceof com . orientechnologies . common . types . OBinary ) && ( iTargetClass . isAssignableFrom ( byte [ ] . class ) ) ) return ( ( com . orientechnologies . common . types . OBinary ) ( iValue ) ) . toByteArray ( ) ; else if ( byte [ ] . class . isAssignableFrom ( iTargetClass ) ) { return com . orientechnologies . orient . core . serialization . serializer . OStringSerializerHelper . getBinaryContent ( iValue ) ; } else if ( byte [ ] . class . isAssignableFrom ( iValue . getClass ( ) ) ) { return iValue ; } else if ( iTargetClass . isEnum ( ) ) { if ( iValue instanceof java . lang . Number ) return ( ( java . lang . Class < java . lang . Enum > ) ( iTargetClass ) ) . getEnumConstants ( ) [ ( ( java . lang . Number ) ( iValue ) ) . intValue ( ) ] ; return java . lang . Enum . valueOf ( ( ( java . lang . Class < java . lang . Enum > ) ( iTargetClass ) ) , iValue . toString ( ) ) ; } else if ( ( iTargetClass . equals ( Byte . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Byte . class ) ) ) { if ( iValue instanceof java . lang . Byte ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Byte . parseByte ( ( ( java . lang . String ) ( iValue ) ) ) ; else return ( ( java . lang . Number ) ( iValue ) ) . byteValue ( ) ; } else if ( ( iTargetClass . equals ( Short . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Short . class ) ) ) { if ( iValue instanceof java . lang . Short ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Short . parseShort ( ( ( java . lang . String ) ( iValue ) ) ) ; else return ( ( java . lang . Number ) ( iValue ) ) . shortValue ( ) ; } else if ( ( iTargetClass . equals ( Integer . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Integer . class ) ) ) { if ( iValue instanceof java . lang . Integer ) return iValue ; else if ( iValue instanceof java . lang . String ) { if ( iValue . toString ( ) . equals ( "" ) ) { return null ; } return java . lang . Integer . parseInt ( ( ( java . lang . String ) ( iValue ) ) ) ; } else return ( ( java . lang . Number ) ( iValue ) ) . intValue ( ) ; } else if ( ( iTargetClass . equals ( Long . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Long . class ) ) ) { if ( iValue instanceof java . lang . Long ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Long . parseLong ( ( ( java . lang . String ) ( iValue ) ) ) ; else if ( iValue instanceof java . util . Date ) return ( ( java . util . Date ) ( iValue ) ) . getTime ( ) ; else return ( ( java . lang . Number ) ( iValue ) ) . longValue ( ) ; } else if ( ( iTargetClass . equals ( Float . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata . schema . Float . class ) ) ) { if ( iValue instanceof java . lang . Float ) return iValue ; else if ( iValue instanceof java . lang . String ) return java . lang . Float . parseFloat ( ( ( java . lang . String ) ( iValue ) ) ) ; else return ( ( java . lang . Number ) ( iValue ) ) . floatValue ( ) ; } else if ( iTargetClass . equals ( java . math . BigDecimal . class ) ) { if ( iValue instanceof java . lang . String ) return new java . math . BigDecimal ( ( ( java . lang . String ) ( iValue ) ) ) ; else if ( iValue instanceof java . lang . Number ) return new java . math . BigDecimal ( iValue . toString ( ) ) ; } else if ( ( iTargetClass . equals ( Double . TYPE ) ) || ( iTargetClass . equals ( com . orientechnologies . orient . core . metadata .
org . junit . Assert . assertEquals ( result , ( ( byte ) ( 10 ) ) )
testAdjacentEdges ( ) { edu . ucla . sspace . graph . Graph < edu . ucla . sspace . graph . Edge > g = new edu . ucla . sspace . graph . SparseUndirectedGraph ( ) ; edu . ucla . sspace . graph . Set < edu . ucla . sspace . graph . Edge > control = new edu . ucla . sspace . graph . HashSet < edu . ucla . sspace . graph . Edge > ( ) ; for ( int i = 1 ; i <= 100 ; ++ i ) { edu . ucla . sspace . graph . Edge e = new edu . ucla . sspace . graph . SimpleEdge ( 0 , i ) ; g . add ( e ) ; control . add ( e ) ; } edu . ucla . sspace . graph . Set < edu . ucla . sspace . graph . Edge > test = g . getAdjacencyList ( 0 ) ; "<AssertPlaceHolder>" ; } getAdjacencyList ( int ) { return g . getAdjacencyList ( vertex ) ; }
org . junit . Assert . assertEquals ( control , test )
testGetRemoved ( ) { try { java . util . Date date = new java . text . SimpleDateFormat ( "MM/dd/yyyy<sp>HH:mm:ss" ) . parse ( "02/01/2012<sp>12:12:12" ) ; java . util . Date d = host . getRemoved ( ) ; "<AssertPlaceHolder>" ; } catch ( java . text . ParseException e ) { e . printStackTrace ( ) ; } } compareTo ( org . apache . cloudstack . ldap . LdapUser ) { return getUsername ( ) . compareTo ( other . getUsername ( ) ) ; }
org . junit . Assert . assertTrue ( ( ( d . compareTo ( date ) ) == 0 ) )
testIfNullModelTailSettingWorks_shouldThrowNoException ( ) { org . openengsb . core . api . model . ModelWrapper wrapper = org . openengsb . core . api . model . ModelWrapper . wrap ( new org . openengsb . core . weaver . test . model . TestModel ( ) ) ; wrapper . setOpenEngSBModelTail ( null ) ; "<AssertPlaceHolder>" ; } getOpenEngSBModelTail ( ) { return model . getOpenEngSBModelTail ( ) ; }
org . junit . Assert . assertThat ( wrapper . getOpenEngSBModelTail ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
setChargingSchedule_aChargingSchedule_chargingScheduleIsSet ( ) { eu . chargetime . ocpp . model . core . ChargingSchedule chargingSchedule = mock ( eu . chargetime . ocpp . model . core . ChargingSchedule . class ) ; chargingProfile . setChargingSchedule ( chargingSchedule ) ; "<AssertPlaceHolder>" ; } getChargingSchedule ( ) { return chargingSchedule ; }
org . junit . Assert . assertThat ( chargingProfile . getChargingSchedule ( ) , org . hamcrest . CoreMatchers . equalTo ( chargingSchedule ) )
testSubNetworkEdgeTableColumnsPropagate ( ) { defaultSetup ( ) ; sub . getDefaultEdgeTable ( ) . createColumn ( "ASDFASDF" , org . cytoscape . model . subnetwork . Integer . class , true ) ; org . cytoscape . model . subnetwork . CySubNetwork sub2 = root . addSubNetwork ( ) ; "<AssertPlaceHolder>" ; } createColumn ( org . cytoscape . model . CyNetwork , org . cytoscape . jobs . SUIDUtil$Identifiable , java . lang . String ) { java . lang . Class < ? extends org . cytoscape . model . CyIdentifiable > clazz = null ; switch ( type ) { case NETWORK : clazz = org . cytoscape . model . CyNetwork . class ; break ; case NODE : clazz = org . cytoscape . model . CyNode . class ; break ; case EDGE : clazz = org . cytoscape . model . CyEdge . class ; break ; case UNKNOWN : return null ; } org . cytoscape . model . CyTable table = network . getTable ( clazz , CyNetwork . HIDDEN_ATTRS ) ; if ( ( table . getColumn ( columnName ) ) == null ) table . createColumn ( columnName , org . cytoscape . jobs . Long . class , false ) ; return table ; }
org . junit . Assert . assertNotNull ( sub2 . getDefaultEdgeTable ( ) . getColumn ( "ASDFASDF" ) )
testCancelOnErrorWithAnnotation0 ( ) { org . databene . contiperf . junit . ContiPerfRuleTest . TestBean test = new org . databene . contiperf . junit . ContiPerfRuleTest . TestBean ( ) ; try { check ( test , "cancelOnErrorWithAnnotation0" ) ; } catch ( java . lang . RuntimeException e ) { int count = test . cancelOnErrorCountWithAnnotation0 . get ( ) ; "<AssertPlaceHolder>" ; throw e ; } } check ( org . databene . contiperf . junit . ContiPerfRuleTest$TestBean , java . lang . String ) { org . databene . contiperf . junit . ContiPerfRule rule = new org . databene . contiperf . junit . ContiPerfRule ( new org . databene . contiperf . report . ListReportModule ( ) ) ; java . lang . reflect . Method method = org . databene . contiperf . junit . ContiPerfRuleTest . TestBean . class . getDeclaredMethod ( methodName , new java . lang . Class < ? > [ 0 ] ) ; org . junit . runners . model . Statement base = new org . databene . contiperf . junit . ContiPerfRuleTest . InvokerStatement ( target , method ) ; org . junit . runners . model . FrameworkMethod fwMethod = new org . junit . runners . model . FrameworkMethod ( method ) ; org . junit . runners . model . Statement perfTestStatement = rule . apply ( base , fwMethod , target ) ; perfTestStatement . evaluate ( ) ; return target ; }
org . junit . Assert . assertEquals ( 1 , count )
testInfiniteIteration ( ) { int size = 10 ; java . util . List < java . lang . String > hosts = new java . util . ArrayList < java . lang . String > ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { hosts . add ( ( ( "http://thisismyawesomehost<sp>" + i ) + ".com" ) ) ; } com . twitter . hbc . core . HttpHosts httpHosts = new com . twitter . hbc . core . HttpHosts ( hosts ) ; java . util . Set < java . lang . String > hostsSet = new java . util . HashSet < java . lang . String > ( hosts ) ; for ( int i = 0 ; i < ( size * 10 ) ; i ++ ) { "<AssertPlaceHolder>" ; } } nextHost ( ) { return hosts . next ( ) ; }
org . junit . Assert . assertTrue ( hostsSet . contains ( httpHosts . nextHost ( ) ) )
normalizeWithReservedChars ( ) { final java . lang . String TEST_NAME = "?a/b\nc\td\re*f\\g:h<i>j.txt|" ; final java . lang . String EXPECTED_NAME = "%3Fa/b%0Ac%09d%0De%2Af\\g%3Ah%3Ci%3Ej.txt%7C" ; "<AssertPlaceHolder>" ; } normalize ( java . lang . String ) { if ( name == null ) { throw new java . lang . IllegalArgumentException ( "name<sp>cannot<sp>be<sp>null" ) ; } java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( char c : name . toCharArray ( ) ) { if ( org . apache . tika . io . FilenameUtils . RESERVED . contains ( c ) ) { sb . append ( '%' ) . append ( ( c < 16 ? "0" : "" ) ) . append ( java . lang . Integer . toHexString ( c ) . toUpperCase ( Locale . ROOT ) ) ; } else { sb . append ( c ) ; } } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( EXPECTED_NAME , org . apache . tika . io . FilenameUtils . normalize ( TEST_NAME ) )
testChange ( ) { presenter . init ( "On" , "Off" , true , 0 ) ; presenter . setOnChange ( onChange ) ; when ( view . isOn ( ) ) . thenReturn ( false ) ; presenter . onChange ( ) ; "<AssertPlaceHolder>" ; verify ( onChange ) . execute ( ) ; } isOn ( ) { return switchControl . getValue ( ) ; }
org . junit . Assert . assertFalse ( presenter . isOn ( ) )
testGetFragmentCollectionsCountByKeywordsAndStatus ( ) { com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( _group . getGroupId ( ) , com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) ) ; com . liferay . fragment . model . FragmentCollection fragmentCollection = com . liferay . fragment . service . FragmentCollectionServiceUtil . addFragmentCollection ( _group . getGroupId ( ) , com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) , StringPool . BLANK , serviceContext ) ; java . lang . String fragmentEntryName = com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ; com . liferay . fragment . service . FragmentEntryServiceUtil . addFragmentEntry ( _group . getGroupId ( ) , fragmentCollection . getFragmentCollectionId ( ) , fragmentEntryName , WorkflowConstants . STATUS_APPROVED , serviceContext ) ; com . liferay . fragment . service . FragmentEntryServiceUtil . addFragmentEntry ( _group . getGroupId ( ) , fragmentCollection . getFragmentCollectionId ( ) , fragmentEntryName , WorkflowConstants . STATUS_DRAFT , serviceContext ) ; java . util . List < com . liferay . fragment . model . FragmentEntry > actualFragmentEntries = com . liferay . fragment . service . FragmentEntryServiceUtil . getFragmentEntries ( _group . getGroupId ( ) , fragmentCollection . getFragmentCollectionId ( ) , fragmentEntryName , WorkflowConstants . STATUS_APPROVED , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( actualFragmentEntries . toString ( ) , 1 , actualFragmentEntries . size ( ) )
testOnVisitorGetDamageNotInIvSettings ( ) { when ( iwm . inWorld ( any ( org . bukkit . World . class ) ) ) . thenReturn ( false ) ; when ( iwm . inWorld ( any ( org . bukkit . Location . class ) ) ) . thenReturn ( false ) ; org . bukkit . event . entity . EntityDamageEvent e = new org . bukkit . event . entity . EntityDamageEvent ( player , org . bukkit . event . entity . EntityDamageEvent . DamageCause . BLOCK_EXPLOSION , 0.0 ) ; listener . onVisitorGetDamage ( e ) ; "<AssertPlaceHolder>" ; } isCancelled ( ) { return cancelled ; }
org . junit . Assert . assertFalse ( e . isCancelled ( ) )
getOrElse_A$Long ( ) { java . lang . Long actual = com . m3 . scalaflavor4j . SLong . apply ( 123L ) . getOrElse ( 0L ) ; "<AssertPlaceHolder>" ; } getOrElse ( java . lang . Integer ) { if ( ( value ) == null ) { return defaultValue ; } else { return value ; } }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 123L ) ) )
listExcludeUserIdText ( ) { me . xiezefan . easyim . server . model . User user = new me . xiezefan . easyim . server . model . User ( ) ; user . setId ( Contact . USER_ID2 ) ; user . setUsername ( "kdsjaskdhjaksjdh" ) ; user . setPassword ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; user . setNickname ( "hjcvxkhjvsdfsdf" ) ; user . setDeviceId ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; userDao . insert ( user ) ; java . util . List < me . xiezefan . easyim . server . model . User > result1 = userDao . listExcludeUserId ( Contact . USER_ID2 , 0 , 15 ) ; java . util . List < me . xiezefan . easyim . server . model . User > result2 = userDao . list ( 0 , 15 ) ; "<AssertPlaceHolder>" ; } setDeviceId ( java . lang . String ) { this . deviceId = deviceId ; }
org . junit . Assert . assertTrue ( ( ( ( result2 . size ( ) ) - ( result1 . size ( ) ) ) == 1 ) )
cacheCachedValue ( ) { final org . jboss . msc . value . Value < java . lang . String > cachedValue = new org . jboss . msc . value . CachedValue < java . lang . String > ( new org . jboss . msc . value . ImmediateValue < java . lang . String > ( "value" ) ) ; final org . jboss . msc . value . Value < ? > cachedCachedValue = org . jboss . msc . value . Values . cached ( cachedValue ) ; "<AssertPlaceHolder>" ; } cached ( org . jboss . msc . value . Value ) { if ( ( value instanceof org . jboss . msc . value . CachedValue ) || ( value instanceof org . jboss . msc . value . ImmediateValue ) ) { return value ; } else { return new org . jboss . msc . value . CachedValue < T > ( value ) ; } }
org . junit . Assert . assertSame ( cachedValue , cachedCachedValue )
testSourcePatternNoMatch ( ) { com . box . l10n . mojito . cli . filefinder . file . MacStringsdictFileType macStringsdictFileType = new com . box . l10n . mojito . cli . filefinder . file . MacStringsdictFileType ( ) ; com . box . l10n . mojito . cli . filefinder . FilePattern sourceFilePattern = macStringsdictFileType . getSourceFilePattern ( ) ; java . util . regex . Matcher matcher = sourceFilePattern . getPattern ( ) . matcher ( "/source/fr.lproj/Localizable.stringsdict" ) ; "<AssertPlaceHolder>" ; } getPattern ( ) { return pattern ; }
org . junit . Assert . assertFalse ( matcher . matches ( ) )
contextNameConverter ( ) { ch . qos . logback . classic . pattern . ClassicConverter converter = new ch . qos . logback . classic . pattern . ContextNameConverter ( ) ; ch . qos . logback . classic . LoggerContext lcOther = new ch . qos . logback . classic . LoggerContext ( ) ; lcOther . setName ( "another" ) ; converter . setContext ( lcOther ) ; lc . setName ( "aValue" ) ; ch . qos . logback . classic . spi . ILoggingEvent event = makeLoggingEvent ( null ) ; java . lang . String result = converter . convert ( event ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Throwable ) { java . util . List < java . lang . String > strList = new java . util . LinkedList < java . lang . String > ( ) ; ch . qos . logback . core . helpers . ThrowableToStringArray . extract ( strList , t , null ) ; return strList . toArray ( new java . lang . String [ 0 ] ) ; }
org . junit . Assert . assertEquals ( "aValue" , result )
testDeployUsingARMTemplateWithTags ( ) { "<AssertPlaceHolder>" ; } runSample ( com . microsoft . azure . management . Azure ) { final java . lang . String rgName = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "rgRSAT" , 24 ) ; final java . lang . String deploymentName = com . microsoft . azure . management . resources . fluentcore . utils . SdkContext . randomResourceName ( "dpRSAT" , 24 ) ; try { java . lang . String templateJson = com . microsoft . azure . management . resources . samples . DeployUsingARMTemplateWithTags . getTemplate ( ) ; System . out . println ( ( "Resource<sp>created<sp>during<sp>deployment:<sp>" 0 + rgName ) ) ; azure . resourceGroups ( ) . define ( rgName ) . withRegion ( Region . US_WEST ) . create ( ) ; System . out . println ( ( "Resource<sp>created<sp>during<sp>deployment:<sp>" 4 + rgName ) ) ; System . out . println ( ( "Starting<sp>a<sp>deployment<sp>for<sp>an<sp>Azure<sp>App<sp>Service:<sp>" + deploymentName ) ) ; com . microsoft . azure . management . resources . Deployment deployment = azure . deployments ( ) . define ( deploymentName ) . withExistingResourceGroup ( rgName ) . withTemplate ( templateJson ) . withParameters ( "{}" ) . withMode ( DeploymentMode . INCREMENTAL ) . create ( ) ; System . out . println ( ( "Finished<sp>a<sp>deployment<sp>for<sp>an<sp>Azure<sp>App<sp>Service:<sp>" + deploymentName ) ) ; java . util . List < com . microsoft . azure . management . resources . DeploymentOperation > operations = deployment . deploymentOperations ( ) . list ( ) ; java . util . List < com . microsoft . azure . management . resources . GenericResource > genericResources = new java . util . ArrayList ( ) ; for ( com . microsoft . azure . management . resources . DeploymentOperation operation : operations ) { if ( ( operation . targetResource ( ) ) != null ) { genericResources . add ( azure . genericResources ( ) . getById ( operation . targetResource ( ) . id ( ) ) ) ; } } System . out . println ( ( "Resource<sp>created<sp>during<sp>deployment:<sp>" + deploymentName ) ) ; for ( com . microsoft . azure . management . resources . GenericResource genericResource : genericResources ) { System . out . println ( ( ( ( ( ( genericResource . resourceProviderNamespace ( ) ) + "Resource<sp>created<sp>during<sp>deployment:<sp>" 1 ) + ( genericResource . resourceType ( ) ) ) + "Resource<sp>created<sp>during<sp>deployment:<sp>" 2 ) + ( genericResource . name ( ) ) ) ) ; genericResource . update ( ) . withTag ( "label" , "deploy1" ) . apply ( ) ; } genericResources = azure . genericResources ( ) . listByTag ( rgName , "label" , "deploy1" ) ; System . out . println ( ( "Resource<sp>created<sp>during<sp>deployment:<sp>" 5 + deploymentName ) ) ; for ( com . microsoft . azure . management . resources . GenericResource genericResource : genericResources ) { System . out . println ( ( ( ( ( ( genericResource . resourceProviderNamespace ( ) ) + "Resource<sp>created<sp>during<sp>deployment:<sp>" 1 ) + ( genericResource . resourceType ( ) ) ) + "Resource<sp>created<sp>during<sp>deployment:<sp>" 2 ) + ( genericResource . name ( ) ) ) ) ; } return true ; } catch ( java . lang . Exception f ) { System . out . println ( f . getMessage ( ) ) ; f . printStackTrace ( ) ; } finally { try { System . out . println ( ( "Deleting<sp>Resource<sp>Group:<sp>" + rgName ) ) ; azure . resourceGroups ( ) . beginDeleteByName ( rgName ) ; System . out . println ( ( "Deleted<sp>Resource<sp>Group:<sp>" + rgName ) ) ; } catch ( java . lang . NullPointerException npe ) { System . out . println ( "Resource<sp>created<sp>during<sp>deployment:<sp>" 3 ) ; } catch ( java . lang . Exception g ) { g . printStackTrace ( ) ; } } return false ; }
org . junit . Assert . assertTrue ( com . microsoft . azure . management . resources . samples . DeployUsingARMTemplateWithTags . runSample ( azure ) )
testWithDisjointSupersets ( ) { java . util . Collection < org . apache . accumulo . core . security . Authorizations > toMinimize = com . google . common . collect . Lists . newArrayList ( new org . apache . accumulo . core . security . Authorizations ( "A" , "B" 0 , "D" , "B" 1 , "F" ) , new org . apache . accumulo . core . security . Authorizations ( "A" , "B" , "B" 0 , "D" , "B" 1 , "F" ) , new org . apache . accumulo . core . security . Authorizations ( "A" , "B" , "B" 0 , "D" , "B" 1 , "F" ) , new org . apache . accumulo . core . security . Authorizations ( "A" , "B" 0 , "D" , "B" 1 , "F" ) , new org . apache . accumulo . core . security . Authorizations ( "B" 0 , "B" 1 , "F" ) , new org . apache . accumulo . core . security . Authorizations ( "G" , "H" , "I" , "J" , "K" , "L" ) , new org . apache . accumulo . core . security . Authorizations ( "H" , "L" ) , new org . apache . accumulo . core . security . Authorizations ( "H" , "I" , "K" , "L" ) ) ; java . util . LinkedHashSet < org . apache . accumulo . core . security . Authorizations > expected = new java . util . LinkedHashSet ( java . util . Arrays . asList ( new org . apache . accumulo . core . security . Authorizations ( "B" 0 , "B" 1 , "F" ) , new org . apache . accumulo . core . security . Authorizations ( "H" , "L" ) ) ) ; java . util . Collection < org . apache . accumulo . core . security . Authorizations > actual = datawave . security . util . AuthorizationsMinimizer . minimize ( toMinimize ) ; "<AssertPlaceHolder>" ; } minimize ( java . util . Collection ) { if ( ( authorizations . size ( ) ) > 1 ) { final java . util . LinkedHashSet < java . util . Set < java . lang . String > > allAuths = authorizations . stream ( ) . map ( ( a ) -> a . getAuthorizations ( ) . stream ( ) . map ( java . lang . String :: new ) . collect ( java . util . stream . Collectors . toCollection ( java . util . HashSet :: new ) ) ) . collect ( java . util . stream . Collectors . toCollection ( LinkedHashSet :: new ) ) ; for ( java . util . Iterator < java . util . Set < java . lang . String > > it = allAuths . iterator ( ) ; it . hasNext ( ) ; ) { java . util . Set < java . lang . String > currentSet = it . next ( ) ; if ( allAuths . stream ( ) . filter ( ( a ) -> ( a != currentSet ) && ( ( a . size ( ) ) <= ( currentSet . size ( ) ) ) ) . anyMatch ( currentSet :: containsAll ) ) it . remove ( ) ; } if ( ( allAuths . size ( ) ) < ( authorizations . size ( ) ) ) { authorizations = allAuths . stream ( ) . map ( ( a ) -> new org . apache . accumulo . core . security . Authorizations ( a . toArray ( new java . lang . String [ 0 ] ) ) ) . collect ( java . util . stream . Collectors . toCollection ( LinkedHashSet :: new ) ) ; } } return authorizations ; }
org . junit . Assert . assertEquals ( expected , actual )
testEqualsTrue ( ) { org . hipparchus . complex . Complex x = new org . hipparchus . complex . Complex ( 3.0 , 4.0 ) ; org . hipparchus . complex . Complex y = new org . hipparchus . complex . Complex ( 3.0 , 4.0 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == other ) { return true ; } if ( other instanceof org . hipparchus . stat . fitting . MultivariateNormalMixtureExpectationMaximization . DataRow ) { return org . hipparchus . util . MathArrays . equals ( row , ( ( org . hipparchus . stat . fitting . MultivariateNormalMixtureExpectationMaximization . DataRow ) ( other ) ) . row ) ; } return false ; }
org . junit . Assert . assertTrue ( x . equals ( y ) )
shouldReturnTrueGivenEmptyString ( ) { boolean isEmpty = org . flips . utils . Utils . isEmpty ( "" ) ; "<AssertPlaceHolder>" ; } isEmpty ( java . lang . Object [ ] ) { return org . springframework . util . ObjectUtils . isEmpty ( array ) ; }
org . junit . Assert . assertEquals ( true , isEmpty )
getDbclientAgainGivesSame ( ) { java . util . Map < java . lang . String , java . lang . String > labels = new java . util . HashMap ( ) ; labels . put ( "env" , "dev" ) ; org . mockito . Mockito . when ( spannerOptions . getSessionLabels ( ) ) . thenReturn ( labels ) ; java . lang . String dbName = "projects/p1/instances/i1/databases/d1" ; com . google . cloud . spanner . DatabaseId db = com . google . cloud . spanner . DatabaseId . of ( dbName ) ; org . mockito . Mockito . when ( spannerOptions . getTransportOptions ( ) ) . thenReturn ( com . google . cloud . grpc . GrpcTransportOptions . newBuilder ( ) . build ( ) ) ; org . mockito . Mockito . when ( spannerOptions . getSessionPoolOptions ( ) ) . thenReturn ( com . google . cloud . spanner . SessionPoolOptions . newBuilder ( ) . build ( ) ) ; com . google . cloud . spanner . DatabaseClient databaseClient = impl . getDatabaseClient ( db ) ; com . google . cloud . spanner . DatabaseClient databaseClient1 = impl . getDatabaseClient ( db ) ; "<AssertPlaceHolder>" . isSameAs ( databaseClient ) ; } getDatabaseClient ( com . google . cloud . spanner . Database ) { return getClient ( ) . getDatabaseClient ( db . getId ( ) ) ; }
org . junit . Assert . assertThat ( databaseClient1 )
testProcessSimpleImageURL ( ) { com . liferay . document . library . document . conversion . internal . DocumentHTMLProcessor documentHTMLProcessor = new com . liferay . document . library . document . conversion . internal . DocumentHTMLProcessor ( ) ; java . lang . String originalHTML = com . liferay . petra . string . StringBundler . concat ( "<html><head><title>test-title</title></head><body><img<sp>src=\"" , "/image/image_gallery?uuid=f17b2a6b-70ee-4121-ae6e-61c22ff47" , "&groupId=807138&t=12798459506\"/></body></html>" ) ; java . io . InputStream originalIS = new java . io . ByteArrayInputStream ( originalHTML . getBytes ( ) ) ; java . io . InputStream processedIS = documentHTMLProcessor . process ( originalIS ) ; java . lang . String processedHTML = org . apache . commons . io . IOUtils . toString ( processedIS , "UTF-8" ) ; java . lang . String expectedHTML = com . liferay . petra . string . StringBundler . concat ( "<html><head><title>test-title</title></head><body><img<sp>src=\"" , "/image/image_gallery?uuid=f17b2a6b-70ee-4121-ae6e-61c22ff47" , "&groupId=807138&t=12798459506&auth_token=authtoken\"/>" , "</body></html>" ) ; "<AssertPlaceHolder>" ; } toString ( java . lang . String , java . lang . String ) { org . xml . sax . XMLReader xmlReader = null ; if ( ( com . liferay . portal . kernel . security . xml . SecureXMLFactoryProviderUtil . getSecureXMLFactoryProvider ( ) ) != null ) { xmlReader = com . liferay . portal . kernel . security . xml . SecureXMLFactoryProviderUtil . newXMLReader ( ) ; } org . dom4j . io . SAXReader saxReader = new org . dom4j . io . SAXReader ( xmlReader ) ; org . dom4j . Document document = saxReader . read ( new com . liferay . portal . kernel . io . unsync . UnsyncStringReader ( xml ) ) ; return com . liferay . petra . xml . Dom4jUtil . toString ( document , indent ) ; }
org . junit . Assert . assertEquals ( expectedHTML , processedHTML )
testOfMaintainsHeaderValueCase ( ) { java . lang . String expected = "vAlUe" ; org . deftserver . util . HttpRequestHelper helper = new org . deftserver . util . HttpRequestHelper ( ) ; helper . addHeader ( "TESTKEY" , expected ) ; org . deftserver . web . http . HttpRequest request = org . deftserver . web . http . HttpRequest . of ( helper . getRequestAsByteBuffer ( ) ) ; java . lang . String actual = request . getHeader ( "TESTKEY" ) ; "<AssertPlaceHolder>" ; } getHeader ( java . lang . String ) { return headers . get ( name . toLowerCase ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testGetType ( ) { final elemental2 . dom . Element element = mock ( elemental2 . dom . Element . class ) ; doReturn ( element ) . when ( view ) . querySelector ( "type" ) ; "<AssertPlaceHolder>" ; } getType ( ) { return delegate . getType ( ) ; }
org . junit . Assert . assertEquals ( element , view . getType ( ) )
testSelectAlbum ( ) { com . iluwatar . pageobject . pages . AlbumPage albumPage = albumListPage . selectAlbum ( "21" ) ; albumPage . navigateToPage ( ) ; "<AssertPlaceHolder>" ; } isAt ( ) { return "Album<sp>Page" . equals ( page . getTitleText ( ) ) ; }
org . junit . Assert . assertTrue ( albumPage . isAt ( ) )
testProcessWithPageOption ( ) { try { instance . setSourceFormat ( Format . PDF ) ; } catch ( edu . illinois . library . cantaloupe . processor . UnsupportedSourceFormatException e ) { return ; } final java . nio . file . Path fixture = edu . illinois . library . cantaloupe . test . TestUtil . getImage ( "pdf-multipage.pdf" ) ; byte [ ] page1 ; byte [ ] page2 ; edu . illinois . library . cantaloupe . image . Info imageInfo ; instance . setStreamFactory ( new edu . illinois . library . cantaloupe . source . PathStreamFactory ( fixture ) ) ; imageInfo = instance . readInfo ( ) ; java . io . ByteArrayOutputStream outputStream = new java . io . ByteArrayOutputStream ( ) ; edu . illinois . library . cantaloupe . operation . OperationList ops = new edu . illinois . library . cantaloupe . operation . OperationList ( ) ; instance . process ( ops , imageInfo , outputStream ) ; page1 = outputStream . toByteArray ( ) ; instance . setStreamFactory ( new edu . illinois . library . cantaloupe . source . PathStreamFactory ( fixture ) ) ; ops = new edu . illinois . library . cantaloupe . operation . OperationList ( ) ; ops . getOptions ( ) . put ( "page" , "2" ) ; outputStream = new java . io . ByteArrayOutputStream ( ) ; instance . process ( ops , imageInfo , outputStream ) ; page2 = outputStream . toByteArray ( ) ; "<AssertPlaceHolder>" ; } process ( edu . illinois . library . cantaloupe . operation . OperationList , edu . illinois . library . cantaloupe . image . Info , java . io . OutputStream ) { super . process ( ops , imageInfo , outputStream ) ; try ( java . io . InputStream inputStream = streamFactory . newInputStream ( ) ) { final java . util . List < java . lang . String > args = getConvertArguments ( ops , imageInfo ) ; final edu . illinois . library . cantaloupe . process . ProcessStarter cmd = new edu . illinois . library . cantaloupe . process . ProcessStarter ( ) ; cmd . setInputProvider ( new edu . illinois . library . cantaloupe . process . Pipe ( inputStream , null ) ) ; cmd . setOutputConsumer ( new edu . illinois . library . cantaloupe . process . Pipe ( null , outputStream ) ) ; edu . illinois . library . cantaloupe . processor . ImageMagickProcessor . LOGGER . info ( "process():<sp>invoking<sp>{}" , java . lang . String . join ( "<sp>" , args ) ) ; cmd . run ( args ) ; } catch ( java . lang . Exception e ) { throw new edu . illinois . library . cantaloupe . processor . ProcessorException ( e . getMessage ( ) , e ) ; } }
org . junit . Assert . assertFalse ( java . util . Arrays . equals ( page1 , page2 ) )
testEquals_notEqualsNull ( ) { org . eclipse . rap . rwt . template . Position position = new org . eclipse . rap . rwt . template . Position ( 3.14F , 42 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; org . eclipse . rap . e4 . internal . RAPEventObjectSupplier . Subscriber other = ( ( org . eclipse . rap . e4 . internal . RAPEventObjectSupplier . Subscriber ) ( obj ) ) ; if ( ( requestor ) == null ) { if ( ( other . requestor ) != null ) return false ; } else if ( ! ( requestor . equals ( other . requestor ) ) ) return false ; if ( ( topic ) == null ) { if ( ( other . topic ) != null ) return false ; } else if ( ! ( topic . equals ( other . topic ) ) ) return false ; return true ; }
org . junit . Assert . assertFalse ( position . equals ( null ) )
testContinueFollowedByOther ( ) { java . lang . String outcome = opennlp . tools . namefind . BilouNameFinderSequenceValidatorTest . OTHER ; java . lang . String [ ] inputSequence = new java . lang . String [ ] { "TypeA" , "TypeA" , "something" , "something" } ; java . lang . String [ ] outcomesSequence = new java . lang . String [ ] { opennlp . tools . namefind . BilouNameFinderSequenceValidatorTest . START_A , opennlp . tools . namefind . BilouNameFinderSequenceValidatorTest . CONTINUE_A } ; "<AssertPlaceHolder>" ; } validSequence ( int , java . lang . String [ ] , java . lang . String [ ] , java . lang . String ) { if ( outcome . endsWith ( BioCodec . CONTINUE ) ) { int li = ( outcomesSequence . length ) - 1 ; if ( li == ( - 1 ) ) { return false ; } else if ( outcomesSequence [ li ] . endsWith ( BioCodec . OTHER ) ) { return false ; } else if ( ( outcomesSequence [ li ] . endsWith ( BioCodec . CONTINUE ) ) || ( outcomesSequence [ li ] . endsWith ( BioCodec . START ) ) ) { java . lang . String previousNameType = opennlp . tools . namefind . NameFinderME . extractNameType ( outcomesSequence [ li ] ) ; java . lang . String nameType = opennlp . tools . namefind . NameFinderME . extractNameType ( outcome ) ; if ( ( previousNameType != null ) || ( nameType != null ) ) { if ( nameType != null ) { if ( nameType . equals ( previousNameType ) ) { return true ; } } return false ; } } } return true ; }
org . junit . Assert . assertFalse ( opennlp . tools . namefind . BilouNameFinderSequenceValidatorTest . validator . validSequence ( 2 , inputSequence , outcomesSequence , outcome ) )
testRegisterOrganizationWithInvalidCountry_checkRollback ( ) { int orgCount = getOrganizationCount ( ) ; final org . oscm . domobjects . Organization organization = new org . oscm . domobjects . Organization ( ) ; organization . setOrganizationId ( organizationId ) ; final org . oscm . internal . vo . VOUserDetails userDetails = new org . oscm . internal . vo . VOUserDetails ( ) ; userDetails . setEMail ( org . oscm . accountservice . bean . TEST_MAIL_ADDRESS ) ; userDetails . setUserId ( "admin" ) ; userDetails . setSalutation ( Salutation . MR ) ; userDetails . setLocale ( "de" ) ; try { runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { @ org . oscm . accountservice . bean . Override public org . oscm . accountservice . bean . Void call ( ) throws org . oscm . accountservice . bean . Exception { accountMgmtLocal . registerOrganization ( organization , null , userDetails , null , "non-existing" , null , null , OrganizationRoleType . SUPPLIER ) ; return null ; } } ) ; } catch ( org . oscm . internal . types . exception . ObjectNotFoundException e ) { } "<AssertPlaceHolder>" ; } getOrganizationCount ( ) { return runTX ( new java . util . concurrent . Callable < java . lang . Long > ( ) { @ org . oscm . accountservice . bean . Override public org . oscm . accountservice . bean . Long call ( ) throws org . oscm . accountservice . bean . Exception { javax . persistence . Query query = mgr . createQuery ( "SELECT<sp>count(org)<sp>FROM<sp>Organization<sp>org" ) ; java . lang . Long result = ( ( java . lang . Long ) ( query . getSingleResult ( ) ) ) ; return result ; } } ) . intValue ( ) ; }
org . junit . Assert . assertEquals ( ( orgCount + 1 ) , getOrganizationCount ( ) )
modifyData_noClassAttributeFoundInDataIsDefinedWithClassAttributeProvided_throwsException ( ) { configureProperlyClassAttribute ( extractElementDataModifier , "class_name" ) ; java . lang . String inputData = "<div><form<sp>class=\"different_class_name\"><sp>\n<sp><input<sp>id=\"input_id\"<sp>/><sp>\n</form></div>" ; java . lang . String actualData = extractElementDataModifier . modifyData ( inputData ) ; "<AssertPlaceHolder>" ; } modifyData ( java . util . List ) { for ( com . cognifide . aet . job . common . collectors . accessibility . AccessibilityIssue issue : data ) { if ( ( ( ( ( com . cognifide . aet . job . common . utils . ParamsHelper . equalOrNotSet ( principle , issue . getCode ( ) ) ) && ( com . cognifide . aet . job . common . utils . ParamsHelper . matches ( errorMessagePattern , issue . getMessage ( ) ) ) ) && ( com . cognifide . aet . job . common . utils . ParamsHelper . equalOrNotSet ( line , issue . getLineNumber ( ) ) ) ) && ( com . cognifide . aet . job . common . utils . ParamsHelper . equalOrNotSet ( column , issue . getColumnNumber ( ) ) ) ) && ( matchesCssSelector ( issue . getElementString ( ) ) ) ) { issue . exclude ( ) ; } } return data ; }
org . junit . Assert . assertEquals ( actualData , "" )
testNonIsolatedSettingDisabledNonIsolationLookup ( ) { final com . smartitengineering . cms . repo . dao . impl . tx . TransactionInMemoryCache memCache = isolatedOnlyInjector . getInstance ( com . smartitengineering . cms . repo . dao . impl . tx . TransactionInMemoryCache . class ) ; final com . smartitengineering . cms . repo . dao . impl . tx . TransactionFactory factory = isolatedOnlyInjector . getInstance ( com . smartitengineering . cms . repo . dao . impl . tx . TransactionFactory . class ) ; com . smartitengineering . cms . repo . dao . impl . tx . DemoDomain d0 = new com . smartitengineering . cms . repo . dao . impl . tx . DemoDomain ( ) ; com . smartitengineering . cms . repo . dao . impl . tx . DemoDomain d1 = new com . smartitengineering . cms . repo . dao . impl . tx . DemoDomain ( ) ; com . smartitengineering . cms . repo . dao . impl . tx . DemoDomain d2 = new com . smartitengineering . cms . repo . dao . impl . tx . DemoDomain ( ) ; d0 . setTestValue ( 0 ) ; d0 . setId ( "1" ) ; d1 . setTestValue ( 1 ) ; d1 . setId ( "1" ) ; d2 . setTestValue ( 2 ) ; d2 . setId ( "1" ) ; com . smartitengineering . cms . repo . dao . impl . tx . TransactionStoreKey k1 = factory . createTransactionStoreKey ( ) ; k1 . setTransactionId ( "1" ) ; k1 . setObjectId ( d0 . getId ( ) ) ; k1 . setObjectType ( d0 . getClass ( ) ) ; k1 . setOpTimestamp ( ( ( java . lang . System . currentTimeMillis ( ) ) - 10 ) ) ; com . smartitengineering . cms . repo . dao . impl . tx . TransactionStoreValue v1 = factory . createTransactionStoreValue ( ) ; v1 . setCurrentState ( d1 ) ; v1 . setOpSequence ( 1 ) ; v1 . setOpState ( OpState . SAVE ) ; v1 . setOriginalState ( d0 ) ; memCache . storeTransactionValue ( k1 , v1 ) ; com . smartitengineering . cms . repo . dao . impl . tx . TransactionStoreKey k2 = factory . createTransactionStoreKey ( ) ; k2 . setTransactionId ( "2" ) ; k2 . setObjectId ( d0 . getId ( ) ) ; k2 . setObjectType ( d0 . getClass ( ) ) ; k2 . setOpTimestamp ( java . lang . System . currentTimeMillis ( ) ) ; com . smartitengineering . cms . repo . dao . impl . tx . TransactionStoreValue v2 = factory . createTransactionStoreValue ( ) ; v2 . setCurrentState ( d2 ) ; v2 . setOpSequence ( 3 ) ; v2 . setOpState ( OpState . UPDATE ) ; v2 . setOriginalState ( d0 ) ; memCache . storeTransactionValue ( k2 , v2 ) ; java . util . concurrent . ConcurrentMap < org . apache . commons . collections . keyvalue . MultiKey , java . util . Deque < com . smartitengineering . cms . repo . dao . impl . tx . Pair < com . smartitengineering . cms . repo . dao . impl . tx . TransactionStoreKey , com . smartitengineering . cms . repo . dao . impl . tx . TransactionStoreValue > > > gCache = getGlobalCache ( memCache ) ; "<AssertPlaceHolder>" ; com . smartitengineering . cms . repo . dao . impl . tx . Pair < com . smartitengineering . cms . repo . dao . impl . tx . TransactionStoreKey , com . smartitengineering . cms . repo . dao . impl . tx . TransactionStoreValue > pair = memCache . getValueForNonIsolatedTransaction ( k1 ) ; } getGlobalCache ( com . smartitengineering . cms . repo . dao . impl . tx . TransactionInMemoryCache ) { com . smartitengineering . cms . repo . dao . impl . tx . TransactionInMemoryCacheImpl impl = ( ( com . smartitengineering . cms . repo . dao . impl . tx . TransactionInMemoryCacheImpl ) ( memCache ) ) ; java . lang . reflect . Field field = com . smartitengineering . cms . repo . dao . impl . tx . TransactionInMemoryCacheImpl . class . getDeclaredField ( "globalCache" ) ; field . setAccessible ( true ) ; java . util . concurrent . ConcurrentMap < org . apache . commons . collections . keyvalue . MultiKey , java . util . Deque < com . smartitengineering . cms . repo . dao . impl . tx . Pair < com . smartitengineering . cms . repo . dao . impl . tx . TransactionStoreKey , com . smartitengineering . cms . repo . dao . impl . tx . TransactionStoreValue > > > gCache = ( ( java . util . concurrent . ConcurrentMap < org . apache . commons . collections . keyvalue . MultiKey , java . util . Deque < com . smartitengineering . cms . repo . dao . impl . tx . Pair < com . smartitengineering . cms . repo . dao . impl . tx . TransactionStoreKey , com . smartitengineering . cms . repo . dao . impl . tx . TransactionStoreValue > > > ) ( field . get ( impl ) ) ) ; return gCache ; }
org . junit . Assert . assertTrue ( gCache . isEmpty ( ) )
testDefineCommand5 ( ) { try { com . gabstudios . cmdline . CmdLine . defineCommand ( "file<sp>!fileName<sp>:file\\d.txt<sp>#Load<sp>files<sp>into<sp>the<sp>system" ) ; org . junit . Assert . fail ( ) ; } catch ( com . gabstudios . cmdline . UnsupportedException e ) { "<AssertPlaceHolder>" ; } } defineCommand ( java . lang . String [ ] ) { com . gabstudios . validate . Validate . defineBoolean ( ( ( ( nameArgs != null ) && ( ( nameArgs . length ) > 0 ) ) && ( ( nameArgs . length ) <= ( com . gabstudios . cmdline . CmdLine . MAX_LENGTH ) ) ) ) . testTrue ( ) . throwValidationExceptionOnFail ( ) . validate ( ) ; final java . util . List < com . gabstudios . cmdline . Token > tokens = com . gabstudios . cmdline . CmdLine . DEFINED_COMMAND_TOKENIZER . tokenize ( nameArgs ) ; final com . gabstudios . cmdline . CommandDefinition command = com . gabstudios . cmdline . CmdLine . createCommandDefinition ( tokens ) ; final java . util . List < java . lang . String > names = command . getNames ( ) ; for ( final java . lang . String name : names ) { final com . gabstudios . cmdline . CommandDefinition existingCommand = com . gabstudios . cmdline . CmdLine . COMMAND_DEFINITION_MAP . put ( name , command ) ; if ( existingCommand != null ) { throw new com . gabstudios . cmdline . DuplicateException ( ( ( "Error:<sp>The<sp>command<sp>'" + name ) + "'<sp>has<sp>already<sp>been<sp>defined.<sp>Define<sp>a<sp>new<sp>command<sp>name." ) ) ; } } return com . gabstudios . cmdline . CmdLine . INSTANCE ; }
org . junit . Assert . assertTrue ( true )
queryPredicate10 ( ) { int begin = 1 ; int end = 10 ; com . aerospike . client . query . Statement stmt = new com . aerospike . client . query . Statement ( ) ; stmt . setNamespace ( args . namespace ) ; stmt . setSetName ( com . aerospike . test . sync . query . TestQueryPredExp . setName ) ; stmt . setFilter ( com . aerospike . client . query . Filter . range ( com . aerospike . test . sync . query . TestQueryPredExp . binName , begin , end ) ) ; stmt . setPredExp ( com . aerospike . client . query . PredExp . recDigestModulo ( 3 ) , com . aerospike . client . query . PredExp . integerValue ( 1 ) , com . aerospike . client . query . PredExp . integerEqual ( ) ) ; com . aerospike . client . query . RecordSet rs = client . query ( null , stmt ) ; try { int count = 0 ; while ( rs . next ( ) ) { count ++ ; } "<AssertPlaceHolder>" ; } finally { rs . close ( ) ; } } next ( ) { int iter = ( eventIter ) ++ ; iter = iter % ( eventLoopArray . length ) ; if ( iter < 0 ) { iter += eventLoopArray . length ; } return eventLoopArray [ iter ] ; }
org . junit . Assert . assertEquals ( 2 , count )
initializesValue ( ) { com . mpatric . mp3agic . MutableInteger integer = new com . mpatric . mp3agic . MutableInteger ( 8 ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( 8 , integer . getValue ( ) )
userPost ( ) { io . seldon . client . beans . UserBean userBean = new io . seldon . client . beans . UserBean ( "abc" , "abc" ) ; io . seldon . client . beans . UserBean responseBean = apiClient . addUser ( userBean ) ; "<AssertPlaceHolder>" ; } addUser ( io . seldon . client . services . UserBean ) { return addUser ( userBean , false ) ; }
org . junit . Assert . assertEquals ( responseBean , userBean )
toStringValues ( ) { biweekly . property . RawProperty property = new biweekly . property . RawProperty ( "name" , "value" ) ; "<AssertPlaceHolder>" ; } toStringValues ( ) { biweekly . property . ValuedProperty < java . lang . String > property = new biweekly . property . ValuedProperty < java . lang . String > ( "value" ) ; org . junit . Assert . assertFalse ( property . toStringValues ( ) . isEmpty ( ) ) ; }
org . junit . Assert . assertFalse ( property . toStringValues ( ) . isEmpty ( ) )
testWebServiceWSDL ( ) { org . apache . tuscany . sca . implementation . java . JavaImplementation type = javaImplementationFactory . createJavaImplementation ( ) ; processor . visitClass ( org . apache . tuscany . sca . implementation . java . introspect . impl . JAXWSProcessorTestCase . Foo3Impl . class , type ) ; org . apache . tuscany . sca . assembly . Service service = org . apache . tuscany . sca . implementation . java . introspect . impl . ModelHelper . getService ( type , "Foo3" ) ; "<AssertPlaceHolder>" ; } getService ( org . apache . tuscany . sca . implementation . java . JavaImplementation , java . lang . String ) { for ( org . apache . tuscany . sca . assembly . Service svc : type . getServices ( ) ) { if ( svc . getName ( ) . equals ( name ) ) { return svc ; } } return null ; }
org . junit . Assert . assertNotNull ( service )
shouldRetrunTrueWhenCheckIfProductIsNotUsedIfEntityIsSaved ( ) { java . lang . String belongsToProductName = "product" ; java . lang . String belongsToCompanyName = "company" ; java . lang . String hasManyName = "products" ; given ( companyProduct . getId ( ) ) . willReturn ( 1L ) ; boolean result = companyProductService . checkIfProductIsNotUsed ( companyProduct , belongsToProductName , belongsToCompanyName , hasManyName ) ; "<AssertPlaceHolder>" ; } checkIfProductIsNotUsed ( com . qcadoo . model . api . Entity , java . lang . String , java . lang . String , java . lang . String ) { if ( ( companyProduct . getId ( ) ) == null ) { com . qcadoo . model . api . Entity product = companyProduct . getBelongsToField ( belongsToProductName ) ; if ( product == null ) { return true ; } else { com . qcadoo . model . api . Entity company = companyProduct . getBelongsToField ( belongsToCompanyName ) ; if ( company == null ) { return true ; } else { com . qcadoo . model . api . search . SearchResult searchResult = company . getHasManyField ( hasManyName ) . find ( ) . add ( com . qcadoo . model . api . search . SearchRestrictions . belongsTo ( belongsToProductName , product ) ) . list ( ) ; return searchResult . getEntities ( ) . isEmpty ( ) ; } } } return true ; }
org . junit . Assert . assertTrue ( result )
testQueryStringMatchesWithParameters ( ) { store . get ( "my<sp>cat" , new org . ocpsoft . rewrite . param . DefaultParameter ( "my<sp>cat" ) ) ; "<AssertPlaceHolder>" ; } parameterExists ( java . lang . String ) { org . ocpsoft . common . util . Assert . notNull ( name , "Parameter<sp>name<sp>pattern<sp>must<sp>not<sp>be<sp>null." ) ; return new org . ocpsoft . rewrite . servlet . config . Query ( ) { final org . ocpsoft . rewrite . param . ParameterizedPatternParser pattern = new org . ocpsoft . rewrite . param . RegexParameterizedPatternParser ( ( ( "{" + name ) + "}" ) ) ; final java . lang . String parameterName = name ; @ org . ocpsoft . rewrite . servlet . config . Override public boolean evaluateHttp ( final org . ocpsoft . rewrite . servlet . http . event . HttpServletRewrite event , final org . ocpsoft . rewrite . context . EvaluationContext context ) { org . ocpsoft . rewrite . servlet . util . QueryStringBuilder queryString = org . ocpsoft . rewrite . servlet . util . QueryStringBuilder . createFromEncoded ( event . getAddress ( ) . getQuery ( ) ) . decode ( ) ; for ( java . lang . String name : queryString . getParameterNames ( ) ) { java . lang . String [ ] parameterValues = queryString . getParameterValues ( name ) ; if ( parameterName . equals ( name ) ) { if ( ( parameterValues == null ) || ( ( parameterValues . length ) == 0 ) ) { return pattern . parse ( "" ) . matches ( ) ; } else { for ( java . lang . String value : parameterValues ) { org . ocpsoft . rewrite . param . ParameterizedPatternResult parseResult = pattern . parse ( value ) ; if ( parseResult . matches ( ) ) { return parseResult . submit ( event , context ) ; } } } } } return false ; } @ org . ocpsoft . rewrite . servlet . config . Override public java . lang . String toString ( ) { return ( "Query.parameterExists(\"" + name ) + "\")" ; } @ org . ocpsoft . rewrite . servlet . config . Override public java . util . Set < java . lang . String > getRequiredParameterNames ( ) { return pattern . getRequiredParameterNames ( ) ; } @ org . ocpsoft . rewrite . servlet . config . Override public void setParameterStore ( org . ocpsoft . rewrite . param . ParameterStore store ) { pattern . setParameterStore ( store ) ; } } ; }
org . junit . Assert . assertTrue ( org . ocpsoft . rewrite . servlet . config . Query . parameterExists ( "my<sp>cat" ) . evaluate ( rewrite , context ) )
test16 ( ) { java . lang . Object obj = null ; boolean expResult = false ; boolean result = instance . equals ( obj ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } final org . demoiselle . jee . security . impl . TokenImpl other = ( ( org . demoiselle . jee . security . impl . TokenImpl ) ( obj ) ) ; return java . util . Objects . equals ( this . key , other . key ) ; }
org . junit . Assert . assertEquals ( expResult , result )
testHasKey ( ) { "<AssertPlaceHolder>" ; } subject ( ) { return org . everit . json . schema . EnumSchema . builder ( ) . possibleValues ( possibleValues ) ; }
org . junit . Assert . assertTrue ( subject ( ) . containsKey ( "a" ) )
test_5 ( ) { com . alibaba . json . bvt . support . spring . FastJsonRedisSerializerTest . User user = new com . alibaba . json . bvt . support . spring . FastJsonRedisSerializerTest . User ( 1 , "" , 25 ) ; byte [ ] serializedValue = serializer . serialize ( user ) ; java . util . Arrays . sort ( serializedValue ) ; "<AssertPlaceHolder>" ; } deserialize ( byte [ ] ) { if ( ( bytes == null ) || ( ( bytes . length ) == 0 ) ) { return null ; } try { return ( ( T ) ( com . alibaba . fastjson . JSON . parseObject ( bytes , fastJsonConfig . getCharset ( ) , type , fastJsonConfig . getParserConfig ( ) , fastJsonConfig . getParseProcess ( ) , JSON . DEFAULT_PARSER_FEATURE , fastJsonConfig . getFeatures ( ) ) ) ) ; } catch ( java . lang . Exception ex ) { throw new org . springframework . data . redis . serializer . SerializationException ( ( "Could<sp>not<sp>deserialize:<sp>" + ( ex . getMessage ( ) ) ) , ex ) ; } }
org . junit . Assert . assertNull ( serializer . deserialize ( serializedValue ) )
isTopicReadWhenLoggedLastVisitOlderThanTopicReadTimeNewerThanTopicShouldReturnTrue ( ) { when ( httpSession . getAttribute ( ConfigKeys . LOGGED ) ) . thenReturn ( "1" ) ; net . jforum . entities . Topic topic = new net . jforum . entities . Topic ( ) ; topic . setLastPost ( new net . jforum . entities . Post ( ) ) ; topic . getLastPost ( ) . setDate ( new java . util . Date ( 10 ) ) ; userSession . setLastVisit ( 1 ) ; topicsReadTime . put ( topic . getId ( ) , 20L ) ; "<AssertPlaceHolder>" ; } isTopicRead ( net . jforum . entities . Topic ) { if ( ! ( this . isLogged ( ) ) ) { return true ; } long lastVisit = this . getLastVisit ( ) ; long postTime = topic . getLastPost ( ) . getDate ( ) . getTime ( ) ; if ( postTime <= lastVisit ) { return true ; } java . lang . Long readTime = this . topicReadTime . get ( topic . getId ( ) ) ; return ( readTime != null ) && ( postTime <= readTime ) ; }
org . junit . Assert . assertTrue ( userSession . isTopicRead ( topic ) )
testCount ( ) { service . setResourceLoader ( new org . springframework . core . io . DefaultResourceLoader ( ) ) ; service . afterPropertiesSet ( ) ; "<AssertPlaceHolder>" ; } countFiles ( ) { org . springframework . core . io . support . ResourcePatternResolver resolver = org . springframework . core . io . support . ResourcePatternUtils . getResourcePatternResolver ( resourceLoader ) ; org . springframework . core . io . Resource [ ] resources ; try { resources = resolver . getResources ( ( ( "file:///" + ( outputDir . getAbsolutePath ( ) ) ) + "/**" ) ) ; } catch ( java . io . IOException e ) { throw new java . lang . IllegalStateException ( "Unexpected<sp>problem<sp>resolving<sp>files" , e ) ; } return resources . length ; }
org . junit . Assert . assertEquals ( 0 , service . countFiles ( ) )
testParsingRecoveryNoInfiniteLoopDuringAdaptivePredictionAtEof ( ) { java . lang . String testrigName = "parsing-recovery" ; java . lang . String hostname = "ios-blankish-file" ; java . util . List < java . lang . String > configurationNames = com . google . common . collect . ImmutableList . of ( hostname ) ; org . batfish . main . Batfish batfish = org . batfish . main . BatfishTestUtils . getBatfishFromTestrigText ( org . batfish . main . TestrigText . builder ( ) . setConfigurationText ( ( ( org . batfish . grammar . cisco . CiscoGrammarTest . TESTRIGS_PREFIX ) + testrigName ) , configurationNames ) . build ( ) , _folder ) ; batfish . getSettings ( ) . setDisableUnrecognized ( false ) ; java . util . Map < java . lang . String , org . batfish . datamodel . Configuration > configurations = batfish . loadConfigurations ( ) ; "<AssertPlaceHolder>" ; } hasSize ( org . hamcrest . Matcher ) { return new org . batfish . datamodel . matchers . RowsMatchersImpl . HasSize ( subMatcher ) ; }
org . junit . Assert . assertThat ( configurations . entrySet ( ) , org . hamcrest . Matchers . hasSize ( 1 ) )
testCustomFrameBuilder ( ) { final com . syncleus . ferma . Person o = new com . syncleus . ferma . Person ( ) ; final org . apache . tinkerpop . gremlin . structure . Graph g = org . apache . tinkerpop . gremlin . tinkergraph . structure . TinkerGraph . open ( ) ; final com . syncleus . ferma . FramedGraph fg = new com . syncleus . ferma . DelegatingFramedGraph ( g , new com . syncleus . ferma . framefactories . FrameFactory ( ) { @ com . syncleus . ferma . SuppressWarnings ( "unchecked" ) @ com . syncleus . ferma . Override public < T > T create ( final org . apache . tinkerpop . gremlin . structure . Element e , final java . lang . Class < T > kind ) { return ( ( T ) ( o ) ) ; } } , new com . syncleus . ferma . typeresolvers . PolymorphicTypeResolver ( ) ) ; final com . syncleus . ferma . Person person = fg . addFramedVertex ( Person . DEFAULT_INITIALIZER ) ; "<AssertPlaceHolder>" ; } addFramedVertex ( java . lang . Class ) { return this . addFramedVertex ( new com . syncleus . ferma . DefaultClassInitializer ( kind ) ) ; }
org . junit . Assert . assertEquals ( o , person )
testEmptyArray ( ) { com . mictale . jsonite . JsonValue json = com . mictale . jsonite . JsonValue . parse ( "[]" ) ; com . mictale . jsonite . JsonArray arr = json . asArray ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return members . isEmpty ( ) ; }
org . junit . Assert . assertEquals ( arr . isEmpty ( ) , true )
testSelectByIds ( ) { org . apache . ibatis . session . SqlSession sqlSession = tk . mybatis . mapper . mapper . MybatisHelper . getSqlSession ( ) ; try { tk . mybatis . mapper . mapper . CountryMapper mapper = sqlSession . getMapper ( tk . mybatis . mapper . mapper . CountryMapper . class ) ; java . util . List < tk . mybatis . mapper . model . Country > countryList = mapper . selectByIds ( "1,2,3" ) ; "<AssertPlaceHolder>" ; } finally { sqlSession . close ( ) ; } } selectByIds ( org . apache . ibatis . mapping . MappedStatement ) { final java . lang . Class < ? > entityClass = getEntityClass ( ms ) ; setResultType ( ms , entityClass ) ; java . lang . StringBuilder sql = new java . lang . StringBuilder ( ) ; sql . append ( tk . mybatis . mapper . mapperhelper . SqlHelper . selectAllColumns ( entityClass ) ) ; sql . append ( tk . mybatis . mapper . mapperhelper . SqlHelper . fromTable ( entityClass , tableName ( entityClass ) ) ) ; java . util . Set < tk . mybatis . mapper . entity . EntityColumn > columnList = tk . mybatis . mapper . mapperhelper . EntityHelper . getPKColumns ( entityClass ) ; if ( ( columnList . size ( ) ) == 1 ) { tk . mybatis . mapper . entity . EntityColumn column = columnList . iterator ( ) . next ( ) ; sql . append ( "<sp>where<sp>" ) ; sql . append ( column . getColumn ( ) ) ; sql . append ( "<sp>in<sp>(${_parameter})" ) ; } else { throw new tk . mybatis . mapper . MapperException ( ( ( "<sp>selectByIds<sp>[" + ( entityClass . getCanonicalName ( ) ) ) + "]<sp>@Id<sp>" ) ) ; } return sql . toString ( ) ; }
org . junit . Assert . assertEquals ( 3 , countryList . size ( ) )
testMultipleReturnValues ( ) { java . lang . Object o = deliver ( message7 , 7 , 7 ) ; "<AssertPlaceHolder>" ; } deliver ( java . io . Serializable , int , int ) { try { return dispatcher . call ( new dmg . cells . nucleus . CellMessage ( new dmg . cells . nucleus . CellAddressCore ( "test" ) , msg ) ) ; } finally { org . junit . Assert . assertEquals ( listener1 . delivered , result1 ) ; org . junit . Assert . assertEquals ( listener2 . delivered , result2 ) ; } }
org . junit . Assert . assertEquals ( o , null )
correctlyParseNullString ( ) { au . com . bytecode . opencsv . StringWriter sw = new au . com . bytecode . opencsv . StringWriter ( ) ; au . com . bytecode . opencsv . CSVWriter csvw = new au . com . bytecode . opencsv . CSVWriter ( sw , ',' , '\'' ) ; csvw . writeNext ( null ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . getName ( ) ; }
org . junit . Assert . assertEquals ( 0 , sw . toString ( ) . length ( ) )
test_x_$ ( ) { org . antlr . v4 . runtime . atn . PredictionContext r = contextCache . join ( x ( false ) , PredictionContext . EMPTY_LOCAL ) ; System . out . println ( org . antlr . v4 . test . tool . TestGraphNodes . toDOTString ( r ) ) ; java . lang . String expecting = "digraph<sp>G<sp>{\n" + ( ( "rankdir=LR;\n" + "<sp>s0[label=\"*\"];\n" ) + "}\n" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expecting , org . antlr . v4 . test . tool . TestGraphNodes . toDOTString ( r ) )
testMergeOverlappingStrings ( ) { final java . util . List < org . apache . commons . lang3 . tuple . Pair < java . lang . String , java . lang . String > > outputs = new java . util . ArrayList < org . apache . commons . lang3 . tuple . Pair < java . lang . String , java . lang . String > > ( ) ; uk . org . rbc1b . roms . db . common . MergeUtil . merge ( java . util . Arrays . asList ( "bar" , "foo" ) , java . util . Arrays . asList ( "foo" , "quux" ) , String . CASE_INSENSITIVE_ORDER , new MergeUtil . Callback < java . lang . String , java . lang . String > ( ) { @ java . lang . Override public void output ( java . lang . String leftValue , java . lang . String rightValue ) { outputs . add ( new ImmutablePair < java . lang . String , java . lang . String > ( leftValue , rightValue ) ) ; } } ) ; "<AssertPlaceHolder>" ; } output ( java . lang . String , uk . org . rbc1b . roms . db . common . Container ) { outputs . add ( new ImmutablePair < java . lang . String , uk . org . rbc1b . roms . db . common . Container > ( left , right ) ) ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( new org . apache . commons . lang3 . tuple . ImmutablePair < java . lang . String , java . lang . String > ( "bar" , null ) , new org . apache . commons . lang3 . tuple . ImmutablePair < java . lang . String , java . lang . String > ( "foo" , "foo" ) , new org . apache . commons . lang3 . tuple . ImmutablePair < java . lang . String , java . lang . String > ( null , "quux" ) ) , outputs )
testIntegerVariableGet ( ) { jnr . ffi . GlobalVariableTest . TestLib lib = jnr . ffi . TstUtil . loadTestLib ( jnr . ffi . GlobalVariableTest . TestLib . class ) ; jnr . ffi . Variable < java . lang . Long > var = lib . gvar_s32 ( ) ; final int MAGIC = - 559038737 ; lib . gvar_s32_set ( MAGIC ) ; "<AssertPlaceHolder>" ; } intValue ( ) { return ( ( int ) ( value ) ) ; }
org . junit . Assert . assertEquals ( MAGIC , var . get ( ) . intValue ( ) )
whenSortingEntitiesByNameReversed_thenCorrectlySorted ( ) { final java . util . List < com . baeldung . java8 . entity . Human > humans = com . google . common . collect . Lists . newArrayList ( new com . baeldung . java8 . entity . Human ( "Sarah" , 10 ) , new com . baeldung . java8 . entity . Human ( "Jack" , 12 ) ) ; final java . util . Comparator < com . baeldung . java8 . entity . Human > comparator = ( h1 , h2 ) -> h1 . getName ( ) . compareTo ( h2 . getName ( ) ) ; humans . sort ( comparator . reversed ( ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Integer ) { return emf . unwrap ( org . hibernate . SessionFactory . class ) . getCurrentSession ( ) . get ( org . baeldung . demo . model . Foo . class , id ) ; }
org . junit . Assert . assertThat ( humans . get ( 0 ) , org . hamcrest . Matchers . equalTo ( new com . baeldung . java8 . entity . Human ( "Sarah" , 10 ) ) )
testVersionFactory ( ) { co . cask . tephra . util . HBaseVersion . Version foundVersion = co . cask . tephra . util . HBaseVersion . get ( ) ; "<AssertPlaceHolder>" ; } getExpectedVersion ( ) { return HBaseVersion . Version . HBASE_98 ; }
org . junit . Assert . assertEquals ( getExpectedVersion ( ) , foundVersion )
testNewStager_xml ( ) { org . mockito . Mockito . when ( stageMojo . isAppEngineCompatiblePackaging ( ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( stageMojo . isAppEngineWebXmlBased ( ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( stageMojo . getArtifact ( ) ) . thenReturn ( tempFolder . getRoot ( ) . toPath ( ) ) ; com . google . cloud . tools . maven . stage . Stager stager = com . google . cloud . tools . maven . stage . Stager . newStager ( stageMojo ) ; "<AssertPlaceHolder>" ; } newStager ( com . google . cloud . tools . maven . stage . AbstractStageMojo ) { if ( ! ( stageMojo . isAppEngineCompatiblePackaging ( ) ) ) { return new com . google . cloud . tools . maven . stage . NoOpStager ( ) ; } if ( ( ( stageMojo . getArtifact ( ) ) == null ) || ( ! ( java . nio . file . Files . exists ( stageMojo . getArtifact ( ) ) ) ) ) { throw new org . apache . maven . plugin . MojoExecutionException ( ( "\nCould<sp>not<sp>determine<sp>appengine<sp>environment,<sp>did<sp>you<sp>package<sp>your<sp>application?" + "\nRun<sp>\'mvn<sp>package<sp>appengine:stage\'" ) ) ; } return stageMojo . isAppEngineWebXmlBased ( ) ? com . google . cloud . tools . maven . stage . AppEngineWebXmlStager . newAppEngineWebXmlStager ( stageMojo ) : com . google . cloud . tools . maven . stage . AppYamlStager . newAppYamlStager ( stageMojo ) ; }
org . junit . Assert . assertEquals ( com . google . cloud . tools . maven . stage . AppEngineWebXmlStager . class , stager . getClass ( ) )
ThreeCollisionsEquals ( ) { io . usethesource . capsule . SetSmokeTest . DummyValue hash98304_obj1 = new io . usethesource . capsule . SetSmokeTest . DummyValue ( 1 , 98304 ) ; io . usethesource . capsule . SetSmokeTest . DummyValue hash98304_obj2 = new io . usethesource . capsule . SetSmokeTest . DummyValue ( 2 , 98304 ) ; io . usethesource . capsule . SetSmokeTest . DummyValue hash98304_obj3 = new io . usethesource . capsule . SetSmokeTest . DummyValue ( 3 , 98304 ) ; io . usethesource . capsule . Set . Immutable < io . usethesource . capsule . SetSmokeTest . DummyValue > xs = io . usethesource . capsule . core . PersistentTrieSet . of ( hash98304_obj1 , hash98304_obj2 , hash98304_obj3 ) ; io . usethesource . capsule . Set . Immutable < io . usethesource . capsule . SetSmokeTest . DummyValue > ys = io . usethesource . capsule . core . PersistentTrieSet . of ( hash98304_obj3 , hash98304_obj2 , hash98304_obj1 ) ; "<AssertPlaceHolder>" ; } of ( T , U , V ) { return new io . usethesource . capsule . api . ImmutableTriple ( java . util . Objects . requireNonNull ( fst ) , java . util . Objects . requireNonNull ( snd ) , java . util . Objects . requireNonNull ( trd ) ) ; }
org . junit . Assert . assertEquals ( xs , ys )
testInvoke_overloadedOneParam ( ) { java . lang . Object [ ] args = new java . lang . Object [ ] { 1 } ; when ( soapCall . getSoapClientMethod ( ) ) . thenReturn ( com . google . api . ads . common . lib . soap . testing . MockSoapClient . class . getMethod ( "testOverloaded" , int . class ) ) ; when ( soapCall . getSoapClient ( ) ) . thenReturn ( new com . google . api . ads . common . lib . soap . testing . MockSoapClient ( ) ) ; when ( soapCall . getSoapArgs ( ) ) . thenReturn ( args ) ; java . lang . Object result = soapClientHandler . invoke ( soapCall ) ; "<AssertPlaceHolder>" ; } invoke ( org . apache . axis . MessageContext ) { if ( msgContext == null ) { throw org . apache . axis . AxisFault . makeFault ( new java . lang . NullPointerException ( "Null<sp>message<sp>context" ) ) ; } try { com . google . api . client . http . HttpResponse response = null ; com . google . api . client . http . HttpRequest postRequest = createHttpRequest ( msgContext ) ; response = postRequest . execute ( ) ; msgContext . setResponseMessage ( createResponseMessage ( response ) ) ; } catch ( java . lang . RuntimeException | javax . xml . soap . SOAPException | java . io . IOException e ) { throw org . apache . axis . AxisFault . makeFault ( e ) ; } }
org . junit . Assert . assertSame ( 1 , result )
forEach ( ) { org . eclipse . collections . api . bag . MutableBag < java . lang . Integer > result = org . eclipse . collections . impl . bag . mutable . HashBag . newBag ( ) ; org . eclipse . collections . api . bag . sorted . ImmutableSortedBag < java . lang . Integer > collection = this . classUnderTest ( ) ; collection . forEach ( org . eclipse . collections . impl . block . procedure . CollectionAddProcedure . on ( result ) ) ; "<AssertPlaceHolder>" ; } on ( java . util . Collection ) { return new org . eclipse . collections . impl . block . procedure . CollectionAddProcedure ( newCollection ) ; }
org . junit . Assert . assertEquals ( collection , result )
shouldReturnDetectionStatusOfSurvivedWhenNoFailuresOrErrors ( ) { this . testee = new org . pitest . mutationtest . execute . CheckTestHasFailedResultListener ( false ) ; this . testee . onTestSuccess ( new org . pitest . testapi . TestResult ( this . description , null ) ) ; "<AssertPlaceHolder>" ; } status ( ) { if ( ! ( this . failingTests . isEmpty ( ) ) ) { return org . pitest . mutationtest . DetectionStatus . KILLED ; } else { return org . pitest . mutationtest . DetectionStatus . SURVIVED ; } }
org . junit . Assert . assertEquals ( DetectionStatus . SURVIVED , this . testee . status ( ) )
testConnectorResources ( ) { java . lang . String testPool = "connectorPool" + ( generateRandomString ( ) ) ; java . lang . String testConnector = "connectorResource" + ( generateRandomString ( ) ) ; org . glassfish . admingui . devtests . StandaloneTest standaloneTest = new org . glassfish . admingui . devtests . StandaloneTest ( ) ; org . glassfish . admingui . devtests . ClusterTest clusterTest = new org . glassfish . admingui . devtests . ClusterTest ( ) ; standaloneTest . deleteAllStandaloneInstances ( ) ; clusterTest . deleteAllClusters ( ) ; clickAndWait ( "treeForm:tree:resources:Connectors:connectorConnectionPools:connectorConnectionPools_link" , org . glassfish . admingui . devtests . ConnectorsTest . TRIGGER_CONNECTOR_CONNECTION_POOLS ) ; clickAndWait ( "propertyForm:poolTable:topActionsGroup1:newButton" , org . glassfish . admingui . devtests . ConnectorsTest . TRIGGER_NEW_CONNECTOR_CONNECTION_POOL_STEP_1 ) ; setFieldValue ( "connectorResource" 1 , testPool ) ; selectDropdownOption ( "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" , "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" 2 ) ; waitForCondition ( "document.getElementById('propertyForm:propertySheet:generalPropertySheet:connectionDefProp:db').value<sp>!=<sp>''" , 10000 ) ; selectDropdownOption ( "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" 9 , "connectorResource" 2 ) ; waitForButtonEnabled ( "connectorResource" 3 ) ; clickAndWait ( "connectorResource" 3 , org . glassfish . admingui . devtests . ConnectorsTest . TRIGGER_NEW_CONNECTOR_CONNECTION_POOL_STEP_2 ) ; selectDropdownOption ( "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" 3 , "NoTransaction" ) ; clickAndWait ( "connectorResource" 5 , org . glassfish . admingui . devtests . ConnectorsTest . TRIGGER_CONNECTOR_CONNECTION_POOLS ) ; "<AssertPlaceHolder>" ; clickAndWait ( "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" 8 , org . glassfish . admingui . devtests . ConnectorsTest . TRIGGER_CONNECTOR_RESOURCE ) ; clickAndWait ( "connectorResource" 8 , org . glassfish . admingui . devtests . ConnectorsTest . TRIGGER_NEW_CONNECTOR_RESOURCE ) ; setFieldValue ( "connectorResource" 4 , testConnector ) ; selectDropdownOption ( "connectorResource" 0 , testPool ) ; clickAndWait ( "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" 5 , org . glassfish . admingui . devtests . ConnectorsTest . TRIGGER_CONNECTOR_RESOURCE ) ; testDisableButton ( testConnector , "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" 6 , "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" 0 , "connectorResource" 6 , "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" 7 , org . glassfish . admingui . devtests . ConnectorsTest . TRIGGER_CONNECTOR_RESOURCE , org . glassfish . admingui . devtests . ConnectorsTest . TRIGGER_EDIT_CONNECTOR_RESOURCE , "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" 4 ) ; testEnableButton ( testConnector , "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" 6 , "propertyForm:resourcesTable:topActionsGroup1:button2" , "connectorResource" 6 , "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" 7 , org . glassfish . admingui . devtests . ConnectorsTest . TRIGGER_CONNECTOR_RESOURCE , org . glassfish . admingui . devtests . ConnectorsTest . TRIGGER_EDIT_CONNECTOR_RESOURCE , "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" 1 ) ; deleteRow ( "propertyForm:resourcesTable:topActionsGroup1:button1" , "propertyForm:propertySheet:generalPropertySheet:resAdapterProp:db" 6 , testConnector ) ; clickAndWait ( "treeForm:tree:resources:Connectors:connectorConnectionPools:connectorConnectionPools_link" , org . glassfish . admingui . devtests . ConnectorsTest . TRIGGER_CONNECTOR_CONNECTION_POOLS ) ; deleteRow ( "propertyForm:poolTable:topActionsGroup1:button1" , "connectorResource" 7 , testPool ) ; } isTextPresent ( java . lang . String ) { boolean isTextPresent = false ; try { isTextPresent = super . isTextPresent ( string ) ; } catch ( java . lang . Exception e ) { sleep ( 1000 ) ; isTextPresent = super . isTextPresent ( string ) ; } return isTextPresent ; }
org . junit . Assert . assertTrue ( isTextPresent ( testPool ) )
writeSourcePropagatesEof ( ) { okio . Source source = new okio . Buffer ( ) . writeUtf8 ( "abcd" ) ; try { sink . write ( source , 8 ) ; org . junit . Assert . fail ( ) ; } catch ( java . io . EOFException expected ) { } sink . flush ( ) ; "<AssertPlaceHolder>" ; } readUtf8 ( ) { buffer . writeAll ( source ) ; return buffer . readUtf8 ( ) ; }
org . junit . Assert . assertEquals ( "abcd" , data . readUtf8 ( ) )
testDepthFirstTraversal ( ) { java . lang . String [ ] output = new java . lang . String [ ] { "Root" , "Leaf1" , "Child1" , "Child1Leaf" , "Child2" , "Child2Leaf1" , "Child2Leaf2" , "Leaf2" } ; int i = 0 ; for ( edu . illinois . cs . cogcomp . core . datastructures . trees . Tree < java . lang . String > t : edu . illinois . cs . cogcomp . core . datastructures . trees . TreeTraversal . depthFirstTraversal ( tree ) ) { "<AssertPlaceHolder>" ; } } getLabel ( ) { return label ; }
org . junit . Assert . assertEquals ( output [ ( i ++ ) ] , t . getLabel ( ) )