input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
isGreaterThanWorking ( ) { if ( isBatoo ( ) ) { return ; } final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityTwo<sp>r<sp>" + "<sp>where<sp>r.stringAttribute<sp>in<sp>(select<sp>sub.stringAttribute<sp>from<sp>RegularEntityTwo<sp>sub<sp>where<sp>sub.id<sp>><sp>2)" ; final java . util . List < com . uaihebert . model . test . RegularEntityTwo > resultFromJPQL = jpqlHelper . getListFromJPQL ( query , com . uaihebert . model . test . RegularEntityTwo . class ) ; "<AssertPlaceHolder>" ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityTwo > uaiCriteria = createCriteria ( com . uaihebert . model . test . RegularEntityTwo . class ) ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityTwo > subQuery = uaiCriteria . subQuery ( "stringAttribute" , com . uaihebert . model . test . RegularEntityTwo . class ) ; subQuery . andGreaterThan ( "id" , 2L ) ; uaiCriteria . andAttributeIn ( "stringAttribute" , subQuery ) ; validateTestLists ( resultFromJPQL , uaiCriteria . getResultList ( ) ) ; } getListFromJPQL ( java . lang . String , java . lang . Class ) { return getListFromJPQL ( query , classToUse , null ) ; }
org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) > 0 ) )
testStaticSetRanges ( ) { int N = 256 ; for ( int end = 1 ; end < N ; ++ end ) { for ( int start = 0 ; start < end ; ++ start ) { org . roaringbitmap . buffer . MutableRoaringBitmap bs1 = new org . roaringbitmap . buffer . MutableRoaringBitmap ( ) ; for ( int k = start ; k < end ; ++ k ) { bs1 . add ( k ) ; } org . roaringbitmap . buffer . MutableRoaringBitmap bs2 = new org . roaringbitmap . buffer . MutableRoaringBitmap ( ) ; bs2 = org . roaringbitmap . buffer . MutableRoaringBitmap . add ( bs2 , ( ( long ) ( start ) ) , ( ( long ) ( end ) ) ) ; "<AssertPlaceHolder>" ; } } } add ( org . roaringbitmap . buffer . MutableRoaringBitmap , long , long ) { org . roaringbitmap . buffer . MutableRoaringBitmap . rangeSanityCheck ( rangeStart , rangeEnd ) ; if ( rangeStart >= rangeEnd ) { return rb . clone ( ) ; } final int hbStart = org . roaringbitmap . buffer . BufferUtil . toIntUnsigned ( org . roaringbitmap . buffer . BufferUtil . highbits ( rangeStart ) ) ; final int lbStart = org . roaringbitmap . buffer . BufferUtil . toIntUnsigned ( org . roaringbitmap . buffer . BufferUtil . lowbits ( rangeStart ) ) ; final int hbLast = org . roaringbitmap . buffer . BufferUtil . toIntUnsigned ( org . roaringbitmap . buffer . BufferUtil . highbits ( ( rangeEnd - 1 ) ) ) ; final int lbLast = org . roaringbitmap . buffer . BufferUtil . toIntUnsigned ( org . roaringbitmap . buffer . BufferUtil . lowbits ( ( rangeEnd - 1 ) ) ) ; org . roaringbitmap . buffer . MutableRoaringBitmap answer = new org . roaringbitmap . buffer . MutableRoaringBitmap ( ) ; ( ( org . roaringbitmap . buffer . MutableRoaringArray ) ( answer . highLowContainer ) ) . appendCopiesUntil ( rb . highLowContainer , ( ( short ) ( hbStart ) ) ) ; if ( hbStart == hbLast ) { final int i = rb . highLowContainer . getIndex ( ( ( short ) ( hbStart ) ) ) ; final org . roaringbitmap . buffer . MappeableContainer c = ( i >= 0 ) ? rb . highLowContainer . getContainerAtIndex ( i ) . add ( lbStart , ( lbLast + 1 ) ) : org . roaringbitmap . buffer . MappeableContainer . rangeOfOnes ( lbStart , ( lbLast + 1 ) ) ; ( ( org . roaringbitmap . buffer . MutableRoaringArray ) ( answer . highLowContainer ) ) . append ( ( ( short ) ( hbStart ) ) , c ) ; ( ( org . roaringbitmap . buffer . MutableRoaringArray ) ( answer . highLowContainer ) ) . appendCopiesAfter ( rb . highLowContainer , ( ( short ) ( hbLast ) ) ) ; return answer ; } int ifirst = rb . highLowContainer . getIndex ( ( ( short ) ( hbStart ) ) ) ; int ilast = rb . highLowContainer . getIndex ( ( ( short ) ( hbLast ) ) ) ; { final org . roaringbitmap . buffer . MappeableContainer c = ( ifirst >= 0 ) ? rb . highLowContainer . getContainerAtIndex ( ifirst ) . add ( lbStart , ( ( org . roaringbitmap . buffer . BufferUtil . maxLowBitAsInteger ( ) ) + 1 ) ) : org . roaringbitmap . buffer . MappeableContainer . rangeOfOnes ( lbStart , ( ( org . roaringbitmap . buffer . BufferUtil . maxLowBitAsInteger ( ) ) + 1 ) ) ; ( ( org . roaringbitmap . buffer . MutableRoaringArray ) ( answer . highLowContainer ) ) . append ( ( ( short ) ( hbStart ) ) , c ) ; } for ( int hb = hbStart + 1 ; hb < hbLast ; ++ hb ) { org . roaringbitmap . buffer . MappeableContainer c = org . roaringbitmap . buffer . MappeableContainer . rangeOfOnes ( 0 , ( ( org . roaringbitmap . buffer . BufferUtil . maxLowBitAsInteger ( ) ) + 1 ) ) ; ( ( org . roaringbitmap . buffer . MutableRoaringArray ) ( answer . highLowContainer ) ) . append ( ( ( short ) ( hb ) ) , c ) ; } { final org . roaringbitmap . buffer . MappeableContainer c = ( ilast >= 0 ) ? rb . highLowContainer . getContainerAtIndex ( ilast ) . add ( 0 , ( lbLast + 1 ) ) : org . roaringbitmap . buffer . MappeableContainer . rangeOfOnes ( 0 , ( lbLast + 1 ) ) ; ( ( org . roaringbitmap . buffer . MutableRoaringArray ) ( answer . highLowContainer ) ) . append ( ( ( short ) ( hbLast ) ) , c ) ; } ( ( org . roaringbitmap . buffer . MutableRoaringArray ) ( answer . highLowContainer ) ) . appendCopiesAfter ( rb . highLowContainer , ( ( short ) ( hbLast ) ) ) ; return answer ; }
org . junit . Assert . assertEquals ( bs1 , bs2 )
testGetSaveAndRenameServiceCaller ( ) { final org . jboss . errai . common . client . api . Caller < ? extends org . uberfire . ext . editor . commons . service . support . SupportsSaveAndRename < org . guvnor . common . services . project . model . ProjectImports , org . guvnor . common . services . shared . metadata . model . Metadata > > serviceCaller = presenter . getSaveAndRenameServiceCaller ( ) ; "<AssertPlaceHolder>" ; } getSaveAndRenameServiceCaller ( ) { return projectDiagramResourceServiceCaller ; }
org . junit . Assert . assertEquals ( this . serviceCaller , serviceCaller )
updateServiceListContainsChargeableResellerService_noService ( ) { serviceListingBean . updateServiceListContainsChargeableResellerService ( new java . util . ArrayList < org . oscm . internal . vo . VOService > ( ) ) ; "<AssertPlaceHolder>" ; } isServiceListContainsChargeableResellerService ( ) { return serviceListContainsChargeableResellerService ; }
org . junit . Assert . assertFalse ( serviceListingBean . isServiceListContainsChargeableResellerService ( ) )
unicodeEscape ( ) { java . util . Map < java . lang . String , java . lang . String > actual = io . strimzi . operator . cluster . model . OrderedPropertiesTest . propertiesCompatibility ( "unicode=\\u0123X\\uAbBa" ) ; io . strimzi . operator . cluster . model . OrderedProperties expected = new io . strimzi . operator . cluster . model . OrderedProperties ( ) . addPair ( "unicode" , "ģXꮺ" ) ; "<AssertPlaceHolder>" ; } asMap ( ) { return pairs ; }
org . junit . Assert . assertEquals ( expected . asMap ( ) , actual )
shouldReturnEqualForSameInstance ( ) { org . eclipse . egit . ui . internal . synchronize . model . GitModelCache left = new org . eclipse . egit . ui . internal . synchronize . model . GitModelCache ( createModelRepository ( ) , lookupRepository ( leftRepoFile ) , null ) ; boolean actual = left . equals ( left ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } org . eclipse . egit . ui . CommitMessageWithCaretPosition other = ( ( org . eclipse . egit . ui . CommitMessageWithCaretPosition ) ( obj ) ) ; return ( ( caretPosition ) == ( other . caretPosition ) ) && ( java . util . Objects . equals ( message , other . message ) ) ; }
org . junit . Assert . assertTrue ( actual )
canEstimateRegressionParameters ( ) { double [ ] beta = regression . estimateRegressionParameters ( ) ; "<AssertPlaceHolder>" ; } getNumberOfRegressors ( ) { return ( x [ 0 ] . length ) + 1 ; }
org . junit . Assert . assertEquals ( getNumberOfRegressors ( ) , beta . length )
testAndereBetrokkenheid ( ) { nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView persoon = bouwHuidigeSituatie ( true , true ) ; org . springframework . test . util . ReflectionTestUtils . setField ( org . springframework . test . util . ReflectionTestUtils . getField ( persoon . getBetrokkenheden ( ) . iterator ( ) . next ( ) , "betrokkenheid" ) , "rol" , new nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortBetrokkenheidAttribuut ( nl . bzk . brp . model . algemeen . stamgegeven . kern . SoortBetrokkenheid . PARTNER ) ) ; java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteiten = brby0178 . voerRegelUit ( persoon , null , null , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , berichtEntiteiten . size ( ) )
givenAnnotatedLoginResult_whenSameApiToken_thenEqualInstances ( ) { java . lang . String theSameApiToken = "testapitoken" ; com . baeldung . lombok . intro . LoginResult loginResult1 = new com . baeldung . lombok . intro . LoginResult ( java . time . Instant . now ( ) , theSameApiToken , java . time . Duration . ofHours ( 1 ) , new java . net . URL ( "https://api.product.com/token-refresh" ) ) ; com . baeldung . lombok . intro . LoginResult loginResult2 = new com . baeldung . lombok . intro . LoginResult ( java . time . Instant . now ( ) , theSameApiToken , java . time . Duration . ofHours ( 2 ) , new java . net . URL ( "https://api.product.com/token-refresh-alt" ) ) ; "<AssertPlaceHolder>" ; } now ( ) { return java . time . LocalDateTime . now ( clock ) ; }
org . junit . Assert . assertEquals ( loginResult1 , loginResult2 )
testOnceFiresExactlyOnce ( ) { com . google . firebase . database . DatabaseReference ref = com . google . firebase . testing . IntegrationTestUtils . getRandomNode ( com . google . firebase . database . integration . EventTestIT . masterApp ) ; final java . util . concurrent . atomic . AtomicInteger called = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; ref . addListenerForSingleValueEvent ( new com . google . firebase . database . ValueEventListener ( ) { @ com . google . firebase . database . integration . Override public void onDataChange ( com . google . firebase . database . DataSnapshot snapshot ) { called . incrementAndGet ( ) ; } @ com . google . firebase . database . integration . Override public void onCancelled ( com . google . firebase . database . DatabaseError error ) { org . junit . Assert . fail ( "Should<sp>not<sp>be<sp>cancelled" ) ; } } ) ; com . google . firebase . database . core . ZombieVerifier . verifyRepoZombies ( ref ) ; ref . setValueAsync ( 42 ) ; ref . setValueAsync ( 84 ) ; new com . google . firebase . database . future . WriteFuture ( ref , null ) . timedGet ( ) ; "<AssertPlaceHolder>" ; com . google . firebase . database . core . ZombieVerifier . verifyRepoZombies ( ref ) ; } get ( ) { counter . incrementAndGet ( ) ; return supplier . get ( ) ; }
org . junit . Assert . assertEquals ( 1 , called . get ( ) )
testGetByteBodyContents_2 ( ) { org . jinstagram . http . Request fixture = new org . jinstagram . http . Request ( Verbs . DELETE , "" ) ; fixture . setConnectionKeepAlive ( true ) ; fixture . setCharset ( "UTF-8" ) ; fixture . addPayload ( ( ( java . lang . String ) ( null ) ) ) ; fixture . setConnection ( mockHttpConnection ) ; fixture . setProxy ( org . jinstagram . http . RequestTest . proxy ) ; byte [ ] result = fixture . getByteBodyContents ( ) ; "<AssertPlaceHolder>" ; } getByteBodyContents ( ) { java . lang . String body = ( ( payload ) != null ) ? payload : org . jinstagram . http . URLUtils . formURLEncodeMap ( bodyParams ) ; try { return body . getBytes ( getCharset ( ) ) ; } catch ( java . io . UnsupportedEncodingException uee ) { throw new org . jinstagram . auth . exceptions . OAuthException ( ( "Unsupported<sp>Charset:<sp>" + ( getCharset ( ) ) ) , uee ) ; } }
org . junit . Assert . assertNotNull ( result )
loginSucceeded ( ) { final java . lang . String userName = "mockUserName" ; final org . sentilo . common . cache . LRUCache < java . lang . String , java . lang . Integer > attemptsCache = ( ( org . sentilo . common . cache . LRUCache ) ( org . springframework . test . util . ReflectionTestUtils . getField ( loginService , "attemptsCache" ) ) ) ; loginService . loginSucceeded ( userName ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { return blockingQueue . contains ( o ) ; }
org . junit . Assert . assertFalse ( attemptsCache . contains ( userName ) )
string ( ) { com . groupon . lex . metrics . GroupName group_name = com . groupon . lex . metrics . GroupName . valueOf ( com . groupon . lex . metrics . GroupNameTest . PATH ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "SimpleMapEntry{" + ( key_ ) ) + "<sp>=><sp>" ) + ( value_ ) ) + '}' ; }
org . junit . Assert . assertEquals ( com . groupon . lex . metrics . GroupNameTest . PATH . toString ( ) , group_name . toString ( ) )
testFloatValueZero ( ) { java . lang . String a = "0" ; float result = 0.0F ; float aNumber = new java . math . BigInteger ( a ) . floatValue ( ) ; "<AssertPlaceHolder>" ; } floatValue ( ) { return value ; }
org . junit . Assert . assertTrue ( ( aNumber == result ) )
setMeasurand_energyActiveExportRegister_measurandIsSet ( ) { java . lang . String measurand = "Energy.Active.Export.Register" ; sampledValue . setMeasurand ( measurand ) ; "<AssertPlaceHolder>" ; } getMeasurand ( ) { return measurand ; }
org . junit . Assert . assertThat ( sampledValue . getMeasurand ( ) , org . hamcrest . CoreMatchers . equalTo ( measurand ) )
shards_data_should_be_ignored ( ) { com . lordofthejars . nosqlunit . mongodb . integration . WhenExpectedDataShouldBeCompared . mongoOperation . insert ( new java . io . ByteArrayInputStream ( com . lordofthejars . nosqlunit . mongodb . integration . WhenExpectedDataShouldBeCompared . DATA_SHARD . getBytes ( ) ) ) ; boolean isEquals = com . lordofthejars . nosqlunit . mongodb . integration . WhenExpectedDataShouldBeCompared . mongoOperation . databaseIs ( new java . io . ByteArrayInputStream ( com . lordofthejars . nosqlunit . mongodb . integration . WhenExpectedDataShouldBeCompared . DATA_SHARD_2 . getBytes ( ) ) ) ; "<AssertPlaceHolder>" ; } databaseIs ( java . io . InputStream ) { return compareData ( contentStream ) ; }
org . junit . Assert . assertThat ( isEquals , org . hamcrest . CoreMatchers . is ( true ) )
testCanGetAccessToAttendance ( ) { org . slc . sli . api . security . context . validator . Set < java . lang . String > studentIds = new org . slc . sli . api . security . context . validator . HashSet < java . lang . String > ( ) ; org . slc . sli . api . security . context . validator . Set < java . lang . String > attendances = new org . slc . sli . api . security . context . validator . HashSet < java . lang . String > ( ) ; org . slc . sli . api . security . context . validator . Map < java . lang . String , java . lang . Object > attendance1 = buildAttendanceForStudent ( "student123" , "school123" ) ; org . slc . sli . domain . Entity attendanceEntity1 = new org . slc . sli . domain . MongoEntity ( "attendance" , attendance1 ) ; attendances . add ( attendanceEntity1 . getEntityId ( ) ) ; studentIds . add ( "student123" ) ; org . mockito . Mockito . when ( mockRepo . findAll ( org . mockito . Mockito . eq ( EntityNames . ATTENDANCE ) , org . mockito . Mockito . any ( org . slc . sli . domain . NeutralQuery . class ) ) ) . thenReturn ( org . slc . sli . api . security . context . validator . Arrays . asList ( attendanceEntity1 ) ) ; org . mockito . Mockito . when ( staffToStudentValidator . validate ( EntityNames . STUDENT , studentIds ) ) . thenReturn ( studentIds ) ; "<AssertPlaceHolder>" ; } validate ( java . lang . String , org . slc . sli . api . security . context . validator . Set ) { if ( ! ( areParametersValid ( EntityNames . STAFF , entityName , staffIds ) ) ) { return Collections . EMPTY_SET ; } org . slc . sli . api . security . context . validator . Set < java . lang . String > validIds = new org . slc . sli . api . security . context . validator . HashSet < java . lang . String > ( ) ; org . slc . sli . domain . NeutralQuery basicQuery = new org . slc . sli . domain . NeutralQuery ( new org . slc . sli . domain . NeutralCriteria ( "staffReference" , org . slc . sli . domain . NeutralCriteria . CRITERIA_IN , staffIds ) ) ; basicQuery . setIncludeFields ( org . slc . sli . api . security . context . validator . Arrays . asList ( "educationOrganizationReference" , "staffReference" ) ) ; org . slc . sli . api . security . context . validator . TransitiveStaffToStaffValidator . LOG . info ( "Attempting<sp>to<sp>validate<sp>transitively<sp>from<sp>staff<sp>to<sp>staff<sp>with<sp>ids<sp>{}" , staffIds ) ; injectEndDateQuery ( basicQuery ) ; java . lang . Iterable < org . slc . sli . domain . Entity > edOrgAssoc = repo . findAll ( EntityNames . STAFF_ED_ORG_ASSOCIATION , basicQuery ) ; org . slc . sli . api . security . context . validator . Map < java . lang . String , org . slc . sli . api . security . context . validator . Set < java . lang . String > > staffEdorgMap = new org . slc . sli . api . security . context . validator . HashMap < java . lang . String , org . slc . sli . api . security . context . validator . Set < java . lang . String > > ( ) ; populateMapFromMongoResponse ( staffEdorgMap , edOrgAssoc ) ; org . slc . sli . api . security . context . validator . Set < java . lang . String > edOrgLineage = getStaffEdOrgLineage ( ) ; if ( ( edOrgLineage . isEmpty ( ) ) || ( staffEdorgMap . isEmpty ( ) ) ) { return Collections . EMPTY_SET ; } for ( java . util . Map . Entry < java . lang . String , org . slc . sli . api . security . context . validator . Set < java . lang . String > > entry : staffEdorgMap . entrySet ( ) ) { org . slc . sli . api . security . context . validator . Set < java . lang . String > tmpSet = new org . slc . sli . api . security . context . validator . HashSet < java . lang . String > ( entry . getValue ( ) ) ; tmpSet . retainAll ( edOrgLineage ) ; if ( ( tmpSet . size ( ) ) != 0 ) { validIds . add ( entry . getKey ( ) ) ; } } validIds . addAll ( validateThrough ( EntityNames . STAFF_PROGRAM_ASSOCIATION , "programId" ) ) ; validIds . addAll ( validateThrough ( EntityNames . STAFF_COHORT_ASSOCIATION , "cohortId" ) ) ; basicQuery = new org . slc . sli . domain . NeutralQuery ( new org . slc . sli . domain . NeutralCriteria ( "_id" , "in" , edOrgLineage ) ) ; java . lang . Iterable < org . slc . sli . domain . Entity > edorgs = repo . findAll ( EntityNames . EDUCATION_ORGANIZATION , basicQuery ) ; org . slc . sli . api . security . context . validator . List < java . lang . String > programs = new org . slc . sli . api . security . context . validator . ArrayList < java . lang . String > ( ) ; for ( org . slc . sli . domain . Entity e : edorgs ) { java . lang . Object value = e . getBody ( ) . get ( "programReference" ) ; if ( value != null ) { if ( org . slc .
org . junit . Assert . assertTrue ( validator . validate ( EntityNames . ATTENDANCE , attendances ) . equals ( attendances ) )
testValidateXMLNoentity ( ) { java . lang . String metadataInvalid = com . onelogin . saml2 . util . Util . getFileAsString ( "data/metadata/noentity_metadata_settings1.xml" ) ; org . w3c . dom . Document docMetadataInvalid = com . onelogin . saml2 . util . Util . loadXML ( metadataInvalid ) ; boolean isValid = com . onelogin . saml2 . util . Util . validateXML ( docMetadataInvalid , SchemaFactory . SAML_SCHEMA_METADATA_2_0 ) ; "<AssertPlaceHolder>" ; } validateXML ( org . w3c . dom . Document , java . net . URL ) { try { if ( xmlDocument == null ) { throw new java . lang . IllegalArgumentException ( "xmlDocument<sp>was<sp>null" ) ; } javax . xml . validation . Schema schema = com . onelogin . saml2 . util . SchemaFactory . loadFromUrl ( schemaUrl ) ; javax . xml . validation . Validator validator = schema . newValidator ( ) ; if ( com . onelogin . saml2 . util . Util . JAXP_15_SUPPORTED ) { validator . setProperty ( XMLConstants . ACCESS_EXTERNAL_DTD , "" ) ; validator . setProperty ( XMLConstants . ACCESS_EXTERNAL_SCHEMA , "" ) ; } com . onelogin . saml2 . util . XMLErrorAccumulatorHandler errorAcumulator = new com . onelogin . saml2 . util . XMLErrorAccumulatorHandler ( ) ; validator . setErrorHandler ( errorAcumulator ) ; javax . xml . transform . Source xmlSource = new javax . xml . transform . dom . DOMSource ( xmlDocument ) ; validator . validate ( xmlSource ) ; final boolean isValid = ! ( errorAcumulator . hasError ( ) ) ; if ( ! isValid ) { com . onelogin . saml2 . util . Util . LOGGER . warn ( ( "Errors<sp>found<sp>when<sp>validating<sp>SAML<sp>response<sp>with<sp>schema:<sp>" + ( errorAcumulator . getErrorXML ( ) ) ) ) ; } return isValid ; } catch ( java . lang . Exception e ) { com . onelogin . saml2 . util . Util . LOGGER . warn ( ( "Error<sp>executing<sp>validateXML:<sp>" + ( e . getMessage ( ) ) ) , e ) ; return false ; } }
org . junit . Assert . assertFalse ( isValid )
shouldFindShortestPathsWithStartEndVertexFilter ( ) { final org . apache . tinkerpop . gremlin . process . computer . ComputerResult result = graph . compute ( graphProvider . getGraphComputer ( graph ) . getClass ( ) ) . program ( org . apache . tinkerpop . gremlin . process . computer . search . path . ShortestPathVertexProgram . build ( ) . source ( __ . has ( "name" , "marko" ) ) . target ( __ . hasLabel ( "software" ) ) . create ( graph ) ) . submit ( ) . get ( ) ; "<AssertPlaceHolder>" ; final org . apache . tinkerpop . gremlin . process . computer . search . path . List < org . apache . tinkerpop . gremlin . process . traversal . Path > shortestPaths = result . memory ( ) . get ( ShortestPathVertexProgram . SHORTEST_PATHS ) ; final org . apache . tinkerpop . gremlin . process . computer . search . path . List < org . apache . tinkerpop . gremlin . process . traversal . Path > expected = org . apache . tinkerpop . gremlin . process . computer . search . path . Arrays . stream ( org . apache . tinkerpop . gremlin . process . computer . search . path . ShortestPathVertexProgramTest . ALL_SHORTEST_PATHS ) . filter ( ( p ) -> ( p [ 0 ] . equals ( "marko" ) ) && ( org . apache . tinkerpop . gremlin . process . computer . search . path . Arrays . asList ( "lop" , "ripple" ) . contains ( p [ ( p . length - 1 ) ] ) ) ) . map ( helper :: makePath ) . collect ( java . util . stream . Collectors . toList ( ) ) ; helper . checkResults ( expected , shortestPaths ) ; } memory ( ) { return this . memory ; }
org . junit . Assert . assertTrue ( result . memory ( ) . exists ( ShortestPathVertexProgram . SHORTEST_PATHS ) )
testOpenOpenDescending ( ) { org . apache . commons . functor . range . FloatRange range = org . apache . commons . functor . range . Ranges . floatRange ( 5.0F , BoundType . OPEN , ( - 5.0F ) , BoundType . OPEN , ( - 3.0F ) ) ; java . util . List < java . lang . Float > expected = java . util . Arrays . asList ( 2.0F , ( - 1.0F ) , ( - 4.0F ) ) ; java . util . Collection < java . lang . Float > elements = org . apache . commons . functor . generator . loop . IteratorToGeneratorAdapter . adapt ( range ) . toCollection ( ) ; "<AssertPlaceHolder>" ; } toCollection ( ) { return new org . apache . commons . functor . generator . util . CollectionTransformer < E , java . util . Collection < E > > ( new java . util . ArrayList < E > ( ) ) ; }
org . junit . Assert . assertEquals ( expected , elements )
testHandleNotifyExpand ( ) { org . eclipse . nebula . widgets . grid . Grid spyGrid = spy ( grid ) ; handler = new org . eclipse . nebula . widgets . grid . internal . gridkit . GridOperationHandler ( spyGrid ) ; org . eclipse . nebula . widgets . grid . GridItem item = new org . eclipse . nebula . widgets . grid . GridItem ( spyGrid , org . eclipse . swt . SWT . NONE ) ; org . eclipse . rap . json . JsonObject properties = new org . eclipse . rap . json . JsonObject ( ) . add ( "item" , getId ( item ) ) ; handler . handleNotify ( org . eclipse . nebula . widgets . grid . internal . gridkit . EVENT_EXPAND , properties ) ; org . mockito . ArgumentCaptor < org . eclipse . swt . widgets . Event > captor = org . mockito . ArgumentCaptor . forClass ( org . eclipse . swt . widgets . Event . class ) ; verify ( spyGrid ) . notifyListeners ( eq ( SWT . Expand ) , captor . capture ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( item , captor . getValue ( ) . item )
saveReturnEntity ( ) { org . fastquery . bean . UserInfo u1 = new org . fastquery . bean . UserInfo ( "" , 2558 ) ; org . fastquery . bean . UserInfo u2 = db . save ( u1 ) ; org . fastquery . test . DefaultMethodTest . LOG . debug ( "{}" , u2 ) ; long id = u2 . getId ( ) ; int effect = db . delete ( "UserInfo" , "id" , id ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertThat ( effect , is ( 1 ) )
testLocalSauvola ( ) { ops . run ( net . imagej . ops . threshold . localSauvola . LocalSauvolaThreshold . class , out , in , new net . imglib2 . algorithm . neighborhood . RectangleShape ( 2 , false ) , new net . imglib2 . outofbounds . OutOfBoundsMirrorFactory < net . imglib2 . type . numeric . integer . ByteType , net . imglib2 . img . Img < net . imglib2 . type . numeric . integer . ByteType > > ( net . imglib2 . outofbounds . OutOfBoundsMirrorFactory . Boundary . SINGLE ) , 0.5 , 0.5 ) ; "<AssertPlaceHolder>" ; } firstElement ( ) { return cursor ( ) . next ( ) ; }
org . junit . Assert . assertEquals ( false , out . firstElement ( ) . get ( ) )
dispatchVServerManualOperation_VSERVER_CREATION ( ) { paramHandler . setOperation ( Operation . VSERVER_CREATION ) ; org . oscm . app . iaas . data . FlowState newState = null ; setParameters ( ) ; doReturn ( "" ) . when ( platformService ) . getEventServiceUrl ( ) ; newState = vServerProcessor . dispatchVServerManualOperation ( "controllerId" , "instanceId" , paramHandler , "mail" ) ; "<AssertPlaceHolder>" ; } dispatchVServerManualOperation ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , java . lang . String ) { java . lang . String subscriptionId = paramHandler . getSettings ( ) . getOriginalSubscriptionId ( ) ; java . lang . String locale = getTechnicalProviderLocale ( controllerId , paramHandler ) ; if ( Operation . VSERVER_CREATION . equals ( paramHandler . getOperation ( ) ) ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . MANUAL , paramHandler ) ) { java . lang . StringBuffer eventLink = new java . lang . StringBuffer ( platformService . getEventServiceUrl ( ) ) ; eventLink . append ( "?sid=" ) . append ( java . net . URLEncoder . encode ( instanceId , "mail_VSERVER_VDISK_CREATION_manual_modification.subject" 0 ) ) ; eventLink . append ( "&cid=" ) . append ( controllerId ) ; eventLink . append ( "&command=finish" ) ; java . lang . String subject = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_manual_completion.subject" , instanceId , subscriptionId ) ; java . lang . String details = paramHandler . getConfigurationAsString ( ) ; java . lang . String text = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_manual_completion.text" , instanceId , subscriptionId , details , eventLink . toString ( ) ) ; platformService . sendMail ( java . util . Collections . singletonList ( mail ) , subject , text ) ; return org . oscm . app . iaas . data . FlowState . MANUAL ; } } else if ( Operation . VSERVER_MODIFICATION . equals ( paramHandler . getOperation ( ) ) ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { java . lang . String subject = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_VDISK_CREATION_manual_modification.subject" 1 , instanceId , subscriptionId ) ; java . lang . String details = paramHandler . getConfigurationAsString ( ) ; java . lang . String text = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_manual_modification.text" , instanceId , subscriptionId , details ) ; platformService . sendMail ( java . util . Collections . singletonList ( mail ) , subject , text ) ; return org . oscm . app . iaas . data . FlowState . FINISHED ; } } else if ( Operation . VSERVER_MODIFICATION_VDISK_CREATION . equals ( paramHandler . getOperation ( ) ) ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { java . lang . String subject = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_VDISK_CREATION_manual_modification.subject" , instanceId , subscriptionId ) ; java . lang . String details = paramHandler . getConfigurationAsString ( ) ; java . lang . String text = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_VDISK_CREATION_manual_modification.text" , instanceId , subscriptionId , details ) ; platformService . sendMail ( java . util . Collections . singletonList ( mail ) , subject , text ) ; return org . oscm . app . iaas . data . FlowState . FINISHED ; } } else if ( Operation . VSERVER_MODIFICATION_VDISK_DELETION . equals ( paramHandler . getOperation ( ) ) ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { java . lang . String subject = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_VDISK_DELETION_manual_modification.subject" , instanceId , subscriptionId ) ; java . lang . String details = paramHandler . getConfigurationAsString ( ) ; java . lang . String text = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_VDISK_DELETION_manual_modification.text" , instanceId , subscriptionId , details ) ; platformService . sendMail ( java . util . Collections . singletonList ( mail ) , subject , text ) ; return org . oscm . app . iaas . data . FlowState . FINISHED ; } } else if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { return org . oscm . app . iaas . data . FlowState . FINISHED ; } return null ; }
org . junit . Assert . assertEquals ( FlowState . MANUAL , newState )
testLoadEmptyProperties ( ) { com . liferay . portal . configuration . ConfigurationImplTest . TestResourceClassLoader testResourceClassLoader = new com . liferay . portal . configuration . ConfigurationImplTest . TestResourceClassLoader ( ) ; testResourceClassLoader . addPropertiesResource ( com . liferay . portal . configuration . ConfigurationImplTest . class . getName ( ) , StringPool . BLANK ) ; com . liferay . portal . configuration . ConfigurationImpl configurationImpl = new com . liferay . portal . configuration . ConfigurationImpl ( testResourceClassLoader , com . liferay . portal . configuration . ConfigurationImplTest . class . getName ( ) , com . liferay . portal . kernel . model . CompanyConstants . SYSTEM , null ) ; java . util . Properties properties = configurationImpl . getProperties ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( properties . isEmpty ( ) )
withDocumentSnapshotCursor ( ) { doAnswer ( com . google . cloud . firestore . LocalFirestoreHelper . queryResponse ( ) ) . when ( firestoreMock ) . streamRequest ( runQuery . capture ( ) , streamObserverCapture . capture ( ) , org . mockito . Matchers . < com . google . api . gax . rpc . ServerStreamingCallable > any ( ) ) ; query . startAt ( com . google . cloud . firestore . LocalFirestoreHelper . SINGLE_FIELD_SNAPSHOT ) . get ( ) ; com . google . firestore . v1 . Value documentBoundary = com . google . firestore . v1 . Value . newBuilder ( ) . setReferenceValue ( ( ( query . getResourcePath ( ) . toString ( ) ) + "/doc" ) ) . build ( ) ; com . google . firestore . v1 . RunQueryRequest queryRequest = com . google . cloud . firestore . LocalFirestoreHelper . query ( com . google . cloud . firestore . LocalFirestoreHelper . order ( "__name__" , StructuredQuery . Direction . ASCENDING ) , com . google . cloud . firestore . LocalFirestoreHelper . startAt ( documentBoundary , true ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( queryRequest , runQuery . getValue ( ) )
callingAutomationSendsAnHttpRequest ( ) { client . setResponse ( "application/json+nxentity" , HttpResponses . DOC_WORKSPACE ) ; org . nuxeo . ecm . automation . client . Session session = client . getSession ( "Administrator" , "Administrator" ) ; org . nuxeo . ecm . automation . client . model . Documents docs = ( ( org . nuxeo . ecm . automation . client . model . Documents ) ( session . newRequest ( "Document.Query" ) . set ( "query" , "SELECT<sp>*<sp>FROM<sp>Document" ) . execute ( ) ) ) ; "<AssertPlaceHolder>" ; client . shutdown ( ) ; } size ( ) { return vars . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( docs . size ( ) ) > 0 ) )
shouldCorrectlyExecuteScoreOperationChainWhenNamedOperationScoreIsNull ( ) { final uk . gov . gchq . gaffer . store . operation . handler . ScoreOperationChainHandler handler = new uk . gov . gchq . gaffer . store . operation . handler . ScoreOperationChainHandler ( ) ; final java . util . Map < java . lang . Class < ? extends uk . gov . gchq . gaffer . operation . Operation > , uk . gov . gchq . gaffer . store . operation . resolver . ScoreResolver > resolvers = new java . util . HashMap ( ) ; final uk . gov . gchq . gaffer . store . operation . resolver . ScoreResolver scoreResolver = mock ( uk . gov . gchq . gaffer . store . operation . resolver . named . NamedOperationScoreResolver . class ) ; final uk . gov . gchq . gaffer . store . Context context = mock ( uk . gov . gchq . gaffer . store . Context . class ) ; final uk . gov . gchq . gaffer . store . Store store = mock ( uk . gov . gchq . gaffer . store . Store . class ) ; final uk . gov . gchq . gaffer . user . User user = mock ( uk . gov . gchq . gaffer . user . User . class ) ; final uk . gov . gchq . gaffer . operation . impl . ScoreOperationChain scoreOperationChain = mock ( uk . gov . gchq . gaffer . operation . impl . ScoreOperationChain . class ) ; final uk . gov . gchq . gaffer . store . StoreProperties storeProperties = new uk . gov . gchq . gaffer . store . StoreProperties ( ) ; final uk . gov . gchq . gaffer . operation . impl . get . GetAdjacentIds op1 = mock ( uk . gov . gchq . gaffer . operation . impl . get . GetAdjacentIds . class ) ; final uk . gov . gchq . gaffer . operation . impl . get . GetElements op2 = mock ( uk . gov . gchq . gaffer . operation . impl . get . GetElements . class ) ; final uk . gov . gchq . gaffer . operation . impl . Limit op3 = mock ( uk . gov . gchq . gaffer . operation . impl . Limit . class ) ; final java . util . Map < java . lang . Class < ? extends uk . gov . gchq . gaffer . operation . Operation > , java . lang . Integer > opScores = new java . util . LinkedHashMap ( ) ; opScores . put ( uk . gov . gchq . gaffer . operation . impl . get . GetAdjacentIds . class , 3 ) ; opScores . put ( uk . gov . gchq . gaffer . operation . impl . get . GetElements . class , 2 ) ; opScores . put ( uk . gov . gchq . gaffer . operation . impl . Limit . class , 1 ) ; handler . setOpScores ( opScores ) ; final java . lang . String opName = "basicOp" ; final uk . gov . gchq . gaffer . named . operation . NamedOperation < java . lang . Iterable < ? extends uk . gov . gchq . gaffer . data . element . Element > , java . lang . Iterable < ? extends uk . gov . gchq . gaffer . data . element . Element > > namedOp = mock ( uk . gov . gchq . gaffer . named . operation . NamedOperation . class ) ; namedOp . setOperationName ( opName ) ; resolvers . put ( namedOp . getClass ( ) , scoreResolver ) ; handler . setScoreResolvers ( resolvers ) ; given ( scoreResolver . getScore ( eq ( namedOp ) , any ( ) ) ) . willReturn ( null ) ; final uk . gov . gchq . gaffer . operation . OperationChain opChain = new uk . gov . gchq . gaffer . operation . OperationChain ( java . util . Arrays . asList ( op1 , op2 , op3 , namedOp ) ) ; given ( context . getUser ( ) ) . willReturn ( user ) ; java . util . Set < java . lang . String > opAuths = new java . util . HashSet ( ) ; opAuths . add ( "TEST_USER" ) ; given ( user . getOpAuths ( ) ) . willReturn ( opAuths ) ; given ( scoreOperationChain . getOperationChain ( ) ) . willReturn ( opChain ) ; given ( store . getProperties ( ) ) . willReturn ( storeProperties ) ; final java . lang . Object result = handler . doOperation ( new uk . gov . gchq . gaffer . operation . impl . ScoreOperationChain . Builder ( ) . operationChain ( opChain ) . build ( ) , context , store ) ; "<AssertPlaceHolder>" ; } build ( ) { return new uk . gov . gchq . gaffer . user . User ( userId , dataAuths , opAuths ) ; }
org . junit . Assert . assertEquals ( 7 , result )
testToString ( ) { com . cedarsoftware . util . TrackingMap < java . lang . String , java . lang . Object > map = new com . cedarsoftware . util . TrackingMap ( mockedBackingMap ) ; "<AssertPlaceHolder>" ; } toString ( ) { return map . keySet ( ) . toString ( ) ; }
org . junit . Assert . assertNotNull ( map . toString ( ) )
anyOf ( ) { "<AssertPlaceHolder>" ; } or ( com . querydsl . core . types . dsl . Predicate ) { right = ( ( com . querydsl . core . types . dsl . Predicate ) ( com . querydsl . core . types . dsl . ExpressionUtils . extract ( right ) ) ) ; if ( right != null ) { return com . querydsl . core . types . dsl . Expressions . booleanOperation ( Ops . OR , mixin , right ) ; } else { return this ; } }
org . junit . Assert . assertEquals ( a . or ( b ) . or ( c ) , com . querydsl . core . types . dsl . Expressions . anyOf ( a , b , c ) )
testDensity ( ) { double [ ] points = new double [ ] { - 2.0 , - 1.0 , 0.0 , 1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 , 7.0 , 8.0 } ; double [ ] results = new double [ ] { 0 , 0.2 , 0 , 0 , 0 , 0.5 , 0 , 0 , 0 , 0.3 , 0 } ; for ( int p = 0 ; p < ( points . length ) ; p ++ ) { double density = testDistribution . density ( points [ p ] ) ; "<AssertPlaceHolder>" ; } } density ( double ) { if ( x < ( mu ) ) { return Double . NaN ; } final double delta = x - ( mu ) ; final double f = ( halfC ) / delta ; return ( ( org . hipparchus . util . FastMath . sqrt ( ( f / ( org . hipparchus . util . FastMath . PI ) ) ) ) * ( org . hipparchus . util . FastMath . exp ( ( - f ) ) ) ) / delta ; }
org . junit . Assert . assertEquals ( results [ p ] , density , 0.0 )
extractsAssertion ( ) { gov . hhs . fha . nhinc . common . nhinccommon . AssertionType mock = mock ( gov . hhs . fha . nhinc . common . nhinccommon . AssertionType . class ) ; builder . setArguments ( mock ) ; "<AssertPlaceHolder>" ; } getAssertion ( ) { return assertionType ; }
org . junit . Assert . assertEquals ( mock , builder . getAssertion ( ) . get ( ) )
testTwoSeriesPerIsin ( ) { "<AssertPlaceHolder>" ; } getAvailableSeries ( ) { return series ; }
org . junit . Assert . assertEquals ( instance . getAvailableSeries ( ) . size ( ) , 4 )
whenDomPersistedTheLoadFunctionReturnsTheSameDom ( ) { java . lang . String dom = "Some<sp>DOM<sp>string" ; builder . persistDom ( "test-state" , dom ) ; "<AssertPlaceHolder>" ; } getDom ( java . lang . String ) { try { return com . google . common . io . Files . toString ( new java . io . File ( doms , ( name + ".html" ) ) , Charsets . UTF_8 ) ; } catch ( java . io . IOException e ) { return "Could<sp>not<sp>load<sp>DOM:<sp>" + ( e . getLocalizedMessage ( ) ) ; } }
org . junit . Assert . assertThat ( builder . getDom ( "test-state" ) , org . hamcrest . core . Is . is ( dom ) )
testNederlandseNationaliteitWelNamenreeks ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > overtreders = brby0151 . voerRegelUit ( bouwHuidigeSituatie ( true ) , bouwNieuweSituatie ( NationaliteitcodeAttribuut . NL_NATIONALITEIT_CODE ) , null , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , overtreders . size ( ) )
setSubscriptionOwnerTest_emptyOwner ( ) { final java . lang . String ownerId = "" ; final java . lang . String tenantId = "someTenantId" ; org . oscm . domobjects . Tenant tenant = new org . oscm . domobjects . Tenant ( ) ; tenant . setTenantId ( tenantId ) ; org . oscm . domobjects . Organization organization = new org . oscm . domobjects . Organization ( ) ; organization . setKey ( 11111L ) ; organization . setTenant ( tenant ) ; org . oscm . domobjects . Subscription subscriptionToModify = new org . oscm . domobjects . Subscription ( ) ; subscriptionToModify . setKey ( 22222L ) ; subscriptionToModify . setOrganization ( organization ) ; org . oscm . domobjects . PlatformUser platformUser = mock ( org . oscm . domobjects . PlatformUser . class ) ; final org . oscm . identityservice . local . IdentityServiceLocal mockIdManager = bean . idManager ; when ( mockIdManager . getPlatformUser ( ownerId , tenantId , false ) ) . thenReturn ( platformUser ) ; bean . setSubscriptionOwner ( subscriptionToModify , ownerId , false ) ; verify ( mockIdManager , times ( 0 ) ) . getPlatformUser ( ownerId , tenantId , false ) ; "<AssertPlaceHolder>" ; } getOwner ( ) { return owner ; }
org . junit . Assert . assertTrue ( ( ( subscriptionToModify . getOwner ( ) ) == null ) )
shouldReturnMySqlConnection ( ) { fr . xephi . authme . settings . Settings settings = mock ( fr . xephi . authme . settings . Settings . class ) ; fr . xephi . authme . TestHelper . returnDefaultsForAllProperties ( settings ) ; com . zaxxer . hikari . HikariDataSource dataSource = mock ( com . zaxxer . hikari . HikariDataSource . class ) ; java . sql . Connection connection = mock ( java . sql . Connection . class ) ; given ( dataSource . getConnection ( ) ) . willReturn ( connection ) ; fr . xephi . authme . datasource . MySQL mySQL = fr . xephi . authme . datasource . SqlDataSourceTestUtil . createMySql ( settings , dataSource ) ; fr . xephi . authme . command . executable . authme . debug . MySqlDefaultChanger defaultChanger = createDefaultChanger ( mySQL ) ; java . sql . Connection result = defaultChanger . getConnection ( mySQL ) ; "<AssertPlaceHolder>" ; verify ( dataSource ) . getConnection ( ) ; } getConnection ( fr . xephi . authme . datasource . MySQL ) { try { java . lang . reflect . Method method = fr . xephi . authme . datasource . MySQL . class . getDeclaredMethod ( "getConnection" ) ; method . setAccessible ( true ) ; return ( ( java . sql . Connection ) ( method . invoke ( mySql ) ) ) ; } catch ( java . lang . IllegalAccessException | java . lang . NoSuchMethodException | java . lang . reflect . InvocationTargetException e ) { throw new java . lang . IllegalStateException ( "Could<sp>not<sp>get<sp>MySQL<sp>connection" , e ) ; } }
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( connection ) )
testDbFailureUnderLoad ( ) { cnx . runUpdate ( "TestModule" 1 , 50 , TestHelpers . dpVip . getId ( ) ) ; cnx . commit ( ) ; com . enioka . jqm . test . helpers . TestHelpers . setNodesLogLevel ( "INFO" , cnx ) ; com . enioka . jqm . test . helpers . CreationTools . createJobDef ( null , true , "TestModule" 2 , null , "jqm-tests/jqm-test-pyl-nodep/target/test.jar" , TestHelpers . qVip , ( - 1 ) , "TestJqmApplication" , "appFreeName" , "TestModule" , "kw1" , "kw2" , "kw3" , false , cnx ) ; com . enioka . jqm . api . JobRequest j = new com . enioka . jqm . api . JobRequest ( "TestJqmApplication" , "TestUser" ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { com . enioka . jqm . api . JqmClientFactory . getClient ( ) . enqueue ( j ) ; } addAndStartEngine ( ) ; this . sleep ( 1 ) ; jqmlogger . info ( "TestModule" 0 ) ; simulateDbFailure ( ) ; com . enioka . jqm . test . helpers . TestHelpers . waitFor ( 1000 , 120000 , this . getNewDbSession ( ) ) ; "<AssertPlaceHolder>" ; } getOkCount ( com . enioka . jqm . jdbc . DbConn ) { return cnx . runSelectSingle ( "history_select_count_ended" , com . enioka . jqm . test . helpers . Integer . class ) ; }
org . junit . Assert . assertEquals ( 1000 , com . enioka . jqm . test . helpers . TestHelpers . getOkCount ( this . getNewDbSession ( ) ) )
flat ( ) { org . smurn . jsift . Octave octave = new org . smurn . jsift . Octave ( java . util . Arrays . asList ( new org . smurn . jsift . Image ( 3 , 3 ) , new org . smurn . jsift . Image ( 3 , 3 ) , new org . smurn . jsift . Image ( 3 , 3 ) , new org . smurn . jsift . Image ( 3 , 3 ) ) , java . util . Arrays . asList ( new org . smurn . jsift . Image ( new float [ ] [ ] { new float [ ] { 0.0F , 0.0F , 0.0F } , new float [ ] { 0.0F , 0.0F , 0.0F } , new float [ ] { 0.0F , 0.0F , 0.0F } } ) , new org . smurn . jsift . Image ( new float [ ] [ ] { new float [ ] { 0.0F , 0.0F , 0.0F } , new float [ ] { 0.0F , 0.0F , 0.0F } , new float [ ] { 0.0F , 0.0F , 0.0F } } ) , new org . smurn . jsift . Image ( new float [ ] [ ] { new float [ ] { 0.0F , 0.0F , 0.0F } , new float [ ] { 0.0F , 0.0F , 0.0F } , new float [ ] { 0.0F , 0.0F , 0.0F } } ) ) ) ; org . smurn . jsift . ScaleSpace scaleSpace = new org . smurn . jsift . ScaleSpace ( java . util . Arrays . asList ( octave ) ) ; java . util . List < org . smurn . jsift . ScaleSpacePoint > expected = new java . util . ArrayList < org . smurn . jsift . ScaleSpacePoint > ( ) ; java . util . Collection < org . smurn . jsift . ScaleSpacePoint > actual = target . detectKeypoints ( scaleSpace ) ; "<AssertPlaceHolder>" ; } detectKeypoints ( org . smurn . jsift . ScaleSpace ) { if ( scaleSpace == null ) { throw new java . lang . NullPointerException ( "scale<sp>space<sp>must<sp>not<sp>be<sp>null" ) ; } java . util . List < org . smurn . jsift . ScaleSpacePoint > points = new java . util . ArrayList < org . smurn . jsift . ScaleSpacePoint > ( ) ; for ( org . smurn . jsift . Octave octave : scaleSpace . getOctaves ( ) ) { int dogCount = octave . getDifferenceOfGaussians ( ) . size ( ) ; for ( int i = 1 ; i < ( dogCount - 1 ) ; i ++ ) { java . util . Collection < org . smurn . jsift . ScaleSpacePoint > pointsOnThisScale = detectKeypoints ( octave . getDifferenceOfGaussians ( ) . get ( ( i - 1 ) ) , octave . getDifferenceOfGaussians ( ) . get ( i ) , octave . getDifferenceOfGaussians ( ) . get ( ( i + 1 ) ) ) ; points . addAll ( pointsOnThisScale ) ; } } return points ; }
org . junit . Assert . assertEquals ( expected , actual )
shouldGetAllDoublePropertyValues ( ) { int label = token . nodeLabel ( "Node" ) ; int prop = token . propertyKey ( "prop" ) ; int prip = token . propertyKey ( "prip" ) ; org . neo4j . internal . kernel . api . IndexReference index = schemaRead . index ( label , prop , prip ) ; try ( org . neo4j . internal . kernel . api . NodeValueIndexCursor node = cursors . allocateNodeValueIndexCursor ( ) ) { read . nodeIndexScan ( index , node , IndexOrder . NONE , true ) ; java . util . List < org . neo4j . values . storable . ValueTuple > values = new java . util . ArrayList ( ) ; while ( node . next ( ) ) { values . add ( org . neo4j . values . storable . ValueTuple . of ( node . propertyValue ( 0 ) , node . propertyValue ( 1 ) ) ) ; } values . sort ( ValueTuple . COMPARATOR ) ; for ( int i = 0 ; i < ( doublePropValues . size ( ) ) ; i ++ ) { "<AssertPlaceHolder>" ; } } } get ( org . neo4j . kernel . api . proc . Key ) { java . lang . Object o = values . get ( key . name ( ) ) ; if ( o == null ) { throw new org . neo4j . internal . kernel . api . exceptions . ProcedureException ( Status . Procedure . ProcedureCallFailed , "There<sp>is<sp>no<sp>`%s`<sp>in<sp>the<sp>current<sp>procedure<sp>call<sp>context." , key . name ( ) ) ; } return ( ( T ) ( o ) ) ; }
org . junit . Assert . assertEquals ( doublePropValues . get ( i ) , values . get ( i ) )
testSend ( ) { final net . violet . platform . api . actions . Action theAction = new net . violet . platform . api . actions . messages . SendMusicMessage ( ) ; final net . violet . platform . datamodel . Files theFile = new net . violet . platform . datamodel . mock . FilesMock ( "message" , MimeType . MIME_TYPES . A_MPEG ) ; final net . violet . platform . datamodel . Music theMusic = new net . violet . platform . datamodel . mock . MusicMock ( 123L , theFile , "test" , getPrivateUser ( ) , net . violet . platform . datamodel . Music . TYPE_MP3_LIBRARY ) ; final net . violet . platform . datamodel . Application theApplication = new net . violet . platform . datamodel . mock . ApplicationMock ( 12 , "My<sp>first<sp>application" , getPrivateUser ( ) , new java . util . Date ( ) ) ; final net . violet . platform . datamodel . ApplicationCredentials cred = new net . violet . platform . datamodel . mock . ApplicationCredentialsMock ( "6992873d28d86925325dc52d15d6feec30bb2da5" , "59e6060a53ab1be5" , theApplication ) ; final net . violet . platform . api . callers . APICaller caller = new net . violet . platform . api . callers . ApplicationAPICaller ( net . violet . platform . dataobjects . ApplicationCredentialsData . getData ( cred ) ) ; final java . util . Map < java . lang . String , java . lang . Object > theParams = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; final java . util . Calendar theCalendar = java . util . Calendar . getInstance ( ) ; theCalendar . add ( Calendar . HOUR , ( + 1 ) ) ; theParams . put ( ActionParam . SESSION_PARAM_KEY , net . violet . platform . api . authentication . SessionManager . generateSessionId ( caller , net . violet . platform . dataobjects . UserData . getData ( getPrivateUser ( ) ) , theCalendar . getTime ( ) ) ) ; theParams . put ( ActionParam . MAIN_PARAM_KEY , net . violet . platform . dataobjects . MusicData . getData ( theMusic ) . getApiId ( caller ) ) ; theParams . put ( "recipients" , java . util . Arrays . asList ( ( ( java . lang . Object ) ( net . violet . platform . dataobjects . VObjectData . getData ( getKowalskyObject ( ) ) . getApiId ( caller ) ) ) ) ) ; final net . violet . platform . api . actions . ActionParam theActionParam = new net . violet . platform . api . actions . ActionParam ( caller , theParams ) ; final java . lang . Object theResult = theAction . processRequest ( theActionParam ) ; "<AssertPlaceHolder>" ; } getKowalskyObject ( ) { if ( ( this . mKowalskyObject ) == null ) { this . mKowalskyObject = new net . violet . platform . datamodel . mock . VObjectMock ( 60463 , "0019db001073" , "kowalsky" , getKowalskyUser ( ) , net . violet . platform . datamodel . Hardware . HARDWARE . V2 , getParisTimezone ( ) , getFrLang ( ) ) ; } return this . mKowalskyObject ; }
org . junit . Assert . assertNull ( theResult )
testListByProduct ( ) { createLink ( ) ; net . magja . model . product . Product product = products . get ( 0 ) ; try { final java . util . Set < net . magja . model . product . ProductLink > links = service . list ( product ) ; for ( net . magja . model . product . ProductLink productLink : links ) { net . magja . service . product . ProductLinkRemoteServiceITest . log . debug ( productLink . toString ( ) ) ; } "<AssertPlaceHolder>" ; } catch ( net . magja . service . ServiceException e ) { net . magja . service . product . ProductLinkRemoteServiceITest . log . error ( "Error<sp>listing<sp>links" , e ) ; org . junit . Assert . fail ( "Error<sp>on<sp>list<sp>link" ) ; } } toString ( ) { return ( ( ( "Media<sp>[mime=" + ( mime ) ) + ",<sp>name=" ) + ( name ) ) + "]" ; }
org . junit . Assert . assertFalse ( links . isEmpty ( ) )
testIsItemExist ( ) { wd . open ( org . finra . jtaf . ewd . widget . element . html . TableTest . url ) ; org . finra . jtaf . ewd . widget . ITable table = new org . finra . jtaf . ewd . widget . element . html . Table ( tableLocator ) ; java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; map . put ( "Header<sp>1" , "Row<sp>1:<sp>Cell<sp>1" ) ; boolean isExist = table . isItemExist ( map ) ; "<AssertPlaceHolder>" ; } isItemExist ( java . util . Map ) { try { java . util . List < java . util . Map < java . lang . String , java . lang . String > > tableData = getTableDataInMap ( ) ; for ( java . util . Map < java . lang . String , java . lang . String > rowData : tableData ) { boolean found = true ; for ( Map . Entry < java . lang . String , java . lang . String > expectedEntry : item . entrySet ( ) ) { java . lang . String actual = rowData . get ( expectedEntry . getKey ( ) ) ; if ( ! ( actual . equals ( expectedEntry . getValue ( ) ) ) ) { found = false ; } } if ( found ) { return true ; } } return false ; } catch ( java . lang . Exception e ) { throw new org . finra . jtaf . ewd . widget . WidgetException ( ( ( "Error<sp>while<sp>determining<sp>whether<sp>item<sp>" + item ) + "<sp>exists<sp>in<sp>table" ) , generateXPathLocator ( ) , e ) ; } }
org . junit . Assert . assertTrue ( isExist )
testWithMsg ( ) { com . ieven . ext . response . DefaultResponse response = new com . ieven . ext . response . DefaultResponse ( 0 , "" ) ; System . out . println ( response ) ; "<AssertPlaceHolder>" ; } getMsg ( ) { return msg ; }
org . junit . Assert . assertEquals ( "" , response . getMsg ( ) )
timeComponent1 ( ) { net . time4j . PlainTimestamp tsp = net . time4j . PlainTimestamp . of ( 2014 , 8 , 21 , 14 , 30 ) ; tsp = tsp . with ( PlainTime . COMPONENT , net . time4j . PlainTime . of ( 23 , 59 ) ) ; "<AssertPlaceHolder>" ; } of ( int , int , int , int , int ) { return net . time4j . PlainTimestamp . of ( year , month , dayOfMonth , hour , minute , 0 ) ; }
org . junit . Assert . assertThat ( tsp , org . hamcrest . CoreMatchers . is ( net . time4j . PlainTimestamp . of ( 2014 , 8 , 21 , 23 , 59 ) ) )
testTruncatedRequest ( ) { startTestServer ( ( request ) -> request . getBody ( ) . map ( ( body ) -> io . datakernel . http . HttpResponse . ok200 ( ) . withBody ( body ) ) ) ; java . lang . String crlf = new java . lang . String ( CRLF , UTF_8 ) ; java . lang . String chunkedRequest = ( ( ( ( ( ( ( ( "POST<sp>/<sp>HTTP/1.1" + crlf ) + "Host:<sp>localhost" ) + crlf ) + "Content-Length:<sp>13" ) + crlf ) + "Transfer-Encoding:<sp>chunked" ) + crlf ) + crlf ) + "3" ; io . datakernel . bytebuf . ByteBuf body = await ( io . datakernel . eventloop . AsyncTcpSocketImpl . connect ( new java . net . InetSocketAddress ( io . datakernel . http . HttpStreamTest . PORT ) ) . then ( ( socket ) -> socket . write ( io . datakernel . bytebuf . ByteBuf . wrapForReading ( chunkedRequest . getBytes ( io . datakernel . http . UTF_8 ) ) ) . then ( ( $ ) -> socket . write ( null ) ) . then ( ( $ ) -> socket . read ( ) ) . whenComplete ( ( $ , e ) -> socket . close ( ) ) ) ) ; "<AssertPlaceHolder>" ; deepRecycle ( expectedList ) ; } close ( ) { connectionClosing = true ; stream . sendEndOfStream ( ) ; }
org . junit . Assert . assertNull ( body )
testGetInstance_applicationContext_returnsSameInstance ( ) { org . eclipse . rap . rwt . internal . SingletonManager . install ( applicationContext ) ; org . eclipse . rap . rwt . internal . SingletonManager instance1 = org . eclipse . rap . rwt . internal . SingletonManager . getInstance ( applicationContext ) ; org . eclipse . rap . rwt . internal . SingletonManager instance2 = org . eclipse . rap . rwt . internal . SingletonManager . getInstance ( applicationContext ) ; "<AssertPlaceHolder>" ; } getInstance ( org . eclipse . rap . rwt . service . UISession ) { return ( ( org . eclipse . rap . rwt . internal . SingletonManager ) ( uiSession . getAttribute ( org . eclipse . rap . rwt . internal . SingletonManager . ATTR_SINGLETON_MANAGER ) ) ) ; }
org . junit . Assert . assertSame ( instance1 , instance2 )
shouldFailWebSocketConnectionWhenServerSendsMaskWithTextFrame ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . kaazing . gateway . transport . test . Expectations ( ) { { oneOf ( handler ) . sessionCreated ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionOpened ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionClosed ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; atMost ( 1 ) . of ( handler ) . exceptionCaught ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) , with ( org . hamcrest . core . AllOf . allOf ( any ( java . io . IOException . class ) , org . junit . internal . matchers . ThrowableMessageMatcher . hasMessage ( equal ( LoggingUtils . EARLY_TERMINATION_OF_IOSESSION_MESSAGE ) ) ) ) ) ; } } ) ; org . apache . mina . core . future . ConnectFuture connectFuture = connector . connect ( "ws://localhost:8080/echo" , null , handler ) ; connectFuture . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; k3po . finish ( ) ; } isConnected ( ) { return channel . isConnected ( ) ; }
org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) )
isGreaterOrEqualToWorking ( ) { if ( isBatoo ( ) ) { return ; } final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityTwo<sp>r<sp>" + "<sp>where<sp>r.stringAttribute<sp>in<sp>(select<sp>sub.stringAttribute<sp>from<sp>RegularEntityTwo<sp>sub<sp>where<sp>sub.id<sp>>=<sp>2)" ; final java . util . List < com . uaihebert . model . test . RegularEntityTwo > resultFromJPQL = jpqlHelper . getListFromJPQL ( query , com . uaihebert . model . test . RegularEntityTwo . class ) ; "<AssertPlaceHolder>" ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityTwo > uaiCriteria = createCriteria ( com . uaihebert . model . test . RegularEntityTwo . class ) ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityTwo > subQuery = uaiCriteria . subQuery ( "stringAttribute" , com . uaihebert . model . test . RegularEntityTwo . class ) ; subQuery . andGreaterOrEqualTo ( "id" , 2L ) ; uaiCriteria . andAttributeIn ( "stringAttribute" , subQuery ) ; validateTestLists ( resultFromJPQL , uaiCriteria . getResultList ( ) ) ; } getListFromJPQL ( java . lang . String , java . lang . Class ) { return getListFromJPQL ( query , classToUse , null ) ; }
org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) > 0 ) )
testSerialization ( ) { org . jfree . chart . title . TextTitle t = new org . jfree . chart . title . TextTitle ( "Title" ) ; org . jfree . chart . annotations . XYTitleAnnotation a1 = new org . jfree . chart . annotations . XYTitleAnnotation ( 1.0 , 2.0 , t ) ; org . jfree . chart . annotations . XYTitleAnnotation a2 = ( ( org . jfree . chart . annotations . XYTitleAnnotation ) ( org . jfree . chart . TestUtils . serialised ( a1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( a1 , a2 )
compareTestEmpty ( ) { io . toast . tk . runtime . block . TestBlockRunner blockRunner = new io . toast . tk . runtime . block . TestBlockRunner ( ) ; java . lang . String actionSentence = "Comparer<sp>**<sp>a<sp>*$var1*" ; io . toast . tk . runtime . bean . ActionCommandDescriptor actionDescriptor = blockRunner . findMatchingAction ( actionSentence , io . toast . tk . test . runtime . resource . XmlAdapterExample . class ) ; "<AssertPlaceHolder>" ; } findMatchingAction ( java . lang . String , java . lang . Class ) { io . toast . tk . adapter . cache . ToastCache cache = io . toast . tk . adapter . cache . ToastCache . getInstance ( ) ; if ( actionAdapterClass != ( java . lang . Object . class ) ) { final java . util . List < java . lang . reflect . Method > actionMethods = cache . getActionMethodsByClass ( actionAdapterClass ) ; final io . toast . tk . core . annotation . ActionAdapter adapter = actionAdapterClass . getAnnotation ( io . toast . tk . core . annotation . ActionAdapter . class ) ; for ( final java . lang . reflect . Method actionMethod : actionMethods ) { final io . toast . tk . core . annotation . Action mainAction = actionMethod . getAnnotation ( io . toast . tk . core . annotation . Action . class ) ; io . toast . tk . runtime . bean . ActionCommandDescriptor foundMethod = io . toast . tk . runtime . block . TestBlockRunner . matchMethod ( actionImpl , mainAction . action ( ) , actionMethod ) ; if ( foundMethod != null ) { return foundMethod ; } else if ( ( adapter != null ) && ( io . toast . tk . runtime . block . TestBlockRunner . hasMapping ( mainAction , adapter ) ) ) { foundMethod = matchAgainstActionIdMapping ( actionImpl , adapter . name ( ) , actionMethod , mainAction ) ; if ( foundMethod != null ) { return foundMethod ; } } } if ( ( actionAdapterClass . getSuperclass ( ) ) != null ) { return findMatchingAction ( actionImpl , actionAdapterClass . getSuperclass ( ) ) ; } } return null ; }
org . junit . Assert . assertNotNull ( actionDescriptor )
typical ( ) { java . util . Set < javax . validation . ConstraintViolation < com . hotels . bdp . circustrain . api . conf . ReplicaCatalog > > violations = validator . validate ( replicaCatalog ) ; "<AssertPlaceHolder>" ; } validate ( com . hotels . bdp . circustrain . metrics . conf . Graphite ) { if ( graphite == null ) { graphite = new com . hotels . bdp . circustrain . metrics . conf . Graphite ( ) ; } com . hotels . bdp . circustrain . metrics . conf . Graphite validated = loader . load ( graphite . getConfig ( ) ) ; if ( ( graphite . getHost ( ) ) != null ) { validated . setHost ( graphite . getHost ( ) ) ; } if ( ( graphite . getPrefix ( ) ) != null ) { validated . setPrefix ( graphite . getPrefix ( ) ) ; } if ( ( graphite . getNamespace ( ) ) != null ) { validated . setNamespace ( graphite . getNamespace ( ) ) ; } validated . init ( ) ; if ( validated . isEnabled ( ) ) { if ( ( ( ( validated . getHost ( ) ) == null ) || ( ( validated . getPrefix ( ) ) == null ) ) || ( ( validated . getNamespace ( ) ) == null ) ) { throw new com . hotels . bdp . circustrain . api . CircusTrainException ( java . lang . String . format ( "Missing<sp>graphite<sp>configuration<sp>property:<sp>host[%s],<sp>prefix[%s],<sp>namespace[%s]" , validated . getHost ( ) , validated . getPrefix ( ) , validated . getNamespace ( ) ) ) ; } } return new com . hotels . bdp . circustrain . metrics . conf . ValidatedGraphite ( validated ) ; }
org . junit . Assert . assertThat ( violations . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
setAria ( ) { org . mixer2 . jaxb . xhtml . Html html = org . mixer2 . xhtml . DataAttrTest . m2e . loadHtmlTemplate ( new java . io . File ( templateFilePath ) ) ; html . getById ( "span2" , org . mixer2 . jaxb . xhtml . Span . class ) . setAria ( "hoge" , "" ) ; html = org . mixer2 . xhtml . DataAttrTest . m2e . loadHtmlTemplate ( org . mixer2 . xhtml . DataAttrTest . m2e . saveToString ( html ) ) ; java . lang . String ariaHoge = html . getById ( "span2" , org . mixer2 . jaxb . xhtml . Span . class ) . getAria ( "hoge" ) ; "<AssertPlaceHolder>" ; } getAria ( java . lang . String ) { javax . xml . namespace . QName qn = new javax . xml . namespace . QName ( ( "aria-" + key ) ) ; return this . getOtherAttributes ( ) . get ( qn ) ; }
org . junit . Assert . assertThat ( ariaHoge , org . hamcrest . CoreMatchers . is ( "" ) )
testNames ( ) { com . gistlabs . mechanize . util . css_query . NodeSelector < com . gistlabs . mechanize . document . json . node . JsonNode > selector = build ( "{<sp>\"a\"<sp>:<sp>2,<sp>\"b\"<sp>:<sp>{<sp>\"x\"<sp>:<sp>\"y\"<sp>},<sp>\"results\"<sp>:<sp>[<sp>{<sp>\"a\"<sp>:<sp>1<sp>},<sp>{<sp>\"b\"<sp>:<sp>2<sp>}<sp>]<sp>}" ) ; java . util . List < com . gistlabs . mechanize . document . json . node . JsonNode > result = selector . findAll ( "b,<sp>results" ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . response . getEntity ( ) . getContentLength ( ) ; }
org . junit . Assert . assertEquals ( 4 , result . size ( ) )
testGetWikiPage ( ) { System . out . println ( "getWikiPage" ) ; kg . apc . jmeter . vizualizers . ResponseCodesPerSecondGui instance = new kg . apc . jmeter . vizualizers . ResponseCodesPerSecondGui ( ) ; java . lang . String expResult = "" ; java . lang . String result = instance . getWikiPage ( ) ; "<AssertPlaceHolder>" ; } getWikiPage ( ) { return "ResponseCodesPerSecond" ; }
org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) )
testUpdateIncreasing ( ) { final org . neo4j . graphalgo . core . utils . queue . IntPriorityQueue queue = org . neo4j . graphalgo . core . utils . queue . IntPriorityQueue . min ( ) ; final int iterations = com . carrotsearch . randomizedtesting . RandomizedTest . between ( 5 , 50 ) ; for ( int i = 1 ; i <= iterations ; i ++ ) { queue . add ( i , exclusiveDouble ( 50.0 , 100.0 ) ) ; } final int top = queue . top ( ) ; for ( int i = iterations + 1 ; i < ( iterations + 10 ) ; i ++ ) { queue . addCost ( i , 1.0 ) ; queue . update ( i ) ; "<AssertPlaceHolder>" ; } } top ( ) { return heap [ 1 ] ; }
org . junit . Assert . assertEquals ( top , queue . top ( ) )
shouldProperlyAckTuples ( ) { ackTuplesPolicy . addTupleMessageIds ( tuple1 , java . util . Collections . singletonList ( "message1" ) ) ; ackTuplesPolicy . addTupleMessageIds ( tuple2 , java . util . Collections . singletonList ( "message2" ) ) ; org . apache . metron . common . writer . BulkWriterResponse response = new org . apache . metron . common . writer . BulkWriterResponse ( ) ; response . addSuccess ( new org . apache . metron . common . writer . MessageId ( "message1" ) ) ; response . addSuccess ( new org . apache . metron . common . writer . MessageId ( "message2" ) ) ; ackTuplesPolicy . onFlush ( sensorType , response ) ; "<AssertPlaceHolder>" ; verify ( collector , times ( 1 ) ) . ack ( tuple1 ) ; verify ( collector , times ( 1 ) ) . ack ( tuple2 ) ; verifyNoMoreInteractions ( collector ) ; } getTupleMessageMap ( ) { return tupleMessageMap ; }
org . junit . Assert . assertEquals ( 0 , ackTuplesPolicy . getTupleMessageMap ( ) . size ( ) )
whenAddTwoChildAndTwoSubChildToEachChildThenBalancedTree ( ) { tree . addChild ( nodeOne , "1" ) ; tree . addChild ( nodeTwo , "2" ) ; nodeOne . addChild ( new vkaretko . TreeNode ( ) , "3" ) ; nodeOne . addChild ( new vkaretko . TreeNode ( ) , "4" ) ; nodeTwo . addChild ( new vkaretko . TreeNode ( ) , "5" ) ; nodeTwo . addChild ( new vkaretko . TreeNode ( ) , "6" ) ; "<AssertPlaceHolder>" ; } isBalancedTree ( ) { boolean result = true ; if ( ( isRecBalance ( this ) ) == ( - 1 ) ) { result = false ; } return result ; }
org . junit . Assert . assertThat ( tree . isBalancedTree ( ) , org . hamcrest . core . Is . is ( true ) )
testSetSourceVersionHigherThanDefaultTargetVersion ( ) { commandController . initialize ( ) ; commandController . setValueFor ( "sourceVersion" , CompilerVersion . JAVA_1_8 ) ; commandController . setValueFor ( "targetVersion" , CompilerVersion . JAVA_1_7 ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return isInstalled ( ) ; }
org . junit . Assert . assertFalse ( commandController . isValid ( ) )
testSimpleRepositoryDefinitionClass ( ) { org . eclipse . jdt . core . IType type = javaProject . findType ( "org.ClassWithRepositoryDefinition" ) ; "<AssertPlaceHolder>" ; } isSpringDataRepository ( org . eclipse . jdt . core . IType ) { if ( type == null ) { return false ; } try { org . eclipse . jdt . core . IAnnotation [ ] annotations = type . getAnnotations ( ) ; for ( org . eclipse . jdt . core . IAnnotation annotation : annotations ) { if ( ( annotation . getElementName ( ) . equals ( "org.springframework.data.repository.NoRepositoryBean" ) ) || ( annotation . getElementName ( ) . equals ( "NoRepositoryBean" ) ) ) { return false ; } } return org . springframework . ide . eclipse . data . jdt . core . RepositoryInformation . isSpringDataRepositoryInterfaces ( type ) ; } catch ( org . eclipse . jdt . core . JavaModelException e ) { } return false ; }
org . junit . Assert . assertTrue ( org . springframework . ide . eclipse . data . jdt . core . RepositoryInformation . isSpringDataRepository ( type ) )
testResolveRepositoryNameWithNamespaceAndSHA256 ( ) { com . github . dockerjava . core . NameParser . HostnameReposName resolved = com . github . dockerjava . core . NameParser . resolveRepositoryName ( "namespace/repository@sha256:sha256" ) ; "<AssertPlaceHolder>" ; } resolveRepositoryName ( java . lang . String ) { if ( reposName . contains ( "://" ) ) { throw new com . github . dockerjava . core . exception . InvalidRepositoryNameException ( ) ; } java . lang . String [ ] nameParts = reposName . split ( "/" , 2 ) ; if ( ( ( nameParts . length ) == 1 ) || ( ( ( ! ( nameParts [ 0 ] . contains ( "." ) ) ) && ( ! ( nameParts [ 0 ] . contains ( ":" ) ) ) ) && ( ! ( nameParts [ 0 ] . equals ( "localhost" ) ) ) ) ) { return new com . github . dockerjava . core . NameParser . HostnameReposName ( com . github . dockerjava . api . model . AuthConfig . DEFAULT_SERVER_ADDRESS , reposName ) ; } java . lang . String hostname = nameParts [ 0 ] ; reposName = nameParts [ 1 ] ; if ( hostname . contains ( "index.docker.io" ) ) { throw new com . github . dockerjava . core . exception . InvalidRepositoryNameException ( java . lang . String . format ( "Invalid<sp>repository<sp>name,<sp>try<sp>\"%s\"<sp>instead" , reposName ) ) ; } if ( org . apache . commons . lang . StringUtils . containsIgnoreCase ( reposName , com . github . dockerjava . core . NameParser . SHA256_SEPARATOR ) ) { reposName = org . apache . commons . lang . StringUtils . substringBeforeLast ( reposName , com . github . dockerjava . core . NameParser . SHA256_SEPARATOR ) ; } com . github . dockerjava . core . NameParser . validateRepoName ( reposName ) ; return new com . github . dockerjava . core . NameParser . HostnameReposName ( hostname , reposName ) ; }
org . junit . Assert . assertEquals ( resolved , new com . github . dockerjava . core . NameParser . HostnameReposName ( com . github . dockerjava . api . model . AuthConfig . DEFAULT_SERVER_ADDRESS , "namespace/repository@sha256:sha256" ) )
testStringLiteralExp01 ( ) { testpackage . Class1 class1 ; class1 = new testpackage . Class1 ( ) ; "<AssertPlaceHolder>" ; } testStringLiteralExp01 ( ) { testpackage . Class1 class1 ; class1 = new testpackage . Class1 ( ) ; org . junit . Assert . assertEquals ( "some" , class1 . testStringLiteralExp01 ( ) ) ; }
org . junit . Assert . assertEquals ( "some" , class1 . testStringLiteralExp01 ( ) )
testAnd2Expression ( ) { com . hundredwordsgof . interpreter . Context context = new com . hundredwordsgof . interpreter . Context ( ) ; com . hundredwordsgof . interpreter . TerminalExpression firstTerminalExpression = new com . hundredwordsgof . interpreter . TerminalExpression ( false ) ; com . hundredwordsgof . interpreter . TerminalExpression secondTerminalExpression = new com . hundredwordsgof . interpreter . TerminalExpression ( true ) ; com . hundredwordsgof . interpreter . AndExpression andExpression = new com . hundredwordsgof . interpreter . AndExpression ( firstTerminalExpression , secondTerminalExpression ) ; andExpression . interpret ( context ) ; "<AssertPlaceHolder>" ; } isResult ( ) { return result ; }
org . junit . Assert . assertEquals ( false , context . isResult ( ) )
concurrentInsertionsAndReads ( ) { org . apache . bookkeeper . util . collections . ConcurrentLongLongPairHashMap map = new org . apache . bookkeeper . util . collections . ConcurrentLongLongPairHashMap ( ) ; java . util . concurrent . ExecutorService executor = java . util . concurrent . Executors . newCachedThreadPool ( ) ; final int nThreads = 16 ; final int n = 100000 ; final long value = 55 ; java . util . List < java . util . concurrent . Future < ? > > futures = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < nThreads ; i ++ ) { final int threadIdx = i ; futures . add ( executor . submit ( ( ) -> { java . util . Random random = new java . util . Random ( ) ; for ( int j = 0 ; j < n ; j ++ ) { long key1 = java . lang . Math . abs ( random . nextLong ( ) ) ; key1 -= key1 % ( threadIdx + 1 ) ; long key2 = java . lang . Math . abs ( random . nextLong ( ) ) ; key2 -= key2 % ( threadIdx + 1 ) ; map . put ( key1 , key2 , value , value ) ; } } ) ) ; } for ( java . util . concurrent . Future < ? > future : futures ) { future . get ( ) ; } "<AssertPlaceHolder>" ; executor . shutdown ( ) ; } size ( ) { lock . readLock ( ) . lock ( ) ; try { long size = 0 ; for ( int i = 0 ; i < ( cacheIndexes . size ( ) ) ; i ++ ) { if ( i == ( currentSegmentIdx ) ) { size += currentSegmentOffset . get ( ) ; } else if ( ! ( cacheIndexes . get ( i ) . isEmpty ( ) ) ) { size += segmentSize ; } else { } } return size ; } finally { lock . readLock ( ) . unlock ( ) ; } }
org . junit . Assert . assertEquals ( map . size ( ) , ( n * nThreads ) )
brownReaderTest2 ( ) { java . io . File referenceFile = new java . io . File ( "src/test/resources/brown_ims.txt" ) ; java . io . File outputFile = new java . io . File ( "target/test-output/brown_ims.txt" ) ; org . apache . uima . collection . CollectionReaderDescription reader = createReaderDescription ( de . tudarmstadt . ukp . dkpro . core . io . tei . TeiReader . class , TeiReader . PARAM_LANGUAGE , "en" , TeiReader . PARAM_SOURCE_LOCATION , "classpath:/brown_tei/" , TeiReader . PARAM_PATTERNS , new java . lang . String [ ] { "[+]*.xml" } ) ; org . apache . uima . analysis_engine . AnalysisEngineDescription writer = createEngineDescription ( de . tudarmstadt . ukp . dkpro . core . io . imscwb . ImsCwbWriter . class , ImsCwbWriter . PARAM_TARGET_LOCATION , outputFile , ImsCwbWriter . PARAM_WRITE_CPOS , true , ImsCwbWriter . PARAM_SENTENCE_TAG , "sentence" ) ; org . apache . uima . fit . pipeline . SimplePipeline . runPipeline ( reader , writer ) ; java . lang . String reference = org . apache . commons . io . FileUtils . readFileToString ( referenceFile , "UTF-8" ) ; java . lang . String output = org . apache . commons . io . FileUtils . readFileToString ( outputFile , "UTF-8" ) ; reference = de . tudarmstadt . ukp . dkpro . core . testing . EOLUtils . normalizeLineEndings ( reference ) ; output = de . tudarmstadt . ukp . dkpro . core . testing . EOLUtils . normalizeLineEndings ( output ) ; "<AssertPlaceHolder>" ; } normalizeLineEndings ( java . lang . String ) { java . lang . String result = text . replaceAll ( "\\r\\n" , "\n" ) ; result = result . replaceAll ( "\\r" , "\n" ) ; return result ; }
org . junit . Assert . assertEquals ( reference , output )
shouldMakeContextAvailable ( ) { org . neo4j . kernel . api . proc . Key < java . lang . String > someKey = key ( "someKey" , java . lang . String . class ) ; procs . register ( new org . neo4j . kernel . api . proc . CallableUserFunction . BasicUserFunction ( signature ) { @ org . neo4j . kernel . impl . proc . Override public org . neo4j . values . AnyValue apply ( org . neo4j . kernel . api . proc . Context ctx , org . neo4j . values . AnyValue [ ] input ) throws org . neo4j . internal . kernel . api . exceptions . ProcedureException { return org . neo4j . values . storable . Values . stringValue ( ctx . get ( someKey ) ) ; } } ) ; org . neo4j . kernel . api . proc . BasicContext ctx = new org . neo4j . kernel . api . proc . BasicContext ( ) ; ctx . put ( someKey , "hello,<sp>world" ) ; java . lang . Object result = procs . callFunction ( ctx , signature . name ( ) , new org . neo4j . values . AnyValue [ 0 ] ) ; "<AssertPlaceHolder>" ; } of ( java . lang . Object ) { return org . neo4j . values . storable . Values . of ( value , true ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . equalTo ( org . neo4j . values . storable . Values . of ( "hello,<sp>world" ) ) )
itShouldNotBeCreatedWhenThereAreNotEnoughSubSenders ( ) { io . datakernel . rpc . client . sender . helper . RpcClientConnectionPoolStub pool = new io . datakernel . rpc . client . sender . helper . RpcClientConnectionPoolStub ( ) ; io . datakernel . rpc . client . sender . helper . RpcSenderStub connection1 = new io . datakernel . rpc . client . sender . helper . RpcSenderStub ( ) ; io . datakernel . rpc . client . sender . helper . RpcSenderStub connection2 = new io . datakernel . rpc . client . sender . helper . RpcSenderStub ( ) ; io . datakernel . rpc . client . sender . helper . RpcSenderStub connection3 = new io . datakernel . rpc . client . sender . helper . RpcSenderStub ( ) ; io . datakernel . rpc . client . sender . RpcStrategy roundRobin = roundRobin ( servers ( io . datakernel . rpc . client . sender . RpcStrategyRoundRobinTest . ADDRESS_1 , io . datakernel . rpc . client . sender . RpcStrategyRoundRobinTest . ADDRESS_2 , io . datakernel . rpc . client . sender . RpcStrategyRoundRobinTest . ADDRESS_3 ) ) . withMinActiveSubStrategies ( 4 ) ; pool . put ( io . datakernel . rpc . client . sender . RpcStrategyRoundRobinTest . ADDRESS_1 , connection1 ) ; pool . put ( io . datakernel . rpc . client . sender . RpcStrategyRoundRobinTest . ADDRESS_2 , connection2 ) ; pool . put ( io . datakernel . rpc . client . sender . RpcStrategyRoundRobinTest . ADDRESS_3 , connection3 ) ; "<AssertPlaceHolder>" ; } createSender ( io . datakernel . rpc . client . RpcClientConnectionPool ) { java . util . List < io . datakernel . rpc . client . sender . RpcSender > subSenders = list . listOfSenders ( pool ) ; if ( ( subSenders . size ( ) ) < ( minActiveSubStrategies ) ) return null ; if ( ( subSenders . size ( ) ) == 0 ) return null ; if ( ( subSenders . size ( ) ) == 1 ) return subSenders . get ( 0 ) ; return new io . datakernel . rpc . client . sender . RpcStrategyRoundRobin . Sender ( subSenders ) ; }
org . junit . Assert . assertNull ( roundRobin . createSender ( pool ) )
should_get_yml_file_content ( ) { java . lang . String yml = getResourceContent ( "yml/demo_flow.yaml" ) ; com . flow . platform . api . domain . node . Node flow = nodeService . find ( flowName ) . root ( ) ; setFlowToReady ( flow ) ; nodeService . updateByYml ( com . flow . platform . api . util . PathUtil . build ( flowName ) , yml ) ; org . springframework . test . web . servlet . MvcResult result = mockMvc . perform ( get ( ( ( "/flows/" + ( flowName ) ) + "/yml" ) ) ) . andExpect ( status ( ) . isOk ( ) ) . andReturn ( ) ; java . lang . String content = result . getResponse ( ) . getContentAsString ( ) ; "<AssertPlaceHolder>" ; } get ( com . flow . platform . domain . AgentPath ) { return execute ( ( session ) -> session . createQuery ( "from<sp>Agent<sp>where<sp>AGENT_ZONE<sp>=<sp>:zone<sp>and<sp>AGENT_NAME<sp>=<sp>:name" , . class ) . setParameter ( "zone" , agentPath . getZone ( ) ) . setParameter ( "name" , agentPath . getName ( ) ) . uniqueResult ( ) ) ; }
org . junit . Assert . assertEquals ( yml , content )
testSetTempLeader ( ) { java . lang . String timestamp = java . lang . String . valueOf ( java . lang . System . nanoTime ( ) ) ; net . floodlightcontroller . hasupport . HAServerTest . tc . send ( ( "IWON<sp>2<sp>" + timestamp ) ) ; net . floodlightcontroller . hasupport . HAServerTest . tc . send ( ( "LEADER<sp>2<sp>" + timestamp ) ) ; "<AssertPlaceHolder>" ; net . floodlightcontroller . hasupport . HAServerTest . ae . setTempLeader ( none ) ; net . floodlightcontroller . hasupport . HAServerTest . ae . setLeader ( none ) ; } gettempLeader ( ) { final java . lang . String tempLead ; synchronized ( tempLeader ) { tempLead = tempLeader ; } return tempLead ; }
org . junit . Assert . assertEquals ( net . floodlightcontroller . hasupport . HAServerTest . ae . gettempLeader ( ) , "2" )
shouldCloseExhaustedCursors ( ) { org . neo4j . cursor . RawCursor < org . neo4j . index . internal . gbptree . Hit < org . neo4j . kernel . impl . index . labelscan . LabelScanKey , org . neo4j . kernel . impl . index . labelscan . LabelScanValue > , java . io . IOException > cursor = mock ( org . neo4j . cursor . RawCursor . class ) ; when ( cursor . next ( ) ) . thenReturn ( false ) ; java . util . Collection < org . neo4j . cursor . RawCursor < org . neo4j . index . internal . gbptree . Hit < org . neo4j . kernel . impl . index . labelscan . LabelScanKey , org . neo4j . kernel . impl . index . labelscan . LabelScanValue > , java . io . IOException > > toRemoveFrom = new java . util . HashSet ( ) ; org . neo4j . kernel . impl . index . labelscan . LabelScanValueIterator iterator = new org . neo4j . kernel . impl . index . labelscan . LabelScanValueIterator ( cursor , toRemoveFrom , NO_ID ) ; verify ( cursor , never ( ) ) . close ( ) ; exhaust ( iterator ) ; verify ( cursor , times ( 1 ) ) . close ( ) ; iterator . hasNext ( ) ; verify ( cursor , times ( 1 ) ) . close ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { try ( org . neo4j . cursor . RawCursor < org . neo4j . index . internal . gbptree . Hit < org . neo4j . kernel . impl . index . labelscan . LabelScanKey , org . neo4j . kernel . impl . index . labelscan . LabelScanValue > , java . io . IOException > cursor = index . seek ( new org . neo4j . kernel . impl . index . labelscan . LabelScanKey ( 0 , 0 ) , new org . neo4j . kernel . impl . index . labelscan . LabelScanKey ( Integer . MAX_VALUE , Long . MAX_VALUE ) ) ) { return ! ( cursor . next ( ) ) ; } }
org . junit . Assert . assertTrue ( toRemoveFrom . isEmpty ( ) )
testFlush ( ) { try ( org . apache . accumulo . core . client . AccumuloClient client = org . apache . accumulo . core . client . Accumulo . newClient ( ) . from ( getClientProperties ( ) ) . build ( ) ) { java . lang . String [ ] tableNames = init ( client ) ; writeSome ( client , tableNames [ 1 ] , org . apache . accumulo . test . functional . DurabilityIT . N ) ; restartTServer ( ) ; "<AssertPlaceHolder>" ; cleanup ( client , tableNames ) ; } } readSome ( org . apache . accumulo . core . client . AccumuloClient , java . lang . String ) { return com . google . common . collect . Iterators . size ( client . createScanner ( table , Authorizations . EMPTY ) . iterator ( ) ) ; }
org . junit . Assert . assertEquals ( org . apache . accumulo . test . functional . DurabilityIT . N , readSome ( client , tableNames [ 1 ] ) )
testEncodeUri1 ( ) { java . lang . String pattern = "mailto:venus@163.com?subject={}&body={}" ; java . lang . String uriString = com . feilong . tools . slf4j . Slf4jUtil . format ( pattern , "" , "<br>" ) ; java . lang . String result = com . feilong . core . net . URIUtil . encodeUri ( uriString , com . feilong . core . CharsetType . UTF8 ) ; "<AssertPlaceHolder>" ; } encode ( java . lang . String , java . lang . String ) { return com . feilong . core . net . URIUtil . encodeOrDecode ( value , charsetType , true ) ; }
org . junit . Assert . assertEquals ( com . feilong . tools . slf4j . Slf4jUtil . format ( pattern , com . feilong . core . net . URIUtil . encode ( "" , com . feilong . core . CharsetType . UTF8 ) , com . feilong . core . net . URIUtil . encode ( "<br>" , com . feilong . core . CharsetType . UTF8 ) ) , result )
givenPatternIsEmpty_whenGetMatchSpecificity_thenReturnsZero ( ) { com . brandwatch . robots . matching . Matcher < java . lang . String > matcher = com . brandwatch . robots . matching . MatcherUtilsImplTest . newPatternMatcher ( "" ) ; java . lang . String agent = "googlebot" ; com . google . common . base . Optional < java . lang . Double > specificity = utilities . getMatchSpecificity ( matcher , agent ) ; "<AssertPlaceHolder>" ; } get ( ) { return robots . build ( ) ; }
org . junit . Assert . assertThat ( specificity . get ( ) , org . hamcrest . Matchers . equalTo ( 0.0 ) )
invalidArrayIndex ( ) { try { singleElemArrayState ( ) . childFor ( "key" ) ; org . junit . Assert . fail ( "did<sp>not<sp>throw<sp>exception" ) ; } catch ( org . everit . json . schema . SchemaException e ) { org . everit . json . schema . SchemaException expected = new org . everit . json . schema . SchemaException ( "#" , "[key]<sp>is<sp>not<sp>an<sp>array<sp>index" ) ; "<AssertPlaceHolder>" ; } } childFor ( java . lang . String ) { java . lang . Object rawChild = schemaJson . canBeMappedTo ( org . everit . json . schema . loader . JsonObject . class , ( obj ) -> getRawChildOfObject ( obj , key ) ) . orMappedTo ( org . everit . json . schema . loader . JsonArray . class , ( array ) -> getRawElemOfArray ( array , key ) ) . requireAny ( ) ; org . everit . json . schema . loader . LoadingState childLs = new org . everit . json . schema . loader . LoadingState ( config , pointerSchemas , rootSchemaJson , rawChild , id , pointerToCurrentObj . addPointerSegment ( key ) ) ; return childLs . schemaJson ; }
org . junit . Assert . assertEquals ( expected , e )
testEmptyLinesInLabelWithAutoWrap ( ) { org . geotools . renderer . label . LabelPainter painter = new org . geotools . renderer . label . LabelPainter ( graphics , org . geotools . renderer . label . LabelCacheImpl . LabelRenderingMode . STRING ) ; org . geotools . renderer . label . LabelCacheItem labelItem = new org . geotools . renderer . label . LabelCacheItem ( "LAYERID" , style , shape , "line1\n\nline2" , symbolizer ) ; labelItem . setAutoWrap ( 100 ) ; painter . setLabel ( labelItem ) ; "<AssertPlaceHolder>" ; } getLineCount ( ) { return lines . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , painter . getLineCount ( ) )
subscribeToAttributeCallCallsSubscriptionManagerWithCorrectArguments ( ) { io . joynr . pubsub . subscription . AttributeSubscriptionListener < java . lang . String > listener = new io . joynr . pubsub . subscription . AttributeSubscriptionAdapter ( ) ; io . joynr . pubsub . SubscriptionQos subscriptionQos = new joynr . OnChangeSubscriptionQos ( ) ; io . joynr . proxy . ConnectorInvocationHandler connector = createConnector ( ) ; "<AssertPlaceHolder>" ; try { java . lang . reflect . Method method = io . joynr . proxy . ConnectorTest . TestSubscriptionInterface . class . getDeclaredMethod ( "subscribeToTestAttribute" , io . joynr . pubsub . subscription . AttributeSubscriptionListener . class , io . joynr . pubsub . SubscriptionQos . class ) ; io . joynr . proxy . invocation . AttributeSubscribeInvocation invocation = new io . joynr . proxy . invocation . AttributeSubscribeInvocation ( method , new java . lang . Object [ ] { listener , subscriptionQos } , null ) ; connector . executeSubscriptionMethod ( invocation ) ; verify ( subscriptionManager , times ( 1 ) ) . registerAttributeSubscription ( fromParticipantId , toDiscoveryEntries , invocation ) ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ( "Unexpected<sp>exception<sp>from<sp>attribute<sp>subscribe<sp>call:<sp>" + e ) ) ; } }
org . junit . Assert . assertNotNull ( connector )
testBytes2Double ( ) { double [ ] testVals = new double [ ] { Double . MIN_VALUE , - 1.1 , 0 , 1.1 , Double . MAX_VALUE } ; for ( double testVal : testVals ) { byte [ ] convertedBytes = com . tc . util . Conversion . double2Bytes ( testVal ) ; double convertedDouble = com . tc . util . Conversion . bytes2Double ( convertedBytes ) ; "<AssertPlaceHolder>" ; } } bytes2Double ( byte [ ] ) { return java . lang . Double . longBitsToDouble ( com . tc . util . Conversion . bytes2Long ( bytes ) ) ; }
org . junit . Assert . assertTrue ( ( testVal == convertedDouble ) )
shouldIsEmptyReturnTrueForEmptyStringValue ( ) { lookup . setFieldValue ( "" ) ; boolean result = lookup . isEmpty ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( org . apache . commons . lang3 . StringUtils . isEmpty ( autocompleteCode ) ) && ( ! ( hasSelectedEntity ( ) ) ) ; }
org . junit . Assert . assertTrue ( result )
testWithin_beginning ( ) { final org . apache . rya . api . function . temporal . WithinTemporalInterval function = new org . apache . rya . api . function . temporal . WithinTemporalInterval ( ) ; final org . eclipse . rdf4j . model . Value [ ] args = new org . eclipse . rdf4j . model . Value [ 2 ] ; args [ 0 ] = org . apache . rya . api . function . temporal . WithinTemporalFunctionsTest . VF . createLiteral ( org . apache . rya . api . function . temporal . WithinTemporalFunctionsTest . TIME . toString ( ) ) ; args [ 1 ] = org . apache . rya . api . function . temporal . WithinTemporalFunctionsTest . VF . createLiteral ( ( ( ( org . apache . rya . api . function . temporal . WithinTemporalFunctionsTest . TIME . toString ( ) ) + "/" ) + ( org . apache . rya . api . function . temporal . WithinTemporalFunctionsTest . TIME_20 . toString ( ) ) ) ) ; final org . eclipse . rdf4j . model . Value rez = function . evaluate ( org . apache . rya . api . function . temporal . WithinTemporalFunctionsTest . VF , args ) ; "<AssertPlaceHolder>" ; } evaluate ( org . eclipse . rdf4j . model . ValueFactory , org . eclipse . rdf4j . model . Value [ ] ) { if ( ( args . length ) != 2 ) { throw new org . eclipse . rdf4j . query . algebra . evaluation . ValueExprEvaluationException ( ( ( ( getURI ( ) ) + "<sp>requires<sp>exactly<sp>2<sp>arguments,<sp>got<sp>" ) + ( args . length ) ) ) ; } final java . lang . String [ ] strInterval = args [ 1 ] . stringValue ( ) . split ( "/" ) ; if ( ( strInterval . length ) != 2 ) { throw new org . eclipse . rdf4j . query . algebra . evaluation . ValueExprEvaluationException ( ( ( ( ( getURI ( ) ) + "<sp>requires<sp>the<sp>second<sp>argument:<sp>" ) + ( args [ 1 ] ) ) + "<sp>to<sp>be<sp>2<sp>dates<sp>seperated<sp>by<sp>a<sp>\'/\'" ) ) ; } try { final java . time . ZonedDateTime date1 = java . time . ZonedDateTime . parse ( args [ 0 ] . stringValue ( ) ) ; final java . time . ZonedDateTime [ ] interval = new java . time . ZonedDateTime [ ] { java . time . ZonedDateTime . parse ( strInterval [ 0 ] ) , java . time . ZonedDateTime . parse ( strInterval [ 1 ] ) } ; final boolean result = relation ( date1 , interval ) ; return valueFactory . createLiteral ( result ) ; } catch ( final java . time . format . DateTimeParseException e ) { throw new org . eclipse . rdf4j . query . algebra . evaluation . ValueExprEvaluationException ( "Date/Times<sp>provided<sp>must<sp>be<sp>of<sp>the<sp>ISO-8601<sp>format.<sp>Example:<sp>2007-04-05T14:30Z" ) ; } }
org . junit . Assert . assertEquals ( org . apache . rya . api . function . temporal . WithinTemporalFunctionsTest . VF . createLiteral ( false ) , rez )
type_long ( ) { com . asakusafw . dmdl . directio . json . driver . ModelLoader loaded = generateJavaFromLines ( new java . lang . String [ ] { "@directio.json" , "simple<sp>=<sp>{" , "<sp>value<sp>:<sp>LONG;" , "};" } ) ; byte [ ] contents = restore ( loaded , loaded . newModel ( "Simple" ) . setOption ( "value" , new com . asakusafw . runtime . value . LongOption ( 1 ) ) ) ; "<AssertPlaceHolder>" ; } parse ( byte [ ] ) { return com . asakusafw . dmdl . directio . json . driver . JsonFormatEmitterTest . parse ( contents , StandardCharsets . UTF_8 ) ; }
org . junit . Assert . assertThat ( com . asakusafw . dmdl . directio . json . driver . JsonFormatEmitterTest . parse ( contents ) , com . asakusafw . dmdl . directio . json . driver . JsonFormatEmitterTest . contains ( com . asakusafw . dmdl . directio . json . driver . JsonFormatEmitterTest . map ( "value" , "1" ) ) )
testNormalOperatorInitialization ( ) { org . apache . hyracks . dataflow . std . intersect . IntersectOperatorDescriptor operatorDescriptor = new org . apache . hyracks . dataflow . std . intersect . IntersectOperatorDescriptor ( mockRegistry , nInputs , compareFields , normalizedKeyFactory , comparatorFactory , outRecordDescriptor ) ; "<AssertPlaceHolder>" ; } getInputArity ( ) { return inputArity ; }
org . junit . Assert . assertEquals ( nInputs , operatorDescriptor . getInputArity ( ) )
testMyBinaryLast ( ) { System . out . println ( "binarySearch" ) ; int [ ] index = new int [ ] { 10 , 11 , 12 , 13 , 14 } ; int key = 14 ; int begin = 0 ; int end = 5 ; int expResult = 4 ; int result = org . genemania . engine . matricks . Utils . myBinarySearch ( index , key , begin , end ) ; "<AssertPlaceHolder>" ; } myBinarySearch ( int [ ] , int , int , int ) { if ( ( ( indices . length ) == 0 ) || ( begin == end ) ) { return - 1 ; } end -- ; int mid = begin ; while ( begin <= end ) { mid = ( end + begin ) > > 1 ; if ( ( indices [ mid ] ) < key ) { begin = mid + 1 ; } else if ( ( indices [ mid ] ) > key ) { end = mid - 1 ; } else { return mid ; } } if ( ( indices [ mid ] ) < key ) { return ( - mid ) - 2 ; } else { return ( - mid ) - 1 ; } }
org . junit . Assert . assertEquals ( expResult , result )
repositoryServiceUtilTest ( ) { org . osgi . framework . ServiceReference < com . liferay . blade . api . Migration > sr = _context . getServiceReference ( com . liferay . blade . api . Migration . class ) ; com . liferay . blade . api . Migration m = _context . getService ( sr ) ; java . util . List < com . liferay . blade . api . Problem > problems = m . findProblems ( new java . io . File ( "jsptests/repository-service-util" ) , new com . liferay . blade . util . NullProgressMonitor ( ) ) ; "<AssertPlaceHolder>" ; boolean found = false ; for ( com . liferay . blade . api . Problem problem : problems ) { if ( problem . file . getName ( ) . endsWith ( "RepositoryServiceUtilTest.jsp" ) ) { if ( ( ( ( problem . lineNumber ) == 9 ) && ( ( problem . startOffset ) >= 104 ) ) && ( ( problem . endOffset ) >= 171 ) ) { found = true ; } } } if ( ! found ) { org . junit . Assert . fail ( ) ; } } size ( ) { return getWidget ( ) . rowCount ( ) ; }
org . junit . Assert . assertEquals ( "" , 1 , problems . size ( ) )
testNormaleActie ( ) { java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = uitvoerder . voerUit ( getInschrijvingGeboorteActie ( ) ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( persoonRepository ) . opslaanNieuwPersoon ( org . mockito . Matchers . any ( nl . bzk . brp . model . logisch . Persoon . class ) , org . mockito . Matchers . eq ( java . lang . Integer . valueOf ( 20120325 ) ) ) ; org . mockito . Mockito . verify ( relatieRepository ) . opslaanNieuweRelatie ( org . mockito . Matchers . any ( nl . bzk . brp . model . logisch . Relatie . class ) , org . mockito . Matchers . eq ( java . lang . Integer . valueOf ( 20120325 ) ) ) ; } voerUit ( nl . bzk . brp . bijhouding . business . stappen . context . BijhoudingBerichtContext ) { if ( isConfiguratieBijhoudingNotificatorGeconfigureerd ( ) ) { creeerEnPubliceerJmsBericht ( context ) ; } else { nl . bzk . brp . bijhouding . business . stappen . administratievehandeling . PubliceerAdministratieveHandelingStap . LOGGER . warn ( ( "Er<sp>is<sp>geen<sp>configuratie<sp>ingesteld<sp>voor<sp>de<sp>BijhoudingNotificator," + "<sp>daarom<sp>wordt<sp>er<sp>geen<sp>Administratieve<sp>Handeling<sp>Id<sp>gepubliceerd<sp>op<sp>de<sp>levering<sp>JMS<sp>queue." ) ) ; } }
org . junit . Assert . assertNull ( meldingen )
shouldRaiseConstraintsViolation ( ) { org . agoncal . book . javaee7 . chapter03 . ex10 . Item10 book = new org . agoncal . book . javaee7 . chapter03 . ex10 . Item10 ( ) ; java . util . Set < javax . validation . ConstraintViolation < org . agoncal . book . javaee7 . chapter03 . ex10 . Item10 > > violations = org . agoncal . book . javaee7 . chapter03 . ex10 . Item10Test . validator . validate ( book ) ; displayContraintViolations ( violations ) ; "<AssertPlaceHolder>" ; } displayContraintViolations ( java . util . Set ) { for ( org . agoncal . book . javaee7 . chapter03 . ex12 . ConstraintViolation constraintViolation : constraintViolations ) { System . out . println ( ( ( ( ( ( ( ( "###<sp>" + ( constraintViolation . getRootBeanClass ( ) . getSimpleName ( ) ) ) + "." ) + ( constraintViolation . getPropertyPath ( ) ) ) + "<sp>-<sp>Invalid<sp>Value<sp>=<sp>" ) + ( constraintViolation . getInvalidValue ( ) ) ) + "<sp>-<sp>Error<sp>Msg<sp>=<sp>" ) + ( constraintViolation . getMessage ( ) ) ) ) ; } }
org . junit . Assert . assertEquals ( 1 , violations . size ( ) )
testReadEntryWithSpacesAndPlus ( ) { java . net . URL jarFile = org . robovm . objc . JARURLProtocolTest . createJar ( "resource<sp>with<sp>spaces<sp>and+.txt" , "Hello<sp>world!!!" ) ; org . robovm . apple . foundation . NSURL nsUrl = new org . robovm . apple . foundation . NSURL ( org . robovm . objc . JARURLProtocolTest . rel ( jarFile , "resource<sp>with<sp>spaces<sp>and+.txt" , true ) ) ; java . lang . String expected = org . robovm . objc . JARURLProtocolTest . toString ( org . robovm . objc . JARURLProtocolTest . rel ( jarFile , "resource<sp>with<sp>spaces<sp>and+.txt" , false ) ) ; java . lang . String actual = org . robovm . apple . foundation . NSString . readURL ( nsUrl , NSStringEncoding . UTF8 ) ; "<AssertPlaceHolder>" ; } rel ( java . net . URL , java . lang . String , boolean ) { if ( encodePath ) { path = java . net . URLEncoder . encode ( path , "utf8" ) ; path = path . replace ( "+" , "%20" ) ; } return new java . net . URL ( url . getProtocol ( ) , url . getHost ( ) , ( ( url . getFile ( ) ) + path ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
toString_URIs ( ) { final org . eclipse . rdf4j . query . impl . MapBindingSet originalBindingSet = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; originalBindingSet . addBinding ( "x" , org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverterTest . VF . createIRI ( "http://a" ) ) ; originalBindingSet . addBinding ( "y" , org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverterTest . VF . createIRI ( "http://b" ) ) ; originalBindingSet . addBinding ( "z" , org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverterTest . VF . createIRI ( "http://c" ) ) ; final org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder varOrder = new org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ( "y" , "z" , "x" ) ; final org . apache . rya . indexing . pcj . storage . accumulo . BindingSetConverter < java . lang . String > converter = new org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter ( ) ; final java . lang . String bindingSetString = converter . convert ( originalBindingSet , varOrder ) ; final java . lang . String expected = "http://b<<~>>http://www.w3.org/2001/XMLSchema#anyURI:::" + ( "http://c<<~>>http://www.w3.org/2001/XMLSchema#anyURI:::" + "http://a<<~>>http://www.w3.org/2001/XMLSchema#anyURI" ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String , org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ) { requireNonNull ( bindingSetString ) ; requireNonNull ( varOrder ) ; if ( ( bindingSetString . isEmpty ( ) ) && ( varOrder . toString ( ) . isEmpty ( ) ) ) { return new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; } final java . lang . String [ ] bindingStrings = bindingSetString . split ( org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . BINDING_DELIM ) ; final java . lang . String [ ] varOrderArr = varOrder . toArray ( ) ; checkArgument ( ( ( varOrderArr . length ) == ( bindingStrings . length ) ) , "The<sp>number<sp>of<sp>Bindings<sp>must<sp>match<sp>the<sp>length<sp>of<sp>the<sp>VariableOrder." ) ; final org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet bindingSet = new org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet ( ) ; for ( int i = 0 ; i < ( bindingStrings . length ) ; i ++ ) { final java . lang . String bindingString = bindingStrings [ i ] ; if ( ! ( org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . NULL_VALUE_STRING . equals ( bindingString ) ) ) { final java . lang . String name = varOrderArr [ i ] ; final org . eclipse . rdf4j . model . Value value = org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . toValue ( bindingStrings [ i ] ) ; bindingSet . addBinding ( name , value ) ; } } return bindingSet ; }
org . junit . Assert . assertEquals ( expected , bindingSetString )
testMOD_4 ( ) { org . ethereum . vm . VM vm = new org . ethereum . vm . VM ( ) ; program = new org . ethereum . vm . Program ( org . spongycastle . util . encoders . Hex . decode ( "600406" ) , invoke ) ; try { vm . step ( program ) ; vm . step ( program ) ; vm . step ( program ) ; } finally { "<AssertPlaceHolder>" ; } } isStopped ( ) { return stopped ; }
org . junit . Assert . assertTrue ( program . isStopped ( ) )
getMtryAllTest ( ) { when ( randomForest . getMtry ( ) ) . thenReturn ( ( - 1 ) ) ; edu . oswego . csc480_hci521_2013 . client . presenters . adapters . ConfusionMatrixAdapter adapter = new edu . oswego . csc480_hci521_2013 . client . presenters . adapters . ConfusionMatrixAdapter ( randomForest , modelParameters ) ; "<AssertPlaceHolder>" ; } getMtry ( ) { if ( ( this . rfView . getMtry ( ) ) < 0 ) { return "All" ; } return java . lang . Integer . toString ( this . rfView . getMtry ( ) ) ; }
org . junit . Assert . assertEquals ( adapter . getMtry ( ) , "All" )
guidSize ( ) { long s = org . bridj . BridJ . sizeOf ( org . bridj . cpp . com . GUID . class ) ; "<AssertPlaceHolder>" ; } sizeOf ( java . lang . reflect . Type ) { java . lang . Class < ? > c = org . bridj . util . Utils . getClass ( type ) ; if ( c . isPrimitive ( ) ) { return org . bridj . StructUtils . primTypeLength ( c ) ; } else if ( org . bridj . Pointer . class . isAssignableFrom ( c ) ) { return Pointer . SIZE ; } else if ( c == ( org . bridj . CLong . class ) ) { return CLong . SIZE ; } else if ( c == ( org . bridj . TimeT . class ) ) { return TimeT . SIZE ; } else if ( c == ( org . bridj . SizeT . class ) ) { return SizeT . SIZE ; } else if ( ( c == ( org . bridj . Integer . class ) ) || ( c == ( org . bridj . Float . class ) ) ) { return 4 ; } else if ( ( c == ( org . bridj . Character . class ) ) || ( c == ( org . bridj . Short . class ) ) ) { return 2 ; } else if ( ( c == ( org . bridj . Long . class ) ) || ( c == ( org . bridj . Double . class ) ) ) { return 8 ; } else if ( ( c == ( org . bridj . Boolean . class ) ) || ( c == ( org . bridj . Byte . class ) ) ) { return 1 ; } else if ( org . bridj . NativeObject . class . isAssignableFrom ( c ) ) { return org . bridj . BridJ . getRuntime ( c ) . getTypeInfo ( type ) . sizeOf ( ) ; } else if ( org . bridj . IntValuedEnum . class . isAssignableFrom ( c ) ) { return 4 ; } throw new java . lang . RuntimeException ( ( "Unable<sp>to<sp>compute<sp>size<sp>of<sp>type<sp>" + ( org . bridj . util . Utils . toString ( type ) ) ) ) ; }
org . junit . Assert . assertEquals ( 16 , s )
testRebind ( ) { org . mobicents . tools . smpp . balancer . SpliterModeRebindTest . Locker locker = new org . mobicents . tools . smpp . balancer . SpliterModeRebindTest . Locker ( org . mobicents . tools . smpp . balancer . SpliterModeRebindTest . clientNumbers ) ; new org . mobicents . tools . smpp . balancer . SpliterModeRebindTest . Load ( locker , 2 ) . start ( ) ; locker . waitForClients ( ) ; boolean isCorrectEnqLinkRequest = false ; for ( org . mobicents . tools . smpp . balancer . DefaultSmppServerHandler handler : org . mobicents . tools . smpp . balancer . SpliterModeRebindTest . serverHandlerArray ) if ( ( handler . getSmsNumber ( ) ) == 6 ) isCorrectEnqLinkRequest = true ; "<AssertPlaceHolder>" ; } getSmsNumber ( ) { return smsNumber ; }
org . junit . Assert . assertTrue ( isCorrectEnqLinkRequest )
testFindByPrimaryKeyExisting ( ) { com . liferay . portal . workflow . kaleo . model . KaleoTaskAssignmentInstance newKaleoTaskAssignmentInstance = addKaleoTaskAssignmentInstance ( ) ; com . liferay . portal . workflow . kaleo . model . KaleoTaskAssignmentInstance existingKaleoTaskAssignmentInstance = _persistence . findByPrimaryKey ( newKaleoTaskAssignmentInstance . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingKaleoTaskAssignmentInstance , newKaleoTaskAssignmentInstance )
testStream ( ) { org . batfish . datamodel . IntegerSpace space = org . batfish . datamodel . IntegerSpace . unionOf ( new org . batfish . datamodel . SubRange ( 1 , 5 ) , new org . batfish . datamodel . SubRange ( ( - 3 ) , ( - 1 ) ) ) ; java . util . List < java . lang . Integer > streamed = space . stream ( ) . boxed ( ) . collect ( com . google . common . collect . ImmutableList . toImmutableList ( ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( streamed , org . hamcrest . Matchers . equalTo ( com . google . common . collect . ImmutableList . of ( ( - 3 ) , ( - 2 ) , ( - 1 ) , 1 , 2 , 3 , 4 , 5 ) ) )
testGetSetDateTime ( ) { System . out . println ( "getDateTime" ) ; java . time . LocalDateTime cal = java . time . LocalDateTime . now ( ) ; com . sumzerotrading . data . BarData instance = new com . sumzerotrading . data . BarData ( ) ; java . util . Date expResult = new java . util . Date ( ) ; instance . setDateTime ( cal ) ; java . time . LocalDateTime result = instance . getDateTime ( ) ; "<AssertPlaceHolder>" ; } getDateTime ( ) { return dateTime ; }
org . junit . Assert . assertEquals ( cal , result )
testFormattingUtil ( ) { TEST_DATA_MAP . forEach ( ( timeInMinutes , expectedResult ) -> { java . lang . String formattedMinutes = de . pbauerochse . worklogviewer . util . FormattingUtil . formatMinutes ( timeInMinutes ) ; "<AssertPlaceHolder>" ; } ) ; } formatMinutes ( long ) { return de . pbauerochse . worklogviewer . util . FormattingUtil . formatMinutes ( minutes , false ) ; }
org . junit . Assert . assertEquals ( expectedResult , formattedMinutes )
testConstructor ( ) { org . apache . ogt . http . conn . scheme . SchemeRegistry schreg = createSchemeRegistry ( ) ; org . apache . ogt . http . impl . conn . tsccm . ThreadSafeClientConnManager mgr = new org . apache . ogt . http . impl . conn . tsccm . ThreadSafeClientConnManager ( schreg ) ; "<AssertPlaceHolder>" ; mgr . shutdown ( ) ; } createSchemeRegistry ( ) { org . apache . ogt . http . conn . scheme . SchemeRegistry schreg = new org . apache . ogt . http . conn . scheme . SchemeRegistry ( ) ; schreg . register ( new org . apache . ogt . http . conn . scheme . Scheme ( "http" , 80 , org . apache . ogt . http . conn . scheme . PlainSocketFactory . getSocketFactory ( ) ) ) ; return schreg ; }
org . junit . Assert . assertNotNull ( mgr )
testTapProducerException1 ( ) { exception = new org . tap4j . producer . ProducerException ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( exception )
testInactiveByDefault ( ) { event = new org . smpp . debug . DefaultEvent ( ) ; event . write ( "HELLO" ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . String s = super . toString ( ) ; if ( ( pdu ) != null ) { s += "\nPDU<sp>debug<sp>string:<sp>" + ( pdu . debugString ( ) ) ; } return s ; }
org . junit . Assert . assertEquals ( "" , out . toString ( ) )
loadValidPcap ( ) { java . util . concurrent . BlockingQueue < nl . sidn . pcap . support . PacketCombination > queue = new java . util . concurrent . LinkedBlockingQueue < nl . sidn . pcap . support . PacketCombination > ( ) ; nl . sidn . pcap . load . LoaderThread lt = new nl . sidn . pcap . load . LoaderThread ( queue , "/tmp/" , "/tmp/" , "/tmp/" ) ; java . lang . ClassLoader classLoader = getClass ( ) . getClassLoader ( ) ; java . io . File file = new java . io . File ( classLoader . getResource ( "pcap/ns1.example.nl/ns1.example.nl_2-txt-queries.pcap.gz" ) . getFile ( ) ) ; lt . read ( file . getAbsolutePath ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return data . size ( ) ; }
org . junit . Assert . assertEquals ( 5 , queue . size ( ) )
testGetTypeOfSheep ( ) { int age = 10 ; it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . animals . TypeOfSheep tos = TypeOfSheep . MALESHEEP ; it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . objectsOfGame . Terrain position = it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . objectsOfGame . Terrain . C1 ; it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . animals . Sheep sheep = new it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . animals . Sheep ( age , tos , position ) ; sheep . setID ( ) ; sheep . ageIcrement ( ) ; "<AssertPlaceHolder>" ; } getTypeOfSheep ( ) { return typeOfSheep ; }
org . junit . Assert . assertEquals ( sheep . getTypeOfSheep ( ) , tos )