input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testParse2 ( ) { System . out . println ( "parse" ) ; java . lang . String units = "days<sp>since<sp>1970-01-01<sp>0:0:0" ; it . geosolutions . tools . netcdf . UnitsParser instance = new it . geosolutions . tools . netcdf . UnitsParser ( ) ; boolean ret = instance . parse ( units ) ; "<AssertPlaceHolder>" ; System . out . println ( instance ) ; } parse ( java . lang . String ) { java . lang . String [ ] split = input . split ( "<sp>" ) ; if ( ( split . length ) != 4 ) { if ( it . geosolutions . tools . netcdf . UnitsParser . LOGGER . isInfoEnabled ( ) ) it . geosolutions . tools . netcdf . UnitsParser . LOGGER . info ( ( ( "Could<sp>not<sp>parse<sp>'" + input ) + "':<sp>4<sp>tokens<sp>expected" ) ) ; return false ; } java . lang . String u = split [ 0 ] ; try { units = it . geosolutions . tools . netcdf . UnitsParser . Units . valueOf ( u . toLowerCase ( ) ) ; secondsMultiplier = units . getMultiplier ( ) ; } catch ( java . lang . Exception e ) { if ( it . geosolutions . tools . netcdf . UnitsParser . LOGGER . isInfoEnabled ( ) ) it . geosolutions . tools . netcdf . UnitsParser . LOGGER . info ( ( ( ( "Unknown<sp>time<sp>unit<sp>'" + u ) + "':<sp>" ) + ( e . getMessage ( ) ) ) ) ; return false ; } if ( ! ( "since" . equals ( split [ 1 ] ) ) ) { if ( it . geosolutions . tools . netcdf . UnitsParser . LOGGER . isInfoEnabled ( ) ) it . geosolutions . tools . netcdf . UnitsParser . LOGGER . info ( "Missing<sp>'since'<sp>keyword" ) ; return false ; } java . lang . String datetime = ( ( split [ 2 ] ) + "<sp>" ) + ( split [ 3 ] ) ; try { date = it . geosolutions . tools . netcdf . UnitsParser . INPUTFORMAT . parse ( datetime ) ; } catch ( java . text . ParseException ex ) { if ( it . geosolutions . tools . netcdf . UnitsParser . LOGGER . isInfoEnabled ( ) ) it . geosolutions . tools . netcdf . UnitsParser . LOGGER . info ( ( ( ( "Can't<sp>parse<sp>datetime<sp>'" + datetime ) + "':<sp>" ) + ( ex . getMessage ( ) ) ) ) ; return false ; } return true ; }
org . junit . Assert . assertTrue ( ret )
trie_add_04 ( ) { org . apache . jena . atlas . lib . Trie < java . lang . Integer > trie = new org . apache . jena . atlas . lib . Trie ( ) ; trie . add ( "test" , null ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { return ( getArg ( s ) ) != null ; }
org . junit . Assert . assertFalse ( trie . contains ( "test" ) )
pathUtilTest1 ( ) { java . io . File [ ] roots = java . io . File . listRoots ( ) ; if ( ( roots . length ) > 1 ) { java . io . File basePath = new java . io . File ( ( ( ( ( ( ( roots [ 0 ] ) + "some" ) + ( java . io . File . separatorChar ) ) + "dir" ) + ( java . io . File . separatorChar ) ) + "test.txt" ) ) ; java . io . File relativePath = new java . io . File ( ( ( ( ( ( ( roots [ 1 ] ) + "some" ) + ( java . io . File . separatorChar ) ) + "dir" ) + ( java . io . File . separatorChar ) ) + "test.txt" ) ) ; java . lang . String path = org . jf . util . PathUtil . getRelativeFileInternal ( basePath , relativePath ) ; "<AssertPlaceHolder>" ; } } getPath ( ) { return ( ( ( ( "values" + ( mConfig . getFlags ( ) . getQualifiers ( ) ) ) + "/" ) + ( mType . getName ( ) ) ) + ( mType . getName ( ) . endsWith ( "s" ) ? "" : "s" ) ) + ".xml" ; }
org . junit . Assert . assertEquals ( path , relativePath . getPath ( ) )
test_longlong_disc_union_manual ( ) { org . jacorb . test . orb . LongDiscUnion testValue = new org . jacorb . test . orb . LongDiscUnion ( ) ; testValue . s ( "foo" ) ; org . omg . CORBA . Any outAny = setup . getClientOrb ( ) . create_any ( ) ; outAny . type ( org . jacorb . test . orb . LongDiscUnionHelper . type ( ) ) ; org . jacorb . test . orb . LongDiscUnionHelper . write ( outAny . create_output_stream ( ) , testValue ) ; org . omg . CORBA . Any inAny = server . bounce_any ( outAny ) ; "<AssertPlaceHolder>" ; } equal ( java . lang . Object ) { if ( ( obj1 == null ) || ( ( current ) == null ) ) { throw new org . jacorb . collection . util . ObjectInvalid ( ) ; } check_object ( obj1 ) ; return ops . equal ( current , ( ( org . omg . CORBA . Any ) ( obj1 ) ) ) ; }
org . junit . Assert . assertTrue ( outAny . equal ( inAny ) )
testNoResourceSelectedWhenAllResourcesAreBlacklisted ( ) { com . rayo . server . storage . model . Application application = com . rayo . server . storage . BaseDatastoreTest . buildApplication ( "voxeo" , "client@jabber.org" , "staging" ) ; storageService . registerApplication ( application ) ; storageService . registerClient ( new com . rayo . storage . util . JIDImpl ( "client@jabber.org/a" ) ) ; storageService . registerClient ( new com . rayo . storage . util . JIDImpl ( "client@jabber.org/b" ) ) ; storageService . registerClient ( new com . rayo . storage . util . JIDImpl ( "client@jabber.org/c" ) ) ; for ( int i = 0 ; i < 10 ; i ++ ) { loadBalancer . clientOperationFailed ( "client@jabber.org/a" ) ; loadBalancer . clientOperationFailed ( "client@jabber.org/b" ) ; loadBalancer . clientOperationFailed ( "client@jabber.org/c" ) ; } "<AssertPlaceHolder>" ; } pickClientResource ( java . lang . String ) { java . util . List < java . lang . String > resources = storageService . getResourcesForClient ( bareJid ) ; if ( resources . isEmpty ( ) ) { return null ; } java . lang . String client = pickNextResource ( resources , bareJid ) ; if ( client != null ) { lastClients . put ( bareJid , client ) ; } return client ; }
org . junit . Assert . assertNull ( loadBalancer . pickClientResource ( "client@jabber.org" ) )
testCloneable ( ) { final org . drools . core . spi . ObjectType type = new org . drools . core . base . ClassObjectType ( java . lang . String . class ) ; final org . drools . core . rule . Pattern a = new org . drools . core . rule . Pattern ( 0 , type , "a" ) ; final org . drools . core . rule . Pattern b = new org . drools . core . rule . Pattern ( 1 , type , "b" ) ; final org . drools . core . rule . Pattern c = new org . drools . core . rule . Pattern ( 2 , type , "c" ) ; final org . drools . core . rule . Pattern d = new org . drools . core . rule . Pattern ( 3 , type , "d" ) ; final org . drools . core . rule . Pattern e = new org . drools . core . rule . Pattern ( 4 , type , "e" ) ; final org . drools . core . rule . Pattern f = new org . drools . core . rule . Pattern ( 5 , type , "f" ) ; final org . drools . core . rule . Pattern g = new org . drools . core . rule . Pattern ( 6 , type , "g" ) ; final org . drools . core . rule . Pattern h = new org . drools . core . rule . Pattern ( 7 , type , "h" ) ; final org . drools . core . rule . GroupElement and = org . drools . core . rule . GroupElementFactory . newAndInstance ( ) ; and . addChild ( a ) ; and . addChild ( b ) ; final org . drools . core . rule . GroupElement or = org . drools . core . rule . GroupElementFactory . newOrInstance ( ) ; or . addChild ( c ) ; or . addChild ( d ) ; and . addChild ( or ) ; final org . drools . core . rule . GroupElement and2 = org . drools . core . rule . GroupElementFactory . newAndInstance ( ) ; and2 . addChild ( e ) ; and2 . addChild ( f ) ; or . addChild ( and2 ) ; final org . drools . core . rule . GroupElement not = org . drools . core . rule . GroupElementFactory . newNotInstance ( ) ; and . addChild ( not ) ; final org . drools . core . rule . GroupElement or2 = org . drools . core . rule . GroupElementFactory . newOrInstance ( ) ; not . addChild ( or2 ) ; or2 . addChild ( g ) ; or2 . addChild ( h ) ; final org . drools . core . rule . GroupElement cloned = ( ( org . drools . core . rule . GroupElement ) ( and . clone ( ) ) ) ; "<AssertPlaceHolder>" ; } clone ( ) { throw new java . lang . UnsupportedOperationException ( "DisonnectedFactHandle<sp>does<sp>not<sp>support<sp>this<sp>method" ) ; }
org . junit . Assert . assertEquals ( and , cloned )
testPackNull ( ) { "<AssertPlaceHolder>" ; } pack ( java . util . Collection ) { java . lang . String packed = null ; if ( ids != null ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; java . lang . String separator = "" ; for ( java . lang . String id : ids ) { builder . append ( separator ) ; separator = org . sakaiproject . site . util . SiteGroupHelper . SEPARATOR_STR ; builder . append ( id . replace ( org . sakaiproject . site . util . SiteGroupHelper . ESCAPE_STR , ( ( org . sakaiproject . site . util . SiteGroupHelper . ESCAPE_STR ) + ( org . sakaiproject . site . util . SiteGroupHelper . ESCAPE_STR ) ) ) . replace ( org . sakaiproject . site . util . SiteGroupHelper . SEPARATOR_STR , ( ( org . sakaiproject . site . util . SiteGroupHelper . ESCAPE_STR ) + ( org . sakaiproject . site . util . SiteGroupHelper . SEPARATOR_STR ) ) ) ) ; } packed = builder . toString ( ) ; } return packed ; }
org . junit . Assert . assertNull ( pack ( null ) )
givenAccessConfiguration_WithNullAttributes_WhenInstanciate_ThenReturnTrue ( ) { final fr . gouv . vitam . access . internal . common . model . AccessInternalConfiguration accessConfiguration = new fr . gouv . vitam . access . internal . common . model . AccessInternalConfiguration ( ) ; "<AssertPlaceHolder>" ; } getUrlMetaData ( ) { return urlMetaData ; }
org . junit . Assert . assertEquals ( null , accessConfiguration . getUrlMetaData ( ) )
testFilterVarargs ( ) { java . util . List < org . gradoop . common . model . impl . pojo . Vertex > result = getExecutionEnvironment ( ) . fromCollection ( inputVertices ) . filter ( new org . gradoop . flink . model . impl . functions . epgm . LabelIsIn ( "a" , "b" , "a" , null ) ) . collect ( ) ; result . sort ( comparator ) ; "<AssertPlaceHolder>" ; } getExecutionEnvironment ( ) { return env ; }
org . junit . Assert . assertArrayEquals ( expected . toArray ( ) , result . toArray ( ) )
convertToBooleanNegative ( ) { java . lang . Float dt = - 1.0F ; java . lang . Boolean b = converter . toBoolean ( dt ) ; "<AssertPlaceHolder>" ; } toBoolean ( java . lang . Long ) { if ( value == null ) { return null ; } return value == 0L ? Boolean . FALSE : Boolean . TRUE ; }
org . junit . Assert . assertTrue ( b )
testCombinedHitsSizeProblem ( ) { org . neo4j . graphdb . index . Index < org . neo4j . graphdb . Node > index = nodeIndex ( "size-npe" , LuceneIndexImplementation . EXACT_CONFIG ) ; org . neo4j . graphdb . Node node1 = graphDb . createNode ( ) ; org . neo4j . graphdb . Node node2 = graphDb . createNode ( ) ; org . neo4j . graphdb . Node node3 = graphDb . createNode ( ) ; java . lang . String key = "key" ; java . lang . String value = "value" ; index . add ( node1 , key , value ) ; index . add ( node2 , key , value ) ; restartTx ( ) ; index . add ( node3 , key , value ) ; org . neo4j . graphdb . index . IndexHits < org . neo4j . graphdb . Node > hits = index . get ( key , value ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( arrayCount ) != ( - 1 ) ) { return arrayCount ; } return relationshipSet . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , hits . size ( ) )
testRequestWithNullFinishedTimeBeginQuery ( ) { org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest request = org . apache . hadoop . yarn . server . resourcemanager . webapp . ApplicationsRequestBuilder . create ( ) . withFinishTimeBegin ( null ) . build ( ) ; org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest expectedRequest = getDefaultRequest ( ) ; "<AssertPlaceHolder>" ; } getDefaultRequest ( ) { org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest req = org . apache . hadoop . yarn . api . protocolrecords . GetApplicationsRequest . newInstance ( ) ; req . setStartRange ( 0 , Long . MAX_VALUE ) ; req . setFinishRange ( 0 , Long . MAX_VALUE ) ; return req ; }
org . junit . Assert . assertEquals ( expectedRequest , request )
computeFactorForTimeSlice_hour_adjustStartEnd ( ) { org . oscm . billingservice . business . calculation . revenue . model . TimeSlice timeSlice = newTimeSlice ( "2013-05-29<sp>08:00:00" , PricingPeriod . HOUR ) ; long usagePeriodStart = org . oscm . test . DateTimeHandling . calculateMillis ( "2013-05-29<sp>08:10:00" ) ; long usagePeriodEnd = org . oscm . test . DateTimeHandling . calculateMillis ( "2013-05-29<sp>08:40:00" ) ; double factor = calculator . computeFactorForTimeSlice ( timeSlice , usagePeriodStart , usagePeriodEnd , true , true ) ; "<AssertPlaceHolder>" ; } computeFactorForTimeSlice ( org . oscm . billingservice . business . calculation . revenue . model . TimeSlice , long , long , boolean , boolean ) { if ( usagePeriodEnd < usagePeriodStart ) { throw new org . oscm . internal . types . exception . IllegalArgumentException ( ( ( ( ( "Usage<sp>period<sp>end<sp>(" + ( new java . util . Date ( usagePeriodEnd ) ) ) + ")<sp>before<sp>usage<sp>period<sp>start<sp>(" ) + ( new java . util . Date ( usagePeriodStart ) ) ) + ")" ) ) ; } java . util . Calendar startTimeForFactorCalculation = determineStartTimeForFactorCalculation ( timeSlice . getPeriod ( ) , timeSlice . getStartAsCalendar ( ) , usagePeriodStart , adjustsPeriodStart ) ; java . util . Calendar endTimeForFactorCalculation = determineEndTimeForFactorCalculation ( timeSlice . getPeriod ( ) , timeSlice . getStartOfNextSliceAsCalendar ( ) , usagePeriodEnd , adjustsPeriodEnd ) ; if ( startTimeForFactorCalculation . after ( endTimeForFactorCalculation ) ) { throw new org . oscm . types . exceptions . BillingRunFailed ( ( ( ( ( ( ( "Usage<sp>period<sp>start<sp>(" + ( new java . util . Date ( usagePeriodStart ) ) ) + ")<sp>and<sp>usage<sp>period<sp>end<sp>(" ) + ( new java . util . Date ( usagePeriodEnd ) ) ) + ")<sp>do<sp>not<sp>match<sp>time<sp>slice<sp>(" ) + timeSlice ) + ")" ) ) ; } else { return computeFractionalFactorForTimeUnit ( startTimeForFactorCalculation . getTimeInMillis ( ) , endTimeForFactorCalculation . getTimeInMillis ( ) , timeSlice . getPeriod ( ) ) ; } }
org . junit . Assert . assertEquals ( 1.0 , factor , 0 )
testReflectionTest3 ( ) { resetState ( ) ; try { java . lang . String imei = edu . columbia . cs . psl . test . phosphor . DroidBenchImplicitITCase . taintedString ( ) ; java . lang . Class c = java . lang . Class . forName ( "de.ecspride.ReflectiveClass" ) ; java . lang . Object o = c . newInstance ( ) ; java . lang . reflect . Method m = c . getMethod ( ( "setIme" + "i" ) , java . lang . String . class ) ; m . invoke ( o , imei ) ; java . lang . reflect . Method m2 = c . getMethod ( "getImei" ) ; java . lang . String s = ( ( java . lang . String ) ( m2 . invoke ( o ) ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . InstantiationException e ) { e . printStackTrace ( ) ; } catch ( java . lang . IllegalAccessException e ) { e . printStackTrace ( ) ; } catch ( java . lang . ClassNotFoundException e ) { e . printStackTrace ( ) ; } catch ( java . lang . NoSuchMethodException e ) { e . printStackTrace ( ) ; } catch ( java . lang . IllegalArgumentException e ) { e . printStackTrace ( ) ; } catch ( java . lang . reflect . InvocationTargetException e ) { e . printStackTrace ( ) ; } } getTaint ( java . lang . String ) { edu . columbia . cs . psl . phosphor . runtime . Taint taint = edu . columbia . cs . psl . phosphor . runtime . MultiTainter . getTaint ( description . toCharArray ( ) [ 0 ] ) ; return ( taint == null ) || ( ( ( taint . lbl ) == null ) && ( taint . hasNoDependencies ( ) ) ) ? 0 : 1 ; }
org . junit . Assert . assertTrue ( ( ( edu . columbia . cs . psl . test . phosphor . DroidBenchImplicitITCase . getTaint ( s ) ) != 0 ) )
testSerialization ( ) { org . jfree . chart . axis . AxisLocation location1 = AxisLocation . BOTTOM_OR_RIGHT ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( location1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . axis . AxisLocation location2 = ( ( org . jfree . chart . axis . AxisLocation ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
org . junit . Assert . assertSame ( location1 , location2 )
testSetFilter ( ) { java . lang . String value = "blerg" ; edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . StoreViewBuilder instance = new edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . StoreViewBuilder ( ) ; java . lang . String expResult = "http://localhost:54321/StoreView.json?filter=blerg" ; edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . StoreViewBuilder result = instance . setFilter ( value ) ; "<AssertPlaceHolder>" ; } build ( edu . oswego . csc480_hci521_2013 . shared . h2o . urlbuilders . UrlEncoder ) { java . lang . StringBuilder query = new java . lang . StringBuilder ( ) ; for ( java . lang . String key : args . keySet ( ) ) { for ( java . lang . String value : args . get ( key ) ) { if ( ( query . length ( ) ) == 0 ) { query . append ( key ) . append ( '=' ) . append ( encoder . encode ( value ) ) ; } else { query . append ( '&' ) . append ( key ) . append ( '=' ) . append ( encoder . encode ( value ) ) ; } } } java . lang . String url = ( ( ( ( ( ( ( protocol ) + "://" ) + ( host ) ) + ":" ) + ( port ) ) + ( page ) ) + ( ( query . length ( ) ) > 0 ? "?" : "" ) ) + ( query . toString ( ) ) ; return url ; }
org . junit . Assert . assertEquals ( expResult , result . build ( encoder ) )
testMainKeyRangeNoDups_GetLast ( ) { open ( ) ; insert ( 1 ) ; insert ( 2 ) ; startInserts ( 3 ) ; checkRange ( 3 , false , 2 ) ; "<AssertPlaceHolder>" ; close ( ) ; } stopInserts ( ) { if ( ( insertThread ) == null ) { return true ; } final java . lang . Thread t = insertThread ; insertThread = null ; start = java . lang . System . currentTimeMillis ( ) ; while ( ( ( java . lang . System . currentTimeMillis ( ) ) - start ) < ( 10 * 1000 ) ) { t . interrupt ( ) ; java . lang . Thread . sleep ( 10 ) ; if ( ! ( t . isAlive ( ) ) ) { return true ; } } return false ; }
org . junit . Assert . assertTrue ( stopInserts ( ) )
booleanAndRange ( ) { expect ( mock . booleanReturningMethod ( 4 ) ) . andReturn ( true ) . once ( ) ; replay ( mock ) ; "<AssertPlaceHolder>" ; verify ( mock ) ; } replay ( java . lang . Object [ ] ) { for ( int i = 0 ; i < ( mocks . length ) ; i ++ ) { try { org . easymock . EasyMock . getControl ( mocks [ i ] ) . replay ( ) ; } catch ( java . lang . RuntimeException e ) { throw org . easymock . EasyMock . getRuntimeException ( mocks . length , i , e ) ; } catch ( java . lang . AssertionError e ) { throw org . easymock . EasyMock . getAssertionError ( mocks . length , i , e ) ; } } }
org . junit . Assert . assertTrue ( mock . booleanReturningMethod ( 4 ) )
storeTo_configured ( ) { java . util . Properties p = new java . util . Properties ( ) ; p . setProperty ( ( ( ProcessProfile . KEY_PREFIX ) + "testing" ) , com . asakusafw . windgate . core . process . BasicProcessProvider . class . getName ( ) ) ; p . setProperty ( ( ( ( ( ProcessProfile . KEY_PREFIX ) + "testing" ) + ( com . asakusafw . windgate . core . BaseProfile . QUALIFIER ) ) + "conf1" ) , "aaa" ) ; p . setProperty ( ( ( ( ( ProcessProfile . KEY_PREFIX ) + "testing" ) + ( com . asakusafw . windgate . core . BaseProfile . QUALIFIER ) ) + "conf2" ) , "bbb" ) ; java . util . Collection < ? extends com . asakusafw . windgate . core . process . ProcessProfile > profiles = com . asakusafw . windgate . core . process . ProcessProfile . loadFrom ( p , com . asakusafw . windgate . core . ProfileContext . system ( getClass ( ) . getClassLoader ( ) ) ) ; java . util . Properties restored = new java . util . Properties ( ) ; for ( com . asakusafw . windgate . core . process . ProcessProfile profile : profiles ) { profile . storeTo ( restored ) ; } "<AssertPlaceHolder>" ; } is ( java . lang . String ) { com . asakusafw . dmdl . java . util . JavaName jn = com . asakusafw . dmdl . java . util . JavaName . of ( new com . asakusafw . dmdl . model . AstSimpleName ( null , name ) ) ; jn . addFirst ( "is" ) ; java . lang . Object result = invoke ( jn . toMemberName ( ) ) ; return ( ( java . lang . Boolean ) ( result ) ) ; }
org . junit . Assert . assertThat ( restored , is ( p ) )
testTagOnDocumentWithMissingFacet ( ) { org . nuxeo . ecm . core . api . DocumentModel relation = session . createDocumentModel ( "/" , "foo" , "Relation" ) ; relation = session . createDocument ( relation ) ; session . save ( ) ; tagService . tag ( session , relation . getId ( ) , "tag" ) ; "<AssertPlaceHolder>" ; } getTags ( org . nuxeo . ecm . core . api . CoreSession , java . lang . String ) { return org . nuxeo . ecm . core . api . CoreInstance . doPrivileged ( session , ( org . nuxeo . ecm . core . api . CoreSession s ) -> doGetTags ( s , docId ) ) ; }
org . junit . Assert . assertEquals ( 0 , tagService . getTags ( session , relation . getId ( ) ) . size ( ) )
test3populateRangerServiceConfigDefToXX ( ) { org . apache . ranger . plugin . model . RangerServiceDef . RangerServiceConfigDef serviceConfigDefObj = new org . apache . ranger . plugin . model . RangerServiceDef . RangerServiceConfigDef ( ) ; org . apache . ranger . entity . XXServiceConfigDef configDefObj = new org . apache . ranger . entity . XXServiceConfigDef ( ) ; org . apache . ranger . entity . XXServiceDef serviceDefObj = new org . apache . ranger . entity . XXServiceDef ( ) ; org . mockito . Mockito . when ( ( ( org . apache . ranger . entity . XXServiceConfigDef ) ( rangerAuditFields . populateAuditFields ( configDefObj , serviceDefObj ) ) ) ) . thenReturn ( configDefObj ) ; org . apache . ranger . entity . XXServiceConfigDef dbServiceConfigDef = rangerServiceDefService . populateRangerServiceConfigDefToXX ( serviceConfigDefObj , configDefObj , serviceDefObj , 1 ) ; "<AssertPlaceHolder>" ; } populateRangerServiceConfigDefToXX ( org . apache . ranger . plugin . model . RangerServiceDef . RangerServiceConfigDef , org . apache . ranger . service . XXServiceConfigDef , org . apache . ranger . service . XXServiceDef , int ) { if ( serviceDef == null ) { org . apache . ranger . service . RangerServiceDefServiceBase . LOG . error ( "RangerServiceDefServiceBase.populateRangerServiceConfigDefToXX,<sp>serviceDef<sp>can<sp>not<sp>be<sp>null" ) ; throw restErrorUtil . createRESTException ( "RangerServiceDef<sp>cannot<sp>be<sp>null." , MessageEnums . DATA_NOT_FOUND ) ; } xObj = rangerAuditFields . populateAuditFields ( xObj , serviceDef ) ; xObj . setDefid ( serviceDef . getId ( ) ) ; xObj . setItemId ( vObj . getItemId ( ) ) ; xObj . setName ( vObj . getName ( ) ) ; xObj . setType ( vObj . getType ( ) ) ; xObj . setSubtype ( vObj . getSubType ( ) ) ; xObj . setIsMandatory ( vObj . getMandatory ( ) ) ; xObj . setDefaultvalue ( vObj . getDefaultValue ( ) ) ; xObj . setValidationRegEx ( vObj . getValidationRegEx ( ) ) ; xObj . setValidationMessage ( vObj . getValidationMessage ( ) ) ; xObj . setUiHint ( vObj . getUiHint ( ) ) ; xObj . setLabel ( vObj . getLabel ( ) ) ; xObj . setDescription ( vObj . getDescription ( ) ) ; xObj . setRbkeylabel ( vObj . getRbKeyLabel ( ) ) ; xObj . setRbkeydescription ( vObj . getRbKeyDescription ( ) ) ; xObj . setRbKeyValidationMessage ( vObj . getRbKeyValidationMessage ( ) ) ; xObj . setOrder ( AppConstants . DEFAULT_SORT_ORDER ) ; return xObj ; }
org . junit . Assert . assertNotNull ( dbServiceConfigDef )
testToShortWithFewerThanTwoBytes ( ) { byte [ ] fromAsByteArray = new byte [ ] { Byte . MAX_VALUE } ; org . scale7 . cassandra . pelops . Bytes fromAsBytes = org . scale7 . cassandra . pelops . Bytes . fromByteArray ( fromAsByteArray ) ; short to = fromAsBytes . toShort ( ) ; "<AssertPlaceHolder>" ; } toShort ( ) { try { bytes . reset ( ) ; return org . scale7 . cassandra . pelops . Bytes . padValue ( 2 , this . bytes ) . getShort ( ) ; } catch ( java . nio . BufferUnderflowException e ) { throw new java . lang . IllegalStateException ( "Failed<sp>to<sp>read<sp>value<sp>due<sp>to<sp>invalid<sp>format.<sp>See<sp>cause<sp>for<sp>details..." , e ) ; } finally { this . bytes . reset ( ) ; } }
org . junit . Assert . assertEquals ( ( ( short ) ( Byte . MAX_VALUE ) ) , to )
test20_FastDivisionPerformance ( ) { long modulus = cc . redberry . rings . primes . BigPrimes . nextPrime ( 124987324L ) ; org . apache . commons . math3 . random . RandomGenerator rnd = getRandom ( ) ; org . apache . commons . math3 . stat . descriptive . DescriptiveStatistics classic = new org . apache . commons . math3 . stat . descriptive . DescriptiveStatistics ( ) ; org . apache . commons . math3 . stat . descriptive . DescriptiveStatistics fast = new org . apache . commons . math3 . stat . descriptive . DescriptiveStatistics ( ) ; long nIterations = its ( 1000 , 15000 ) ; int dividerDegree = 156 ; int dividendDegree = 256 ; for ( int i = 0 ; i < nIterations ; i ++ ) { if ( ( i * 10 ) == nIterations ) { classic . clear ( ) ; fast . clear ( ) ; } cc . redberry . rings . poly . univar . UnivariatePolynomialZp64 divider = cc . redberry . rings . poly . univar . RandomUnivariatePolynomials . randomMonicPoly ( dividerDegree , modulus , rnd ) ; cc . redberry . rings . poly . univar . UnivariatePolynomialZ64 dividendZ = cc . redberry . rings . poly . univar . RandomUnivariatePolynomials . randomPoly ( dividendDegree , ( ( int ) ( modulus ) ) , rnd ) ; cc . redberry . rings . poly . univar . UnivariatePolynomialZp64 dividend = dividendZ . modulus ( modulus ) ; divider . multiply ( 3 ) ; long start = java . lang . System . nanoTime ( ) ; cc . redberry . rings . poly . univar . UnivariatePolynomialZp64 [ ] qdPlain = cc . redberry . rings . poly . univar . UnivariateDivision . UnivariateDivision . divideAndRemainderClassic ( dividend , divider , true ) ; long plain = ( java . lang . System . nanoTime ( ) ) - start ; classic . addValue ( plain ) ; start = java . lang . System . nanoTime ( ) ; cc . redberry . rings . poly . univar . UnivariatePolynomialZp64 [ ] qdNewton = cc . redberry . rings . poly . univar . UnivariateDivision . UnivariateDivision . divideAndRemainderFast ( dividend , divider , true ) ; long newton = ( java . lang . System . nanoTime ( ) ) - start ; fast . addValue ( newton ) ; "<AssertPlaceHolder>" ; } System . out . println ( "====<sp>Plain<sp>====" ) ; System . out . println ( classic . getMean ( ) ) ; System . out . println ( "====<sp>Fast<sp>====" ) ; System . out . println ( fast . getMean ( ) ) ; } divideAndRemainderFast ( cc . redberry . rings . poly . univar . UnivariatePolynomial , cc . redberry . rings . poly . univar . UnivariatePolynomial , boolean ) { cc . redberry . rings . poly . univar . UnivariatePolynomial < E > [ ] r = cc . redberry . rings . poly . univar . UnivariateDivision . earlyDivideAndRemainderChecks ( dividend , divider , copy ) ; if ( r != null ) return r ; return cc . redberry . rings . poly . univar . UnivariateDivision . divideAndRemainderFast0 ( dividend , divider , copy ) ; }
org . junit . Assert . assertArrayEquals ( qdPlain , qdNewton )
testNationaliteitenNull ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > overtreders = brby0162 . voerRegelUit ( null , bouwNieuweSituatie ( null ) , null , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , overtreders . size ( ) )
testCreateDocumentEntry ( ) { org . linagora . linshare . service . DocumentEntryServiceImplTest . logger . info ( LinShareTestConstants . BEGIN_TEST ) ; org . linagora . linshare . core . domain . entities . Account actor = jane ; java . io . File tempFile = java . io . File . createTempFile ( "linshare-test-" , ".tmp" ) ; org . apache . cxf . helpers . IOUtils . transferTo ( stream , tempFile ) ; aDocumentEntry = documentEntryService . create ( actor , actor , tempFile , fileName , comment , false , null ) ; "<AssertPlaceHolder>" ; org . linagora . linshare . core . domain . entities . Document aDocument = aDocumentEntry . getDocument ( ) ; documentEntryRepository . delete ( aDocumentEntry ) ; jane . getEntries ( ) . clear ( ) ; userRepository . update ( jane ) ; org . linagora . linshare . core . domain . objects . FileMetaData metadata = new org . linagora . linshare . core . domain . objects . FileMetaData ( org . linagora . linshare . core . domain . constants . FileMetaDataKind . THUMBNAIL_SMALL , aDocument , "image/png" ) ; metadata . setUuid ( aDocument . getUuid ( ) ) ; fileDataStore . remove ( metadata ) ; documentRepository . delete ( aDocument ) ; org . linagora . linshare . service . DocumentEntryServiceImplTest . logger . debug ( LinShareTestConstants . END_TEST ) ; } findById ( java . lang . String ) { org . apache . commons . lang . Validate . notEmpty ( identifier , "Domain<sp>identifier<sp>must<sp>be<sp>set." ) ; org . linagora . linshare . core . domain . entities . AbstractDomain domain = domainBusinessService . findById ( identifier ) ; return domain ; }
org . junit . Assert . assertTrue ( ( ( documentEntryRepository . findById ( aDocumentEntry . getUuid ( ) ) ) != null ) )
should_extend_process_context_sequence_dictionary_when_encountering_named_contig ( ) { au . edu . wehi . idsv . GenomicProcessingContext pc = getContext ( ) ; int seqCount = pc . getDictionary ( ) . size ( ) ; new au . edu . wehi . idsv . VariantContextDirectedEvidence ( pc , AES ( ) , minimalVariant ( ) . chr ( "<contigNotInReference>" ) . make ( ) ) ; "<AssertPlaceHolder>" ; } getDictionary ( ) { return dictionary ; }
org . junit . Assert . assertEquals ( ( seqCount + 1 ) , pc . getDictionary ( ) . size ( ) )
testInvokeSyncSetsUpProperly ( ) { com . softlayer . api . http . BuiltInHttpClientFactory . BuiltInHttpClient client = spy ( new com . softlayer . api . http . BuiltInHttpClientFactory ( ) . getHttpClient ( new com . softlayer . api . http . HttpBasicAuthCredentials ( "some<sp>user" , "some<sp>key" ) , "NOTGET" , "http://example.com" , java . util . Collections . singletonMap ( "header" , java . util . Collections . singletonList ( "some<sp>header<sp>value" ) ) ) ) ; client . connection = mock ( java . net . HttpURLConnection . class ) ; doNothing ( ) . when ( client ) . openConnection ( ) ; java . util . concurrent . Callable < ? > setupBody = mock ( java . util . concurrent . Callable . class ) ; com . softlayer . api . http . HttpResponse response = client . invokeSync ( setupBody ) ; "<AssertPlaceHolder>" ; verify ( client . connection ) . addRequestProperty ( "Authorization" , "Basic<sp>c29tZSB1c2VyOnNvbWUga2V5" ) ; verify ( client . connection ) . addRequestProperty ( "header" , "some<sp>header<sp>value" ) ; verify ( client . connection ) . setRequestMethod ( "NOTGET" ) ; verify ( setupBody ) . call ( ) ; } invokeSync ( java . util . concurrent . Callable ) { openConnection ( ) ; if ( ( credentials ) != null ) { connection . addRequestProperty ( "Authorization" , credentials . getHeader ( ) ) ; } for ( Map . Entry < java . lang . String , java . util . List < java . lang . String > > headerEntry : headers . entrySet ( ) ) { for ( java . lang . String headerValue : headerEntry . getValue ( ) ) { connection . addRequestProperty ( headerEntry . getKey ( ) , headerValue ) ; } } try { connection . setRequestMethod ( method ) ; setupBody . call ( ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( e ) ; } return this ; }
org . junit . Assert . assertEquals ( client , response )
testBitSetUsing ( ) { java . util . BitSet using = new java . util . BitSet ( 4 ) ; using . set ( 1 ) ; net . openhft . chronicle . bytes . Bytes b = net . openhft . chronicle . bytes . Bytes . elasticByteBuffer ( ) ; try { net . openhft . chronicle . wire . Wire wire = WireType . TEXT . apply ( b ) ; java . util . BitSet original = new java . util . BitSet ( 64 ) ; original . set ( 10 ) ; original . set ( 89 ) ; wire . getValueOut ( ) . object ( original ) ; java . util . BitSet read = wire . getValueIn ( ) . object ( using , java . util . BitSet . class ) ; "<AssertPlaceHolder>" ; } finally { b . release ( ) ; } } object ( E , java . lang . Class ) { return net . openhft . chronicle . wire . Wires . object0 ( this , using , clazz ) ; }
org . junit . Assert . assertEquals ( original , read )
testCountByG_U_R_F_M_StatusApproved_BothRepositories ( ) { com . liferay . portal . kernel . dao . orm . QueryDefinition < com . liferay . document . library . kernel . model . DLFileEntry > queryDefinition = new com . liferay . portal . kernel . dao . orm . QueryDefinition ( ) ; queryDefinition . setStatus ( WorkflowConstants . STATUS_APPROVED ) ; "<AssertPlaceHolder>" ; } doCountBy_G_U_R_F_M_BothRepositories ( long , java . lang . String , com . liferay . portal . kernel . dao . orm . QueryDefinition ) { java . util . List < java . lang . Long > repositoryIds = com . liferay . portal . kernel . util . ListUtil . toList ( new long [ ] { _defaultRepositoryFolder . getRepositoryId ( ) , _newRepositoryFolder . getRepositoryId ( ) } ) ; java . util . List < java . lang . Long > folderIds = com . liferay . portal . kernel . util . ListUtil . toList ( new long [ ] { _defaultRepositoryFolder . getFolderId ( ) , _newRepositoryFolder . getFolderId ( ) } ) ; return doCountBy_G_U_R_F_M ( userId , repositoryIds , folderIds , mimeType , queryDefinition ) ; }
org . junit . Assert . assertEquals ( 4 , doCountBy_G_U_R_F_M_BothRepositories ( 0 , null , queryDefinition ) )
testScrollLeft ( ) { openTestURL ( ) ; com . vaadin . testbench . elements . PanelElement panel = $ ( com . vaadin . testbench . elements . PanelElement . class ) . get ( 0 ) ; panel . scrollLeft ( com . vaadin . tests . elements . panel . PanelScrollTest . SCROLL_VALUE ) ; "<AssertPlaceHolder>" ; } getScrollLeftValue ( org . openqa . selenium . WebElement ) { java . lang . Long scrollTop = ( ( java . lang . Long ) ( executeScript ( "return<sp>arguments[0].getElementsByClassName(\"v-scrollable\")[0].scrollLeft;" , elem ) ) ) ; return scrollTop . intValue ( ) ; }
org . junit . Assert . assertEquals ( com . vaadin . tests . elements . panel . PanelScrollTest . SCROLL_VALUE , getScrollLeftValue ( panel ) )
unionLiftFirstUnion ( ) { it . unibz . inf . ontop . iq . executor . IntermediateQueryBuilder expectedBuilder = createQueryBuilder ( it . unibz . inf . ontop . iq . executor . DB_METADATA ) ; it . unibz . inf . ontop . iq . executor . UnionNode unionNode3 = it . unibz . inf . ontop . iq . executor . IQ_FACTORY . createUnionNode ( com . google . common . collect . ImmutableSet . of ( it . unibz . inf . ontop . iq . executor . UnionLiftInternalTest . A , it . unibz . inf . ontop . iq . executor . UnionLiftInternalTest . B , it . unibz . inf . ontop . iq . executor . UnionLiftInternalTest . C ) ) ; it . unibz . inf . ontop . iq . executor . UnionNode unionNode4 = it . unibz . inf . ontop . iq . executor . IQ_FACTORY . createUnionNode ( com . google . common . collect . ImmutableSet . of ( it . unibz . inf . ontop . iq . executor . UnionLiftInternalTest . A , it . unibz . inf . ontop . iq . executor . UnionLiftInternalTest . B , it . unibz . inf . ontop . iq . executor . UnionLiftInternalTest . C ) ) ; it . unibz . inf . ontop . iq . executor . InnerJoinNode joinNode2 = it . unibz . inf . ontop . iq . executor . IQ_FACTORY . createInnerJoinNode ( ) ; it . unibz . inf . ontop . iq . executor . InnerJoinNode joinNode3 = it . unibz . inf . ontop . iq . executor . IQ_FACTORY . createInnerJoinNode ( ) ; it . unibz . inf . ontop . iq . executor . InnerJoinNode joinNode4 = it . unibz . inf . ontop . iq . executor . IQ_FACTORY . createInnerJoinNode ( ) ; it . unibz . inf . ontop . iq . executor . UnionNode unionNode5 = it . unibz . inf . ontop . iq . executor . IQ_FACTORY . createUnionNode ( com . google . common . collect . ImmutableSet . of ( it . unibz . inf . ontop . iq . executor . UnionLiftInternalTest . A , it . unibz . inf . ontop . iq . executor . UnionLiftInternalTest . C ) ) ; it . unibz . inf . ontop . iq . executor . UnionNode unionNode6 = it . unibz . inf . ontop . iq . executor . IQ_FACTORY . createUnionNode ( com . google . common . collect . ImmutableSet . of ( it . unibz . inf . ontop . iq . executor . UnionLiftInternalTest . A , it . unibz . inf . ontop . iq . executor . UnionLiftInternalTest . C ) ) ; it . unibz . inf . ontop . iq . executor . UnionNode unionNode7 = it . unibz . inf . ontop . iq . executor . IQ_FACTORY . createUnionNode ( com . google . common . collect . ImmutableSet . of ( it . unibz . inf . ontop . iq . executor . UnionLiftInternalTest . A , it . unibz . inf . ontop . iq . executor . UnionLiftInternalTest . C ) ) ; expectedBuilder . init ( ROOT_CONSTRUCTION_NODE_ATOM , rootConstructionNode ) ; expectedBuilder . addChild ( rootConstructionNode , unionNode3 ) ; expectedBuilder . addChild ( unionNode3 , unionNode4 ) ; expectedBuilder . addChild ( unionNode3 , table5DataNode ) ; expectedBuilder . addChild ( unionNode4 , joinNode2 ) ; expectedBuilder . addChild ( unionNode4 , joinNode3 ) ; expectedBuilder . addChild ( unionNode4 , joinNode4 ) ; expectedBuilder . addChild ( joinNode2 , table4DataNode ) ; expectedBuilder . addChild ( joinNode2 , table1DataNode ) ; expectedBuilder . addChild ( joinNode2 , unionNode5 ) ; expectedBuilder . addChild ( unionNode5 , table4DataNode . clone ( ) ) ; expectedBuilder . addChild ( unionNode5 , table5DataNode . clone ( ) ) ; expectedBuilder . addChild ( joinNode3 , table4DataNode . clone ( ) ) ; expectedBuilder . addChild ( joinNode3 , table2DataNode ) ; expectedBuilder . addChild ( joinNode3 , unionNode6 ) ; expectedBuilder . addChild ( unionNode6 , table4DataNode . clone ( ) ) ; expectedBuilder . addChild ( unionNode6 , table5DataNode . clone ( ) ) ; expectedBuilder . addChild ( joinNode4 , table4DataNode . clone ( ) ) ; expectedBuilder . addChild ( joinNode4 , table3DataNode ) ; expectedBuilder . addChild ( joinNode4 , unionNode7 ) ; expectedBuilder . addChild ( unionNode7 , table4DataNode . clone ( ) ) ; expectedBuilder . addChild ( unionNode7 , table5DataNode . clone ( ) ) ; it . unibz . inf . ontop . iq . executor . IntermediateQuery expectedQuery = expectedBuilder . build ( ) ; System . out . println ( ( "\n<sp>Expected<sp>query:<sp>\n" + expectedQuery ) ) ; "<AssertPlaceHolder>" ; } areEquivalent ( it . unibz . inf . ontop . iq . equivalence . IntermediateQuery , it . unibz . inf . ontop . iq . equivalence . IntermediateQuery ) { if ( ! ( query1 . getProjectionAtom ( ) . equals ( query2 . getProjectionAtom ( ) ) ) ) return false ; java . util . Queue < it . unibz . inf . ontop . iq . equivalence . IQSyntacticEquivalenceChecker . NodePair > pairsToVisit = new java . util . LinkedList ( ) ; pairsToVisit . add ( new it . unibz . inf . ontop . iq . equivalence . IQSyntacticEquivalenceChecker . NodePair ( query1 . getRootNode ( ) , query2 . getRootNode ( ) ) ) ; while ( ! ( pairsToVisit . isEmpty ( ) ) ) { it . unibz . inf . ontop . iq . equivalence . IQSyntacticEquivalenceChecker . NodePair pair = pairsToVisit . poll ( ) ; if ( ! ( it . unibz . inf . ontop . iq . equivalence . IQSyntacticEquivalenceChecker . areNodesEqual ( pair . node1 ,
org . junit . Assert . assertTrue ( it . unibz . inf . ontop . iq . equivalence . IQSyntacticEquivalenceChecker . areEquivalent ( query , expectedQuery ) )
getFalseBooleanMixcase ( ) { mConfiguration . set ( PropertyKey . WEB_THREADS , "fAlSe" ) ; "<AssertPlaceHolder>" ; } getBoolean ( alluxio . conf . PropertyKey ) { return conf ( key ) . getBoolean ( key ) ; }
org . junit . Assert . assertFalse ( mConfiguration . getBoolean ( PropertyKey . WEB_THREADS ) )
givenTypeAndNameWhenTypeMatchButNameDoesntThenFieldNotFoundExceptionIsThrown ( ) { org . awaitility . FakeRepositoryWithAnnotation repository = new org . awaitility . FakeRepositoryWithAnnotation ( ) ; new org . awaitility . Asynch ( repository ) . perform ( ) ; org . awaitility . Awaitility . await ( ) . until ( org . awaitility . Awaitility . fieldIn ( repository ) . ofType ( int . class ) . andWithName ( "value2" ) , org . hamcrest . Matchers . equalTo ( 1 ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return currentConditionValue ; }
org . junit . Assert . assertEquals ( 1 , repository . getValue ( ) )
testSendFile ( ) { int messageCount = 3 ; final java . lang . String peerA = getUniqueHostPort ( ) ; final java . lang . String peerB = getUniqueHostPort ( ) ; final java . util . concurrent . CountDownLatch latchA = new java . util . concurrent . CountDownLatch ( messageCount ) ; final java . util . concurrent . CountDownLatch latchB = new java . util . concurrent . CountDownLatch ( messageCount ) ; final java . util . ArrayList < java . io . File > receivedFiles = new java . util . ArrayList ( ) ; com . github . zk1931 . jzab . Transport . Receiver receiverA = new com . github . zk1931 . jzab . Transport . Receiver ( ) { public void onReceived ( java . lang . String source , com . github . zk1931 . jzab . proto . ZabMessage . Message message ) { com . github . zk1931 . jzab . NettyTransportTest . LOG . debug ( "onReceived<sp>{}" , message ) ; latchA . countDown ( ) ; } public void onDisconnected ( java . lang . String source ) { } } ; com . github . zk1931 . jzab . Transport . Receiver receiverB = new com . github . zk1931 . jzab . Transport . Receiver ( ) { public void onReceived ( java . lang . String source , com . github . zk1931 . jzab . proto . ZabMessage . Message message ) { if ( ( message . getType ( ) ) == ( com . github . zk1931 . jzab . proto . ZabMessage . Message . MessageType . FILE_RECEIVED ) ) { receivedFiles . add ( new java . io . File ( message . getFileReceived ( ) . getFullPath ( ) ) ) ; } com . github . zk1931 . jzab . NettyTransportTest . LOG . debug ( "Received<sp>a<sp>message<sp>from<sp>{}:<sp>{}:<sp>{}" , source , com . google . protobuf . TextFormat . shortDebugString ( message ) , latchB . getCount ( ) ) ; latchB . countDown ( ) ; } public void onDisconnected ( java . lang . String source ) { } } ; final com . github . zk1931 . jzab . NettyTransport transportA = new com . github . zk1931 . jzab . NettyTransport ( peerA , receiverA , getDirectory ( ) ) ; final com . github . zk1931 . jzab . NettyTransport transportB = new com . github . zk1931 . jzab . NettyTransport ( peerB , receiverB , getDirectory ( ) ) ; transportA . send ( peerB , com . github . zk1931 . jzab . NettyTransportTest . createAck ( new com . github . zk1931 . jzab . Zxid ( 0 , 0 ) ) ) ; java . io . File file = new java . io . File ( "./pom.xml" ) ; transportA . send ( peerB , file ) ; transportA . send ( peerB , com . github . zk1931 . jzab . NettyTransportTest . createAck ( new com . github . zk1931 . jzab . Zxid ( 0 , 1 ) ) ) ; latchB . await ( ) ; "<AssertPlaceHolder>" ; transportA . shutdown ( ) ; transportB . shutdown ( ) ; } compareFiles ( java . io . File , java . io . File ) { org . junit . Assert . assertTrue ( file1 . exists ( ) ) ; org . junit . Assert . assertTrue ( file2 . exists ( ) ) ; if ( ( file1 . length ( ) ) != ( file2 . length ( ) ) ) { return false ; } try ( java . io . FileInputStream fin1 = new java . io . FileInputStream ( file1 ) ; java . io . FileInputStream fin2 = new java . io . FileInputStream ( file2 ) ) { java . io . BufferedReader reader = new java . io . BufferedReader ( new java . io . InputStreamReader ( fin1 ) ) ; java . lang . StringBuilder sb1 = new java . lang . StringBuilder ( ) ; java . lang . String line = null ; while ( ( line = reader . readLine ( ) ) != null ) { sb1 . append ( line ) ; } java . lang . StringBuilder sb2 = new java . lang . StringBuilder ( ) ; reader = new java . io . BufferedReader ( new java . io . InputStreamReader ( fin2 ) ) ; while ( ( line = reader . readLine ( ) ) != null ) { sb2 . append ( line ) ; } return sb1 . toString ( ) . equals ( sb2 . toString ( ) ) ; } }
org . junit . Assert . assertTrue ( com . github . zk1931 . jzab . NettyTransportTest . compareFiles ( file , receivedFiles . get ( 0 ) ) )
sameElements_A$Seq_true ( ) { com . m3 . scalaflavor4j . Seq < java . lang . Integer > seq = com . m3 . scalaflavor4j . Seq . apply ( 1 , 2 , 3 ) ; com . m3 . scalaflavor4j . Seq < java . lang . Integer > that = com . m3 . scalaflavor4j . Seq . apply ( 1 , 2 , 3 ) ; boolean actual = seq . sameElements ( that ) ; boolean expected = true ; "<AssertPlaceHolder>" ; } sameElements ( com . m3 . scalaflavor4j . Seq ) { return that . isEmpty ( ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
getYear_A$Calendar_2038 ( ) { java . lang . Integer expected = 2038 ; java . util . Calendar arg0 = java . util . Calendar . getInstance ( ) ; arg0 . set ( Calendar . YEAR , expected ) ; java . lang . Integer actual = com . github . seratch . taskun . util . CalendarUtil . getYear ( arg0 ) ; "<AssertPlaceHolder>" ; } getYear ( java . util . Calendar ) { java . lang . Integer year = calendar . get ( Calendar . YEAR ) ; return year ; }
org . junit . Assert . assertEquals ( expected , actual )
decodeExtended ( ) { final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( extended ) ; final com . flagstone . transform . coder . SWFDecoder decoder = new com . flagstone . transform . coder . SWFDecoder ( stream ) ; fixture = new com . flagstone . transform . image . DefineImage ( decoder ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( fixture )
testPutAtIntervalIndexWithStride ( ) { org . nd4j . linalg . api . ndarray . INDArray n1 = org . nd4j . linalg . factory . Nd4j . create ( 3 , 3 ) . assign ( 0.0 ) ; org . nd4j . linalg . indexing . INDArrayIndex [ ] indices = new org . nd4j . linalg . indexing . INDArrayIndex [ ] { org . nd4j . linalg . indexing . NDArrayIndex . interval ( 0 , 2 , 3 ) , org . nd4j . linalg . indexing . NDArrayIndex . all ( ) } ; n1 . put ( indices , 1 ) ; org . nd4j . linalg . api . ndarray . INDArray expected = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] [ ] { new double [ ] { 1.0 , 1.0 , 1.0 } , new double [ ] { 0.0 , 0.0 , 0.0 } , new double [ ] { 1.0 , 1.0 , 1.0 } } ) ; "<AssertPlaceHolder>" ; } put ( K , org . nd4j . linalg . io . List ) { return this . map . put ( key , value ) ; }
org . junit . Assert . assertEquals ( expected , n1 )
testActionNeverAndNoTx ( ) { org . mule . runtime . core . api . transaction . MuleTransactionConfig config = new org . mule . runtime . core . api . transaction . MuleTransactionConfig ( org . mule . runtime . core . api . transaction . TransactionConfig . ACTION_NEVER ) ; org . mule . runtime . core . api . execution . ExecutionTemplate executionTemplate = createExecutionTemplate ( config ) ; java . lang . Object result = executionTemplate . execute ( getEmptyTransactionCallback ( ) ) ; "<AssertPlaceHolder>" ; } getEmptyTransactionCallback ( ) { return org . mule . runtime . core . api . transaction . TransactionTemplateTestUtils . getEmptyTransactionCallback ( RETURN_VALUE ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( RETURN_VALUE ) )
twoItems ( ) { long [ ] data = new long [ ] { 1 , 2 , 3 , 4 , 1 , 1 , 5 , 5 } ; long [ ] expectedSorted = new long [ ] { 1 , 1 , 5 , 5 , 1 , 2 , 3 , 4 } ; org . apache . bookkeeper . bookie . storage . ldb . ArrayGroupSort sorter = new org . apache . bookkeeper . bookie . storage . ldb . ArrayGroupSort ( 2 , 4 ) ; sorter . sort ( data ) ; "<AssertPlaceHolder>" ; } sort ( long [ ] ) { sort ( array , 0 , array . length ) ; }
org . junit . Assert . assertArrayEquals ( expectedSorted , data )
when_pdroute_pastMaxLoatAtAct2ShouldBe10 ( ) { stateManager . informInsertionStarts ( java . util . Arrays . asList ( pickup_delivery_route ) , java . util . Collections . < jsprit . core . algorithm . state . Job > emptyList ( ) ) ; jsprit . core . algorithm . state . Capacity atAct2 = stateManager . getActivityState ( pickup_delivery_route . getActivities ( ) . get ( 1 ) , InternalStates . PAST_MAXLOAD , jsprit . core . algorithm . state . Capacity . class ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 15 , atAct2 . get ( 0 ) )
testAddingFileEntryWithImageCreatesMedia ( ) { com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( _group , com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) ) ; final com . liferay . portal . kernel . repository . model . FileEntry fileEntry = _addImageFileEntry ( serviceContext ) ; java . util . stream . Stream < com . liferay . adaptive . media . AdaptiveMedia < com . liferay . adaptive . media . image . processor . AMImageProcessor > > adaptiveMediaStream = _amImageFinder . getAdaptiveMediaStream ( ( amImageQueryBuilder ) -> amImageQueryBuilder . forFileEntry ( fileEntry ) . done ( ) ) ; "<AssertPlaceHolder>" ; } _getVariantsCount ( ) { java . util . Collection < com . liferay . adaptive . media . image . configuration . AMImageConfigurationEntry > amImageConfigurationEntries = _amImageConfigurationHelper . getAMImageConfigurationEntries ( com . liferay . portal . kernel . test . util . TestPropsValues . getCompanyId ( ) ) ; return amImageConfigurationEntries . size ( ) ; }
org . junit . Assert . assertEquals ( _getVariantsCount ( ) , adaptiveMediaStream . count ( ) )
testGetVisibilityServiceProperties ( ) { org . apache . ambari . server . controller . AmbariManagementController managementController = createNiceMock ( org . apache . ambari . server . controller . AmbariManagementController . class ) ; org . apache . ambari . server . controller . spi . Resource . Type type = Resource . Type . StackService ; org . apache . ambari . server . state . ServiceInfo serviceInfo = new org . apache . ambari . server . state . ServiceInfo ( ) ; serviceInfo . setServicePropertyList ( TEST_SERVICE_PROPERTY_LIST ) ; org . apache . ambari . server . controller . StackServiceResponse stackServiceResponse = new org . apache . ambari . server . controller . StackServiceResponse ( serviceInfo ) ; expect ( managementController . getStackServices ( org . easymock . EasyMock . anyObject ( ) ) ) . andReturn ( com . google . common . collect . ImmutableSet . of ( stackServiceResponse ) ) ; replay ( managementController ) ; org . apache . ambari . server . controller . spi . Request request = org . apache . ambari . server . controller . utilities . PropertyHelper . getReadRequest ( SERVICE_PROPERTIES_PROPERTY_ID ) ; org . apache . ambari . server . controller . spi . ResourceProvider stackServiceResourceProvider = org . apache . ambari . server . controller . internal . AbstractControllerResourceProvider . getResourceProvider ( type , managementController ) ; java . util . Set < org . apache . ambari . server . controller . spi . Resource > resources = stackServiceResourceProvider . getResources ( request , null ) ; java . util . Map < java . lang . String , java . lang . String > expectedServiceProperties = com . google . common . collect . ImmutableMap . < java . lang . String , java . lang . String > builder ( ) . putAll ( TEST_SERVICE_PROPERTIES ) . put ( ServiceInfo . DEFAULT_SERVICE_INSTALLABLE_PROPERTY ) . put ( ServiceInfo . DEFAULT_SERVICE_MANAGED_PROPERTY ) . put ( ServiceInfo . DEFAULT_SERVICE_MONITORED_PROPERTY ) . build ( ) ; org . apache . ambari . server . controller . spi . Resource expected = new org . apache . ambari . server . controller . internal . ResourceImpl ( type ) ; org . apache . ambari . server . controller . internal . BaseProvider . setResourceProperty ( expected , SERVICE_PROPERTIES_PROPERTY_ID , expectedServiceProperties , com . google . common . collect . ImmutableSet . of ( SERVICE_PROPERTIES_PROPERTY_ID ) ) ; "<AssertPlaceHolder>" ; verify ( managementController ) ; } of ( java . lang . Iterable ) { java . util . List < org . apache . ambari . server . controller . spi . Predicate > predicateList = new java . util . LinkedList ( ) ; for ( org . apache . ambari . server . controller . spi . Predicate predicate : predicates ) { if ( predicate instanceof org . apache . ambari . server . controller . predicate . AlwaysPredicate ) { return predicate ; } else if ( predicate instanceof org . apache . ambari . server . controller . predicate . OrPredicate ) { predicateList . addAll ( java . util . Arrays . asList ( ( ( org . apache . ambari . server . controller . predicate . OrPredicate ) ( predicate ) ) . getPredicates ( ) ) ) ; } else { predicateList . add ( predicate ) ; } } return ( predicateList . size ( ) ) == 1 ? predicateList . get ( 0 ) : new org . apache . ambari . server . controller . predicate . OrPredicate ( predicateList . toArray ( new org . apache . ambari . server . controller . spi . Predicate [ predicateList . size ( ) ] ) ) ; }
org . junit . Assert . assertEquals ( com . google . common . collect . ImmutableSet . of ( expected ) , resources )
findDepsFromParamsAddsPythonDep ( ) { com . facebook . buck . io . filesystem . ProjectFilesystem filesystem = new com . facebook . buck . io . filesystem . impl . FakeProjectFilesystem ( ) ; com . facebook . buck . core . model . BuildTarget target = com . facebook . buck . core . model . BuildTargetFactory . newInstance ( "//:target" ) ; com . facebook . buck . features . python . CxxPythonExtensionDescription desc = ( ( com . facebook . buck . features . python . CxxPythonExtensionDescription ) ( new com . facebook . buck . features . python . CxxPythonExtensionBuilder ( target , com . facebook . buck . core . model . FlavorDomain . of ( "Python<sp>Platform" , com . facebook . buck . features . python . CxxPythonExtensionDescriptionTest . createPy2Platform ( java . util . Optional . of ( com . facebook . buck . features . python . CxxPythonExtensionDescriptionTest . PYTHON2_DEP_TARGET ) ) , com . facebook . buck . features . python . CxxPythonExtensionDescriptionTest . createPy3Platform ( java . util . Optional . of ( com . facebook . buck . features . python . CxxPythonExtensionDescriptionTest . PYTHON3_DEP_TARGET ) ) ) , new com . facebook . buck . cxx . toolchain . CxxBuckConfig ( com . facebook . buck . core . config . FakeBuckConfig . builder ( ) . build ( ) ) , com . facebook . buck . cxx . CxxTestUtils . createDefaultPlatforms ( ) ) . build ( ) . getDescription ( ) ) ) ; com . facebook . buck . features . python . CxxPythonExtensionDescriptionArg constructorArg = com . facebook . buck . features . python . CxxPythonExtensionDescriptionArg . builder ( ) . setName ( "target" ) . build ( ) ; com . google . common . collect . ImmutableSortedSet . Builder < com . facebook . buck . core . model . BuildTarget > builder = com . google . common . collect . ImmutableSortedSet . naturalOrder ( ) ; desc . findDepsForTargetFromConstructorArgs ( com . facebook . buck . core . model . BuildTargetFactory . newInstance ( "//foo:bar" ) , createCellRoots ( filesystem ) , constructorArg , builder , com . google . common . collect . ImmutableSortedSet . naturalOrder ( ) ) ; "<AssertPlaceHolder>" ; } build ( ) { if ( ( startedEvent . getOperation ( ) ) == ( Operation . FETCH ) ) { com . facebook . buck . core . rulekey . RuleKey requestsRuleKey = java . util . Objects . requireNonNull ( com . google . common . collect . Iterables . getFirst ( startedEvent . getRuleKeys ( ) , null ) ) ; fetchDataBuilder . setRequestedRuleKey ( requestsRuleKey ) ; return new com . facebook . buck . artifact_cache . HttpArtifactCacheEvent . Finished ( startedEvent , target , fetchDataBuilder . build ( ) ) ; } else { storeDataBuilder . setRuleKeys ( startedEvent . getRuleKeys ( ) ) ; storeDataBuilder . setStoreType ( startedEvent . getStoreType ( ) ) ; return new com . facebook . buck . artifact_cache . HttpArtifactCacheEvent . Finished ( startedEvent , storeDataBuilder . build ( ) ) ; } }
org . junit . Assert . assertThat ( builder . build ( ) , org . hamcrest . Matchers . contains ( com . facebook . buck . features . python . CxxPythonExtensionDescriptionTest . PYTHON2_DEP_TARGET , com . facebook . buck . features . python . CxxPythonExtensionDescriptionTest . PYTHON3_DEP_TARGET ) )
testDumbLocalizerWithPatch ( ) { fr . inria . lille . repair . common . config . NopolContext nopolContext = fr . inria . lille . repair . TestUtility . configForExample ( "nopol" , 2 ) ; nopolContext . setLocalizer ( NopolContext . NopolLocalizer . DUMB ) ; nopolContext . setType ( RepairType . CONDITIONAL ) ; fr . inria . lille . commons . synthesis . smt . solver . SolverFactory . setSolver ( "z3" , TestUtility . solverPath ) ; fr . inria . lille . repair . nopol . NoPol nopol = new fr . inria . lille . repair . nopol . NoPol ( nopolContext ) ; fr . inria . lille . repair . nopol . NopolResult result = nopol . build ( ) ; "<AssertPlaceHolder>" ; } getPatches ( ) { return patches ; }
org . junit . Assert . assertEquals ( 1 , result . getPatches ( ) . size ( ) )
testLastIndexOf ( ) { java . util . List < java . lang . Integer > list = redisson . getList ( "list" ) ; list . add ( 1 ) ; list . add ( 2 ) ; list . add ( 3 ) ; list . add ( 4 ) ; list . add ( 5 ) ; list . add ( 3 ) ; list . add ( 7 ) ; list . add ( 8 ) ; list . add ( 3 ) ; list . add ( 10 ) ; int index = list . lastIndexOf ( 3 ) ; "<AssertPlaceHolder>" ; } lastIndexOf ( java . lang . Object ) { return responses . lastIndexOf ( o ) ; }
org . junit . Assert . assertEquals ( 8 , index )
testWithNameWhenSameName ( ) { final com . allanbank . mongodb . bson . element . DocumentElement element = new com . allanbank . mongodb . bson . element . DocumentElement ( "foo" ) ; "<AssertPlaceHolder>" ; } withName ( java . lang . String ) { if ( getName ( ) . equals ( name ) ) { return this ; } return new com . allanbank . mongodb . bson . element . UuidElement ( name , getSubType ( ) , myUuid ) ; }
org . junit . Assert . assertSame ( element , element . withName ( "foo" ) )
testUnmarshallObject ( ) { java . io . Reader reader = com . google . common . io . Resources . newReaderSupplier ( com . google . common . io . Resources . getResource ( "rss.xml" ) , Util . UTF_8 ) . getInput ( ) ; com . github . aview . api . html5 . Rss rss = RssUnmarshaller . instance . unmarshallObject ( "application/xml" , reader , com . github . aview . api . html5 . Rss . class ) ; "<AssertPlaceHolder>" ; } unmarshallObject ( java . lang . String , java . io . Reader , java . lang . Class ) { org . simpleframework . xml . Serializer serializer = new org . simpleframework . xml . core . Persister ( new com . github . aview . api . html5 . AbcDateMatcher ( ) ) ; try { return serializer . read ( type , reader , false ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( e ) ; } }
org . junit . Assert . assertNotNull ( rss )
testVersionCheck ( ) { javax . servlet . http . HttpServletRequest request = headers ( mock ( javax . servlet . http . HttpServletRequest . class ) , "Authorization" , "Basic<sp>VE9LRU46dGlnZXI=" ) ; javax . servlet . http . HttpServletResponse response = mock ( javax . servlet . http . HttpServletResponse . class ) ; com . distelli . europa . ServletByteArrayOutputStream out = new com . distelli . europa . ServletByteArrayOutputStream ( ) ; when ( request . getRequestURI ( ) ) . thenReturn ( "/v2/" ) ; when ( response . getOutputStream ( ) ) . thenReturn ( out ) ; servlet . handleRequest ( HTTPMethod . GET , request , response ) ; verify ( response ) . setStatus ( 200 ) ; verify ( response ) . setHeader ( "Docker-Distribution-API-Version" , "registry/2.0" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "{cid=" + ( cid ) ) + ",idx=" ) + ( idx ) ) + "}" ; }
org . junit . Assert . assertEquals ( "" , out . toString ( ) )
testMetEnkelePersoonPlaatsAfnIndicatie ( ) { final nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst persoon = maakPersoon ( 1 , 20160906 ) ; final nl . bzk . brp . service . algemeen . BepaalGeleverdePersonenService . Resultaat resultaat = service . bepaal ( SoortDienst . PLAATSING_AFNEMERINDICATIE , 1 , singletonList ( persoon ) , null ) ; "<AssertPlaceHolder>" ; } getDatumAanvangMaterielePeriodeResultaat ( ) { return datumAanvangMaterielePeriodeResultaat ; }
org . junit . Assert . assertThat ( resultaat . getDatumAanvangMaterielePeriodeResultaat ( ) , org . hamcrest . core . Is . is ( 20160906 ) )
blockedSubmit ( ) { com . facebook . buck . util . concurrent . WeightedListeningExecutorService service = new com . facebook . buck . util . concurrent . WeightedListeningExecutorService ( new com . facebook . buck . util . concurrent . ListeningMultiSemaphore ( com . facebook . buck . util . concurrent . ResourceAmounts . of ( 1 , 0 , 0 , 0 ) , ResourceAllocationFairness . FAIR ) , com . facebook . buck . util . concurrent . ResourceAmounts . of ( 1 , 0 , 0 , 0 ) , com . google . common . util . concurrent . MoreExecutors . listeningDecorator ( java . util . concurrent . Executors . newSingleThreadExecutor ( ) ) ) ; service . submit ( new java . lang . Runnable ( ) { @ com . facebook . buck . util . concurrent . Override public void run ( ) { while ( true ) { } } } , com . facebook . buck . util . concurrent . ResourceAmounts . of ( 1 , 0 , 0 , 0 ) ) ; java . util . concurrent . atomic . AtomicBoolean second = submitSetBool ( service , com . facebook . buck . util . concurrent . ResourceAmounts . of ( 1 , 0 , 0 , 0 ) ) ; "<AssertPlaceHolder>" ; } get ( ) { return value ; }
org . junit . Assert . assertFalse ( second . get ( ) )
testWithIdAsString ( ) { io . yawp . repository . models . basic . BasicObject myObj = new io . yawp . repository . models . basic . BasicObject ( "xpto" ) ; yawp . save ( myObj ) ; io . yawp . repository . models . basic . BasicObject fetch = yawp ( io . yawp . repository . models . basic . BasicObject . class ) . where ( "id" , "=" , myObj . getId ( ) . toString ( ) ) . only ( ) ; "<AssertPlaceHolder>" ; } getStringValue ( ) { return stringValue ; }
org . junit . Assert . assertEquals ( "xpto" , fetch . getStringValue ( ) )
testPublicGroupStreamCommentAllowStrict ( ) { "<AssertPlaceHolder>" ; } coreGroupStreamInGeneralCommentTest ( boolean , boolean , boolean ) { final org . eurekastreams . server . search . modelview . DomainGroupModelView group = expectGroupStream ( isStreamPublic ) ; mockery . checking ( new org . jmock . Expectations ( ) { { allowing ( group ) . isCommentable ( ) ; will ( returnValue ( streamAllowsAction ) ) ; } } ) ; boolean result = sut . authorize ( activity , ActivityInteractionType . COMMENT , strict ) ; mockery . assertIsSatisfied ( ) ; return result ; }
org . junit . Assert . assertTrue ( coreGroupStreamInGeneralCommentTest ( true , true , true ) )
testConvert ( ) { java . lang . String name = "LieToMe" ; java . lang . String abbrName = "LTM" ; org . lnu . is . domain . job . type . JobType expected = new org . lnu . is . domain . job . type . JobType ( ) ; expected . setAbbrName ( abbrName ) ; expected . setName ( name ) ; org . lnu . is . resource . job . type . JobTypeResource source = new org . lnu . is . resource . job . type . JobTypeResource ( ) ; source . setAbbrName ( abbrName ) ; source . setName ( name ) ; org . lnu . is . domain . job . type . JobType 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 )
testExprNodeBetweenWithDynamicValue ( ) { org . apache . hadoop . hive . ql . optimizer . physical . ExprNodeDesc notBetween = new org . apache . hadoop . hive . ql . optimizer . physical . ExprNodeConstantDesc ( org . apache . hadoop . hive . serde2 . typeinfo . TypeInfoFactory . booleanTypeInfo , Boolean . FALSE ) ; org . apache . hadoop . hive . ql . optimizer . physical . ExprNodeColumnDesc colExpr = new org . apache . hadoop . hive . ql . optimizer . physical . ExprNodeColumnDesc ( java . lang . String . class , "col1" , "table" , false ) ; org . apache . hadoop . hive . ql . optimizer . physical . ExprNodeDesc minExpr = new org . apache . hadoop . hive . ql . optimizer . physical . ExprNodeDynamicValueDesc ( new org . apache . hadoop . hive . ql . optimizer . physical . DynamicValue ( "id1" , org . apache . hadoop . hive . serde2 . typeinfo . TypeInfoFactory . stringTypeInfo ) ) ; org . apache . hadoop . hive . ql . optimizer . physical . ExprNodeDesc maxExpr = new org . apache . hadoop . hive . ql . optimizer . physical . ExprNodeDynamicValueDesc ( new org . apache . hadoop . hive . ql . optimizer . physical . DynamicValue ( "id2" , org . apache . hadoop . hive . serde2 . typeinfo . TypeInfoFactory . stringTypeInfo ) ) ; org . apache . hadoop . hive . ql . optimizer . physical . ExprNodeGenericFuncDesc betweenExpr = new org . apache . hadoop . hive . ql . optimizer . physical . ExprNodeGenericFuncDesc ( ) ; org . apache . hadoop . hive . ql . optimizer . physical . GenericUDF betweenUdf = new org . apache . hadoop . hive . ql . optimizer . physical . GenericUDFBetween ( ) ; betweenExpr . setTypeInfo ( TypeInfoFactory . booleanTypeInfo ) ; betweenExpr . setGenericUDF ( betweenUdf ) ; java . util . List < org . apache . hadoop . hive . ql . optimizer . physical . ExprNodeDesc > children1 = new java . util . ArrayList < org . apache . hadoop . hive . ql . optimizer . physical . ExprNodeDesc > ( 2 ) ; children1 . add ( notBetween ) ; children1 . add ( colExpr ) ; children1 . add ( minExpr ) ; children1 . add ( maxExpr ) ; betweenExpr . setChildren ( children1 ) ; org . apache . hadoop . hive . ql . optimizer . physical . Vectorizer v = new org . apache . hadoop . hive . ql . optimizer . physical . Vectorizer ( ) ; v . testSetCurrentBaseWork ( new org . apache . hadoop . hive . ql . optimizer . physical . MapWork ( ) ) ; boolean valid = v . validateExprNodeDesc ( betweenExpr , "Test" , Mode . FILTER , false ) ; "<AssertPlaceHolder>" ; } validateExprNodeDesc ( java . util . List , java . lang . String , org . apache . hadoop . hive . ql . exec . vector . VectorExpressionDescriptor$Mode , boolean ) { for ( org . apache . hadoop . hive . ql . plan . ExprNodeDesc d : descs ) { boolean ret = validateExprNodeDesc ( d , expressionTitle , mode , allowComplex ) ; if ( ! ret ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( valid )
testGetParametersWithDisabledDefauts ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . Long specOfferId = 1L ; org . lnu . is . domain . specoffer . SpecOffer specOffer = new org . lnu . is . domain . specoffer . SpecOffer ( ) ; specOffer . setId ( specOfferId ) ; java . lang . Long enrolmentSubjectId = 2L ; org . lnu . is . domain . enrolment . subject . EnrolmentSubject enrolmentSubject = new org . lnu . is . domain . enrolment . subject . EnrolmentSubject ( ) ; enrolmentSubject . setId ( enrolmentSubjectId ) ; java . lang . Boolean isMajor = false ; java . lang . Boolean alternative = true ; org . lnu . is . domain . specoffer . SpecOfferSubject entity = new org . lnu . is . domain . specoffer . SpecOfferSubject ( ) ; entity . setSpecOffer ( specOffer ) ; entity . setEnrolmentSubject ( enrolmentSubject ) ; entity . setIsMajor ( isMajor ) ; entity . setAlternative ( alternative ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "specOffer" , specOffer ) ; expected . put ( "enrolmentSubject" , enrolmentSubject ) ; expected . put ( "isMajor" , isMajor ) ; expected . put ( "alternative" , alternative ) ; when ( specOfferDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( specOffer ) ; when ( enrolmenntSubjectDao . getEntityById ( anyLong ( ) ) ) . thenReturn ( enrolmentSubject ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; verify ( specOfferDao ) . getEntityById ( specOfferId ) ; verify ( enrolmenntSubjectDao ) . getEntityById ( enrolmentSubjectId ) ; "<AssertPlaceHolder>" ; } getEntityById ( KEY ) { org . lnu . is . dao . dao . DefaultDao . LOG . info ( "Getting<sp>{}.entity<sp>wit<sp>id" , getEntityClass ( ) . getSimpleName ( ) , id ) ; return persistenceManager . findById ( getEntityClass ( ) , id ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testTargetPlatformInfoExport ( ) { org . nuxeo . targetplatforms . api . TargetPlatformInfo tpi = service . getTargetPlatformInfo ( "cap-5.8" ) ; "<AssertPlaceHolder>" ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; org . nuxeo . targetplatforms . io . JSONExporter . exportToJson ( tpi , out , true ) ; checkJsonEquals ( "target-platform-info-export.json" , out ) ; } getTargetPlatformInfo ( java . lang . String ) { if ( id == null ) { return null ; } org . nuxeo . targetplatforms . core . descriptors . TargetPlatformDescriptor desc = platforms . getTargetPlatform ( id ) ; return getTargetPlatformInfo ( desc ) ; }
org . junit . Assert . assertNotNull ( tpi )
occurrencesOfCodePoint ( ) { int count = com . gs . collections . impl . utility . StringIterate . occurrencesOf ( "1a2a3" , "a" . codePointAt ( 0 ) ) ; "<AssertPlaceHolder>" ; } occurrencesOf ( java . lang . String , char ) { return com . gs . collections . impl . utility . StringIterate . occurrencesOfChar ( string , value ) ; }
org . junit . Assert . assertEquals ( 2 , count )
manageActivationProcess_VSERVER_STARTING ( ) { org . oscm . app . iaas . data . FlowState flowState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTING ; org . oscm . app . iaas . data . FlowState newState = null ; newState = vServerProcessor . manageActivationProcess ( "controllerId" , "instanceId" , paramHandler , flowState , newState ) ; "<AssertPlaceHolder>" ; } manageActivationProcess ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState , org . oscm . app . iaas . data . FlowState ) { switch ( flowState ) { case VSERVER_ACTIVATION_REQUESTED : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STARTING , paramHandler ) ) { if ( vserverComm . startVServer ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTING ; } } break ; case VSERVER_STARTING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STARTED , paramHandler ) ) { if ( VServerStatus . RUNNING . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTED ; } } break ; case VSERVER_STARTED : if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } break ; case VSERVER_DEACTIVATION_REQUESTED : if ( ( paramHandler . getControllerWaitTime ( ) ) != 0 ) { paramHandler . suspendProcessInstanceFor ( paramHandler . getControllerWaitTime ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . WAITING_BEFORE_STOP ; break ; } case WAITING_BEFORE_STOP : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STOP_FOR_DEACTIVATION , paramHandler ) ) { vserverComm . stopVServer ( paramHandler ) ; if ( VServerStatus . STOPPED . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STOP_FOR_DEACTIVATION ; } } break ; case VSERVER_STOP_FOR_DEACTIVATION : if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } break ; default : } return newState ; }
org . junit . Assert . assertNull ( newState )
testPerformIteratedQuery_Count ( ) { createArtistsDataSet ( ) ; org . apache . cayenne . query . SelectQuery < org . apache . cayenne . testdo . testmap . Artist > q1 = new org . apache . cayenne . query . SelectQuery < org . apache . cayenne . testdo . testmap . Artist > ( org . apache . cayenne . testdo . testmap . Artist . class ) ; try ( org . apache . cayenne . ResultIterator < ? > it = context . performIteratedQuery ( q1 ) ) { int count = 0 ; while ( it . hasNextRow ( ) ) { it . nextRow ( ) ; count ++ ; } "<AssertPlaceHolder>" ; } } nextRow ( ) { if ( ! ( hasNextRow ( ) ) ) { throw new java . util . NoSuchElementException ( "An<sp>attempt<sp>to<sp>read<sp>uninitialized<sp>row<sp>or<sp>past<sp>the<sp>end<sp>of<sp>the<sp>iterator." ) ; } T row = delegate . nextRow ( ) ; checkNextRow ( ) ; return row ; }
org . junit . Assert . assertEquals ( 7 , count )
testSetMessage ( ) { java . lang . String msg = "Lorem<sp>ipsum<sp>dolor<sp>sit<sp>amet<sp>consectetuer<sp>adipiscing<sp>elit." ; messageBox . setMessage ( msg ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; }
org . junit . Assert . assertEquals ( msg , messageBox . getMessage ( ) )
shouldReturnFalseWhenCheckIfTransfersAreValidAndTransferProductAlreadyAdded ( ) { com . qcadoo . model . api . Entity transferConsumption1 = mockTransfer ( com . qcadoo . mes . materialFlow . hooks . TransformationsModelValidatorsTest . L_NUMBER_CONSUMPTION_1 , productConsumption , BigDecimal . ONE ) ; com . qcadoo . model . api . Entity transferConsumption2 = mockTransfer ( com . qcadoo . mes . materialFlow . hooks . TransformationsModelValidatorsTest . L_NUMBER_CONSUMPTION_2 , productProduction , BigDecimal . ONE ) ; stubHasManyField ( transformations , com . qcadoo . mes . materialFlow . hooks . TRANSFERS_CONSUMPTION , com . google . common . collect . Lists . newArrayList ( transferConsumption1 , transferConsumption2 ) ) ; boolean result = transformationsModelValidators . checkIfTransfersAreValid ( transformationsDD , transformations ) ; "<AssertPlaceHolder>" ; } checkIfTransfersAreValid ( com . qcadoo . model . api . DataDefinition , com . qcadoo . model . api . Entity ) { java . util . List < com . qcadoo . model . api . Entity > transfersConsumption = transformations . getHasManyField ( com . qcadoo . mes . materialFlow . hooks . TRANSFERS_CONSUMPTION ) ; java . util . List < com . qcadoo . model . api . Entity > transfersProduction = transformations . getHasManyField ( com . qcadoo . mes . materialFlow . hooks . TRANSFERS_PRODUCTION ) ; java . lang . Iterable < java . lang . Boolean > validationResults = com . google . common . collect . Lists . newArrayList ( areTransfersValid ( transfersConsumption ) , areTransfersValid ( transfersProduction ) , checkIfTransfersNumbersAreDistinct ( transfersConsumption , transfersProduction ) , checkIfTransfersNumbersAreDistinct ( transfersProduction , transfersConsumption ) ) ; return com . google . common . collect . Iterables . all ( validationResults , com . google . common . base . Predicates . equalTo ( true ) ) ; }
org . junit . Assert . assertFalse ( result )
testSchemaRenameWithoutInstances ( ) { org . zoodb . test . testutil . TestTools . defineSchema ( org . zoodb . test . jdo . TestClassTiny . class ) ; javax . jdo . PersistenceManager pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; pm . currentTransaction ( ) . begin ( ) ; org . zoodb . schema . ZooClass s = org . zoodb . jdo . ZooJdoHelper . schema ( pm ) . getClass ( org . zoodb . test . jdo . TestClassTiny . class . getName ( ) ) ; s . rename ( org . zoodb . test . jdo . TestClassTinyClone . class . getName ( ) ) ; "<AssertPlaceHolder>" ; checkRename ( org . zoodb . test . jdo . TestClassTiny . class , org . zoodb . test . jdo . TestClassTinyClone . class , pm ) ; pm . currentTransaction ( ) . commit ( ) ; pm . currentTransaction ( ) . begin ( ) ; checkRename ( org . zoodb . test . jdo . TestClassTiny . class , org . zoodb . test . jdo . TestClassTinyClone . class , pm ) ; pm . currentTransaction ( ) . commit ( ) ; org . zoodb . test . testutil . TestTools . closePM ( ) ; pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; pm . currentTransaction ( ) . begin ( ) ; checkRename ( org . zoodb . test . jdo . TestClassTiny . class , org . zoodb . test . jdo . TestClassTinyClone . class , pm ) ; pm . currentTransaction ( ) . commit ( ) ; org . zoodb . test . testutil . TestTools . closePM ( ) ; } getName ( ) { zooActivateRead ( ) ; return name ; }
org . junit . Assert . assertEquals ( org . zoodb . test . jdo . TestClassTinyClone . class . getName ( ) , s . getName ( ) )
testProcessMediaPut ( ) { org . easymock . EasyMock . replay ( responseMock ) ; org . easymock . EasyMock . expect ( requestMock . getMethod ( ) ) . andReturn ( "PUT" ) ; org . easymock . EasyMock . replay ( requestMock ) ; org . easymock . EasyMock . expect ( adapterMock . putMedia ( requestMock ) ) . andReturn ( responseMock ) ; org . easymock . EasyMock . replay ( adapterMock ) ; org . apache . abdera . protocol . server . ResponseContext response = processor . processMedia ( requestMock , adapterMock ) ; "<AssertPlaceHolder>" ; } processMedia ( org . apache . abdera . protocol . server . RequestContext , org . apache . abdera . protocol . server . CollectionAdapter ) { java . lang . String method = context . getMethod ( ) ; if ( adapter instanceof org . apache . abdera . protocol . server . MediaCollectionAdapter ) { org . apache . abdera . protocol . server . MediaCollectionAdapter mcadapter = ( ( org . apache . abdera . protocol . server . MediaCollectionAdapter ) ( adapter ) ) ; if ( method . equalsIgnoreCase ( "GET" ) ) { return mcadapter . getMedia ( context ) ; } else if ( method . equalsIgnoreCase ( "POST" ) ) { return mcadapter . postMedia ( context ) ; } else if ( method . equalsIgnoreCase ( "PUT" ) ) { return mcadapter . putMedia ( context ) ; } else if ( method . equalsIgnoreCase ( "DELETE" ) ) { return mcadapter . deleteMedia ( context ) ; } else if ( method . equalsIgnoreCase ( "HEAD" ) ) { return mcadapter . headMedia ( context ) ; } else if ( method . equalsIgnoreCase ( "OPTIONS" ) ) { return mcadapter . optionsMedia ( context ) ; } else { return null ; } } else { return org . apache . abdera . protocol . server . ProviderHelper . notallowed ( context ) ; } }
org . junit . Assert . assertNotNull ( response )
size_anthracene ( ) { int [ ] [ ] anthracene = org . openscience . cdk . graph . InitialCyclesTest . anthracene ( ) ; org . openscience . cdk . graph . MinimumCycleBasis mcb = new org . openscience . cdk . graph . MinimumCycleBasis ( anthracene ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cells . size ( ) ; }
org . junit . Assert . assertThat ( mcb . size ( ) , org . hamcrest . CoreMatchers . is ( 3 ) )
testShortcut_android ( ) { cn . jpush . api . push . model . notification . Notification notification = cn . jpush . api . push . model . notification . Notification . android ( "alert" , "title" , null ) ; com . google . gson . JsonObject json = new com . google . gson . JsonObject ( ) ; com . google . gson . JsonObject android = new com . google . gson . JsonObject ( ) ; android . add ( "alert" , new com . google . gson . JsonPrimitive ( "alert" ) ) ; android . add ( "title" , new com . google . gson . JsonPrimitive ( "title" ) ) ; json . add ( "android" , android ) ; "<AssertPlaceHolder>" ; } toJSON ( ) { com . google . gson . JsonObject json = super . toJSON ( ) . getAsJsonObject ( ) ; if ( ! ( badgeDisabled ) ) { if ( null != ( badge ) ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . BADGE , new com . google . gson . JsonPrimitive ( this . badge ) ) ; } else { json . add ( cn . jpush . api . push . model . notification . IosNotification . BADGE , new com . google . gson . JsonPrimitive ( cn . jpush . api . push . model . notification . IosNotification . DEFAULT_BADGE ) ) ; } } if ( ! ( soundDisabled ) ) { if ( null != ( sound ) ) { if ( ( sound ) instanceof java . lang . String ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . SOUND , new com . google . gson . JsonPrimitive ( ( ( java . lang . String ) ( sound ) ) ) ) ; } else if ( ( sound ) instanceof com . google . gson . JsonObject ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . SOUND , ( ( com . google . gson . JsonObject ) ( sound ) ) ) ; } } else { json . add ( cn . jpush . api . push . model . notification . IosNotification . SOUND , new com . google . gson . JsonPrimitive ( cn . jpush . api . push . model . notification . IosNotification . DEFAULT_SOUND ) ) ; } } if ( contentAvailable ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . CONTENT_AVAILABLE , new com . google . gson . JsonPrimitive ( true ) ) ; } if ( null != ( category ) ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . CATEGORY , new com . google . gson . JsonPrimitive ( category ) ) ; } if ( mutableContent ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . MUTABLE_CONTENT , new com . google . gson . JsonPrimitive ( true ) ) ; } if ( null != ( threadId ) ) { json . add ( cn . jpush . api . push . model . notification . IosNotification . THREAD_ID , new com . google . gson . JsonPrimitive ( threadId ) ) ; } return json ; }
org . junit . Assert . assertEquals ( "" , json , notification . toJSON ( ) )
testSimpleInEquality3 ( ) { com . github . davidmoten . rtree3d . geometry . Box r = com . github . davidmoten . rtree3d . geometry . RectangleTest . box ( 0 , 0 , 2 , 1 ) ; com . github . davidmoten . rtree3d . geometry . Box r2 = com . github . davidmoten . rtree3d . geometry . RectangleTest . box ( 0 , 1 , 2 , 1 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { com . google . common . base . Optional < com . github . davidmoten . rtree3d . geometry . Point > other = com . github . davidmoten . util . ObjectsHelper . asClass ( obj , com . github . davidmoten . rtree3d . geometry . Point . class ) ; if ( other . isPresent ( ) ) { return com . google . common . base . Objects . equal ( mbr , other . get ( ) . mbb ( ) ) ; } else return false ; }
org . junit . Assert . assertFalse ( r . equals ( r2 ) )
findAllRNIDeelnemer ( ) { final java . util . List < nl . bzk . algemeenbrp . dal . domein . brp . entity . RNIDeelnemer > result = rniDeelnemerRepository . findAll ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 7 , result . size ( ) )
updateUda ( ) { ua . updateUda ( voUda , defSupplier , supplier ) ; "<AssertPlaceHolder>" ; } getUdaValue ( ) { return uda . getUdaValue ( ) ; }
org . junit . Assert . assertEquals ( voUda . getUdaValue ( ) , uda . getUdaValue ( ) )
save_fieldValidationErrors ( ) { com . vaadin . data . Binder < com . vaadin . tests . data . bean . Person > binder = new com . vaadin . data . Binder ( ) ; java . lang . String msg = "foo" ; binder . forField ( nameField ) . withValidator ( new com . vaadin . data . validator . NotEmptyValidator ( msg ) ) . bind ( Person :: getFirstName , Person :: setFirstName ) ; com . vaadin . tests . data . bean . Person person = new com . vaadin . tests . data . bean . Person ( ) ; java . lang . String firstName = "foo" ; person . setFirstName ( firstName ) ; nameField . setValue ( "" ) ; try { binder . writeBean ( person ) ; } finally { "<AssertPlaceHolder>" ; } } getFirstName ( ) { return firstName ; }
org . junit . Assert . assertEquals ( firstName , person . getFirstName ( ) )
testName_Gets_Value_From_Element ( ) { mmarquee . automation . AutomationElement element = org . mockito . Mockito . mock ( mmarquee . automation . AutomationElement . class ) ; mmarquee . automation . pattern . Value value = org . mockito . Mockito . mock ( mmarquee . automation . pattern . Value . class ) ; when ( element . getName ( ) ) . thenReturn ( "NAME" ) ; mmarquee . automation . uiautomation . IUIAutomation mocked_automation = org . mockito . Mockito . mock ( mmarquee . automation . uiautomation . IUIAutomation . class ) ; mmarquee . automation . UIAutomation instance = new mmarquee . automation . UIAutomation ( mocked_automation ) ; mmarquee . automation . controls . AutomationEditBox ctrl = new mmarquee . automation . controls . AutomationEditBox ( new mmarquee . automation . controls . ElementBuilder ( element ) . addPattern ( value ) . automation ( instance ) ) ; java . lang . String name = ctrl . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return this . name ; }
org . junit . Assert . assertTrue ( name . equals ( "NAME" ) )
testEquals4 ( ) { org . jacoco . core . analysis . ICounter c = org . jacoco . core . internal . analysis . CounterImpl . getInstance ( 300 , 123 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return data . equals ( obj ) ; }
org . junit . Assert . assertFalse ( c . equals ( new java . lang . Integer ( 123 ) ) )
testRequestUriRelative ( ) { java . lang . String requestUri = "dam/test.jpg" ; boolean isValidUri = servlet . isUriValid ( requestUri ) ; "<AssertPlaceHolder>" ; } isUriValid ( java . lang . String ) { boolean isValidUri = true ; if ( ! ( org . apache . commons . lang3 . StringUtils . startsWith ( requestUri , "/" ) ) ) { isValidUri = false ; } return isValidUri ; }
org . junit . Assert . assertFalse ( isValidUri )
testGetParametersWithDefault ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String name = "AssetStateN" ; org . lnu . is . domain . asset . state . AssetState entity = new org . lnu . is . domain . asset . state . AssetState ( ) ; entity . setName ( name ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "name" , name ) ; 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 )
testGetPendingSubTasksByParentWithParentNoTask ( ) { int count = taskService . getPendingSubTasksByParent ( 0 ) ; "<AssertPlaceHolder>" ; } getPendingSubTasksByParent ( long ) { return executor . execute ( new org . jbpm . services . task . commands . GetPendingSubTasksCommand ( parentId ) ) ; }
org . junit . Assert . assertEquals ( 0 , count )
testGetBooleanValue6 ( ) { com . huawei . streaming . config . StreamingConfigTest . config . put ( com . huawei . streaming . config . StreamingConfigTest . CONF_VAR , "abc" ) ; "<AssertPlaceHolder>" ; } getBooleanValue ( java . lang . String ) { if ( this . containsKey ( key ) ) { try { return java . lang . Boolean . valueOf ( get ( key ) . toString ( ) ) ; } catch ( java . lang . Exception e ) { com . huawei . streaming . exception . StreamingException exception = new com . huawei . streaming . exception . StreamingException ( com . huawei . streaming . exception . ErrorCode . CONFIG_FORMAT , get ( key ) . toString ( ) , "boolean" ) ; com . huawei . streaming . config . StreamingConfig . LOG . error ( ErrorCode . CONFIG_FORMAT . getFullMessage ( get ( key ) . toString ( ) , "boolean" ) ) ; throw exception ; } } else { com . huawei . streaming . exception . StreamingException exception = new com . huawei . streaming . exception . StreamingException ( com . huawei . streaming . exception . ErrorCode . CONFIG_NOT_FOUND , key ) ; com . huawei . streaming . config . StreamingConfig . LOG . error ( ErrorCode . CONFIG_NOT_FOUND . getFullMessage ( key ) ) ; throw exception ; } }
org . junit . Assert . assertTrue ( ( ( com . huawei . streaming . config . StreamingConfigTest . config . getBooleanValue ( com . huawei . streaming . config . StreamingConfigTest . CONF_VAR ) ) == false ) )
checkExplicit ( ) { org . apache . hadoop . hive . ql . optimizer . signature . TestOpSigFactory . SampleOperator so = new org . apache . hadoop . hive . ql . optimizer . signature . TestOpSigFactory . SampleOperator ( ) ; org . apache . hadoop . hive . ql . optimizer . signature . TestOpSigFactory . SampleDesc sd = new org . apache . hadoop . hive . ql . optimizer . signature . TestOpSigFactory . SampleDesc ( ) ; so . setConf ( sd ) ; f . getSignature ( so ) ; f . getSignature ( so ) ; verify ( f , times ( 2 ) ) . getSignature ( org . mockito . Mockito . any ( ) ) ; "<AssertPlaceHolder>" ; } getDesc_invocations ( ) { return desc_invocations ; }
org . junit . Assert . assertEquals ( 1 , sd . getDesc_invocations ( ) )
validPlatformsAndApiLevels25 ( ) { final com . simpligility . maven . plugins . android . AndroidSdk sdk25 = new com . simpligility . maven . plugins . android . AndroidSdk ( new java . io . File ( sdkTestSupport . getEnv_ANDROID_HOME ( ) ) , "25" , "25.0.2" ) ; "<AssertPlaceHolder>" ; } getAaptPath ( ) { return getPathForBuildTool ( BuildToolInfo . PathId . AAPT ) ; }
org . junit . Assert . assertTrue ( ( ( ( sdk25 . getAaptPath ( ) ) != null ) && ( ! ( sdk25 . getAaptPath ( ) . equals ( "" ) ) ) ) )
singleLineValues ( ) { final org . apache . rya . indexing . pcj . fluo . client . util . Report . Builder builder = org . apache . rya . indexing . pcj . fluo . client . util . Report . builder ( ) ; builder . appendItem ( new org . apache . rya . indexing . pcj . fluo . client . util . Report . ReportItem ( "Title<sp>1" , new java . lang . String [ ] { "Short<sp>value." } ) ) ; builder . appendItem ( new org . apache . rya . indexing . pcj . fluo . client . util . Report . ReportItem ( "Title<sp>2" , new java . lang . String [ ] { "This<sp>is<sp>the<sp>longest<sp>values<sp>that<sp>appears<sp>in<sp>the<sp>report." } ) ) ; builder . appendItem ( new org . apache . rya . indexing . pcj . fluo . client . util . Report . ReportItem ( "This<sp>is<sp>a<sp>long<sp>title" , new java . lang . String [ ] { "Short<sp>value." } ) ) ; final org . apache . rya . indexing . pcj . fluo . client . util . Report report = builder . build ( ) ; final java . lang . String expected = "---------------------------------------------------------------------------------\n" + ( ( ( "|<sp>Title<sp>1<sp>|<sp>Short<sp>value.<sp>|\n" + "|<sp>Title<sp>2<sp>|<sp>This<sp>is<sp>the<sp>longest<sp>values<sp>that<sp>appears<sp>in<sp>the<sp>report.<sp>|\n" ) + "|<sp>This<sp>is<sp>a<sp>long<sp>title<sp>|<sp>Short<sp>value.<sp>|\n" ) + "---------------------------------------------------------------------------------\n" ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( ( card ) != null ) { return card . toString ( ) ; } else { return te . toString ( ) ; } }
org . junit . Assert . assertEquals ( expected , report . toString ( ) )
testE2EV1WriteWithLargeEntities ( ) { org . apache . beam . sdk . Pipeline p = org . apache . beam . sdk . Pipeline . create ( options ) ; final int rawPropertySize = 900000 ; final int numLargeEntities = 100 ; p . apply ( org . apache . beam . sdk . io . GenerateSequence . from ( 0 ) . to ( numLargeEntities ) ) . apply ( org . apache . beam . sdk . transforms . ParDo . of ( new org . apache . beam . sdk . io . gcp . datastore . V1TestUtil . CreateEntityFn ( options . getKind ( ) , options . getNamespace ( ) , ancestor , rawPropertySize ) ) ) . apply ( org . apache . beam . sdk . io . gcp . datastore . DatastoreIO . v1 ( ) . write ( ) . withProjectId ( project ) ) ; p . run ( ) ; long numEntitiesWritten = org . apache . beam . sdk . io . gcp . datastore . V1TestUtil . countEntities ( options , project , ancestor ) ; "<AssertPlaceHolder>" ; } countEntities ( org . apache . beam . sdk . io . gcp . datastore . V1TestOptions , java . lang . String , java . lang . String ) { com . google . datastore . v1 . client . Datastore datastore = org . apache . beam . sdk . io . gcp . datastore . V1TestUtil . getDatastore ( options , project ) ; com . google . datastore . v1 . Query query = org . apache . beam . sdk . io . gcp . datastore . V1TestUtil . makeAncestorKindQuery ( options . getKind ( ) , options . getNamespace ( ) , ancestor ) ; org . apache . beam . sdk . io . gcp . datastore . V1TestUtil . V1TestReader reader = new org . apache . beam . sdk . io . gcp . datastore . V1TestUtil . V1TestReader ( datastore , query , options . getNamespace ( ) ) ; long numEntitiesRead = 0 ; while ( reader . advance ( ) ) { reader . getCurrent ( ) ; numEntitiesRead ++ ; } return numEntitiesRead ; }
org . junit . Assert . assertEquals ( numLargeEntities , numEntitiesWritten )
testAsyncExecEntryPoint ( ) { initializeClient ( org . eclipse . rap . rwt . cluster . test . entrypoints . AsyncExecEntryPoint . class ) ; org . eclipse . rap . rwt . cluster . test . entrypoints . AsyncExecEntryPoint . scheduleAsyncRunnable ( getFirstDisplay ( primary ) ) ; cluster . removeServletEngine ( primary ) ; client . changeServletEngine ( secondary ) ; client . sendDisplayResizeRequest ( 100 , 100 ) ; prepareExamination ( ) ; org . eclipse . rap . rwt . service . UISession secondaryUiSession = getFirstUISession ( secondary , client . getConnectionId ( ) ) ; "<AssertPlaceHolder>" ; } wasRunnableExecuted ( org . eclipse . rap . rwt . service . UISession ) { return org . eclipse . rap . rwt . cluster . test . entrypoints . AsyncExecEntryPoint . ATTRIBUTE_VALUE . equals ( uiSession . getAttribute ( org . eclipse . rap . rwt . cluster . test . entrypoints . AsyncExecEntryPoint . ATTRIBUTE_NAME ) ) ; }
org . junit . Assert . assertTrue ( org . eclipse . rap . rwt . cluster . test . entrypoints . AsyncExecEntryPoint . wasRunnableExecuted ( secondaryUiSession ) )
two_$parent_nary_nin_string_array_returns_false_when_field_value_does_not_match_expression ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'field':'field6.nf7.$parent.$parent.field6.nf1','op':'$in','values':['blah','yada','nothere']}" ) ; com . redhat . lightblue . eval . QueryEvaluator qe = com . redhat . lightblue . eval . QueryEvaluator . getInstance ( q , md ) ; com . redhat . lightblue . eval . QueryEvaluationContext ctx = qe . evaluate ( jsonDoc ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return result ; }
org . junit . Assert . assertFalse ( ctx . getResult ( ) )
isNative ( ) { "<AssertPlaceHolder>" ; } isNative ( ) { org . junit . Assert . assertFalse ( "JavaPOSIX<sp>isNative<sp>should<sp>be<sp>false" , posix . isNative ( ) ) ; }
org . junit . Assert . assertFalse ( "JavaPOSIX<sp>isNative<sp>should<sp>be<sp>false" , posix . isNative ( ) )
testNullChangeToNotNullWithLists ( ) { db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "create<sp>class<sp>Test<sp>extends<sp>V" ) ) . execute ( ) ; db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "create<sp>property<sp>Test.names<sp>EMBEDDEDLIST<sp>STRING" ) ) . execute ( ) ; db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "create<sp>index<sp>Test.names<sp>on<sp>Test<sp>(names)<sp>fulltext<sp>engine<sp>lucene" ) ) . execute ( ) ; db . begin ( ) ; com . orientechnologies . orient . core . record . impl . ODocument doc = new com . orientechnologies . orient . core . record . impl . ODocument ( "Test" ) ; db . save ( doc ) ; db . commit ( ) ; db . begin ( ) ; doc . field ( "names" , new java . lang . String [ ] { "foo" } ) ; db . save ( doc ) ; db . commit ( ) ; com . orientechnologies . orient . core . index . OIndex < ? > index = db . getMetadata ( ) . getIndexManager ( ) . getIndex ( "Test.names" ) ; "<AssertPlaceHolder>" ; } getSize ( ) { while ( true ) { try { return storage . callIndexEngine ( false , false , indexId , new com . orientechnologies . orient . core . storage . impl . local . OIndexEngineCallback < java . lang . Long > ( ) { @ com . orientechnologies . lucene . index . Override public com . orientechnologies . lucene . index . Long callEngine ( com . orientechnologies . orient . core . index . engine . OBaseIndexEngine engine ) { com . orientechnologies . orient . core . storage . OBasicTransaction transaction = getDatabase ( ) . getMicroOrRegularTransaction ( ) ; com . orientechnologies . lucene . engine . OLuceneIndexEngine indexEngine = ( ( com . orientechnologies . lucene . engine . OLuceneIndexEngine ) ( engine ) ) ; return indexEngine . sizeInTx ( getTransactionChanges ( transaction ) ) ; } } ) ; } catch ( com . orientechnologies . orient . core . exception . OInvalidIndexEngineIdException e ) { doReloadIndexEngine ( ) ; } } }
org . junit . Assert . assertEquals ( 2 , index . getSize ( ) )
testBasicFunctions ( ) { displayer . init ( ) ; verify ( view , times ( 1 ) ) . init ( displayer ) ; displayer . show ( ) ; verify ( view ) . show ( ) ; displayer . hide ( ) ; verify ( view ) . hide ( ) ; displayer . getElement ( ) ; verify ( view ) . getElement ( ) ; "<AssertPlaceHolder>" ; displayer . dispose ( ) ; verify ( formRenderer ) . unBind ( ) ; displayer . destroy ( ) ; verify ( formRenderer , times ( 2 ) ) . unBind ( ) ; } getRenderer ( ) { return renderer ; }
org . junit . Assert . assertEquals ( formRenderer , displayer . getRenderer ( ) )
getIotHubStatusCodeMapsThrottledCorrectly ( ) { final int httpsStatus = 429 ; com . microsoft . azure . sdk . iot . device . IotHubStatusCode testStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . getIotHubStatusCode ( httpsStatus ) ; final com . microsoft . azure . sdk . iot . device . IotHubStatusCode expectedStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . THROTTLED ; "<AssertPlaceHolder>" ; } getIotHubStatusCode ( int ) { com . microsoft . azure . sdk . iot . device . IotHubStatusCode iotHubStatus ; switch ( httpsStatus ) { case 200 : iotHubStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . OK ; break ; case 204 : iotHubStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . OK_EMPTY ; break ; case 400 : iotHubStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . BAD_FORMAT ; break ; case 401 : iotHubStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . UNAUTHORIZED ; break ; case 403 : iotHubStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . TOO_MANY_DEVICES ; break ; case 404 : iotHubStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . HUB_OR_DEVICE_ID_NOT_FOUND ; break ; case 412 : iotHubStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . PRECONDITION_FAILED ; break ; case 413 : iotHubStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . REQUEST_ENTITY_TOO_LARGE ; break ; case 429 : iotHubStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . THROTTLED ; break ; case 500 : iotHubStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . INTERNAL_SERVER_ERROR ; break ; case 503 : iotHubStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . SERVER_BUSY ; break ; default : iotHubStatus = com . microsoft . azure . sdk . iot . device . IotHubStatusCode . ERROR ; } return iotHubStatus ; }
org . junit . Assert . assertThat ( testStatus , org . hamcrest . CoreMatchers . is ( expectedStatus ) )
testSetCytoscapeProperties ( ) { session = new org . cytoscape . session . CySession . Builder ( ) . properties ( getFakeProps ( ) ) . build ( ) ; "<AssertPlaceHolder>" ; checkProps ( session . getProperties ( ) ) ; } build ( ) { return new org . cytoscape . session . CySession ( this ) ; }
org . junit . Assert . assertNotNull ( session )
testCtor ( ) { System . out . println ( "ctor" ) ; javax . ws . rs . core . Cookie c = new javax . ws . rs . core . Cookie ( "name" , "value" ) ; javax . ws . rs . core . NewCookie nc = new javax . ws . rs . core . NewCookie ( c ) ; "<AssertPlaceHolder>" ; try { nc = new javax . ws . rs . core . NewCookie ( null ) ; org . junit . Assert . fail ( "Expected<sp>IllegalArgumentException" ) ; } catch ( java . lang . IllegalArgumentException e ) { } try { nc = new javax . ws . rs . core . NewCookie ( null , "comment" , 120 , true ) ; org . junit . Assert . fail ( "Expected<sp>IllegalArgumentException" ) ; } catch ( java . lang . IllegalArgumentException e ) { } } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( nc . getName ( ) , c . getName ( ) )
testCreateSegmentFile ( ) { java . io . File file = io . atomix . storage . journal . JournalSegmentFile . createSegmentFile ( "foo" , new java . io . File ( java . lang . System . getProperty ( "user.dir" ) ) , 1 ) ; "<AssertPlaceHolder>" ; } isSegmentFile ( java . lang . String , java . io . File ) { return io . atomix . storage . journal . JournalSegmentFile . isSegmentFile ( name , file . getName ( ) ) ; }
org . junit . Assert . assertTrue ( io . atomix . storage . journal . JournalSegmentFile . isSegmentFile ( "foo" , file ) )
shouldHaveSizeOfParentPlusOne ( ) { "<AssertPlaceHolder>" ; } size ( ) { return values . size ( ) ; }
org . junit . Assert . assertThat ( list . size ( ) , org . hamcrest . core . Is . is ( ( ( parent . size ( ) ) + 1 ) ) )
testExportImportContentWithNoReferences ( ) { com . liferay . journal . model . JournalArticle journalArticle = _addJournalArticle ( _getContent ( StringPool . BLANK ) , _getServiceContext ( ) ) ; exportImportStagedModel ( journalArticle ) ; com . liferay . journal . model . JournalArticle importedJournalArticle = ( ( com . liferay . journal . model . JournalArticle ) ( getStagedModel ( journalArticle . getUuid ( ) , liveGroup ) ) ) ; "<AssertPlaceHolder>" ; } getContent ( ) { return content ; }
org . junit . Assert . assertEquals ( journalArticle . getContent ( ) , importedJournalArticle . getContent ( ) )
initDefaultTimeZone ( ) { org . slim3 . tester . MockServletContext servletContext = new org . slim3 . tester . MockServletContext ( ) ; org . slim3 . controller . FrontController frontController = new org . slim3 . controller . FrontController ( ) ; servletContext . setInitParameter ( ControllerConstants . TIME_ZONE_KEY , "PST" ) ; frontController . servletContext = servletContext ; frontController . initDefaultTimeZone ( ) ; "<AssertPlaceHolder>" ; } initDefaultTimeZone ( ) { java . lang . String s = servletContext . getInitParameter ( ControllerConstants . TIME_ZONE_KEY ) ; if ( s != null ) { defaultTimeZone = java . util . TimeZone . getTimeZone ( s ) ; } }
org . junit . Assert . assertThat ( frontController . defaultTimeZone , org . hamcrest . CoreMatchers . is ( java . util . TimeZone . getTimeZone ( "PST" ) ) )
setIccid_stringLength20_noExceptions ( ) { request . setIccid ( stringLength20 ) ; "<AssertPlaceHolder>" ; } getIccid ( ) { return iccid ; }
org . junit . Assert . assertThat ( request . getIccid ( ) , org . hamcrest . CoreMatchers . equalTo ( stringLength20 ) )
testScaleTo_1 ( ) { final int nbBuckets = 10 ; final int maxHeight = 10 ; final int nbEvents = nbBuckets / 2 ; final org . eclipse . tracecompass . tmf . ui . views . histogram . HistogramBucket [ ] expectedResult = new org . eclipse . tracecompass . tmf . ui . views . histogram . HistogramBucket [ ] { org . eclipse . tracecompass . tmf . ui . tests . histogram . HistogramDataModelTest . _1 , org . eclipse . tracecompass . tmf . ui . tests . histogram . HistogramDataModelTest . _1 , org . eclipse . tracecompass . tmf . ui . tests . histogram . HistogramDataModelTest . _1 , org . eclipse . tracecompass . tmf . ui . tests . histogram . HistogramDataModelTest . _1 , org . eclipse . tracecompass . tmf . ui . tests . histogram . HistogramDataModelTest . _1 , org . eclipse . tracecompass . tmf . ui . tests . histogram . HistogramDataModelTest . _1 , org . eclipse . tracecompass . tmf . ui . tests . histogram . HistogramDataModelTest . _1 , org . eclipse . tracecompass . tmf . ui . tests . histogram . HistogramDataModelTest . _1 , org . eclipse . tracecompass . tmf . ui . tests . histogram . HistogramDataModelTest . _1 , org . eclipse . tracecompass . tmf . ui . tests . histogram . HistogramDataModelTest . _1 } ; org . eclipse . tracecompass . tmf . ui . views . histogram . HistogramDataModel model = new org . eclipse . tracecompass . tmf . ui . views . histogram . HistogramDataModel ( nbBuckets ) ; org . eclipse . tracecompass . tmf . ui . tests . histogram . HistogramDataModelTest . countEventsInModel ( nbEvents , model ) ; org . eclipse . tracecompass . tmf . ui . views . histogram . HistogramScaledData result = model . scaleTo ( nbBuckets , maxHeight , 1 ) ; "<AssertPlaceHolder>" ; org . eclipse . tracecompass . tmf . ui . tests . histogram . HistogramDataModelTest . testModelConsistency ( model , nbBuckets , nbEvents , 1 , 0 , 0 , ( nbEvents - 1 ) , nbBuckets ) ; } scaleTo ( int , int , int ) { if ( ( ( width <= 0 ) || ( height <= 0 ) ) || ( barWidth <= 0 ) ) { throw new java . lang . AssertionError ( ( ( ( ( ( ( "Invalid<sp>histogram<sp>dimensions<sp>(" + width ) + "x" ) + height ) + ",<sp>barWidth=" ) + barWidth ) + ")" ) ) ; } if ( ( fBucketDuration ) == 0 ) { throw new java . lang . IllegalStateException ( "Bucket<sp>width<sp>is<sp>0,<sp>that<sp>should<sp>be<sp>impossible" ) ; } org . eclipse . tracecompass . tmf . ui . views . histogram . HistogramScaledData result = new org . eclipse . tracecompass . tmf . ui . views . histogram . HistogramScaledData ( width , height , barWidth ) ; result . fMaxValue = 0 ; int nbBars = width / barWidth ; double bucketsPerBar = ( ( double ) ( fLastBucket ) ) / nbBars ; final long modelBucketStartTime = fFirstBucketTime ; final long modelBucketEndTime = fEndTime ; double bucketDuration = ( java . lang . Math . max ( ( modelBucketEndTime - modelBucketStartTime ) , 1 ) ) / ( ( double ) ( nbBars ) ) ; result . fBucketDuration = ( ( fLastBucket ) == 0 ) ? 0 : bucketDuration ; int scaledCount = 0 ; int scaledCountLostEvent = 0 ; int offset = ( ( int ) ( 0.5 / bucketDuration ) ) ; for ( int i = 0 ; i < ( result . fData . length ) ; i ++ ) { result . fData [ i ] = new org . eclipse . tracecompass . tmf . ui . views . histogram . HistogramBucket ( getNbTraces ( ) ) ; } for ( int modelIndex = 0 ; modelIndex <= ( fLastBucket ) ; modelIndex ++ ) { double done = ( ( double ) ( modelIndex ) ) / ( ( double ) ( fLastBucket ) ) ; double doneNext = ( ( double ) ( modelIndex + 1 ) ) / ( ( double ) ( fLastBucket ) ) ; final int scaledStart = java . lang . Math . max ( ( ( ( int ) ( done * nbBars ) ) - offset ) , 0 ) ; final int scaledEnd = java . lang . Math . min ( ( ( ( int ) ( doneNext * nbBars ) ) - offset ) , ( nbBars - 1 ) ) ; int scaledIndex = scaledStart ; final org . eclipse . tracecompass . tmf . ui . views . histogram . HistogramBucket currentModelBucket = fBuckets [ modelIndex ] ; final long lostEvents = fLostEventsBuckets [ modelIndex ] ; if ( ( currentModelBucket != null ) || ( lostEvents != 0 ) ) { do { scaledIndex = java . lang . Math . min ( scaledIndex , ( nbBars - 1 ) ) ; if ( ( result . fData [ scaledIndex ] . getNbEvents ( ) ) == 0 ) { scaledCount = 0 ; scaledCountLostEvent = 0 ; } if ( currentModelBucket != null ) { result . fData [ scaledIndex ] . add ( currentModelBucket ) ; scaledCount += currentModelBucket . getNbEvents ( ) ; if ( ! ( currentModelBucket . isEmpty ( ) ) ) { result . fLastBucket = scaledIndex ; } } result . fLostEventsData [ scaledIndex ] += lostEvents ; scaledCountLostEvent += lostEvents ; result . fMaxValue = java . lang . Math . max ( result . fMaxValue , scaledCount ) ; result . fMaxCombinedValue = java . lang . Math . max ( result . fMaxCombinedValue , ( scaledCount + scaledCountLostEvent ) ) ; scaledIndex ++ ; } while ( scaledIndex <
org . junit . Assert . assertArrayEquals ( expectedResult , result . fData )
shouldReturnEmptyStringOnToString ( ) { com . github . zafarkhaja . semver . MetadataVersion v = MetadataVersion . NULL ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . String message = java . lang . String . format ( "Unexpected<sp>character<sp>'%s(%s)'<sp>at<sp>position<sp>'%d'" , com . github . zafarkhaja . semver . VersionParser . CharType . forCharacter ( unexpected ) , unexpected , position ) ; if ( ( expected . length ) > 0 ) { message += java . lang . String . format ( ",<sp>expecting<sp>'%s'" , java . util . Arrays . toString ( expected ) ) ; } return message ; }
org . junit . Assert . assertTrue ( v . toString ( ) . isEmpty ( ) )
replace_2arg_NullValue ( ) { try { "<AssertPlaceHolder>" ; org . junit . Assert . fail ( "should<sp>have<sp>thrown<sp>an<sp>exception<sp>-<sp>null<sp>value<sp>not<sp>allowed" ) ; } catch ( java . lang . NullPointerException e ) { } } replace ( K , V ) { org . cache2k . processor . EntryProcessor < K , V , java . lang . Boolean > p = new org . cache2k . processor . EntryProcessor < K , V , java . lang . Boolean > ( ) { @ org . cache2k . test . core . Override public org . cache2k . test . core . Boolean process ( org . cache2k . processor . MutableCacheEntry < K , V > e ) throws org . cache2k . test . core . Exception { if ( ! ( e . exists ( ) ) ) { return false ; } e . setValue ( _newValue ) ; return true ; } } ; return invoke ( key , p ) ; }
org . junit . Assert . assertFalse ( cache . replace ( 1L , null ) )
maxCapacityShouldNotBeExceeded ( ) { com . graphhopper . jsprit . core . problem . vehicle . VehicleType type = VehicleTypeImpl . Builder . newInstance ( "type" ) . addCapacityDimension ( 0 , 100 ) . build ( ) ; com . graphhopper . jsprit . core . problem . vehicle . VehicleImpl vehicle = VehicleImpl . Builder . newInstance ( "veh" ) . setStartLocation ( Location . Builder . newInstance ( ) . setId ( "start" ) . setCoordinate ( com . graphhopper . jsprit . core . util . Coordinate . newInstance ( 0 , 0 ) ) . build ( ) ) . setType ( type ) . build ( ) ; com . graphhopper . jsprit . core . problem . job . Shipment shipment = Shipment . Builder . newInstance ( "s" ) . setPickupLocation ( Location . Builder . newInstance ( ) . setCoordinate ( com . graphhopper . jsprit . core . util . Coordinate . newInstance ( 10 , 0 ) ) . setId ( "pick" ) . build ( ) ) . setDeliveryLocation ( Location . Builder . newInstance ( ) . setId ( "del" ) . setCoordinate ( com . graphhopper . jsprit . core . util . Coordinate . newInstance ( 0 , 10 ) ) . build ( ) ) . addSizeDimension ( 0 , 100 ) . build ( ) ; com . graphhopper . jsprit . core . problem . job . Shipment another_shipment = Shipment . Builder . newInstance ( "another_s" ) . setPickupLocation ( Location . Builder . newInstance ( ) . setCoordinate ( com . graphhopper . jsprit . core . util . Coordinate . newInstance ( 10 , 0 ) ) . setId ( "pick" ) . build ( ) ) . setDeliveryLocation ( Location . Builder . newInstance ( ) . setId ( "del" ) . setCoordinate ( com . graphhopper . jsprit . core . util . Coordinate . newInstance ( 0 , 10 ) ) . build ( ) ) . addSizeDimension ( 0 , 50 ) . build ( ) ; com . graphhopper . jsprit . core . problem . solution . route . VehicleRoute iniRoute = VehicleRoute . Builder . newInstance ( vehicle ) . addPickup ( shipment ) . addDelivery ( shipment ) . build ( ) ; com . graphhopper . jsprit . core . problem . VehicleRoutingProblem vrp = VehicleRoutingProblem . Builder . newInstance ( ) . addJob ( shipment ) . addVehicle ( vehicle ) . addJob ( another_shipment ) . setFleetSize ( VehicleRoutingProblem . FleetSize . FINITE ) . addInitialVehicleRoute ( iniRoute ) . build ( ) ; com . graphhopper . jsprit . core . algorithm . VehicleRoutingAlgorithm vra = new com . graphhopper . jsprit . core . algorithm . box . GreedySchrimpfFactory ( ) . createAlgorithm ( vrp ) ; vra . setMaxIterations ( 10 ) ; java . util . Collection < com . graphhopper . jsprit . core . problem . solution . VehicleRoutingProblemSolution > solutions = vra . searchSolutions ( ) ; "<AssertPlaceHolder>" ; } secondActIsPickup ( java . util . Collection ) { com . graphhopper . jsprit . core . problem . solution . VehicleRoutingProblemSolution solution = com . graphhopper . jsprit . core . util . Solutions . bestOf ( solutions ) ; com . graphhopper . jsprit . core . problem . solution . route . activity . TourActivity secondAct = solution . getRoutes ( ) . iterator ( ) . next ( ) . getActivities ( ) . get ( 1 ) ; return secondAct instanceof com . graphhopper . jsprit . core . problem . solution . route . activity . PickupShipment ; }
org . junit . Assert . assertFalse ( secondActIsPickup ( solutions ) )
shouldReturnTrueForUnique ( ) { int [ ] nums = new int [ ] { 1 , 2 , 3 , 4 } ; "<AssertPlaceHolder>" ; } containsDuplicate ( int [ ] ) { java . util . Set < java . lang . Integer > set = new java . util . HashSet < java . lang . Integer > ( ) ; for ( int i = 0 ; i < ( nums . length ) ; i ++ ) { if ( ! ( set . add ( nums [ i ] ) ) ) { return true ; } } return false ; }
org . junit . Assert . assertFalse ( containsDuplicate . containsDuplicate ( nums ) )
shouldBeRelatedToEdgeIdWhenDestinationEqualsVertex ( ) { final java . lang . String source = "source" ; final java . lang . String destination = "destination" ; final uk . gov . gchq . gaffer . data . element . id . EntityId seed = new uk . gov . gchq . gaffer . operation . data . EntitySeed ( destination ) ; final uk . gov . gchq . gaffer . data . element . id . EdgeId relatedSeed = mock ( uk . gov . gchq . gaffer . data . element . id . EdgeId . class ) ; given ( relatedSeed . getSource ( ) ) . willReturn ( source ) ; given ( relatedSeed . getDestination ( ) ) . willReturn ( destination ) ; final boolean isRelated = seed . isRelated ( ( ( uk . gov . gchq . gaffer . data . element . id . ElementId ) ( relatedSeed ) ) ) . isMatch ( ) ; "<AssertPlaceHolder>" ; } getDestination ( ) { return destination ; }
org . junit . Assert . assertTrue ( isRelated )
eb19_notImplemented ( ) { try { org . apache . juneau . rest . client . remote . EndToEndInterfaceTest . ieb . notImplemented ( ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . juneau . rest . client . remote . NotImplemented e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return msg ; }
org . junit . Assert . assertEquals ( "foo" , e . getMessage ( ) )