input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
shouldSupportCustomMessageSource ( ) { org . springframework . springfaces . message . ObjectMessageSource messageSource = mock ( org . springframework . springfaces . message . ObjectMessageSource . class ) ; given ( messageSource . getMessage ( org . springframework . springfaces . selectitems . ui . UISelectItemsTest . SampleEnum . ONE , null , this . locale ) ) . willReturn ( "Eins" ) ; javax . faces . component . UIComponent parent = mockParent ( javax . faces . component . UISelectMany . class ) ; this . selectItems . setParent ( parent ) ; this . selectItems . setValue ( java . util . Collections . singleton ( org . springframework . springfaces . selectitems . ui . UISelectItemsTest . SampleEnum . ONE ) ) ; this . selectItems . setMessageSource ( messageSource ) ; javax . faces . model . SelectItem actual = this . selectItems . getSelectItems ( ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getLabel ( ) { javax . faces . component . UIComponent component = getComponent ( ) ; return ( ( java . lang . String ) ( component == null ? null : component . getAttributes ( ) . get ( "label" ) ) ) ; }
org . junit . Assert . assertThat ( actual . getLabel ( ) , org . hamcrest . Matchers . is ( "Eins" ) )
processOptionsIname ( ) { org . apache . hadoop . fs . shell . find . Find find = new org . apache . hadoop . fs . shell . find . Find ( ) ; find . setConf ( org . apache . hadoop . fs . shell . find . TestFind . conf ) ; java . lang . String args = "path<sp>-iname<sp>namemask" ; java . lang . String expected = "And(;Iname-Name(namemask;),Print(;))" ; find . processOptions ( getArgs ( args ) ) ; org . apache . hadoop . fs . shell . find . Expression expression = find . getRootExpression ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( ( json ) == null ) { return "Test<sp>codec<sp>" + ( id ) ; } else { return json . toString ( ) ; } }
org . junit . Assert . assertEquals ( expected , expression . toString ( ) )
testWriteAmbiguousOrgs ( ) { java . io . StringWriter writer = new java . io . StringWriter ( ) ; orgManager . writeAmbiguousOrgs ( writer ) ; java . lang . String result = writer . toString ( ) ; java . lang . String expected = org . apache . commons . io . IOUtils . toString ( getClass ( ) . getResource ( "expected_ambiguous_orgs.csv" ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return value ; }
org . junit . Assert . assertEquals ( expected , result )
shouldAssembleExpectedResultForAccessToken ( ) { org . mitre . oauth2 . model . OAuth2AccessTokenEntity accessToken = accessToken ( new java . util . Date ( ( 123 * 1000L ) ) , scopes ( "user_id" 3 , "bar" ) , null , "Bearer" , oauth2AuthenticationWithUser ( oauth2Request ( "clientId" ) , "name" ) ) ; org . mitre . openid . connect . model . UserInfo userInfo = userInfo ( "sub" ) ; java . util . Set < java . lang . String > authScopes = scopes ( "user_id" 3 , "bar" , "baz" ) ; java . util . Map < java . lang . String , java . lang . Object > result = assembler . assembleFrom ( accessToken , userInfo , authScopes ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new ImmutableMap . Builder < java . lang . String , java . lang . Object > ( ) . put ( "sub" , "sub" ) . put ( "exp" , 123L ) . put ( "expires_at" , org . mitre . oauth2 . service . impl . TestDefaultIntrospectionResultAssembler . dateFormat . valueToString ( new java . util . Date ( ( 123 * 1000L ) ) ) ) . put ( "user_id" 0 , "user_id" 1 ) . put ( "user_id" 4 , Boolean . TRUE ) . put ( "user_id" , "name" ) . put ( "client_id" , "clientId" ) . put ( "user_id" 2 , "Bearer" ) . build ( ) ; "<AssertPlaceHolder>" ; } assembleFrom ( org . mitre . oauth2 . model . OAuth2RefreshTokenEntity , org . mitre . openid . connect . model . UserInfo , java . util . Set ) { java . util . Map < java . lang . String , java . lang . Object > result = newLinkedHashMap ( ) ; org . springframework . security . oauth2 . provider . OAuth2Authentication authentication = refreshToken . getAuthenticationHolder ( ) . getAuthentication ( ) ; result . put ( org . mitre . oauth2 . service . impl . ACTIVE , true ) ; java . util . Set < java . lang . String > scopes = com . google . common . collect . Sets . intersection ( authScopes , authentication . getOAuth2Request ( ) . getScope ( ) ) ; result . put ( org . mitre . oauth2 . service . impl . SCOPE , com . google . common . base . Joiner . on ( org . mitre . oauth2 . service . impl . SCOPE_SEPARATOR ) . join ( scopes ) ) ; if ( ( refreshToken . getExpiration ( ) ) != null ) { try { result . put ( org . mitre . oauth2 . service . impl . EXPIRES_AT , dateFormat . valueToString ( refreshToken . getExpiration ( ) ) ) ; result . put ( org . mitre . oauth2 . service . impl . EXP , ( ( refreshToken . getExpiration ( ) . getTime ( ) ) / 1000L ) ) ; } catch ( java . text . ParseException e ) { org . mitre . oauth2 . service . impl . DefaultIntrospectionResultAssembler . logger . error ( "Parse<sp>exception<sp>in<sp>token<sp>introspection" , e ) ; } } if ( userInfo != null ) { result . put ( org . mitre . oauth2 . service . impl . SUB , userInfo . getSub ( ) ) ; } else { result . put ( org . mitre . oauth2 . service . impl . SUB , authentication . getName ( ) ) ; } if ( ( authentication . getUserAuthentication ( ) ) != null ) { result . put ( org . mitre . oauth2 . service . impl . USER_ID , authentication . getUserAuthentication ( ) . getName ( ) ) ; } result . put ( org . mitre . oauth2 . service . impl . CLIENT_ID , authentication . getOAuth2Request ( ) . getClientId ( ) ) ; return result ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
testBuildCluster ( ) { java . util . Map < java . lang . String , java . lang . String > hostNames = singletonMap ( "host1" , "HEALTHY" ) ; java . util . Map < java . lang . String , java . util . List < java . lang . String > > map = singletonMap ( "group1" , asList ( "comp1" , "comp2" ) ) ; when ( client . doesBlueprintExist ( "id" ) ) . thenReturn ( true ) ; when ( client . getBlueprintMap ( "id" ) ) . thenReturn ( map ) ; when ( context . getFocusValue ( ) ) . thenReturn ( "id" ) ; when ( client . getHostNames ( ) ) . thenReturn ( hostNames ) ; java . lang . String result = clusterCommands . buildCluster ( new com . sequenceiq . ambari . shell . completion . Blueprint ( "id" ) ) ; verify ( client ) . doesBlueprintExist ( "id" ) ; verify ( client ) . getBlueprintMap ( "id" ) ; verify ( client ) . getHostGroups ( "id" ) ; "<AssertPlaceHolder>" ; } buildCluster ( com . sequenceiq . ambari . shell . completion . Blueprint ) { java . lang . String message ; java . lang . String blueprint = id . getName ( ) ; if ( client . doesBlueprintExist ( blueprint ) ) { context . setFocus ( blueprint , FocusType . CLUSTER_BUILD ) ; context . setHint ( Hints . ASSIGN_HOSTS ) ; message = java . lang . String . format ( "%s\n%s" , renderSingleMap ( client . getHostNames ( ) , "HOSTNAME" , "STATE" ) , renderMultiValueMap ( client . getBlueprintMap ( blueprint ) , "HOSTGROUP" , "COMPONENT" ) ) ; createNewHostGroups ( ) ; } else { message = "Not<sp>a<sp>valid<sp>blueprint<sp>id" ; } return message ; }
org . junit . Assert . assertEquals ( java . lang . String . format ( "%s\n%s" , renderSingleMap ( hostNames , "HOSTNAME" , "STATE" ) , renderMultiValueMap ( map , "HOSTGROUP" , "%s\n%s" 0 ) ) , result )
parseContainsFilter ( ) { org . deegree . filter . Filter filter = parse ( "testfilter17.xml" ) ; "<AssertPlaceHolder>" ; } parse ( java . util . Map ) { java . lang . String procedure = getRequired ( prams , "PROCEDURE" ) ; java . lang . String format = prams . get ( "OUTPUTFORMAT" ) ; if ( format == null ) { format = org . deegree . protocol . sos . describesensor . DescribeSensor100KVPAdapter . DEFAULT_FORMAT ; } return new org . deegree . protocol . sos . describesensor . DescribeSensor ( procedure , format ) ; }
org . junit . Assert . assertNotNull ( filter )
testFlushRemoval ( ) { final org . batoo . jpa . core . test . remove . Parent parent = this . createParent ( ) ; this . persist ( parent ) ; this . flush ( ) ; this . remove ( parent ) ; this . commit ( ) ; "<AssertPlaceHolder>" ; } getCounts ( ) { final int [ ] counts = new int [ 4 ] ; try { for ( int i = 0 ; i < 4 ; i ++ ) { counts [ i ] = new org . batoo . jpa . jdbc . dbutils . QueryRunner ( this . em ( ) . unwrap ( javax . sql . DataSource . class ) ) . query ( ( "SELECT<sp>COUNT(*)<sp>FROM<sp>Child" + ( i + 1 ) ) , new org . batoo . jpa . jdbc . dbutils . SingleValueHandler < java . lang . Number > ( ) ) . intValue ( ) ; } org . batoo . jpa . core . test . remove . RemoveTest . LOG . debug ( "Remaining<sp>children<sp>are:<sp>{0},<sp>{1},<sp>{2},<sp>{3}" , counts [ 0 ] , counts [ 1 ] , counts [ 2 ] , counts [ 3 ] ) ; } catch ( final java . sql . SQLException e ) { throw new java . lang . RuntimeException ( e ) ; } return counts ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( new int [ ] { 0 , 0 , 2 , 0 } , this . getCounts ( ) ) )
equalsNull ( ) { "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { else if ( object instanceof org . mcsoxford . rss . RSSBase ) { final org . mcsoxford . rss . RSSBase other = ( ( org . mcsoxford . rss . RSSBase ) ( object ) ) ; if ( ( link ) == null ) { return ( other . link ) == null ; } return link . equals ( other . link ) ; } else { return false ; } }
org . junit . Assert . assertFalse ( base . equals ( null ) )
testBuildPartialIndex ( ) { final cern . colt . list . ObjectArrayList cts = new cern . colt . list . ObjectArrayList ( ) ; cts . add ( com . anjlab . sat3 . Helper . createFormula ( 1 , 2 , 3 , 2 , 3 , 4 , 3 , 4 , 5 , 4 , 5 , 6 , 5 , 6 , 7 ) ) ; cts . add ( com . anjlab . sat3 . Helper . createFormula ( 2 , 5 , 1 , 5 , 1 , 3 , 1 , 3 , 4 , 3 , 4 , 6 , 4 , 6 , 7 ) ) ; com . anjlab . sat3 . VarPairsIndexFactory . getInstance ( ) . buildIndex ( cts ) ; com . anjlab . sat3 . VarPairsIndexFactory . VarPairsIndex index = com . anjlab . sat3 . VarPairsIndexFactory . getInstance ( ) . buildPartialIndex ( cts , ( ( com . anjlab . sat3 . ICompactTripletsStructureHolder ) ( cts . get ( 0 ) ) ) , 0 , 0 ) ; index . forEachPair ( new cern . colt . function . LongObjectProcedure ( ) { public boolean apply ( long key , java . lang . Object value ) { int varName1_ = ( ( int ) ( key > > 21 ) ) ; int varName2_ = ( ( int ) ( key & 2097151 ) ) ; System . out . println ( ( ( varName1_ + ",<sp>" ) + varName2_ ) ) ; cern . colt . list . LongArrayList tiers = ( ( cern . colt . list . LongArrayList ) ( value ) ) ; for ( int i = 0 ; i < ( tiers . size ( ) ) ; i ++ ) { long formulaAndTierIndex = tiers . get ( i ) ; int formulaIndex = ( ( int ) ( formulaAndTierIndex > > 32 ) ) ; int tierIndex = ( ( int ) ( formulaAndTierIndex & 4294967295L ) ) ; com . anjlab . sat3 . ICompactTripletsStructure formula = ( ( com . anjlab . sat3 . ICompactTripletsStructure ) ( cts . get ( formulaIndex ) ) ) ; com . anjlab . sat3 . ITier tier = formula . getTier ( tierIndex ) ; System . out . println ( tier ) ; com . anjlab . sat3 . Helper . prettyPrint ( formula ) ; } return true ; } } ) ; "<AssertPlaceHolder>" ; } pairs ( ) { return pairsToTiersIndex . keys ( ) ; }
org . junit . Assert . assertEquals ( 4 , index . pairs ( ) . size ( ) )
testGetGroupCalendarResourceCreatesStagingCalendarResource ( ) { com . liferay . portal . kernel . test . util . GroupTestUtil . enableLocalStaging ( _group ) ; com . liferay . portal . kernel . model . Group stagingGroup = _group . getStagingGroup ( ) ; com . liferay . portal . kernel . service . ServiceContext serviceContext = new com . liferay . portal . kernel . service . ServiceContext ( ) ; com . liferay . calendar . model . CalendarResource calendarResource = com . liferay . calendar . util . CalendarResourceUtil . getGroupCalendarResource ( stagingGroup . getGroupId ( ) , serviceContext ) ; "<AssertPlaceHolder>" ; } getGroupId ( ) { return _groupId ; }
org . junit . Assert . assertNotNull ( calendarResource )
testBuild ( ) { java . lang . Boolean alternative = false ; org . lnu . is . domain . specoffer . SpecOfferSubject context = new org . lnu . is . domain . specoffer . SpecOfferSubject ( ) ; context . setAlternative ( alternative ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>SpecOfferSubject<sp>e<sp>WHERE<sp>(<sp>e.alternative<sp>=<sp>:alternative<sp>)<sp>AND<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . specoffer . SpecOfferSubject > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expected , actualQuery )
testGetPrincipalProviderUnsupportedCallbackException ( ) { org . apache . jackrabbit . oak . spi . security . authentication . AbstractLoginModule loginModule = org . apache . jackrabbit . oak . spi . security . authentication . AbstractLoginModuleTest . initLoginModule ( org . apache . jackrabbit . oak . spi . security . authentication . AbstractLoginModuleTest . TestCredentials . class , new org . apache . jackrabbit . oak . spi . security . authentication . ThrowingCallbackHandler ( false ) ) ; "<AssertPlaceHolder>" ; } getPrincipalProvider ( ) { return principalProvider ; }
org . junit . Assert . assertNull ( loginModule . getPrincipalProvider ( ) )
testUnionVsUnionAllRule ( ) { java . lang . String s = "select<sp>*<sp>from<sp>dbo.test<sp>union<sp>select<sp>*<sp>from<sp>dbo.test2;" ; org . sonar . plugins . tsql . checks . custom . Rule sut = org . sonar . plugins . tsql . checks . CustomPluginChecks . getUnionVsUnionALLRule ( ) ; org . sonar . plugins . tsql . helpers . AntlrUtils . print ( s ) ; org . sonar . plugins . tsql . rules . issues . TsqlIssue [ ] issues = org . sonar . plugins . tsql . helpers . AntlrUtils . verify ( sut , s ) ; "<AssertPlaceHolder>" ; } verify ( org . sonar . plugins . tsql . checks . custom . Rule , java . lang . String ) { org . sonar . plugins . tsql . antlr . AntlrContext request = org . sonar . plugins . tsql . helpers . AntlrUtils . getRequest ( text ) ; org . sonar . plugins . tsql . antlr . visitors . CustomRulesVisitor visitor = new org . sonar . plugins . tsql . antlr . visitors . CustomRulesVisitor ( new org . sonar . plugins . tsql . antlr . CandidateRule ( "test" , rule ) ) ; org . sonar . plugins . tsql . antlr . visitors . CustomTreeVisitor treeVisitor = new org . sonar . plugins . tsql . antlr . visitors . CustomTreeVisitor ( visitor ) ; treeVisitor . visit ( request . getRoot ( ) ) ; org . sonar . plugins . tsql . antlr . CandidateNode [ ] nodes = visitor . getNodes ( ) ; final org . sonar . plugins . tsql . antlr . issues . CustomIssuesProvider provider = new org . sonar . plugins . tsql . antlr . issues . CustomIssuesProvider ( ) ; org . sonar . plugins . tsql . rules . issues . TsqlIssue [ ] issues = provider . getIssues ( request , nodes ) ; return issues ; }
org . junit . Assert . assertEquals ( 1 , issues . length )
testObjectToValue ( ) { byte [ ] valBytes = new org . vertexium . serializer . kryo . KryoVertexiumSerializer ( ) . objectToBytes ( new java . util . Date ( ) ) ; "<AssertPlaceHolder>" ; } objectToBytes ( java . lang . Object ) { try { org . vertexium . util . ByteArrayOutputStream baos = new org . vertexium . util . ByteArrayOutputStream ( ) ; org . vertexium . util . ObjectOutputStream oos = new org . vertexium . util . ObjectOutputStream ( baos ) ; oos . writeObject ( obj ) ; oos . close ( ) ; return baos . toByteArray ( ) ; } catch ( org . vertexium . util . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } }
org . junit . Assert . assertEquals ( 10 , valBytes . length )
testGetOrganizationsFilterByCustomFieldWithEqualsAndLocalizedStringTextType ( ) { com . liferay . expando . kernel . model . ExpandoColumn expandoColumn = _addExpandoColumn ( _expandoTable , com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) , ExpandoColumnConstants . STRING_LOCALIZED , ExpandoColumnConstants . INDEX_TYPE_TEXT ) ; java . util . Map < java . util . Locale , java . lang . String > columnValueMap = new java . util . HashMap ( ) ; java . util . Locale esLocale = com . liferay . portal . kernel . util . LocaleUtil . fromLanguageId ( "es_ES" ) ; columnValueMap . put ( esLocale , "Hola<sp>Mundo!" ) ; columnValueMap . put ( com . liferay . portal . kernel . util . LocaleUtil . getDefault ( ) , "Hello<sp>World!" ) ; java . io . Serializable columnValue = ( ( java . io . Serializable ) ( columnValueMap ) ) ; com . liferay . portal . kernel . model . Organization organization1 = _addOrganization ( expandoColumn . getName ( ) , columnValue ) ; _organizations . add ( organization1 ) ; com . liferay . portal . kernel . model . Organization organization2 = com . liferay . portal . kernel . test . util . OrganizationTestUtil . addOrganization ( ) ; _organizations . add ( organization2 ) ; java . lang . String filterString = java . lang . String . format ( "(customField/%s<sp>eq<sp>'%s')" , _encodeName ( expandoColumn ) , columnValueMap . get ( esLocale ) ) ; int count = _getODataRetriever ( ) . getResultsCount ( com . liferay . portal . kernel . test . util . TestPropsValues . getCompanyId ( ) , filterString , esLocale ) ; "<AssertPlaceHolder>" ; } getCompanyId ( ) { if ( ( com . liferay . portal . kernel . test . util . TestPropsValues . _companyId ) > 0 ) { return com . liferay . portal . kernel . test . util . TestPropsValues . _companyId ; } com . liferay . portal . kernel . model . Company company = com . liferay . portal . kernel . service . CompanyLocalServiceUtil . getCompanyByWebId ( com . liferay . portal . kernel . test . util . TestPropsValues . COMPANY_WEB_ID ) ; com . liferay . portal . kernel . test . util . TestPropsValues . _companyId = company . getCompanyId ( ) ; return com . liferay . portal . kernel . test . util . TestPropsValues . _companyId ; }
org . junit . Assert . assertEquals ( 0 , count )
shouldCorrectlyCompareAllVersionsFromSpecification ( ) { java . lang . String [ ] versions = new java . lang . String [ ] { "1.0.0-alpha" , "2.1.0" 0 , "1.0.0-alpha.beta" , "1.0.0-beta" , "1.0.0-beta.2" , "1.0.0-beta.11" , "1.0.0-rc.1" , "1.0.0" , "2.0.0" , "2.1.0" , "2.1.1" } ; for ( int i = 1 ; i < ( versions . length ) ; i ++ ) { com . github . zafarkhaja . semver . Version v1 = com . github . zafarkhaja . semver . Version . valueOf ( versions [ ( i - 1 ) ] ) ; com . github . zafarkhaja . semver . Version v2 = com . github . zafarkhaja . semver . Version . valueOf ( versions [ i ] ) ; "<AssertPlaceHolder>" ; } } lessThan ( com . github . zafarkhaja . semver . Version ) { return ( compareTo ( other ) ) < 0 ; }
org . junit . Assert . assertTrue ( v1 . lessThan ( v2 ) )
testSinglePath ( ) { addSchemaAndEntities ( ) ; try ( grakn . core . server . session . TransactionOLTP tx = session . transaction ( ) . write ( ) ) { graql . lang . query . GraqlCompute . Path query = graql . lang . Graql . parse ( ( ( ( ( "compute<sp>path<sp>from<sp>'" + ( entityId1 ) ) + "',<sp>to<sp>'" ) + ( entityId2 ) ) + "';" ) ) . asComputePath ( ) ; java . util . List < grakn . core . concept . answer . ConceptList > paths = tx . execute ( query ) ; java . util . List < grakn . core . concept . ConceptId > path = java . util . Collections . emptyList ( ) ; if ( ! ( paths . isEmpty ( ) ) ) path = paths . get ( 0 ) . list ( ) ; java . util . List < java . lang . String > result = path . stream ( ) . map ( ConceptId :: getValue ) . collect ( java . util . stream . Collectors . toList ( ) ) ; java . util . List < java . lang . String > expected = com . google . common . collect . Lists . newArrayList ( entityId1 , relationId12 , entityId2 ) ; "<AssertPlaceHolder>" ; } } map ( grakn . core . common . util . Tuple [ ] ) { java . util . Map < K , V > map = new java . util . HashMap ( ) ; for ( grakn . core . common . util . Tuple < K , V > tuple : tuples ) { map . put ( tuple . first ( ) , tuple . second ( ) ) ; } return java . util . Collections . unmodifiableMap ( map ) ; }
org . junit . Assert . assertEquals ( expected , result )
testHostResolveAttempt ( ) { org . apache . hadoop . mapreduce . v2 . app . job . impl . TaskAttemptImpl . RequestContainerTransition rct = new org . apache . hadoop . mapreduce . v2 . app . job . impl . TaskAttemptImpl . RequestContainerTransition ( false ) ; org . apache . hadoop . yarn . event . EventHandler eventHandler = mock ( org . apache . hadoop . yarn . event . EventHandler . class ) ; java . lang . String [ ] hosts = new java . lang . String [ 3 ] ; hosts [ 0 ] = "192.168.1.1" ; hosts [ 1 ] = "host2" ; hosts [ 2 ] = "host3" ; org . apache . hadoop . mapreduce . split . JobSplit . TaskSplitMetaInfo splitInfo = new org . apache . hadoop . mapreduce . split . JobSplit . TaskSplitMetaInfo ( hosts , 0 , ( ( 128 * 1024 ) * 1024L ) ) ; org . apache . hadoop . mapreduce . v2 . app . job . impl . TaskAttemptImpl mockTaskAttempt = createMapTaskAttemptImplForTest ( eventHandler , splitInfo ) ; org . apache . hadoop . mapreduce . v2 . app . job . impl . TaskAttemptImpl spyTa = spy ( mockTaskAttempt ) ; when ( spyTa . resolveHost ( hosts [ 0 ] ) ) . thenReturn ( "host1" ) ; spyTa . dataLocalHosts = spyTa . resolveHosts ( splitInfo . getLocations ( ) ) ; org . apache . hadoop . mapreduce . v2 . app . job . event . TaskAttemptEvent mockTAEvent = mock ( org . apache . hadoop . mapreduce . v2 . app . job . event . TaskAttemptEvent . class ) ; rct . transition ( spyTa , mockTAEvent ) ; verify ( spyTa ) . resolveHost ( hosts [ 0 ] ) ; org . mockito . ArgumentCaptor < org . apache . hadoop . yarn . event . Event > arg = org . mockito . ArgumentCaptor . forClass ( org . apache . hadoop . yarn . event . Event . class ) ; verify ( eventHandler , times ( 2 ) ) . handle ( arg . capture ( ) ) ; if ( ! ( ( arg . getAllValues ( ) . get ( 1 ) ) instanceof org . apache . hadoop . mapreduce . v2 . app . rm . ContainerRequestEvent ) ) { org . junit . Assert . fail ( "Second<sp>Event<sp>not<sp>of<sp>type<sp>ContainerRequestEvent" ) ; } java . util . Map < java . lang . String , java . lang . Boolean > expected = new java . util . HashMap < java . lang . String , java . lang . Boolean > ( ) ; expected . put ( "host1" , true ) ; expected . put ( "host2" , true ) ; expected . put ( "host3" , true ) ; org . apache . hadoop . mapreduce . v2 . app . rm . ContainerRequestEvent cre = ( ( org . apache . hadoop . mapreduce . v2 . app . rm . ContainerRequestEvent ) ( arg . getAllValues ( ) . get ( 1 ) ) ) ; java . lang . String [ ] requestedHosts = cre . getHosts ( ) ; for ( java . lang . String h : requestedHosts ) { expected . remove ( h ) ; } "<AssertPlaceHolder>" ; } size ( ) { return ( ( java . lang . Integer ) ( new io . hops . transaction . handler . LightWeightRequestHandler ( io . hops . transaction . handler . HDFSOperationType . COUNT_CORRUPT_REPLICAS ) { @ io . hops . metadata . blockmanagement . Override public java . lang . Object performTask ( ) throws java . io . IOException { io . hops . metadata . hdfs . dal . ExcessReplicaDataAccess da = ( ( io . hops . metadata . hdfs . dal . ExcessReplicaDataAccess ) ( io . hops . metadata . HdfsStorageFactory . getDataAccess ( io . hops . metadata . hdfs . dal . ExcessReplicaDataAccess . class ) ) ) ; return da . countAllUniqueBlk ( ) ; } } . handle ( ) ) ) ; }
org . junit . Assert . assertEquals ( 0 , expected . size ( ) )
test_getLastSampling_no_sampling ( ) { org . kairosdb . core . datapoints . DoubleDataPointFactory dataPointFactory = mock ( org . kairosdb . core . datapoints . DoubleDataPointFactory . class ) ; org . kairosdb . rollup . List < org . kairosdb . plugin . Aggregator > aggregators = new org . kairosdb . rollup . ArrayList ( ) ; aggregators . add ( new org . kairosdb . rollup . DivideAggregator ( dataPointFactory ) ) ; aggregators . add ( new org . kairosdb . rollup . DiffAggregator ( dataPointFactory ) ) ; org . kairosdb . rollup . Sampling lastSampling = org . kairosdb . rollup . RollUpJob . getLastSampling ( aggregators ) ; "<AssertPlaceHolder>" ; } getLastSampling ( java . util . List ) { for ( int i = ( aggregators . size ( ) ) - 1 ; i >= 0 ; i -- ) { org . kairosdb . plugin . Aggregator aggregator = aggregators . get ( i ) ; if ( aggregator instanceof org . kairosdb . core . aggregator . RangeAggregator ) { return ( ( org . kairosdb . core . aggregator . RangeAggregator ) ( aggregator ) ) . getSampling ( ) ; } } return null ; }
org . junit . Assert . assertThat ( lastSampling , org . hamcrest . CoreMatchers . equalTo ( null ) )
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . Portlet . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "id" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "id" , new java . lang . Object [ ] { com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) } ) ) ; java . util . List < java . lang . Object > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
retainAll ( ) { r . retainAll ( com . machinezoo . sourceafis . Arrays . asList ( 2 , 4 , 10 ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( com . machinezoo . sourceafis . Arrays . asList ( 4 , 2 ) , r )
testGetPlotStyleEmpty ( ) { "<AssertPlaceHolder>" ; } getPlotStyle ( java . lang . String ) { return java . util . Arrays . stream ( net . sf . latexdraw . model . api . shape . PlotStyle . values ( ) ) . filter ( ( it ) -> it . getPSTToken ( ) . equals ( latexToken ) ) . findFirst ( ) . orElse ( net . sf . latexdraw . model . api . shape . PlotStyle . CURVE ) ; }
org . junit . Assert . assertEquals ( PlotStyle . CURVE , net . sf . latexdraw . model . api . shape . PlotStyle . getPlotStyle ( "" ) )
testDeleteVarInstanceInfoLogByDate ( ) { int p = 0 ; java . util . Date date = vilTestData [ ( p ++ ) ] . getDate ( ) ; org . kie . internal . runtime . manager . audit . query . VariableInstanceLogDeleteBuilder updateBuilder = this . variableInstanceLogDelete ( ) . date ( date ) ; int result = updateBuilder . build ( ) . execute ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return new org . kie . internal . query . ParametrizedQuery < org . kie . api . task . model . TaskSummary > ( ) { private org . jbpm . query . jpa . data . QueryWhere queryWhere = new org . jbpm . query . jpa . data . QueryWhere ( getQueryWhere ( ) ) ; @ org . jbpm . services . task . impl . Override public java . util . List < org . kie . api . task . model . TaskSummary > getResultList ( ) { org . jbpm . services . task . commands . TaskSummaryQueryCommand cmd = new org . jbpm . services . task . commands . TaskSummaryQueryCommand ( queryWhere ) ; cmd . setUserId ( userId ) ; return executor . execute ( cmd ) ; } } ; }
org . junit . Assert . assertEquals ( 2 , result )
testClone ( ) { com . streamsets . pipeline . api . impl . FloatTypeSupport ts = new com . streamsets . pipeline . api . impl . FloatTypeSupport ( ) ; java . lang . Float o = new java . lang . Float ( 1.2 ) ; "<AssertPlaceHolder>" ; } clone ( java . lang . Object ) { java . util . List list = null ; if ( value != null ) { list = com . streamsets . pipeline . api . impl . ListTypeSupport . deepCopy ( ( ( java . util . List < com . streamsets . pipeline . api . Field > ) ( value ) ) ) ; } return list ; }
org . junit . Assert . assertSame ( o , ts . clone ( o ) )
testGetRows ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 9 , 9 ) . reshape ( 3 , 3 ) ; org . nd4j . linalg . api . ndarray . INDArray testAssertion = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] [ ] { new double [ ] { 4 , 5 } , new double [ ] { 7 , 8 } } ) ; org . nd4j . linalg . api . ndarray . INDArray test = arr . get ( new org . nd4j . linalg . indexing . SpecifiedIndex ( 1 , 2 ) , new org . nd4j . linalg . indexing . SpecifiedIndex ( 0 , 1 ) ) ; "<AssertPlaceHolder>" ; } create ( double [ ] , int [ ] , int [ ] , long ) { shape = org . nd4j . linalg . factory . Nd4j . getEnsuredShape ( shape ) ; if ( ( shape . length ) == 1 ) { if ( ( shape [ 0 ] ) == ( data . length ) ) { shape = new int [ ] { 1 , data . length } ; } else throw new org . nd4j . linalg . exception . ND4JIllegalStateException ( ( ( ( "Shape<sp>of<sp>the<sp>new<sp>array<sp>" + ( org . nd4j . linalg . factory . Arrays . toString ( shape ) ) ) + "<sp>doesn't<sp>match<sp>data<sp>length:<sp>" ) + ( data . length ) ) ) ; } org . nd4j . linalg . factory . Nd4j . checkShapeValues ( data . length , shape ) ; org . nd4j . linalg . factory . INDArray ret = org . nd4j . linalg . factory . Nd4j . INSTANCE . create ( data , shape , stride , offset ) ; org . nd4j . linalg . factory . Nd4j . logCreationIfNecessary ( ret ) ; return ret ; }
org . junit . Assert . assertEquals ( testAssertion , test )
test_access_settings_whitelist_get ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method . GET ) ; request . setEndpoint ( "access_settings/whitelist" ) ; com . sendgrid . Response response = sg . api ( request ) ; "<AssertPlaceHolder>" ; } api ( com . sendgrid . Request ) { com . sendgrid . Request req = new com . sendgrid . Request ( ) ; req . setMethod ( request . getMethod ( ) ) ; req . setBaseUri ( this . host ) ; req . setEndpoint ( ( ( ( "/" + ( version ) ) + "/" ) + ( request . getEndpoint ( ) ) ) ) ; req . setBody ( request . getBody ( ) ) ; for ( Map . Entry < java . lang . String , java . lang . String > header : this . requestHeaders . entrySet ( ) ) { req . addHeader ( header . getKey ( ) , header . getValue ( ) ) ; } for ( Map . Entry < java . lang . String , java . lang . String > queryParam : request . getQueryParams ( ) . entrySet ( ) ) { req . addQueryParam ( queryParam . getKey ( ) , queryParam . getValue ( ) ) ; } return makeCall ( req ) ; }
org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) )
testErrorCounterEventReadFail ( ) { org . apache . flume . instrumentation . SourceCounter sc = errorCounterCommonInit ( ) ; org . apache . flume . channel . ChannelProcessor cp = org . mockito . Mockito . mock ( org . apache . flume . channel . ChannelProcessor . class ) ; org . apache . flume . source . TestSpoolDirectorySource . source . setChannelProcessor ( cp ) ; org . apache . flume . client . avro . ReliableSpoolingFileEventReader reader = org . mockito . Mockito . mock ( org . apache . flume . client . avro . ReliableSpoolingFileEventReader . class ) ; java . util . List < org . apache . flume . Event > events = new java . util . ArrayList ( ) ; events . add ( org . mockito . Mockito . mock ( org . apache . flume . Event . class ) ) ; org . mockito . Mockito . doReturn ( events ) . doThrow ( new java . io . IOException ( "dummy" ) ) . when ( reader ) . readEvents ( org . mockito . Mockito . anyInt ( ) ) ; java . lang . Runnable runner = org . apache . flume . source . TestSpoolDirectorySource . source . new org . apache . flume . source . SpoolDirectoryRunnable ( reader , sc ) ; try { runner . run ( ) ; } catch ( java . lang . Exception ex ) { } "<AssertPlaceHolder>" ; } getEventReadFail ( ) { return get ( org . apache . flume . instrumentation . SourceCounter . COUNTER_EVENT_READ_FAIL ) ; }
org . junit . Assert . assertEquals ( 1 , sc . getEventReadFail ( ) )
shouldBePossibleToIterateThroughCallsWhileNewItemsAreAdded ( ) { whenHttp ( server ) . match ( get ( "/" ) ) . then ( ok ( ) ) . mustHappen ( ) ; io . restassured . RestAssured . expect ( ) . statusCode ( 200 ) . when ( ) . get ( "/" ) ; io . restassured . RestAssured . expect ( ) . statusCode ( 200 ) . when ( ) . get ( "/" ) ; "<AssertPlaceHolder>" ; for ( com . xebialabs . restito . semantics . Call ignored : server . getCalls ( ) ) { io . restassured . RestAssured . expect ( ) . statusCode ( 200 ) . when ( ) . get ( "/" ) ; io . restassured . RestAssured . expect ( ) . statusCode ( 200 ) . when ( ) . get ( "/" ) ; } } getCalls ( ) { return unmodifiableList ( calls ) ; }
org . junit . Assert . assertEquals ( server . getCalls ( ) . size ( ) , 2 )
testLineBreak ( ) { final com . ait . lienzo . client . core . shape . ITextWrapper wrapper = org . kie . workbench . common . stunner . client . lienzo . shape . view . wires . ext . TextWrapperProvider . get ( TextWrapperStrategy . LINE_BREAK , text ) ; "<AssertPlaceHolder>" ; } get ( org . kie . workbench . common . stunner . core . client . shape . TextWrapperStrategy , com . ait . lienzo . client . core . shape . Text ) { switch ( strategy ) { case BOUNDS_AND_LINE_BREAKS : return new com . ait . lienzo . client . core . shape . TextBoundsAndLineBreaksWrap ( text ) ; case LINE_BREAK : return new com . ait . lienzo . client . core . shape . TextLineBreakWrap ( text ) ; case NO_WRAP : return new com . ait . lienzo . client . core . shape . TextNoWrap ( text ) ; case TRUNCATE : return new com . ait . lienzo . client . core . shape . TextLineBreakTruncateWrapper ( text , new com . ait . lienzo . client . core . types . BoundingBox ( ) ) ; case TRUNCATE_WITH_LINE_BREAK : return new com . ait . lienzo . client . core . shape . TextLineBreakTruncateWrapper ( text , new com . ait . lienzo . client . core . types . BoundingBox ( ) ) ; default : return new com . ait . lienzo . client . core . shape . TextBoundsWrap ( text ) ; } }
org . junit . Assert . assertTrue ( ( wrapper instanceof com . ait . lienzo . client . core . shape . TextLineBreakWrap ) )
testJidSingleField ( ) { org . jivesoftware . smackx . FormField field = new org . jivesoftware . smackx . FormField ( "abc<sp>def" ) ; field . setType ( "jid-single" ) ; field . addValue ( org . apache . vysper . console . HtmlFormBuilderTest . VALUE1 ) ; form . addField ( field ) ; java . lang . String actual = builder . build ( form ) ; java . lang . String expected = "<p><input<sp>id='abc-def'<sp>name='abc<sp>def'<sp>value='Value<sp>1'<sp>type='email'<sp>placeholder='example@vysper.org'<sp>/></p>" ; "<AssertPlaceHolder>" ; } build ( java . util . Map ) { org . jivesoftware . smackx . packet . AdHocCommandData commandData = new org . jivesoftware . smackx . packet . AdHocCommandData ( ) ; commandData . setSessionID ( getSingleValue ( parameters , AdminConsoleController . SESSION_FIELD ) ) ; org . jivesoftware . smackx . packet . DataForm form = new org . jivesoftware . smackx . packet . DataForm ( "submit" ) ; for ( java . util . Map . Entry < java . lang . String , java . lang . String [ ] > entry : parameters . entrySet ( ) ) { if ( ! ( AdminConsoleController . SESSION_FIELD . equals ( entry . getKey ( ) ) ) ) { org . jivesoftware . smackx . FormField field = new org . jivesoftware . smackx . FormField ( entry . getKey ( ) ) ; for ( java . lang . String value : entry . getValue ( ) ) { java . lang . String [ ] splitValues = value . split ( "[\\r\\n]+" ) ; for ( java . lang . String splitValue : splitValues ) { field . addValue ( splitValue ) ; } } form . addField ( field ) ; } } commandData . setForm ( form ) ; return commandData ; }
org . junit . Assert . assertEquals ( expected , actual )
testBuildWithDisabledStautsConstaint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . department . type . DepartmentType context = new org . lnu . is . domain . department . type . DepartmentType ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>DepartmentType<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . department . type . DepartmentType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expected , actualQuery )
parse_empty ( ) { "<AssertPlaceHolder>" ; } parse ( byte [ ] ) { try { return parseAny ( bytes ) ; } catch ( org . codehaus . jackson . JsonParseException error ) { throw new com . psddev . dari . util . JsonParsingException ( "Can't<sp>parse<sp>JSON<sp>bytes!" , error ) ; } catch ( java . io . IOException error ) { throw new java . lang . IllegalStateException ( error ) ; } }
org . junit . Assert . assertEquals ( null , parser . parse ( "" ) )
testInsert_3x3_into_3x3 ( ) { org . la4j . matrix . Matrix a = m ( org . la4j . matrix . MatrixTest . a ( 1.0 , 2.0 , 3.0 ) , org . la4j . matrix . MatrixTest . a ( 4.0 , 5.0 , 6.0 ) , org . la4j . matrix . MatrixTest . a ( 7.0 , 8.0 , 9.0 ) ) ; org . la4j . matrix . Matrix b = mz ( 3 , 3 ) ; "<AssertPlaceHolder>" ; } mz ( int , int ) { return org . la4j . Matrix . zero ( rows , columns ) ; }
org . junit . Assert . assertEquals ( a , b . insert ( a ) )
testConvert ( ) { java . lang . String abbrName = "abbr<sp>name" ; java . lang . String name = "name" ; org . lnu . is . resource . specialty . type . SpecialtyTypeResource expected = new org . lnu . is . resource . specialty . type . SpecialtyTypeResource ( ) ; expected . setAbbrName ( abbrName ) ; expected . setName ( name ) ; org . lnu . is . domain . specialty . SpecialtyType source = new org . lnu . is . domain . specialty . SpecialtyType ( ) ; source . setAbbrName ( abbrName ) ; source . setName ( name ) ; org . lnu . is . resource . specialty . type . SpecialtyTypeResource actual = unit . convert ( source ) ; "<AssertPlaceHolder>" ; } convert ( org . lnu . is . domain . admin . unit . AdminUnit ) { return convert ( source , new org . lnu . is . resource . adminunit . AdminUnitResource ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
getPatients_shouldGetCloseIdentifiersWithCorrectStartPhrase ( ) { java . lang . String oldPropertyValue = globalPropertiesTestHelper . setGlobalProperty ( OpenmrsConstants . GLOBAL_PROPERTY_PATIENT_IDENTIFIER_SEARCH_MATCH_MODE , OpenmrsConstants . GLOBAL_PROPERTY_PATIENT_SEARCH_MATCH_START ) ; org . openmrs . Patient patient = patientService . getPatient ( 2 ) ; org . openmrs . PatientIdentifier patientIdentifier = new org . openmrs . PatientIdentifier ( "BAH409" , patientService . getPatientIdentifierType ( 5 ) , org . openmrs . api . context . Context . getLocationService ( ) . getLocation ( 1 ) ) ; patient . addIdentifier ( patientIdentifier ) ; patientService . savePatient ( patient ) ; org . openmrs . Patient patient2 = patientService . getPatient ( 6 ) ; org . openmrs . PatientIdentifier patientIdentifier6 = new org . openmrs . PatientIdentifier ( "BAH509" , patientService . getPatientIdentifierType ( 5 ) , org . openmrs . api . context . Context . getLocationService ( ) . getLocation ( 1 ) ) ; patientIdentifier6 . setPreferred ( true ) ; patient2 . addIdentifier ( patientIdentifier6 ) ; patientService . savePatient ( patient2 ) ; updateSearchIndex ( ) ; java . util . List < org . openmrs . Patient > patients = dao . getPatients ( "BAH" , false , 0 , null ) ; "<AssertPlaceHolder>" ; if ( oldPropertyValue != null ) { globalPropertiesTestHelper . setGlobalProperty ( OpenmrsConstants . GLOBAL_PROPERTY_PATIENT_IDENTIFIER_SEARCH_MATCH_MODE , oldPropertyValue ) ; } else { globalPropertiesTestHelper . purgeGlobalProperty ( OpenmrsConstants . GLOBAL_PROPERTY_PATIENT_IDENTIFIER_SEARCH_MATCH_MODE ) ; } } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , patients . size ( ) )
testOptimizeOperationsUToU ( ) { java . util . Deque < org . onosproject . vpls . api . VplsOperation > operations = new java . util . ArrayDeque ( ) ; org . onosproject . vpls . api . VplsData vplsData = org . onosproject . vpls . api . VplsData . of ( org . onosproject . vpls . VPLS1 ) ; vplsData . addInterfaces ( com . google . common . collect . ImmutableSet . of ( org . onosproject . vpls . V100H1 ) ) ; org . onosproject . vpls . api . VplsOperation vplsOperation = org . onosproject . vpls . api . VplsOperation . of ( vplsData , VplsOperation . Operation . UPDATE ) ; operations . add ( vplsOperation ) ; vplsData = org . onosproject . vpls . api . VplsData . of ( org . onosproject . vpls . VPLS1 , EncapsulationType . VLAN ) ; vplsData . addInterfaces ( com . google . common . collect . ImmutableSet . of ( org . onosproject . vpls . V100H1 , org . onosproject . vpls . V100H2 ) ) ; vplsOperation = org . onosproject . vpls . api . VplsOperation . of ( vplsData , VplsOperation . Operation . UPDATE ) ; operations . add ( vplsOperation ) ; vplsOperation = org . onosproject . vpls . VplsOperationManager . getOptimizedVplsOperation ( operations ) ; "<AssertPlaceHolder>" ; } of ( org . onosproject . vpls . api . VplsData , org . onosproject . vpls . api . VplsOperation$Operation ) { return new org . onosproject . vpls . api . VplsOperation ( vplsData , op ) ; }
org . junit . Assert . assertEquals ( org . onosproject . vpls . api . VplsOperation . of ( vplsData , VplsOperation . Operation . UPDATE ) , vplsOperation )
testValues ( ) { org . onosproject . net . resource . DiscreteResource res1 = org . onosproject . net . resource . Resources . discrete ( org . onosproject . net . DeviceId . deviceId ( "a" ) , org . onosproject . net . PortNumber . portNumber ( 1 ) ) . resource ( ) ; org . onosproject . net . resource . DiscreteResource res2 = org . onosproject . net . resource . Resources . discrete ( org . onosproject . net . DeviceId . deviceId ( "a" ) , org . onosproject . net . PortNumber . portNumber ( 2 ) ) . resource ( ) ; org . onosproject . store . resource . impl . DiscreteResources sut = org . onosproject . store . resource . impl . EncodableDiscreteResources . of ( com . google . common . collect . ImmutableSet . of ( res1 , res2 ) ) ; "<AssertPlaceHolder>" ; } values ( ) { return map . values ( ) ; }
org . junit . Assert . assertThat ( sut . values ( ) , org . hamcrest . Matchers . is ( com . google . common . collect . ImmutableSet . of ( res1 , res2 ) ) )
findFunctionsByNameInNamespaceForSubResourceTypeWithFunctionsWithSameNameOnRootTypeShouldReturnOtherFunction ( ) { ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceTypeEntity rootResourceType = createRootResourceType ( OTHER_FUNCTION_A ) ; ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceTypeEntity subResourceType = createSubResourceType ( rootResourceType ) ; ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity resource = createResourceWithType ( "amw" , 1000 , subResourceType ) ; when ( resourceRepositoryMock . loadWithFunctionsAndMiksForId ( resource . getId ( ) ) ) . thenReturn ( resource ) ; ch . puzzle . itc . mobiliar . business . function . control . List < ch . puzzle . itc . mobiliar . business . function . entity . AmwFunctionEntity > functionsWithName = functionService . findFunctionsByNameInNamespace ( subResourceType , FUNCTION_A . getName ( ) ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { ch . puzzle . itc . mobiliar . common . util . DefaultResourceTypeDefinition [ ] values = ch . puzzle . itc . mobiliar . common . util . DefaultResourceTypeDefinition . values ( ) ; for ( ch . puzzle . itc . mobiliar . common . util . DefaultResourceTypeDefinition value : values ) { if ( value . name ( ) . equals ( name ) ) { return true ; } } return false ; }
org . junit . Assert . assertTrue ( functionsWithName . contains ( OTHER_FUNCTION_A ) )
testNegServiceName ( ) { try { com . emc . storageos . systemservices . impl . healthmonitor . ProcStats . getServiceName ( com . emc . storageos . systemservices . impl . healthmonitor . ProcStatsTest . INVALID_PID ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } getServiceName ( java . lang . String ) { java . io . File cmdLineFile = new java . io . File ( java . lang . String . format ( com . emc . storageos . systemservices . impl . healthmonitor . CMDLINE_FILE , pid ) ) ; if ( cmdLineFile . exists ( ) ) { java . lang . String cmdLineString = com . emc . storageos . systemservices . impl . healthmonitor . FileReadUtil . readFirstLine ( java . lang . String . format ( com . emc . storageos . systemservices . impl . healthmonitor . CMDLINE_FILE , pid ) ) ; java . lang . String [ ] splitCmdLineString = cmdLineString . split ( com . emc . storageos . systemservices . impl . healthmonitor . NULL_VALUES ) ; for ( java . lang . String acceptablePrefix : ACCEPTABLE_PID_COMMAND_PREFIXES ) { if ( splitCmdLineString [ 0 ] . startsWith ( acceptablePrefix ) ) { return splitCmdLineString [ 0 ] . substring ( acceptablePrefix . length ( ) ) ; } } } throw SyssvcException . syssvcExceptions . serviceNameNotFoundException ( pid ) ; }
org . junit . Assert . assertTrue ( true )
testDefaultInjectEmptyUrlPattern ( javax . servlet . ServletContext , javax . servlet . ServletRegistration . Dynamic ) { new mockit . Expectations ( org . apache . servicecomb . transport . rest . servlet . ServletConfig . class ) { { org . apache . servicecomb . transport . rest . servlet . ServletConfig . getServletUrlPattern ( ) ; result = null ; } } ; "<AssertPlaceHolder>" ; } defaultInject ( javax . servlet . ServletContext ) { org . apache . servicecomb . transport . rest . servlet . RestServletInjector injector = new org . apache . servicecomb . transport . rest . servlet . RestServletInjector ( ) ; java . lang . String urlPattern = org . apache . servicecomb . transport . rest . servlet . ServletConfig . getServletUrlPattern ( ) ; return injector . inject ( servletContext , urlPattern ) ; }
org . junit . Assert . assertEquals ( null , org . apache . servicecomb . transport . rest . servlet . RestServletInjector . defaultInject ( servletContext ) )
testGetSecondaryKey ( ) { edu . ucla . sspace . wordsi . DependencyContextExtractor extractor = new edu . ucla . sspace . wordsi . DependencyContextExtractor ( null , null ) ; edu . ucla . sspace . wordsi . DependencyTreeNode node = new edu . ucla . sspace . wordsi . SimpleDependencyTreeNode ( "cat" , "n" , "c" , 0 , null ) ; "<AssertPlaceHolder>" ; } getSecondaryKey ( edu . ucla . sspace . dependency . DependencyTreeNode , java . lang . String ) { return focusNode . lemma ( ) ; }
org . junit . Assert . assertEquals ( "cat" , extractor . getSecondaryKey ( node , null ) )
test_multi_dim_array2 ( ) { java . lang . Object [ ] [ ] arr = new java . lang . Object [ ] [ ] { new java . lang . Object [ ] { 11 , 22 , 44 } , new java . lang . Object [ ] { 1 , 2 , 34 } } ; java . lang . Object [ ] [ ] arr2 = org . mapdb . elsa . ElsaSerializerBaseTest . clone ( arr ) ; "<AssertPlaceHolder>" ; } clone ( E ) { return org . mapdb . elsa . ElsaSerializerBaseTest . clonePojo ( value ) ; }
org . junit . Assert . assertArrayEquals ( arr , arr2 )
testMinTime ( ) { final byte [ ] b1 = org . apache . commons . compress . archivers . zip . ZipUtil . toDosTime ( 0 ) ; final byte b10 = b1 [ 0 ] ; ( b1 [ 0 ] ) ++ ; final byte [ ] b2 = org . apache . commons . compress . archivers . zip . ZipUtil . toDosTime ( 0 ) ; "<AssertPlaceHolder>" ; } toDosTime ( java . util . Date ) { return new org . apache . commons . compress . archivers . zip . ZipLong ( org . apache . commons . compress . archivers . zip . ZipUtil . toDosTime ( time . getTime ( ) ) ) ; }
org . junit . Assert . assertEquals ( b10 , b2 [ 0 ] )
setCustomAllocationDefinitionWorks ( tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . SymmetricKeyAttestation ) { tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . CustomAllocationDefinition expectedCustomAllocationDefinition = new tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . CustomAllocationDefinition ( ) ; tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . IndividualEnrollment individualEnrollment = new tests . unit . com . microsoft . azure . sdk . iot . provisioning . service . configs . IndividualEnrollment ( "1234" , mockedAttestation ) ; individualEnrollment . setCustomAllocationDefinition ( expectedCustomAllocationDefinition ) ; "<AssertPlaceHolder>" ; } getCustomAllocationDefinition ( ) { return this . customAllocationDefinition ; }
org . junit . Assert . assertEquals ( expectedCustomAllocationDefinition , individualEnrollment . getCustomAllocationDefinition ( ) )
testUpdateNameToExistingNameFails ( ) { org . lilyproject . repository . api . QName name = new org . lilyproject . repository . api . QName ( org . lilyproject . repository . impl . test . AbstractTypeManagerRecordTypeTest . namespace1 , "testUpdateNameToExistingNameFails" ) ; org . lilyproject . repository . api . QName name2 = new org . lilyproject . repository . api . QName ( org . lilyproject . repository . impl . test . AbstractTypeManagerRecordTypeTest . namespace1 , "testUpdateNameToExistingNameFails2" ) ; org . lilyproject . repository . api . RecordType recordType = org . lilyproject . repository . impl . test . AbstractTypeManagerRecordTypeTest . typeManager . newRecordType ( name ) ; recordType = org . lilyproject . repository . impl . test . AbstractTypeManagerRecordTypeTest . typeManager . createRecordType ( recordType ) ; "<AssertPlaceHolder>" ; org . lilyproject . repository . api . RecordType recordType2 = org . lilyproject . repository . impl . test . AbstractTypeManagerRecordTypeTest . typeManager . newRecordType ( name2 ) ; recordType2 = org . lilyproject . repository . impl . test . AbstractTypeManagerRecordTypeTest . typeManager . createRecordType ( recordType2 ) ; recordType . setName ( name2 ) ; try { System . out . println ( "Expecting<sp>TypeException" ) ; recordType = org . lilyproject . repository . impl . test . AbstractTypeManagerRecordTypeTest . typeManager . updateRecordType ( recordType ) ; org . junit . Assert . fail ( ) ; } catch ( org . lilyproject . repository . api . TypeException expected ) { } } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( name , recordType . getName ( ) )
itsPossibleToStubReactiveServiceUsingDirectComponent ( ) { com . avanza . astrix . beans . registry . InMemoryServiceRegistry serviceRegistry = new com . avanza . astrix . beans . registry . InMemoryServiceRegistry ( ) ; serviceRegistry . registerProvider ( com . avanza . astrix . beans . service . DirectComponentTest . Ping . class , new com . avanza . astrix . beans . service . DirectComponentTest . PingImpl ( ) ) ; com . avanza . astrix . context . TestAstrixConfigurer astrixConfigurer = new com . avanza . astrix . context . TestAstrixConfigurer ( ) ; astrixConfigurer . registerApiProvider ( com . avanza . astrix . beans . service . DirectComponentTest . PingApiProvider . class ) ; astrixConfigurer . set ( AstrixSettings . SERVICE_REGISTRY_URI , serviceRegistry . getServiceUri ( ) ) ; astrixContext = astrixConfigurer . configure ( ) ; com . avanza . astrix . beans . service . DirectComponentTest . PingAsync ping = astrixContext . getBean ( com . avanza . astrix . beans . service . DirectComponentTest . PingAsync . class ) ; "<AssertPlaceHolder>" ; } ping ( java . lang . String ) { pingRequests . add ( msg ) ; java . util . concurrent . CompletableFuture < java . lang . String > result = new java . util . concurrent . CompletableFuture < java . lang . String > ( ) ; new java . lang . Thread ( ( ) -> { try { java . lang . String response = pingResponses . poll ( 1 , TimeUnit . SECONDS ) ; if ( response != null ) { result . complete ( response ) ; } else { result . completeExceptionally ( new java . lang . IllegalStateException ( "TIMEOUT" ) ) ; } } catch ( e ) { result . completeExceptionally ( new java . lang . IllegalStateException ( "TIMEOUT" ) ) ; } } ) . start ( ) ; return result ; }
org . junit . Assert . assertEquals ( "foo" , ping . ping ( "foo" ) . get ( ) )
testGetParametersWithDefaultEntityAndDisabledDefaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . salary . type . SalaryType entity = new org . lnu . is . domain . salary . type . SalaryType ( ) ; 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 )
test_SingleDirFile ( ) { de . vandermeer . svg2vector . applications . is . Svg2Vector_IS app = new de . vandermeer . svg2vector . applications . is . Svg2Vector_IS ( ) ; java . lang . String [ ] args = org . apache . commons . lang3 . ArrayUtils . addAll ( de . vandermeer . svg2vector . applications . is . Test_Svg2Vector_IS_PDF . STD_OPTIONS , "-f" , "src/test/resources/svg-files/chomsky-hierarchy.svgz" , "-d" , de . vandermeer . svg2vector . applications . is . Test_Svg2Vector_IS_PDF . OUT_DIR_PREFIX , "-o" , "chomsky1" ) ; "<AssertPlaceHolder>" ; } executeApplication ( java . lang . String [ ] ) { int ret = super . executeApplication ( args ) ; if ( ret != 0 ) { return ret ; } de . vandermeer . svg2vector . applications . base . SvgTargets target = this . getProps ( ) . getTarget ( ) ; java . lang . String fn = this . optionInkscapeExec . getValue ( ) ; if ( ( ret = this . checkIsExecutable ( fn ) ) < 0 ) { return ret ; } this . printDetailMessage ( ( "Inkscape<sp>exec:<sp>" + fn ) ) ; this . setWarnings ( target ) ; de . vandermeer . svg2vector . applications . is . IsCmd isCmd = new de . vandermeer . svg2vector . applications . is . IsCmd ( fn , target , this . getProps ( ) ) ; isCmd . appendTargetSettings ( target , this . optionExpDpi , this . optionExpPdfver , this . optionExpPslevel ) ; de . vandermeer . svg2vector . applications . is . IsCmd isTmpCmd = new de . vandermeer . svg2vector . applications . is . IsCmd ( fn , de . vandermeer . svg2vector . applications . base . SvgTargets . svg , this . getProps ( ) ) ; if ( this . optionSvgFirst . inCli ( ) ) { this . printProgressMessage ( "converting<sp>to<sp>temporary<sp>SVG<sp>first" ) ; this . printDetailMessage ( ( "Inkscape<sp>cmd<sp>tmp:<sp>" + isTmpCmd ) ) ; } else { this . printProgressMessage ( "converting<sp>directly<sp>to<sp>target" ) ; this . printDetailMessage ( ( "Inkscape<sp>cmd:<sp>" + isCmd ) ) ; } ret = this . createTempArtifacts ( isTmpCmd ) ; if ( ret < 0 ) { return ret ; } ret = this . convertInput ( isCmd , target ) ; if ( ret < 0 ) { return ret ; } this . removeTempArtifacts ( ) ; this . printProgressMessage ( "finished<sp>successfully" ) ; return 0 ; }
org . junit . Assert . assertEquals ( 0 , app . executeApplication ( args ) )
getByArticleTest ( ) { System . out . print ( "-><sp>getByArticle()<sp>-<sp>" ) ; ua . com . alexcoffee . model . product . Product product = ua . com . alexcoffee . service . impl . ProductServiceImplTest . productService . getByArticle ( ua . com . alexcoffee . service . impl . ARTICLE ) ; "<AssertPlaceHolder>" ; System . out . println ( "OK!" ) ; } getByArticle ( int ) { final ua . com . alexcoffee . model . product . Product product = this . repository . findByArticle ( article ) ; if ( isNull ( product ) ) { throw new java . lang . NullPointerException ( ( ( "Can't<sp>find<sp>product<sp>by<sp>article<sp>" + article ) + "!" ) ) ; } return product ; }
org . junit . Assert . assertNotNull ( product )
testAniline ( ) { org . openscience . cdk . interfaces . IAtomContainer molecule = org . openscience . cdk . tools . StructureResonanceGeneratorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ; molecule . addAtom ( org . openscience . cdk . tools . StructureResonanceGeneratorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "N" ) ) ; molecule . addAtom ( org . openscience . cdk . tools . StructureResonanceGeneratorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ) ; molecule . addBond ( 0 , 1 , IBond . Order . SINGLE ) ; molecule . addAtom ( org . openscience . cdk . tools . StructureResonanceGeneratorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ) ; molecule . addBond ( 1 , 2 , IBond . Order . DOUBLE ) ; molecule . addAtom ( org . openscience . cdk . tools . StructureResonanceGeneratorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ) ; molecule . addBond ( 2 , 3 , IBond . Order . SINGLE ) ; molecule . addAtom ( org . openscience . cdk . tools . StructureResonanceGeneratorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ) ; molecule . addBond ( 3 , 4 , IBond . Order . DOUBLE ) ; molecule . addAtom ( org . openscience . cdk . tools . StructureResonanceGeneratorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ) ; molecule . addBond ( 4 , 5 , IBond . Order . SINGLE ) ; molecule . addAtom ( org . openscience . cdk . tools . StructureResonanceGeneratorTest . builder . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ) ; molecule . addBond ( 5 , 6 , IBond . Order . DOUBLE ) ; molecule . addBond ( 6 , 1 , IBond . Order . SINGLE ) ; addExplicitHydrogens ( molecule ) ; org . openscience . cdk . tools . manipulator . AtomContainerManipulator . percieveAtomTypesAndConfigureAtoms ( molecule ) ; lpcheck . saturate ( molecule ) ; org . openscience . cdk . tools . StructureResonanceGenerator gRI = new org . openscience . cdk . tools . StructureResonanceGenerator ( ) ; org . openscience . cdk . interfaces . IAtomContainerSet setOfMolecules = gRI . getStructures ( molecule ) ; "<AssertPlaceHolder>" ; } getAtomContainerCount ( ) { return this . atomContainerCount ; }
org . junit . Assert . assertEquals ( 5 , setOfMolecules . getAtomContainerCount ( ) )
testList ( ) { java . util . List < org . candlepin . model . SubscriptionsCertificate > certificates = certificateCurator . listAll ( ) . list ( ) ; int beforeCount = certificates . size ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { certificateCurator . create ( createSubCert ( ( "key" + i ) , ( "cert" + i ) ) ) ; } certificates = certificateCurator . listAll ( ) . list ( ) ; int afterCount = certificates . size ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return virtUuidToConsumerMap . keySet ( ) . size ( ) ; }
org . junit . Assert . assertEquals ( 10 , ( afterCount - beforeCount ) )
testQuerySingleRangeExpected ( ) { org . calrissian . accumulorecipes . rangestore . impl . AccumuloRangeStore < java . lang . Long > rangeStore = new org . calrissian . accumulorecipes . rangestore . impl . AccumuloRangeStore < java . lang . Long > ( org . calrissian . accumulorecipes . rangestore . impl . AccumuloRangeStoreTest . getConnector ( ) , new org . calrissian . accumulorecipes . rangestore . helper . LongRangeHelper ( ) ) ; rangeStore . save ( singleton ( new org . calrissian . accumulorecipes . rangestore . support . ValueRange < java . lang . Long > ( 1L , 4L ) ) ) ; rangeStore . save ( singleton ( new org . calrissian . accumulorecipes . rangestore . support . ValueRange < java . lang . Long > ( 3L , 7L ) ) ) ; rangeStore . save ( singleton ( new org . calrissian . accumulorecipes . rangestore . support . ValueRange < java . lang . Long > ( 8L , 9L ) ) ) ; java . util . List < org . calrissian . accumulorecipes . rangestore . support . ValueRange < java . lang . Long > > results = newArrayList ( rangeStore . query ( new org . calrissian . accumulorecipes . rangestore . support . ValueRange < java . lang . Long > ( 1L , 2L ) , Auths . EMPTY ) ) ; "<AssertPlaceHolder>" ; org . calrissian . accumulorecipes . rangestore . impl . AccumuloRangeStoreTest . compareRanges ( new org . calrissian . accumulorecipes . rangestore . support . ValueRange < java . lang . Long > ( 1L , 4L ) , results . get ( 0 ) ) ; } query ( java . util . Set , org . calrissian . mango . criteria . domain . Node , org . calrissian . accumulorecipes . commons . domain . Auths ) { return query ( types , query , null , auths ) ; }
org . junit . Assert . assertEquals ( 1 , results . size ( ) )
testTranslatorORCIDHTTPS ( ) { org . sagebionetworks . repo . model . dbo . principal . DBOPrincipalAlias dbo = new org . sagebionetworks . repo . model . dbo . principal . DBOPrincipalAlias ( ) ; org . sagebionetworks . repo . model . dbo . migration . MigratableTableTranslation < org . sagebionetworks . repo . model . dbo . principal . DBOPrincipalAlias , org . sagebionetworks . repo . model . dbo . principal . DBOPrincipalAlias > translator = dbo . getTranslator ( ) ; org . sagebionetworks . repo . model . dbo . principal . DBOPrincipalAlias backup = org . sagebionetworks . repo . model . dbo . principal . DBOPrincipalAliasTest . newDBO ( "https://orcid.org/0000-1111-2222-3333" , AliasEnum . USER_ORCID ) ; dbo = translator . createDatabaseObjectFromBackup ( backup ) ; "<AssertPlaceHolder>" ; } createDatabaseObjectFromBackup ( D extends org . sagebionetworks . repo . model . dbo . DatabaseObject ) { return backup ; }
org . junit . Assert . assertEquals ( dbo , backup )
testGetInfo ( ) { org . apache . hive . service . cli . SessionHandle sessionHandle = org . apache . hive . service . cli . CLIServiceTest . client . openSession ( "tom" , "password" , java . util . Collections . < java . lang . String , java . lang . String > emptyMap ( ) ) ; "<AssertPlaceHolder>" ; org . apache . hive . service . cli . GetInfoValue value = org . apache . hive . service . cli . CLIServiceTest . client . getInfo ( sessionHandle , GetInfoType . CLI_DBMS_NAME ) ; System . out . println ( value . getStringValue ( ) ) ; value = org . apache . hive . service . cli . CLIServiceTest . client . getInfo ( sessionHandle , GetInfoType . CLI_SERVER_NAME ) ; System . out . println ( value . getStringValue ( ) ) ; value = org . apache . hive . service . cli . CLIServiceTest . client . getInfo ( sessionHandle , GetInfoType . CLI_DBMS_VER ) ; System . out . println ( value . getStringValue ( ) ) ; org . apache . hive . service . cli . CLIServiceTest . client . closeSession ( sessionHandle ) ; } openSession ( org . apache . hive . service . rpc . thrift . TProtocolVersion , java . lang . String , java . lang . String , java . util . Map ) { org . apache . hive . service . cli . SessionHandle sessionHandle = sessionManager . openSession ( protocol , username , password , null , configuration , false , null ) ; LOG . debug ( ( sessionHandle + ":<sp>openSession()" ) ) ; return sessionHandle ; }
org . junit . Assert . assertNotNull ( sessionHandle )
testResolvingEmptyListReturnsEmptyList ( ) { com . facebook . buck . core . select . impl . DefaultSelectorListResolver resolver = new com . facebook . buck . core . select . impl . DefaultSelectorListResolver ( new com . facebook . buck . core . select . TestSelectableResolver ( ) ) ; com . facebook . buck . core . model . BuildTarget buildTarget = com . facebook . buck . core . model . BuildTargetFactory . newInstance ( "//a:b" ) ; com . facebook . buck . core . select . SelectorList < com . google . common . collect . ImmutableList < com . facebook . buck . core . model . Flavor > > selectorList = createSelectorListForListsOfFlavors ( ) ; com . google . common . collect . ImmutableList < com . facebook . buck . core . model . Flavor > flavors = resolver . resolveList ( configurationContext , buildTarget , "some_attribute" , selectorList ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( segments . length ) == 0 ; }
org . junit . Assert . assertTrue ( flavors . isEmpty ( ) )
testReadAll ( ) { System . out . println ( "readAll" ) ; com . pearson . docussandra . domain . objects . Table testTable = com . pearson . docussandra . testhelper . Fixtures . createTestTable ( ) ; com . pearson . docussandra . persistence . impl . TableRepositoryImplTest . f . insertTable ( testTable ) ; java . lang . String database = testTable . getDatabaseName ( ) ; com . pearson . docussandra . persistence . TableRepository instance = new com . pearson . docussandra . persistence . impl . TableRepositoryImpl ( com . pearson . docussandra . persistence . impl . TableRepositoryImplTest . f . getSession ( ) ) ; java . util . List < com . pearson . docussandra . domain . objects . Table > expResult = new java . util . ArrayList ( ) ; expResult . add ( testTable ) ; java . util . List < com . pearson . docussandra . domain . objects . Table > result = instance . readAll ( new com . pearson . docussandra . domain . objects . Identifier ( database ) ) ; "<AssertPlaceHolder>" ; } readAll ( java . lang . String ) { com . pearson . docussandra . domain . objects . Identifier id = new com . pearson . docussandra . domain . objects . Identifier ( database ) ; if ( ! ( databases . exists ( id ) ) ) { throw new com . pearson . docussandra . exception . ItemNotFoundException ( ( "Database<sp>not<sp>found:<sp>" + database ) ) ; } return tables . readAll ( id ) ; }
org . junit . Assert . assertEquals ( expResult , result )
testNestedTables ( ) { org . apache . crunch . types . PTableType < java . lang . Long , java . lang . Long > pll = org . apache . crunch . types . writable . Writables . tableOf ( org . apache . crunch . types . writable . Writables . longs ( ) , org . apache . crunch . types . writable . Writables . longs ( ) ) ; org . apache . crunch . types . PTableType < org . apache . crunch . Pair < java . lang . Long , java . lang . Long > , java . lang . String > nest = org . apache . crunch . types . writable . Writables . tableOf ( pll , org . apache . crunch . types . writable . Writables . strings ( ) ) ; "<AssertPlaceHolder>" ; } strings ( ) { return org . apache . crunch . types . writable . Writables . strings ; }
org . junit . Assert . assertNotNull ( nest )
testFindLessOrEqualNullFromEmptyTree ( ) { org . apache . directory . server . core . avltree . ArrayTree < java . lang . Integer > tree = createTree ( ) ; "<AssertPlaceHolder>" ; } findLessOrEqual ( K ) { if ( ( key != null ) && ( ( comparator . compare ( key , singleton . key ) ) >= 0 ) ) { return singleton ; } return null ; }
org . junit . Assert . assertNull ( tree . findLessOrEqual ( null ) )
testHistoricDetailActivityInstanceIdForInactiveScopeExecution ( ) { org . camunda . bpm . engine . runtime . ProcessInstance pi = runtimeService . startProcessInstanceByKey ( "testProcess" ) ; runtimeService . setVariable ( pi . getId ( ) , "foo" , "bar" ) ; org . camunda . bpm . engine . history . HistoricDetail historicDetail = historyService . createHistoricDetailQuery ( ) . singleResult ( ) ; "<AssertPlaceHolder>" ; } getActivityInstanceId ( ) { return activityInstanceId ; }
org . junit . Assert . assertNotNull ( historicDetail . getActivityInstanceId ( ) )
testDownControl ( ) { java . util . List < org . biopax . paxtools . pattern . Match > list = org . biopax . paxtools . pattern . Searcher . search ( model . getByID ( "http://pid.nci.nih.gov/biopaxpid_35449" ) , new org . biopax . paxtools . pattern . Pattern ( org . biopax . paxtools . pattern . constraint . PhysicalEntity . class , org . biopax . paxtools . pattern . constraint . ConBox . peToControl ( ) , "PE" , "Control" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( lastIndex ) + 1 ; }
org . junit . Assert . assertTrue ( ( ( list . size ( ) ) == 1 ) )
given_asConfigured_and_configurationSetToNone_thenNone ( ) { class Customer { @ org . apache . isis . applib . annotation . Action ( publishing = org . apache . isis . applib . annotation . Publishing . AS_CONFIGURED ) public void someAction ( ) { } } allowingPublishingConfigurationToReturn ( "none" ) ; final java . lang . reflect . Method actionMethod = findMethod ( Customer . class , "someAction" ) ; facetFactory . processPublishing ( new org . apache . isis . core . metamodel . facets . FacetFactory . ProcessMethodContext ( Customer . class , null , null , actionMethod , mockMethodRemover , facetedMethod ) ) ; final org . apache . isis . core . metamodel . facetapi . Facet facet = facetedMethod . getFacet ( org . apache . isis . core . metamodel . facets . actions . publish . PublishedActionFacet . class ) ; "<AssertPlaceHolder>" ; expectNoMethodsRemoved ( ) ; } getFacet ( java . lang . Class ) { final org . apache . isis . core . metamodel . facetapi . FacetHolder facetHolder = getAction ( ) ; return facetHolder . getFacet ( facetType ) ; }
org . junit . Assert . assertNull ( facet )
testGetUTCDayStart ( ) { System . out . println ( "getUTCDayStart" ) ; long dateInput = getUTCDateExpected ( 2012 , 1 , 1 , 0 , 0 , 0 ) ; long expResult = dateInput ; dateInput += 12134 ; java . util . Date EventStartDate = OpenRate . utils . ConversionUtilsTest . instance . getDateFromUTC ( dateInput ) ; long result = OpenRate . utils . ConversionUtilsTest . instance . getUTCDayStart ( EventStartDate ) ; "<AssertPlaceHolder>" ; } getUTCDayStart ( java . util . Date ) { java . util . Date roundedDate = getDayStart ( EventStartDate ) ; cal . setTime ( roundedDate ) ; long validityDayStart = ( cal . getTimeInMillis ( ) ) / 1000 ; return validityDayStart ; }
org . junit . Assert . assertEquals ( expResult , result )
testNoSpan ( ) { javax . servlet . http . HttpServletRequest request = org . mockito . Mockito . mock ( javax . servlet . http . HttpServletRequest . class ) ; org . mockito . Mockito . when ( request . getAttribute ( TracingFilter . SERVER_SPAN_CONTEXT ) ) . thenReturn ( null ) ; io . opentracing . contrib . spring . web . interceptor . TracingHandlerInterceptor interceptor = new io . opentracing . contrib . spring . web . interceptor . TracingHandlerInterceptor ( null ) ; "<AssertPlaceHolder>" ; interceptor . afterConcurrentHandlingStarted ( request , null , null ) ; interceptor . afterCompletion ( request , null , null , null ) ; } preHandle ( javax . servlet . http . HttpServletRequest , javax . servlet . http . HttpServletResponse , java . lang . Object ) { if ( request . getRequestURL ( ) . toString ( ) . contains ( "/sync" ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( interceptor . preHandle ( request , null , null ) )
testSharepointFilterIsEnabled ( ) { com . liferay . portal . util . PropsUtil . set ( com . liferay . portal . sharepoint . SharepointFilter . class . getName ( ) , "true" ) ; com . liferay . portal . sharepoint . SharepointFilter sharepointFilter = new com . liferay . portal . sharepoint . SharepointFilter ( ) ; sharepointFilter . init ( _filterConfig ) ; "<AssertPlaceHolder>" ; } isFilterEnabled ( ) { if ( ! ( super . isFilterEnabled ( ) ) ) { return false ; } if ( ( ( ( ( ( ! ( _monitorPortalRequest ) ) && ( ! ( _portletMonitoringControl . isMonitorPortletActionRequest ( ) ) ) ) && ( ! ( _portletMonitoringControl . isMonitorPortletEventRequest ( ) ) ) ) && ( ! ( _portletMonitoringControl . isMonitorPortletRenderRequest ( ) ) ) ) && ( ! ( _portletMonitoringControl . isMonitorPortletResourceRequest ( ) ) ) ) && ( ! ( _serviceMonitoringControl . isMonitorServiceRequest ( ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( sharepointFilter . isFilterEnabled ( ) )
shouldThrow ( ) { final java . lang . Exception e = new com . jeromeloisel . db . conversion . jackson . JacksonConversionException ( "" , new java . io . IOException ( ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( e )
indexOf_A$Object_notExists ( ) { com . m3 . scalaflavor4j . Seq < java . lang . Integer > seq = com . m3 . scalaflavor4j . IndexedSeq . apply ( 1 , 2 , 3 ) ; java . lang . Integer elem = 1000 ; int actual = seq . indexOf ( elem ) ; int expected = - 1 ; "<AssertPlaceHolder>" ; } indexOf ( T ) { return - 1 ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
roundtripOfDateIntervalUntil ( ) { net . time4j . PlainDate end = net . time4j . PlainDate . of ( 2014 , 2 , 27 ) ; java . lang . Object interval = net . time4j . range . DateInterval . until ( end ) ; java . lang . Object ser = net . time4j . range . SerializationTest . roundtrip ( interval ) ; "<AssertPlaceHolder>" ; } roundtrip ( java . lang . Object ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream oos = new java . io . ObjectOutputStream ( baos ) ; oos . writeObject ( obj ) ; byte [ ] data = baos . toByteArray ( ) ; oos . close ( ) ; java . io . ByteArrayInputStream bais = new java . io . ByteArrayInputStream ( data ) ; java . io . ObjectInputStream ois = new java . io . ObjectInputStream ( bais ) ; java . lang . Object ser = ois . readObject ( ) ; ois . close ( ) ; return ser ; }
org . junit . Assert . assertThat ( interval , org . hamcrest . CoreMatchers . is ( ser ) )
testSerialization ( ) { org . jfree . chart . needle . PinNeedle n1 = new org . jfree . chart . needle . PinNeedle ( ) ; org . jfree . chart . needle . PinNeedle n2 = ( ( org . jfree . chart . needle . PinNeedle ) ( org . jfree . chart . TestUtilities . serialised ( n1 ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; mdz . hc . ProcessValue other = ( ( mdz . hc . ProcessValue ) ( obj ) ) ; if ( ( state ) != ( other . state ) ) return false ; if ( ( timestamp ) == null ) { if ( ( other . timestamp ) != null ) return false ; } else if ( ! ( timestamp . equals ( other . timestamp ) ) ) return false ; if ( ( value ) == null ) { if ( ( other . value ) != null ) return false ; } else if ( ! ( value . equals ( other . value ) ) ) return false ; return true ; }
org . junit . Assert . assertTrue ( n1 . equals ( n2 ) )
testFromEbXMLEmpty ( ) { org . openehealth . ipf . commons . ihe . xds . core . requests . query . GetRelatedDocumentsQuery result = new org . openehealth . ipf . commons . ihe . xds . core . requests . query . GetRelatedDocumentsQuery ( ) ; transformer . fromEbXML ( result , ebXML ) ; "<AssertPlaceHolder>" ; } fromEbXML ( org . openehealth . ipf . commons . ihe . xds . core . requests . query . GetAllQuery , org . openehealth . ipf . commons . ihe . xds . core . ebxml . EbXMLAdhocQueryRequest ) { if ( ( query == null ) || ( ebXML == null ) ) { return ; } org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . QuerySlotHelper slots = new org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . QuerySlotHelper ( ebXML ) ; java . lang . String patientId = slots . toString ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . PATIENT_ID ) ; query . setPatientId ( org . openehealth . ipf . commons . ihe . xds . core . metadata . Hl7v2Based . parse ( patientId , org . openehealth . ipf . commons . ihe . xds . core . metadata . Identifiable . class ) ) ; query . setStatusDocuments ( slots . toStatus ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . DOC_ENTRY_STATUS ) ) ; query . setStatusFolders ( slots . toStatus ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . FOLDER_STATUS ) ) ; query . setStatusSubmissionSets ( slots . toStatus ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . SUBMISSION_SET_STATUS ) ) ; query . setConfidentialityCodes ( slots . toCodeQueryList ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . DOC_ENTRY_CONFIDENTIALITY_CODE , org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . DOC_ENTRY_CONFIDENTIALITY_CODE_SCHEME ) ) ; query . setFormatCodes ( slots . toCodeList ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . DOC_ENTRY_FORMAT_CODE ) ) ; query . setHomeCommunityId ( ebXML . getHome ( ) ) ; query . setDocumentEntryTypes ( slots . toDocumentEntryType ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . DOC_ENTRY_TYPE ) ) ; }
org . junit . Assert . assertEquals ( new org . openehealth . ipf . commons . ihe . xds . core . requests . query . GetRelatedDocumentsQuery ( ) , result )
testSPIShutdownHookRun7 ( ) { _mockRemoteSPI . registrationReference = mockRegistrationReference ( true ) ; java . rmi . server . UnicastRemoteObject . exportObject ( _mockRemoteSPI , 0 ) ; com . liferay . portal . kernel . resiliency . spi . remote . RemoteSPI . SPIShutdownHook spiShutdownHook = _mockRemoteSPI . new com . liferay . portal . kernel . resiliency . spi . remote . RemoteSPI . SPIShutdownHook ( ) ; try ( com . liferay . portal . kernel . test . CaptureHandler captureHandler = com . liferay . portal . kernel . test . JDKLoggerTestUtil . configureJDKLogger ( com . liferay . portal . kernel . resiliency . spi . remote . RemoteSPI . class . getName ( ) , Level . ALL ) ) { spiShutdownHook . run ( ) ; java . util . List < java . util . logging . LogRecord > logRecords = captureHandler . getLogRecords ( ) ; "<AssertPlaceHolder>" ; } unexported ( ) ; } 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 . assertTrue ( logRecords . toString ( ) , logRecords . isEmpty ( ) )
testLang315 ( ) { final org . apache . commons . lang3 . time . StopWatch watch = new org . apache . commons . lang3 . time . StopWatch ( ) ; watch . start ( ) ; try { java . lang . Thread . sleep ( 200 ) ; } catch ( final java . lang . InterruptedException ex ) { } watch . suspend ( ) ; final long suspendTime = watch . getTime ( ) ; try { java . lang . Thread . sleep ( 200 ) ; } catch ( final java . lang . InterruptedException ex ) { } watch . stop ( ) ; final long totalTime = watch . getTime ( ) ; "<AssertPlaceHolder>" ; } getTime ( ) { return new java . util . Date ( this . time ) ; }
org . junit . Assert . assertTrue ( ( suspendTime == totalTime ) )
testAssociationIndicationStatusStaticAccess ( ) { for ( com . digi . xbee . api . models . AssociationIndicationStatus associationIndicationStatus : associationIndicationStatusValues ) "<AssertPlaceHolder>" ; } get ( int ) { return com . digi . xbee . api . models . AssociationIndicationStatus . lookupTable . get ( value ) ; }
org . junit . Assert . assertEquals ( associationIndicationStatus , com . digi . xbee . api . models . AssociationIndicationStatus . get ( associationIndicationStatus . getValue ( ) ) )
testExclusion ( ) { owltools . graph . OWLGraphWrapper g = getOntologyWrapper ( ) ; owltools . graph . OWLGraphWrapperEdges . Config cfg = g . getConfig ( ) ; cfg . excludeProperty ( g . getDataFactory ( ) . getOWLObjectProperty ( org . semanticweb . owlapi . model . IRI . create ( "http://example.org#has" ) ) , null ) ; org . semanticweb . owlapi . model . OWLObject obj = g . getOWLObject ( "http://example.org#o1" ) ; org . semanticweb . owlapi . model . OWLObject eye = g . getOWLObject ( "http://example.org#eye" ) ; boolean ok = true ; if ( owltools . graph . Ancestors2Test . RENDER_ONTOLOGY_FLAG ) { for ( owltools . graph . OWLGraphEdge e : g . getOutgoingEdges ( obj ) ) { System . out . println ( ( "DIRECT<sp>EDGE:" + e ) ) ; } } for ( owltools . graph . OWLGraphEdge e : g . getOutgoingEdgesClosureReflexive ( obj ) ) { if ( e . getTarget ( ) . equals ( eye ) ) ok = false ; } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( obj instanceof owltools . gaf . ExtensionExpression ) == false ) return false ; owltools . gaf . ExtensionExpression other = ( ( owltools . gaf . ExtensionExpression ) ( obj ) ) ; if ( ( cls ) == null ) { if ( ( other . cls ) != null ) return false ; } else if ( ! ( cls . equals ( other . cls ) ) ) return false ; if ( ( relation ) == null ) { if ( ( other . relation ) != null ) return false ; } else if ( ! ( relation . equals ( other . relation ) ) ) return false ; return true ; }
org . junit . Assert . assertTrue ( ok )
throwExceptionFromProceedIntoJREMethod ( mockit . AbstractExecutorService , mockit . DelegateInvocationProceedTest$ClassToBeMocked ) { new mockit . Expectations ( ) { { c1 . submit ( ( ( java . lang . Runnable ) ( any ) ) ) ; result = new mockit . Delegate ( ) { @ mockit . Mock void delegate ( mockit . Invocation inv ) { inv . proceed ( ) ; } } ; } } ; try { c1 . submit ( ( ( java . lang . Runnable ) ( null ) ) ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . NullPointerException ignored ) { new mockit . Expectations ( ) { { c2 . methodToBeMocked ( anyInt ) ; result = 123 ; } } ; "<AssertPlaceHolder>" ; } } delegate ( int ) { if ( i > 1 ) return i ; return mockit . ReentrantDelegateTest . RealClass . nonRecursiveStaticMethod ( ( i + 1 ) ) ; }
org . junit . Assert . assertEquals ( 123 , c2 . methodToBeMocked ( 1 ) )
empty ( ) { io . fabric8 . maven . docker . config . BuildImageConfiguration config = new io . fabric8 . maven . docker . config . BuildImageConfiguration ( ) ; config . initAndValidate ( logger ) ; "<AssertPlaceHolder>" ; } isDockerFileMode ( ) { return ( dockerFileFile ) != null ; }
org . junit . Assert . assertFalse ( config . isDockerFileMode ( ) )
booleanParamShouldHandleNull ( ) { create ( "booleanParam" ) . invoke ( mockController , context ) ; verify ( mockController ) . booleanParam ( null ) ; "<AssertPlaceHolder>" ; } hasViolations ( ) { return ! ( this . violations . isEmpty ( ) ) ; }
org . junit . Assert . assertFalse ( validation . hasViolations ( ) )
testSetStringintString ( ) { stmt . prepare ( ( ( org . eclipse . birt . report . data . oda . jdbc . StatementTest . SELECT_SQL ) + "<sp>where<sp>col4<sp>=<sp>?" ) ) ; stmt . setString ( 1 , "00" ) ; org . eclipse . birt . report . data . oda . jdbc . ResultSet rs = ( ( org . eclipse . birt . report . data . oda . jdbc . ResultSet ) ( stmt . executeQuery ( ) ) ) ; "<AssertPlaceHolder>" ; } next ( ) { if ( ( entry ) == null ) { if ( beforeFirst ) { if ( first ( ) ) { return true ; } beforeFirst = false ; } return false ; } org . eclipse . birt . core . btree . LeafEntry < K , V > tgtEntry = getNextEntry ( entry ) ; if ( tgtEntry != null ) { btree . lockEntry ( tgtEntry ) ; btree . unlockEntry ( entry ) ; entry = tgtEntry ; return true ; } btree . unlockEntry ( entry ) ; entry = null ; beforeFirst = false ; return false ; }
org . junit . Assert . assertTrue ( rs . next ( ) )
testReplaceMatrixParamWithNull ( ) { javax . ws . rs . core . UriBuilder builder = new com . sun . jersey . api . uri . UriBuilderImpl ( ) . matrixParam ( "matrix" , "param1" , "param2" ) ; builder . replaceMatrixParam ( "matrix" , ( ( java . lang . Object [ ] ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } build ( ) { return new com . sun . jersey . api . json . JSONConfiguration ( this ) ; }
org . junit . Assert . assertEquals ( builder . build ( ) . toString ( ) , "" )
testAndFails ( ) { buildRule . executeTarget ( "andfails" ) ; "<AssertPlaceHolder>" ; } getProject ( ) { return project ; }
org . junit . Assert . assertNull ( buildRule . getProject ( ) . getProperty ( "andfails" ) )
testIsCompareModeFalse ( ) { result = new ch . puzzle . itc . mobiliar . presentation . generator . ComparedGenerationResult ( originalResult ) ; "<AssertPlaceHolder>" ; } isCompareMode ( ) { return ( compareGlobalFunction ) != null ; }
org . junit . Assert . assertFalse ( result . isCompareMode ( ) )
testSkipEnum ( ) { org . terracotta . runnel . EnumMapping < org . terracotta . runnel . EnumMappingTest . TestEnum1 > enm1 = org . terracotta . runnel . EnumMappingBuilder . newEnumMappingBuilder ( org . terracotta . runnel . EnumMappingTest . TestEnum1 . class ) . mapping ( org . terracotta . runnel . EnumMappingTest . TestEnum1 . A , 1 ) . mapping ( org . terracotta . runnel . EnumMappingTest . TestEnum1 . B , 2 ) . mapping ( org . terracotta . runnel . EnumMappingTest . TestEnum1 . C , 3 ) . build ( ) ; org . terracotta . runnel . EnumMapping < java . lang . Character > enm2 = org . terracotta . runnel . EnumMappingBuilder . newEnumMappingBuilder ( org . terracotta . runnel . Character . class ) . mapping ( org . terracotta . runnel . EnumMappingTest . W , 1 ) . mapping ( org . terracotta . runnel . EnumMappingTest . X , 2 ) . mapping ( org . terracotta . runnel . EnumMappingTest . Y , 3 ) . mapping ( org . terracotta . runnel . EnumMappingTest . Z , 4 ) . build ( ) ; org . terracotta . runnel . Struct subStruct = org . terracotta . runnel . StructBuilder . newStructBuilder ( ) . enm ( "myEnum1" , 1 , enm1 ) . build ( ) ; org . terracotta . runnel . Struct struct = org . terracotta . runnel . StructBuilder . newStructBuilder ( ) . enm ( "myEnum2" , 1 , enm2 ) . struct ( "z" , 3 , subStruct ) . enm ( "myEnum2bis" , 5 , enm2 ) . build ( ) ; java . nio . ByteBuffer encoded = struct . encoder ( ) . enm ( "myEnum2" , org . terracotta . runnel . EnumMappingTest . W ) . struct ( "z" ) . enm ( "myEnum1" , org . terracotta . runnel . EnumMappingTest . TestEnum1 . A ) . end ( ) . enm ( "myEnum2bis" , org . terracotta . runnel . EnumMappingTest . X ) . encode ( ) ; encoded . rewind ( ) ; org . terracotta . runnel . decoding . StructDecoder < java . lang . Void > decoder = struct . decoder ( encoded ) ; "<AssertPlaceHolder>" ; } get ( ) { try { return futureTask . get ( ) ; } catch ( java . util . concurrent . ExecutionException e ) { throw new java . lang . RuntimeException ( e . getCause ( ) ) ; } }
org . junit . Assert . assertThat ( decoder . < java . lang . Character > enm ( "myEnum2bis" ) . get ( ) , org . hamcrest . CoreMatchers . is ( org . terracotta . runnel . EnumMappingTest . X ) )
testTranslateContextUnsuccessfull ( ) { ichunk . setContext ( ( - 2324 ) ) ; java . lang . String expResult = null ; java . lang . String result = org . goodoldai . jeff . report . rtf . RTFChunkUtility . translateContext ( ichunk ) ; "<AssertPlaceHolder>" ; } translateContext ( org . goodoldai . jeff . explanation . ExplanationChunk ) { if ( echunk == null ) { throw new org . goodoldai . jeff . explanation . ExplanationException ( "The<sp>entered<sp>chunk<sp>must<sp>not<sp>be<sp>null" ) ; } java . lang . Class < org . goodoldai . jeff . explanation . ExplanationChunk > cl = org . goodoldai . jeff . explanation . ExplanationChunk . class ; java . lang . reflect . Field [ ] fields = cl . getDeclaredFields ( ) ; try { for ( int i = 0 ; i < ( fields . length ) ; i ++ ) { java . lang . reflect . Field field = fields [ i ] ; if ( ( java . lang . reflect . Modifier . isPublic ( field . getModifiers ( ) ) ) && ( ( field . getInt ( field . getName ( ) ) ) == ( echunk . getContext ( ) ) ) ) { return field . getName ( ) ; } } return null ; } catch ( java . lang . Exception e ) { throw new org . goodoldai . jeff . explanation . ExplanationException ( e . getMessage ( ) ) ; } }
org . junit . Assert . assertEquals ( expResult , result )
testExists_True ( ) { initializeExpectedImage ( 2 ) ; com . google . cloud . compute . deprecated . Compute [ ] expectedOptions = new Compute . ImageOption [ ] { Compute . ImageOption . fields ( ) } ; expect ( compute . getOptions ( ) ) . andReturn ( mockOptions ) ; expect ( compute . getImage ( com . google . cloud . compute . deprecated . ImageTest . IMAGE_ID , expectedOptions ) ) . andReturn ( diskImage ) ; replay ( compute ) ; initializeImage ( ) ; "<AssertPlaceHolder>" ; verify ( compute ) ; } exists ( ) { boolean exists = bucket . exists ( ) ; if ( exists ) { } else { } return exists ; }
org . junit . Assert . assertTrue ( image . exists ( ) )
testCleanAccesskeyFromRequestString ( ) { final java . lang . String input = "username=foo&accesskey=bar&url=foobar" ; final java . lang . String expected = "username=foo&url=foobar" ; final java . lang . String result = com . cloud . utils . StringUtils . cleanString ( input ) ; "<AssertPlaceHolder>" ; } cleanString ( java . lang . String ) { java . lang . String cleanResult = "" ; if ( stringToClean != null ) { cleanResult = com . cloud . utils . StringUtils . REGEX_PASSWORD_QUERYSTRING . matcher ( stringToClean ) . replaceAll ( "" ) ; cleanResult = com . cloud . utils . StringUtils . REGEX_PASSWORD_JSON . matcher ( cleanResult ) . replaceAll ( "" ) ; final java . util . regex . Matcher detailsMatcher = com . cloud . utils . StringUtils . REGEX_PASSWORD_DETAILS . matcher ( cleanResult ) ; while ( detailsMatcher . find ( ) ) { final java . util . regex . Matcher detailsIndexMatcher = com . cloud . utils . StringUtils . REGEX_PASSWORD_DETAILS_INDEX . matcher ( detailsMatcher . group ( ) ) ; if ( detailsIndexMatcher . find ( ) ) { cleanResult = com . cloud . utils . StringUtils . cleanDetails ( cleanResult , detailsIndexMatcher . group ( ) ) ; } } } return cleanResult ; }
org . junit . Assert . assertEquals ( result , expected )
testRedisSlaveRoleCorrect ( ) { result = new java . util . function . Supplier < java . lang . String > ( ) { @ com . ctrip . xpipe . redis . console . healthcheck . actions . redismaster . Override public java . lang . String get ( ) { return com . ctrip . xpipe . redis . console . healthcheck . actions . redismaster . RedisMasterCheckActionTest . ROLE_SLAVE ; } } ; instance . getRedisInstanceInfo ( ) . isMaster ( false ) ; action . doTask ( ) ; waitConditionUntilTimeOut ( ( ) -> ( server . getConnected ( ) ) == 1 , 200 ) ; waitConditionUntilTimeOut ( ( ) -> ! ( instance . getRedisInstanceInfo ( ) . isMaster ( ) ) , 50 ) ; "<AssertPlaceHolder>" ; verify ( redisService , never ( ) ) . updateBatchMaster ( anyList ( ) ) ; verify ( redisService , never ( ) ) . findRedisesByDcClusterShard ( anyString ( ) , anyString ( ) , anyString ( ) ) ; } getRedisInstanceInfo ( ) { return redisInstanceInfo ; }
org . junit . Assert . assertFalse ( instance . getRedisInstanceInfo ( ) . isMaster ( ) )
test22 ( ) { java . lang . System . out . println ( "validate" ) ; token . setKey ( org . demoiselle . jee . security . jwt . impl . TokenManagerImplMasterTest . localtoken ) ; token . setType ( TokenType . JWT ) ; boolean expResult = true ; boolean result = instance . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { return ( getUser ( ) ) != null ; }
org . junit . Assert . assertEquals ( expResult , result )
testResolvePackageWithPOMFile ( ) { final javax . enterprise . inject . spi . Bean moduleServiceBean = ( ( javax . enterprise . inject . spi . Bean ) ( beanManager . getBeans ( org . kie . workbench . common . services . shared . project . KieModuleService . class ) . iterator ( ) . next ( ) ) ) ; final javax . enterprise . context . spi . CreationalContext cc = beanManager . createCreationalContext ( moduleServiceBean ) ; final org . kie . workbench . common . services . shared . project . KieModuleService moduleService = ( ( org . kie . workbench . common . services . shared . project . KieModuleService ) ( beanManager . getReference ( moduleServiceBean , org . kie . workbench . common . services . shared . project . KieModuleService . class , cc ) ) ) ; final java . net . URL testUrl = this . getClass ( ) . getResource ( "/ModuleBackendTestModuleStructureValid/pom.xml" ) ; final org . uberfire . java . nio . file . Path nioTestPath = fs . getPath ( testUrl . toURI ( ) ) ; final org . uberfire . backend . vfs . Path testPath = paths . convert ( nioTestPath ) ; final org . guvnor . common . services . project . model . Package result = moduleService . resolvePackage ( testPath ) ; "<AssertPlaceHolder>" ; } resolvePackage ( org . uberfire . backend . vfs . Path ) { try { if ( resource == null ) { return null ; } final org . guvnor . common . services . project . model . Module module = resolveModule ( resource , false ) ; if ( module == null ) { return null ; } if ( ( isPom ( resource ) ) || ( kModuleService . isKModule ( resource ) ) ) { return null ; } return makePackage ( module , resource ) ; } catch ( java . lang . Exception e ) { throw org . guvnor . common . services . backend . exceptions . ExceptionUtilities . handleException ( e ) ; } }
org . junit . Assert . assertNull ( result )
magVerwerktWordenMetNegatiefResultaat ( ) { final java . util . List < java . lang . Integer > persoonIds = java . util . Arrays . asList ( 1 , 2 , 3 , 4 ) ; final nl . bzk . brp . model . operationeel . kern . AdministratieveHandelingModel administratieveHandeling = new nl . bzk . brp . model . operationeel . kern . AdministratieveHandelingModel ( new nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortAdministratieveHandelingAttribuut ( nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortAdministratieveHandeling . GEBOORTE_IN_NEDERLAND ) , null , null , nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumTijdAttribuut . nu ( ) ) ; final boolean magHet = administratieveHandelingVerwerkerRepository . magAdministratieveHandelingVerwerktWorden ( administratieveHandeling , persoonIds , null ) ; "<AssertPlaceHolder>" ; } magAdministratieveHandelingVerwerktWorden ( nl . bzk . brp . model . operationeel . kern . AdministratieveHandelingModel , java . util . List , java . util . List ) { final java . lang . StringBuilder querySb = new java . lang . StringBuilder ( ( "SELECT<sp>CASE<sp>WHEN<sp>(count(afad)<sp>><sp>0)<sp>THEN<sp>false<sp>ELSE<sp>true<sp>END" + ( ( ( "<sp>FROM<sp>HisPersoonAfgeleidAdministratiefModel<sp>afad" + "<sp>WHERE<sp>afad.administratieveHandeling.levering.tijdstipLevering<sp>IS<sp>NULL" ) + "<sp>AND<sp>afad.administratieveHandeling.tijdstipRegistratie<sp><<sp>:huidigeTsreg" ) + "<sp>AND<sp>afad.persoon.id<sp>IN<sp>:persIds" ) ) ) ; final boolean heeftTeNegerenSoortAdministratieveHandelingen = ( overslaanSoortAdministratieveHandelingen != null ) && ( ! ( overslaanSoortAdministratieveHandelingen . isEmpty ( ) ) ) ; if ( heeftTeNegerenSoortAdministratieveHandelingen ) { querySb . append ( "<sp>AND<sp>afad.administratieveHandeling.soort.waarde<sp>NOT<sp>IN<sp>:overslaanSoortAdministratieveHandelingen" ) ; } final javax . persistence . TypedQuery < java . lang . Boolean > tQuery = em . createQuery ( querySb . toString ( ) , nl . bzk . brp . levering . dataaccess . repository . lezenenschrijven . impl . Boolean . class ) ; tQuery . setParameter ( "huidigeTsreg" , administratieveHandeling . getTijdstipRegistratie ( ) ) ; tQuery . setParameter ( "persIds" , persoonIds ) ; if ( heeftTeNegerenSoortAdministratieveHandelingen ) { tQuery . setParameter ( "overslaanSoortAdministratieveHandelingen" , overslaanSoortAdministratieveHandelingen ) ; } return tQuery . getSingleResult ( ) ; }
org . junit . Assert . assertFalse ( magHet )
testRemove ( ) { com . liferay . portal . kernel . model . Release newRelease = addRelease ( ) ; _persistence . remove ( newRelease ) ; com . liferay . portal . kernel . model . Release existingRelease = _persistence . fetchByPrimaryKey ( newRelease . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertNull ( existingRelease )
testCSWServersCount ( ) { org . geosdi . geoplatform . request . SearchRequest request = new org . geosdi . geoplatform . request . SearchRequest ( "test" ) ; int count = cswService . getCSWServersCount ( request , super . organizationNameTest ) ; "<AssertPlaceHolder>" ; } getCSWServersCount ( org . geosdi . geoplatform . request . SearchRequest , java . lang . String ) { org . geosdi . geoplatform . services . delegate . CSWServiceDelegate . logger . trace ( "\n***<sp>CSWServersCount:<sp>{}<sp>***" , request ) ; return serverDao . countServers ( organization , GPCapabilityType . CSW , request . getNameLike ( ) ) . intValue ( ) ; }
org . junit . Assert . assertEquals ( 1 , count )
shouldWriteAndReadBytes ( ) { for ( int i = 0 ; i < 100 ; i ++ ) { java . lang . String str = "bazinga<sp>#" + i ; com . ociweb . pronghorn . iot . rs232 . RS232ClientTest . client1 . write ( str . getBytes ( "UTF-8" ) ) ; java . lang . Thread . sleep ( 10 ) ; java . lang . String read = new java . lang . String ( com . ociweb . pronghorn . iot . rs232 . RS232ClientTest . client2 . read ( 50 ) , "UTF-8" ) ; "<AssertPlaceHolder>" ; } } read ( int ) { if ( connected ) { return backing . read ( fd , size ) ; } else { return new byte [ 0 ] ; } }
org . junit . Assert . assertTrue ( read . contains ( str ) )
testGetLabelsDisplayedOK ( ) { axes1 . setLabelsDisplayed ( PlottingStyle . Y ) ; "<AssertPlaceHolder>" ; } getLabelsDisplayed ( ) { return labelsDisplayed . getValue ( ) ; }
org . junit . Assert . assertEquals ( PlottingStyle . Y , group . getLabelsDisplayed ( ) )
testWriteOneOutbound ( ) { final java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 1 ) ; final java . util . concurrent . atomic . AtomicInteger flushCount = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; io . netty . channel . embedded . EmbeddedChannel channel = new io . netty . channel . embedded . EmbeddedChannel ( new io . netty . channel . ChannelOutboundHandlerAdapter ( ) { @ io . netty . channel . embedded . Override public void write ( io . netty . channel . ChannelHandlerContext ctx , java . lang . Object msg , io . netty . channel . ChannelPromise promise ) throws io . netty . channel . embedded . Exception { ctx . write ( msg , promise ) ; latch . countDown ( ) ; } @ io . netty . channel . embedded . Override public void flush ( io . netty . channel . ChannelHandlerContext ctx ) throws io . netty . channel . embedded . Exception { flushCount . incrementAndGet ( ) ; } } ) ; channel . writeOneOutbound ( "Hello,<sp>Netty!" ) ; if ( ! ( latch . await ( 1L , TimeUnit . SECONDS ) ) ) { org . junit . Assert . fail ( "Nobody<sp>called<sp>#write()<sp>in<sp>time." ) ; } channel . close ( ) . syncUninterruptibly ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return maybeMoreDataToRead ( ) ; }
org . junit . Assert . assertEquals ( 0 , flushCount . get ( ) )
testAddAllCollectionOfQextendsIN ( ) { final java . util . List < java . lang . Integer > c = new java . util . ArrayList < java . lang . Integer > ( ) ; c . add ( 0 ) ; c . add ( 1 ) ; c . add ( 2 ) ; subject . addAll ( c ) ; "<AssertPlaceHolder>" ; } getOutput ( ) { return output ; }
org . junit . Assert . assertEquals ( "2" , subject . getOutput ( ) . get ( 2 ) )
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . ServiceComponent > serviceComponents = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( serviceComponents . isEmpty ( ) )
testMultipleSet04 ( ) { cmsdbContext . setAllowFullTableScan ( true ) ; try { java . lang . String query = "DNSRecord.((fqdn{*}<sp>&&<sp>cname{*})<sp>||<sp>fqdn{*}<sp>&&<sp>networkAddress{*})" ; com . ebay . cloud . cms . query . service . IQueryResult result = queryService . query ( query , cmsdbContext ) ; "<AssertPlaceHolder>" ; } catch ( com . ebay . cloud . cms . query . parser . QueryParseException qpe ) { } } getEntities ( ) { return entities ; }
org . junit . Assert . assertEquals ( 4 , result . getEntities ( ) . size ( ) )
testRealAjaxRequest ( ) { final org . pac4j . core . context . MockWebContext context = org . pac4j . core . context . MockWebContext . create ( ) . addRequestHeader ( "X-Requested-With" , "XMLHttpRequest" ) ; "<AssertPlaceHolder>" ; } isAjax ( org . pac4j . core . context . WebContext ) { final boolean xmlHttpRequest = org . pac4j . core . http . ajax . AJAX_HEADER_VALUE . equalsIgnoreCase ( context . getRequestHeader ( org . pac4j . core . http . ajax . AJAX_HEADER_NAME ) . orElse ( null ) ) ; final boolean hasDynamicAjaxParameter = Boolean . TRUE . toString ( ) . equalsIgnoreCase ( context . getRequestHeader ( org . pac4j . core . http . ajax . IS_AJAX_REQUEST ) . orElse ( null ) ) ; final boolean hasDynamicAjaxHeader = Boolean . TRUE . toString ( ) . equalsIgnoreCase ( context . getRequestParameter ( org . pac4j . core . http . ajax . IS_AJAX_REQUEST ) . orElse ( null ) ) ; return ( xmlHttpRequest || hasDynamicAjaxParameter ) || hasDynamicAjaxHeader ; }
org . junit . Assert . assertTrue ( resolver . isAjax ( context ) )
copyBRForExcludeNull ( ) { org . slim3 . util . BeanUtilTest . SrcBR src = new org . slim3 . util . BeanUtilTest . SrcBR ( ) ; org . slim3 . tester . MockServletContext servletContext = new org . slim3 . tester . MockServletContext ( ) ; org . slim3 . tester . MockHttpServletRequest dest = new org . slim3 . tester . MockHttpServletRequest ( servletContext ) ; dest . setAttribute ( "aaa" , "111" ) ; org . slim3 . util . BeanUtil . copy ( src , dest , new org . slim3 . util . CopyOptions ( ) . excludeNull ( ) ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { return attributeMap . get ( name ) ; }
org . junit . Assert . assertThat ( ( ( java . lang . String ) ( dest . getAttribute ( "aaa" ) ) ) , org . hamcrest . CoreMatchers . is ( "111" ) )
testOpening ( ) { ij . process . ImageProcessor image = createImage_Square10x10 ( ) ; inra . ijpb . morphology . Strel strel = new inra . ijpb . morphology . strel . LinearHorizontalStrel ( 5 ) ; ij . process . ImageProcessor result = strel . opening ( image ) ; for ( int y = 0 ; y < ( image . getHeight ( ) ) ; y ++ ) { for ( int x = 0 ; x < ( image . getWidth ( ) ) ; x ++ ) { "<AssertPlaceHolder>" ; } } } get ( int , int ) { if ( x < 0 ) return ( ( int ) ( this . value ) ) ; if ( y < 0 ) return ( ( int ) ( this . value ) ) ; if ( x >= ( this . image . getWidth ( ) ) ) return ( ( int ) ( this . value ) ) ; if ( y >= ( this . image . getHeight ( ) ) ) return ( ( int ) ( this . value ) ) ; return this . image . get ( x , y ) ; }
org . junit . Assert . assertEquals ( image . get ( x , y ) , result . get ( x , y ) )
testAsyncProxyPrimitiveResponse ( ) { java . lang . String address = "http://localhost:" + ( org . apache . cxf . systest . jaxrs . JAXRSAsyncClientTest . PORT ) ; final javax . xml . ws . Holder < java . lang . Boolean > holder = new javax . xml . ws . Holder ( ) ; final javax . ws . rs . client . InvocationCallback < java . lang . Boolean > callback = new javax . ws . rs . client . InvocationCallback < java . lang . Boolean > ( ) { public void completed ( java . lang . Boolean response ) { holder . value = response ; } public void failed ( java . lang . Throwable error ) { } } ; org . apache . cxf . systest . jaxrs . BookStore store = org . apache . cxf . jaxrs . client . JAXRSClientFactory . create ( address , org . apache . cxf . systest . jaxrs . BookStore . class ) ; org . apache . cxf . jaxrs . client . WebClient . getConfig ( store ) . getRequestContext ( ) . put ( javax . ws . rs . client . InvocationCallback . class . getName ( ) , callback ) ; store . checkBook ( 123L ) ; java . lang . Thread . sleep ( 3000 ) ; "<AssertPlaceHolder>" ; } checkBook ( java . lang . Long ) { if ( ( id . longValue ( ) ) != 0L ) { return javax . ws . rs . core . Response . status ( HttpStatus . SC_NOT_FOUND ) . build ( ) ; } return javax . ws . rs . core . Response . ok ( ) . build ( ) ; }
org . junit . Assert . assertTrue ( holder . value )