input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testHasIndexHashKeyEqualConditionAnd_WhenConditionCriteriaIsNonEqualityConditionOnAPropertyWhichIsAnIndexHashKeyButNotAHashKeyButIsARangeKey ( ) { org . mockito . Mockito . when ( entityInformation . isGlobalIndexHashKeyProperty ( "playlistName" ) ) . thenReturn ( true ) ; criteria . withPropertyBetween ( "playlistName" , "some<sp>playlist<sp>name" , "some<sp>other<sp>playlist<sp>name" , java . lang . String . class ) ; boolean hasIndexHashKeyEqualCondition = criteria . hasIndexHashKeyEqualCondition ( ) ; "<AssertPlaceHolder>" ; } hasIndexHashKeyEqualCondition ( ) { boolean hasCondition = super . hasIndexHashKeyEqualCondition ( ) ; if ( ! hasCondition ) { if ( ( ( rangeKeyAttributeValue ) != null ) && ( entityInformation . isGlobalIndexHashKeyProperty ( rangeKeyPropertyName ) ) ) { hasCondition = true ; } } return hasCondition ; }
|
org . junit . Assert . assertFalse ( hasIndexHashKeyEqualCondition )
|
getPatientIdentifiers_shouldReturnAllMatchingNonVoidedPatientIdentifiersIfIsPreferredIsSetToNull ( ) { java . util . List < org . openmrs . PatientIdentifier > patientIdentifiers = dao . getPatientIdentifiers ( null , new java . util . ArrayList ( ) , new java . util . ArrayList ( ) , new java . util . ArrayList ( ) , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) . size ( ) ; }
|
org . junit . Assert . assertEquals ( 8 , patientIdentifiers . size ( ) )
|
hybridWrapperRoleCompletionRespectsPriorities ( ) { jetbrains . jetpad . completion . CompletionSupplier roleCompletionSupplier = createHybridWrapperRoleCompletionSupplier ( ) ; jetbrains . jetpad . cell . completion . CompletionItems completionItems = new jetbrains . jetpad . cell . completion . CompletionItems ( roleCompletionSupplier . get ( CompletionParameters . EMPTY ) ) ; java . lang . String code = "'" ; for ( boolean eagerCompletion : new boolean [ ] { false , true } ) { "<AssertPlaceHolder>" ; } } hasSingleMatch ( java . lang . String , boolean ) { java . util . List < jetbrains . jetpad . completion . CompletionItem > matches = matches ( text ) ; java . util . List < jetbrains . jetpad . completion . CompletionItem > strictlyPrefixed = strictlyPrefixedBy ( text ) ; if ( ( matches . size ( ) ) == 1 ) { if ( eager ) return true ; if ( matches . containsAll ( strictlyPrefixed ) ) return true ; java . util . List < jetbrains . jetpad . completion . CompletionItem > allItems = new java . util . ArrayList ( ) ; allItems . addAll ( matches ) ; allItems . addAll ( strictlyPrefixed ) ; java . util . List < jetbrains . jetpad . completion . CompletionItem > reduced = reduce ( allItems ) ; if ( ( ( reduced . size ( ) ) == 1 ) && ( reduced . containsAll ( matches ) ) ) return true ; } return false ; }
|
org . junit . Assert . assertTrue ( completionItems . hasSingleMatch ( code , eagerCompletion ) )
|
shouldBijectivelyConvert ( ) { final com . jeromeloisel . db . conversion . jackson . Animal animal = new com . jeromeloisel . db . conversion . jackson . Animal ( "id" , "Tiger" , "Panthera<sp>Tigris" , false ) ; final java . lang . String json = serializer . apply ( animal ) ; final com . jeromeloisel . db . conversion . jackson . Animal deserialized = deserializer . apply ( json ) ; "<AssertPlaceHolder>" ; } apply ( java . lang . String ) { try { return mapper . readerFor ( clazz ) . readValue ( json ) ; } catch ( final java . io . IOException e ) { throw new com . jeromeloisel . db . conversion . jackson . JacksonConversionException ( "Could<sp>not<sp>deserialize<sp>json" , e ) ; } }
|
org . junit . Assert . assertEquals ( animal , deserialized )
|
getRevocationInformation ( ) { eu . abc4trust . services . revocation . RevocationServiceFactory revocationServiceFactory = new eu . abc4trust . services . revocation . RevocationServiceFactory ( ) ; java . lang . String revocationAuthorityParametersUid = "urn:revocationauthorityparameters:test:foobar" ; eu . abc4trust . xml . RevocationInformation revocationInformation = revocationServiceFactory . getRevocationInformation ( revocationAuthorityParametersUid ) ; "<AssertPlaceHolder>" ; } getRevocationInformation ( java . net . URI ) { this . log . info ( "RevocationService<sp>-<sp>getrevocationinformation" ) ; this . validateRevocationParametersUid ( revParUid ) ; this . initializeHelper ( ) ; eu . abc4trust . abce . external . revocation . RevocationAbcEngine engine = eu . abc4trust . services . helpers . RevocationHelper . getInstance ( ) . engine ; eu . abc4trust . xml . RevocationInformation revInfo = engine . updateRevocationInformation ( revParUid ) ; return this . of . createRevocationInformation ( revInfo ) ; }
|
org . junit . Assert . assertNotNull ( revocationInformation )
|
byteArrayCopyOf2 ( ) { long [ ] array = new long [ ] { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ; org . diirt . util . array . ListNumber coll = new org . diirt . util . array . ArrayLong ( array ) ; byte [ ] array2 = org . diirt . util . array . CollectionNumbers . byteArrayCopyOf ( coll ) ; "<AssertPlaceHolder>" ; } byteArrayCopyOf ( org . diirt . util . array . CollectionNumber ) { byte [ ] data = new byte [ coll . size ( ) ] ; org . diirt . util . array . IteratorNumber iter = coll . iterator ( ) ; int index = 0 ; while ( iter . hasNext ( ) ) { data [ index ] = iter . nextByte ( ) ; index ++ ; } return data ; }
|
org . junit . Assert . assertThat ( array2 , equalTo ( new byte [ ] { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ) )
|
testGetProjectStatsOderByAndPagingEachType ( ) { java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap ( ) ; org . sagebionetworks . repo . model . entity . query . SortDirection sortDirection = org . sagebionetworks . repo . model . entity . query . SortDirection . DESC ; java . lang . Long limit = 10L ; java . lang . Long offset = 1L ; for ( org . sagebionetworks . repo . model . ProjectListSortColumn sortColumn : org . sagebionetworks . repo . model . ProjectListSortColumn . values ( ) ) { java . lang . String result = org . sagebionetworks . repo . model . dbo . dao . NodeDAOImpl . getProjectStatsOderByAndPaging ( parameters , sortColumn , sortDirection , limit , offset ) ; "<AssertPlaceHolder>" ; } } getProjectStatsOderByAndPaging ( java . util . Map , org . sagebionetworks . repo . model . ProjectListSortColumn , org . sagebionetworks . repo . model . entity . query . SortDirection , java . lang . Long , java . lang . Long ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; switch ( sortColumn ) { case LAST_ACTIVITY : builder . append ( org . sagebionetworks . repo . model . dbo . dao . NodeDAOImpl . SELECT_PROJECTS_ORDER ) ; break ; case PROJECT_NAME : builder . append ( org . sagebionetworks . repo . model . dbo . dao . NodeDAOImpl . SELECT_NAME_ORDER ) ; break ; default : throw new org . apache . commons . lang3 . NotImplementedException ( ( ( "project<sp>list<sp>sort<sp>column<sp>" + sortColumn ) + "<sp>not<sp>yet<sp>implemented" ) ) ; } builder . append ( "<sp>" ) . append ( sortDirection . name ( ) ) ; builder . append ( "<sp>" ) ; java . lang . String pagingSql = org . sagebionetworks . repo . model . query . jdo . QueryUtils . buildPaging ( offset , limit , parameters ) ; builder . append ( pagingSql ) ; return builder . toString ( ) ; }
|
org . junit . Assert . assertNotNull ( result )
|
testConfigure ( ) { lifeCycleFactory . configure ( org . eclipse . rap . rwt . internal . lifecycle . LifeCycleFactory_Test . TestLifeCycle . class ) ; lifeCycleFactory . activate ( ) ; java . lang . Class < ? > lifeCycleClass = lifeCycleFactory . getLifeCycle ( ) . getClass ( ) ; "<AssertPlaceHolder>" ; } getLifeCycle ( ) { return lifeCycle ; }
|
org . junit . Assert . assertSame ( org . eclipse . rap . rwt . internal . lifecycle . LifeCycleFactory_Test . TestLifeCycle . class , lifeCycleClass )
|
testGetAllOrders ( ) { java . util . List < ca . on . oicr . pinery . api . Order > orders = sut . getOrders ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
|
org . junit . Assert . assertTrue ( ( ( orders . size ( ) ) > 1 ) )
|
testEqualToRecordThresholdCount ( ) { int thresholdVolume = 5 ; int uploadCheckPeriod = 2000 ; org . kaaproject . kaa . client . logging . LogStorageStatus logStorageStatus = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . logging . LogStorageStatus . class ) ; org . mockito . Mockito . when ( logStorageStatus . getConsumedVolume ( ) ) . thenReturn ( ( ( long ) ( thresholdVolume ) ) ) ; org . kaaproject . kaa . client . logging . strategies . StorageSizeWithTimeLimitLogUploadStrategy strategy = new org . kaaproject . kaa . client . logging . strategies . StorageSizeWithTimeLimitLogUploadStrategy ( thresholdVolume , uploadCheckPeriod , java . util . concurrent . TimeUnit . MILLISECONDS ) ; "<AssertPlaceHolder>" ; } checkUploadNeeded ( org . kaaproject . kaa . client . logging . LogStorageStatus ) { org . kaaproject . kaa . client . logging . LogUploadStrategyDecision decision = LogUploadStrategyDecision . NOOP ; if ( ( status . getConsumedVolume ( ) ) >= ( volumeThreshold ) ) { org . kaaproject . kaa . client . logging . DefaultLogUploadStrategy . LOG . info ( "Need<sp>to<sp>upload<sp>logs<sp>-<sp>current<sp>size:<sp>{},<sp>threshold:<sp>{}" , status . getConsumedVolume ( ) , volumeThreshold ) ; decision = LogUploadStrategyDecision . UPLOAD ; } else if ( ( status . getRecordCount ( ) ) >= ( countThreshold ) ) { org . kaaproject . kaa . client . logging . DefaultLogUploadStrategy . LOG . info ( "Need<sp>to<sp>upload<sp>logs<sp>-<sp>current<sp>count:<sp>{},<sp>threshold:<sp>{}" , status . getRecordCount ( ) , countThreshold ) ; decision = LogUploadStrategyDecision . UPLOAD ; } return decision ; }
|
org . junit . Assert . assertEquals ( strategy . checkUploadNeeded ( logStorageStatus ) , LogUploadStrategyDecision . UPLOAD )
|
testRecordJsonAvro ( ) { org . nuxeo . lib . stream . computation . Record src = getRecord ( ) ; org . nuxeo . lib . stream . codec . Codec < org . nuxeo . lib . stream . computation . Record > codec = new org . nuxeo . lib . stream . codec . AvroJsonCodec ( org . nuxeo . lib . stream . computation . Record . class ) ; org . nuxeo . lib . stream . computation . Record dest = testCodec ( src , codec ) ; "<AssertPlaceHolder>" ; testCodecFromFile ( "data/record-avro.json" , codec ) ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "AuthenticationToken{" + "token='" ) + ( token ) ) + '\'' ) + ",<sp>userName='" ) + ( userName ) ) + '\'' ) + ",<sp>applicationName='" ) + ( applicationName ) ) + '\'' ) + ",<sp>deviceId='" ) + ( deviceId ) ) + '\'' ) + ",<sp>deviceDescription='" ) + ( deviceDescription ) ) + '\'' ) + ",<sp>permission='" ) + ( permission ) ) + '\'' ) + ",<sp>creationDate=" ) + ( creationDate ) ) + '}' ; }
|
org . junit . Assert . assertEquals ( src . toString ( ) , dest . toString ( ) )
|
testUnreachableCode ( ) { int i = 46 + 1 ; if ( i < 47 ) { java . lang . String s = edu . columbia . cs . psl . test . phosphor . DroidBenchObjTagITCase . taintedString ( ) ; "<AssertPlaceHolder>" ; } } getTaint ( java . lang . String ) { edu . columbia . cs . psl . phosphor . runtime . Taint taint = edu . columbia . cs . psl . phosphor . runtime . MultiTainter . getTaint ( description . toCharArray ( ) [ 0 ] ) ; return ( taint == null ) || ( ( ( taint . lbl ) == null ) && ( taint . hasNoDependencies ( ) ) ) ? 0 : 1 ; }
|
org . junit . Assert . assertTrue ( ( ( edu . columbia . cs . psl . test . phosphor . DroidBenchObjTagITCase . getTaint ( s ) ) != 0 ) )
|
nameNewIsNameOp ( ) { final org . libdohj . script . NameScript ns = getNameNewNameScript ( ) ; "<AssertPlaceHolder>" ; } isNameOp ( ) { switch ( op ) { case org . libdohj . script . NameScript . OP_NAME_NEW : case org . libdohj . script . NameScript . OP_NAME_FIRSTUPDATE : case org . libdohj . script . NameScript . OP_NAME_UPDATE : return true ; case OP_NOP : return false ; default : throw new org . bitcoinj . core . ScriptException ( "Invalid<sp>name<sp>op" ) ; } }
|
org . junit . Assert . assertTrue ( ns . isNameOp ( ) )
|
testUpdateBusinessObjectDataNotificationRegistrationWithDisabledStatus ( ) { org . finra . herd . model . api . xml . NotificationRegistrationKey notificationRegistrationKey = new org . finra . herd . model . api . xml . NotificationRegistrationKey ( NAMESPACE , NOTIFICATION_NAME ) ; notificationRegistrationServiceTestHelper . createDatabaseEntitiesForBusinessObjectDataNotificationRegistrationTesting ( org . finra . herd . service . NAMESPACE , java . util . Arrays . asList ( NotificationEventTypeEntity . EventTypesBdata . BUS_OBJCT_DATA_STTS_CHG . name ( ) , NotificationEventTypeEntity . EventTypesBdata . BUS_OBJCT_DATA_RGSTN . name ( ) ) , org . finra . herd . service . BDEF_NAMESPACE_2 , org . finra . herd . service . BDEF_NAME_2 , java . util . Arrays . asList ( org . finra . herd . service . FORMAT_FILE_TYPE_CODE , org . finra . herd . service . FORMAT_FILE_TYPE_CODE_2 ) , java . util . Arrays . asList ( org . finra . herd . service . STORAGE_NAME , org . finra . herd . service . STORAGE_NAME_2 ) , java . util . Arrays . asList ( org . finra . herd . service . BDATA_STATUS , org . finra . herd . service . BDATA_STATUS_2 , org . finra . herd . service . BDATA_STATUS_3 , org . finra . herd . service . BDATA_STATUS_4 ) , notificationRegistrationDaoTestHelper . getTestJobActions2 ( ) ) ; notificationRegistrationDaoTestHelper . createBusinessObjectDataNotificationRegistrationEntity ( notificationRegistrationKey , NotificationEventTypeEntity . EventTypesBdata . BUS_OBJCT_DATA_STTS_CHG . name ( ) , org . finra . herd . service . BDEF_NAMESPACE , org . finra . herd . service . BDEF_NAME , org . finra . herd . service . FORMAT_USAGE_CODE , org . finra . herd . service . FORMAT_FILE_TYPE_CODE , org . finra . herd . service . FORMAT_VERSION , org . finra . herd . service . STORAGE_NAME , org . finra . herd . service . BDATA_STATUS , org . finra . herd . service . BDATA_STATUS_2 , notificationRegistrationDaoTestHelper . getTestJobActions ( ) , NotificationRegistrationStatusEntity . ENABLED ) ; org . finra . herd . model . api . xml . BusinessObjectDataNotificationRegistration resultBusinessObjectDataNotificationRegistration = businessObjectDataNotificationRegistrationService . updateBusinessObjectDataNotificationRegistration ( new org . finra . herd . model . api . xml . NotificationRegistrationKey ( NAMESPACE , NOTIFICATION_NAME ) , new org . finra . herd . model . api . xml . BusinessObjectDataNotificationRegistrationUpdateRequest ( NotificationEventTypeEntity . EventTypesBdata . BUS_OBJCT_DATA_RGSTN . name ( ) , new org . finra . herd . model . api . xml . BusinessObjectDataNotificationFilter ( BDEF_NAMESPACE_2 , BDEF_NAME_2 , FORMAT_USAGE_CODE_2 , FORMAT_FILE_TYPE_CODE_2 , FORMAT_VERSION_2 , STORAGE_NAME_2 , BDATA_STATUS_3 , NO_BDATA_STATUS ) , notificationRegistrationDaoTestHelper . getTestJobActions2 ( ) , org . finra . herd . model . jpa . NotificationRegistrationStatusEntity . DISABLED ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
|
org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . BusinessObjectDataNotificationRegistration ( resultBusinessObjectDataNotificationRegistration . getId ( ) , notificationRegistrationKey , NotificationEventTypeEntity . EventTypesBdata . BUS_OBJCT_DATA_RGSTN . name ( ) , new org . finra . herd . model . api . xml . BusinessObjectDataNotificationFilter ( BDEF_NAMESPACE_2 , BDEF_NAME_2 , FORMAT_USAGE_CODE_2 , FORMAT_FILE_TYPE_CODE_2 , FORMAT_VERSION_2 , STORAGE_NAME_2 , BDATA_STATUS_3 , NO_BDATA_STATUS ) , notificationRegistrationDaoTestHelper . getTestJobActions2 ( ) , org . finra . herd . model . jpa . NotificationRegistrationStatusEntity . DISABLED ) , resultBusinessObjectDataNotificationRegistration )
|
detectIfNoneWithString ( ) { char character = com . gs . collections . impl . utility . StringIterate . detectIfNone ( "123" , com . gs . collections . impl . block . factory . primitive . CharPredicates . isLetter ( ) , "b" ) ; "<AssertPlaceHolder>" ; } isLetter ( ) { com . gs . collections . impl . block . factory . primitive . CharPredicateTest . assertTrue ( CharLists . mutable . of ( 'A' , 'B' , 'C' ) , CharPredicate . IS_LETTER ) ; com . gs . collections . impl . block . factory . primitive . CharPredicateTest . assertTrue ( CharLists . mutable . of ( 'a' , 'b' , 'c' ) , CharPredicate . IS_LETTER ) ; com . gs . collections . impl . block . factory . primitive . CharPredicateTest . assertFalse ( CharLists . mutable . of ( '0' , '1' , '2' , '3' , '.' ) , CharPredicate . IS_LETTER ) ; }
|
org . junit . Assert . assertEquals ( 'b' , character )
|
runTest ( ) { boolean result = checkNoError ( "Social_ActivityStreams_Notifications_For_Me" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; }
|
org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result )
|
testGetGeometries ( ) { java . util . List < org . locationtech . jts . geom . Geometry > intersecting = org . hortonmachine . dbs . TestSpatialDbsMain . db . getGeometriesIn ( org . hortonmachine . dbs . TestUtilities . MPOLY_TABLE , ( ( org . locationtech . jts . geom . Envelope ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return nCols ; }
|
org . junit . Assert . assertEquals ( 3 , intersecting . size ( ) )
|
testIterable ( ) { int size = 1000 ; java . util . Random r = new java . util . Random ( ) ; int [ ] ints = new int [ size ] ; tl . lin . data . array . ArrayListOfInts list = new tl . lin . data . array . ArrayListOfInts ( ) ; for ( int i = 0 ; i < size ; i ++ ) { int k = r . nextInt ( size ) ; list . add ( k ) ; ints [ i ] = k ; } int i = 0 ; for ( java . lang . Integer v : list ) { "<AssertPlaceHolder>" ; } } add ( long ) { ensureCapacity ( ( ( size ) + 1 ) ) ; array [ ( ( size ) ++ ) ] = e ; return this ; }
|
org . junit . Assert . assertEquals ( ints [ ( i ++ ) ] , ( ( int ) ( v ) ) )
|
secondTest ( ) { "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( 1 , 1 )
|
testGetFirst ( ) { try { deque . getFirst ( ) ; org . junit . Assert . fail ( "Not<sp>supposed<sp>to<sp>get<sp>here" ) ; } catch ( final java . util . NoSuchElementException e ) { } deque . add ( org . apache . commons . pool2 . impl . TestLinkedBlockingDeque . ONE ) ; deque . add ( org . apache . commons . pool2 . impl . TestLinkedBlockingDeque . TWO ) ; "<AssertPlaceHolder>" ; } getFirst ( ) { final E x = peekFirst ( ) ; if ( x == null ) { throw new java . util . NoSuchElementException ( ) ; } return x ; }
|
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , deque . getFirst ( ) )
|
testPublicKey ( ) { securityContextManager . setFoo ( ) ; userService . setPublicKey ( "eyJtb2R1bGUiOiI5MTIxMzkwMjU2NDM1ODA1MjM4NDg4MDI5NDE3MjgxMzIxNjk4NTYxMDk2NTcwNTE5NDc2OTM4NDQ4NDA1NzgxMjAyMDM4NzM1NzQwNDg0OTczODQ5NzU2MTIzNjE3MjQ1MzI1MzMzMTEzNDMwMzAwMjc4NjIyNjc2NjkwMDEzMzkxOTgxMjAyMTk2NzY5Mjg2MDc3NzMwODkwOTkxODIyMDMzNTk4NjQ1NjkwMzU1NzYxNTU3NjUwNjkwMzI1MTE2NTUzODQ3OTI0NTc5OTk1MTQwNDM0NDkyOTk3NDg0MDg1NjM5ODI2NjU4NzY1NDM4NTE3ODk0Mzg5NTc4NDg1ODYxNDMxMjY3Mzg0OTM3MDE1MzgyMjg2MzAzODYxOTU5NzcyOTA1OTQwNDUzNjMxNjA2OSIsInB1YmxpY0tleSI6IjY1NTM3In0=" ) ; com . github . emailtohl . building . site . entities . user . User u = userService . getUserByEmail ( foo . getEmail ( ) ) ; "<AssertPlaceHolder>" ; userService . clearPublicKey ( ) ; } getPublicKey ( ) { return publicKey ; }
|
org . junit . Assert . assertNotNull ( u . getPublicKey ( ) )
|
testCompareToWithEqualVersion ( ) { org . tibennetwork . iarcade . mame . MameVersion version1 = new org . tibennetwork . iarcade . mame . MameVersion ( "0.149" ) ; org . tibennetwork . iarcade . mame . MameVersion version2 = new org . tibennetwork . iarcade . mame . MameVersion ( "0.149" ) ; "<AssertPlaceHolder>" ; } compareTo ( org . tibennetwork . iarcade . mame . MameVersion ) { if ( ( major ) == ( version . getMajor ( ) ) ) { return ( minor ) - ( version . getMinor ( ) ) ; } return ( major ) - ( version . getMajor ( ) ) ; }
|
org . junit . Assert . assertTrue ( ( ( version1 . compareTo ( version2 ) ) == 0 ) )
|
testPrettyPrint_1 ( ) { org . audit4j . core . util . StopWatch fixture = new org . audit4j . core . util . StopWatch ( "" ) ; fixture . setKeepTaskList ( true ) ; fixture . start ( "" ) ; halt ( ) ; fixture . stop ( ) ; java . lang . String result = fixture . prettyPrint ( ) ; "<AssertPlaceHolder>" ; } prettyPrint ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( shortSummary ( ) ) ; sb . append ( '\n' ) ; if ( ! ( this . keepTaskList ) ) { sb . append ( "No<sp>task<sp>info<sp>kept" ) ; } else { sb . append ( "-----------------------------------------\n" ) ; sb . append ( "ms<sp>%<sp>Task<sp>name\n" ) ; sb . append ( "-----------------------------------------\n" ) ; java . text . NumberFormat nf = java . text . NumberFormat . getNumberInstance ( ) ; nf . setMinimumIntegerDigits ( 5 ) ; nf . setGroupingUsed ( false ) ; java . text . NumberFormat pf = java . text . NumberFormat . getPercentInstance ( ) ; pf . setMinimumIntegerDigits ( 3 ) ; pf . setGroupingUsed ( false ) ; for ( org . audit4j . core . util . StopWatch . TaskInfo task : getTaskInfo ( ) ) { sb . append ( nf . format ( task . getTimeMillis ( ) ) ) . append ( "<sp>" ) ; sb . append ( pf . format ( ( ( task . getTimeSeconds ( ) ) / ( getTotalTimeSeconds ( ) ) ) ) ) . append ( "<sp>" ) ; sb . append ( task . getTaskName ( ) ) . append ( "\n" ) ; } } return sb . toString ( ) ; }
|
org . junit . Assert . assertNotNull ( result )
|
testWafterR ( ) { org . zoodb . internal . util . RWSemaphore < java . lang . Object > s = new org . zoodb . internal . util . RWSemaphore ( ) ; org . zoodb . test . util . RWSemaphoreTest . GetRLOCK r1 = new org . zoodb . test . util . RWSemaphoreTest . GetRLOCK ( s ) ; r1 . start ( ) ; r1 . join ( ) ; org . zoodb . test . util . RWSemaphoreTest . GetWLOCK w2 = new org . zoodb . test . util . RWSemaphoreTest . GetWLOCK ( s ) ; w2 . start ( ) ; java . lang . Thread . sleep ( 100 ) ; "<AssertPlaceHolder>" ; s . release ( r1 ) ; w2 . join ( ) ; s . release ( w2 ) ; } isAlive ( ) { return true ; }
|
org . junit . Assert . assertTrue ( w2 . isAlive ( ) )
|
testLatestFirst ( ) { java . util . List < java . net . URL > expected = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { java . io . File tempFile = createTempFile ( ( ( "recent-" + i ) + "-" ) , ".url" ) ; tempFile . deleteOnExit ( ) ; java . net . URL url = tempFile . toURI ( ) . toURL ( ) ; model . addUrl ( url ) ; expected . add ( 0 , url ) ; "<AssertPlaceHolder>" ; } } getUrls ( ) { java . util . List < java . net . URL > result = new java . util . ArrayList ( ) ; java . lang . String recentUrls = preferences . get ( slash . navigation . converter . gui . models . RecentUrlsModel . RECENT_URLS_PREFERENCE , "" ) ; for ( char c : recentUrls . toCharArray ( ) ) { java . lang . String urlString = preferences . get ( ( ( slash . navigation . converter . gui . models . RecentUrlsModel . RECENT_URL_PREFERENCE ) + c ) , null ) ; if ( urlString != null ) { try { java . net . URL url = new java . net . URL ( urlString ) ; java . io . File file = slash . common . io . Files . toFile ( url ) ; if ( ( file == null ) || ( file . exists ( ) ) ) result . add ( 0 , url ) ; } catch ( java . net . MalformedURLException e ) { slash . navigation . converter . gui . models . RecentUrlsModel . log . warning ( ( ( ( "Recent<sp>URL<sp>'" + urlString ) + "'<sp>is<sp>malformed:<sp>" ) + e ) ) ; } } } return result . subList ( 0 , java . lang . Math . min ( result . size ( ) , getMaximumCount ( ) ) ) ; }
|
org . junit . Assert . assertEquals ( expected , model . getUrls ( ) )
|
testRequestZeroWhenUnsubscribed ( ) { rx . Subscriber < java . lang . Object > sub = new rx . Subscriber < java . lang . Object > ( ) { @ com . github . davidmoten . rtree . Override public void onCompleted ( ) { } @ com . github . davidmoten . rtree . Override public void onError ( java . lang . Throwable e ) { } @ com . github . davidmoten . rtree . Override public void onNext ( java . lang . Object t ) { } } ; sub . add ( new rx . Subscription ( ) { volatile boolean subscribed = true ; @ com . github . davidmoten . rtree . Override public void unsubscribe ( ) { subscribed = false ; } @ com . github . davidmoten . rtree . Override public boolean isUnsubscribed ( ) { return ! ( subscribed ) ; } } ) ; sub . unsubscribe ( ) ; com . github . davidmoten . rtree . Node < java . lang . Object , com . github . davidmoten . rtree . geometry . Geometry > node = org . mockito . Mockito . mock ( com . github . davidmoten . rtree . Node . class ) ; com . github . davidmoten . rtree . NodePosition < java . lang . Object , com . github . davidmoten . rtree . geometry . Geometry > np = new com . github . davidmoten . rtree . NodePosition < java . lang . Object , com . github . davidmoten . rtree . geometry . Geometry > ( node , 1 ) ; com . github . davidmoten . rtree . internal . util . ImmutableStack < com . github . davidmoten . rtree . NodePosition < java . lang . Object , com . github . davidmoten . rtree . geometry . Geometry > > stack = com . github . davidmoten . rtree . internal . util . ImmutableStack . < com . github . davidmoten . rtree . NodePosition < java . lang . Object , com . github . davidmoten . rtree . geometry . Geometry > > empty ( ) . push ( np ) ; rx . functions . Func1 < com . github . davidmoten . rtree . geometry . Geometry , java . lang . Boolean > condition = org . mockito . Mockito . mock ( rx . functions . Func1 . class ) ; com . github . davidmoten . rtree . internal . util . ImmutableStack < com . github . davidmoten . rtree . NodePosition < java . lang . Object , com . github . davidmoten . rtree . geometry . Geometry > > stack2 = com . github . davidmoten . rtree . Backpressure . search ( condition , sub , stack , 1 ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( size ) == 0 ; }
|
org . junit . Assert . assertTrue ( stack2 . isEmpty ( ) )
|
containsFilePath ( ) { org . jenkinsci . plugins . postbuildscript . model . ScriptFile scriptFile = new org . jenkinsci . plugins . postbuildscript . model . ScriptFile ( java . util . Collections . singleton ( org . jenkinsci . plugins . postbuildscript . model . ScriptFileTest . RESULT ) , org . jenkinsci . plugins . postbuildscript . model . ScriptFileTest . FILE_PATH ) ; "<AssertPlaceHolder>" ; } getFilePath ( ) { return filePath ; }
|
org . junit . Assert . assertThat ( scriptFile . getFilePath ( ) , org . hamcrest . CoreMatchers . is ( org . jenkinsci . plugins . postbuildscript . model . ScriptFileTest . FILE_PATH ) )
|
testTranslateRightHandeSideInterval ( ) { org . sagebionetworks . table . query . model . UnsignedLiteral element = new org . sagebionetworks . table . query . TableQueryParser ( "INTERVAL<sp>3<sp>MONTH" ) . unsignedLiteral ( ) ; java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; org . sagebionetworks . table . cluster . SQLTranslatorUtils . translateRightHandeSide ( element , columnDate , parameters ) ; "<AssertPlaceHolder>" ; } translateRightHandeSide ( org . sagebionetworks . table . query . model . HasReplaceableChildren , org . sagebionetworks . repo . model . table . ColumnModel , java . util . Map ) { org . sagebionetworks . util . ValidateArgument . required ( element , "element" ) ; org . sagebionetworks . util . ValidateArgument . required ( model , "model" ) ; org . sagebionetworks . util . ValidateArgument . required ( parameters , "parameters" ) ; if ( ( element . getFirstElementOfType ( org . sagebionetworks . table . query . model . IntervalLiteral . class ) ) != null ) { return ; } java . lang . String key = ( org . sagebionetworks . table . cluster . SQLTranslatorUtils . BIND_PREFIX ) + ( parameters . size ( ) ) ; java . lang . String value = element . toSqlWithoutQuotes ( ) ; java . lang . Object valueObject = null ; try { valueObject = org . sagebionetworks . table . cluster . SQLUtils . parseValueForDB ( model . getColumnType ( ) , value ) ; } catch ( java . lang . IllegalArgumentException e ) { valueObject = value ; } parameters . put ( key , valueObject ) ; element . replaceChildren ( new org . sagebionetworks . table . query . model . StringOverride ( ( ( org . sagebionetworks . table . cluster . SQLTranslatorUtils . COLON ) + key ) ) ) ; }
|
org . junit . Assert . assertEquals ( "INTERVAL<sp>3<sp>MONTH" , element . toSqlWithoutQuotes ( ) )
|
powerSet ( ) { com . gs . collections . api . set . MutableSet < java . lang . Integer > set = com . gs . collections . impl . set . mutable . UnifiedSet . newSetWith ( 1 , 2 , 3 ) ; com . gs . collections . api . set . MutableSet < com . gs . collections . api . set . MutableSet < java . lang . Integer > > expectedPowerSet = com . gs . collections . impl . set . mutable . UnifiedSet . < com . gs . collections . api . set . MutableSet < java . lang . Integer > > newSetWith ( com . gs . collections . impl . set . mutable . UnifiedSet . < java . lang . Integer > newSet ( ) , com . gs . collections . impl . set . mutable . UnifiedSet . newSetWith ( 1 ) , com . gs . collections . impl . set . mutable . UnifiedSet . newSetWith ( 2 ) , com . gs . collections . impl . set . mutable . UnifiedSet . newSetWith ( 3 ) , com . gs . collections . impl . set . mutable . UnifiedSet . newSetWith ( 1 , 2 ) , com . gs . collections . impl . set . mutable . UnifiedSet . newSetWith ( 1 , 3 ) , com . gs . collections . impl . set . mutable . UnifiedSet . newSetWith ( 2 , 3 ) , com . gs . collections . impl . set . mutable . UnifiedSet . newSetWith ( 1 , 2 , 3 ) ) ; "<AssertPlaceHolder>" ; } powerSet ( java . util . Set ) { com . gs . collections . api . set . MutableSet < com . gs . collections . api . set . MutableSet < T > > seed = com . gs . collections . impl . set . mutable . UnifiedSet . < com . gs . collections . api . set . MutableSet < T > > newSetWith ( com . gs . collections . impl . set . mutable . UnifiedSet . < T > newSet ( ) ) ; return com . gs . collections . impl . utility . Iterate . injectInto ( seed , set , new com . gs . collections . api . block . function . Function2 < com . gs . collections . api . set . MutableSet < com . gs . collections . api . set . MutableSet < T > > , T , com . gs . collections . api . set . MutableSet < com . gs . collections . api . set . MutableSet < T > > > ( ) { public com . gs . collections . api . set . MutableSet < com . gs . collections . api . set . MutableSet < T > > value ( com . gs . collections . api . set . MutableSet < com . gs . collections . api . set . MutableSet < T > > accumulator , final T element ) { return com . gs . collections . impl . factory . Sets . union ( accumulator , accumulator . collect ( new com . gs . collections . api . block . function . Function < com . gs . collections . api . set . MutableSet < T > , com . gs . collections . api . set . MutableSet < T > > ( ) { public com . gs . collections . api . set . MutableSet < T > valueOf ( com . gs . collections . api . set . MutableSet < T > innerSet ) { return innerSet . toSet ( ) . with ( element ) ; } } ) ) ; } } ) ; }
|
org . junit . Assert . assertEquals ( expectedPowerSet , com . gs . collections . impl . factory . Sets . powerSet ( set ) )
|
testRestoreWithGarbageCollectedValue ( ) { com . vaadin . server . VaadinSession session1 = new com . vaadin . server . VaadinSession ( null ) { @ com . vaadin . util . Override public java . lang . String toString ( ) { return "First<sp>session" ; } } ; com . vaadin . server . VaadinSession session2 = new com . vaadin . server . VaadinSession ( null ) { @ com . vaadin . util . Override public java . lang . String toString ( ) { return "Second<sp>session" ; } } ; com . vaadin . server . VaadinSession . setCurrent ( session1 ) ; java . util . Map < java . lang . Class < ? > , com . vaadin . util . CurrentInstance > previous = com . vaadin . util . CurrentInstance . setCurrent ( session2 ) ; java . lang . ref . WeakReference < com . vaadin . server . VaadinSession > ref = new java . lang . ref . WeakReference ( session1 ) ; session1 = null ; com . vaadin . util . CurrentInstanceTest . waitUntilGarbageCollected ( ref ) ; com . vaadin . util . CurrentInstance . restoreInstances ( previous ) ; "<AssertPlaceHolder>" ; } getCurrent ( ) { return com . vaadin . util . CurrentInstance . get ( com . vaadin . server . VaadinSession . class ) ; }
|
org . junit . Assert . assertNull ( com . vaadin . server . VaadinSession . getCurrent ( ) )
|
testGetRepubBirthCertOnReconnectNullProps ( ) { org . eclipse . kura . core . cloud . CloudServiceOptions options = new org . eclipse . kura . core . cloud . CloudServiceOptions ( null , org . eclipse . kura . core . cloud . CloudServiceOptionsTest . systemService ) ; boolean enable = options . getRepubBirthCertOnReconnect ( ) ; "<AssertPlaceHolder>" ; } getRepubBirthCertOnReconnect ( ) { boolean republishBirt = true ; java . lang . String birthPubPolicy = "" ; if ( ( ( this . properties ) != null ) && ( ( this . properties . get ( org . eclipse . kura . core . cloud . CloudServiceOptions . BIRTH_CERT_POLICY ) ) instanceof java . lang . String ) ) { birthPubPolicy = ( ( java . lang . String ) ( this . properties . get ( org . eclipse . kura . core . cloud . CloudServiceOptions . BIRTH_CERT_POLICY ) ) ) ; } if ( ! ( org . eclipse . kura . core . cloud . CloudServiceLifecycleCertsPolicy . PUBLISH_BIRTH_CONNECT_RECONNECT . getValue ( ) . equals ( birthPubPolicy ) ) ) { republishBirt = false ; } return republishBirt ; }
|
org . junit . Assert . assertFalse ( enable )
|
testEqualsSameVersionVersionAreEquals ( ) { org . phoenicis . tools . version . Version version1 = new org . phoenicis . tools . version . Version ( "4.1.9" ) ; org . phoenicis . tools . version . Version version2 = new org . phoenicis . tools . version . Version ( "4.1.9" ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( version1 , version2 )
|
testRemove ( ) { com . liferay . portal . kernel . model . ListType newListType = addListType ( ) ; _persistence . remove ( newListType ) ; com . liferay . portal . kernel . model . ListType existingListType = _persistence . fetchByPrimaryKey ( newListType . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertNull ( existingListType )
|
testGeoHashGridAggregation ( ) { com . liferay . portal . search . aggregation . bucket . GeoHashGridAggregation geoHashGridAggregation = com . liferay . portal . search . aggregations . test . AggregationsInstantiationTest . _aggregations . geoHashGrid ( "name" , "field" ) ; "<AssertPlaceHolder>" ; } geoHashGrid ( java . lang . String , java . lang . String ) { return new com . liferay . portal . search . internal . aggregation . bucket . GeoHashGridAggregationImpl ( name , field ) ; }
|
org . junit . Assert . assertNotNull ( geoHashGridAggregation )
|
testGetIdAttribute ( ) { when ( persistentEntity . getTypeInformation ( ) ) . thenReturn ( org . springframework . data . util . ClassTypeInformation . from ( org . springframework . data . solr . repository . ProductBean . class ) ) ; org . springframework . data . solr . core . mapping . SimpleSolrPersistentProperty property = new org . springframework . data . solr . core . mapping . SimpleSolrPersistentProperty ( org . springframework . data . mapping . model . Property . of ( org . springframework . data . util . ClassTypeInformation . from ( org . springframework . data . solr . repository . ProductBean . class ) , org . springframework . data . solr . repository . ProductBean . class . getDeclaredField ( "id" ) ) , persistentEntity , org . springframework . data . mapping . model . SimpleTypeHolder . DEFAULT ) ; when ( persistentEntity . getRequiredIdProperty ( ) ) . thenReturn ( property ) ; org . springframework . data . solr . repository . query . SolrEntityInformation < org . springframework . data . solr . repository . ProductBean , java . lang . String > entityInformation = new org . springframework . data . solr . repository . support . MappingSolrEntityInformation ( persistentEntity ) ; "<AssertPlaceHolder>" ; } getIdAttribute ( ) { return entityMetadata . getRequiredIdProperty ( ) . getFieldName ( ) ; }
|
org . junit . Assert . assertEquals ( "id" , entityInformation . getIdAttribute ( ) )
|
remove_comments_with_spaces ( ) { subject = new net . ripe . db . whois . common . rpsl . RpslAttribute ( "domain" , "foo<sp>bar" ) ; "<AssertPlaceHolder>" ; } getCleanValue ( ) { final java . util . Set < net . ripe . db . whois . common . domain . CIString > values = getCleanValues ( ) ; switch ( values . size ( ) ) { case 0 : throw new java . lang . IllegalStateException ( ( ( "No<sp>" + ( type ) ) + ":<sp>value<sp>found" ) ) ; case 1 : return values . iterator ( ) . next ( ) ; default : throw new java . lang . IllegalStateException ( ( ( "Multiple<sp>" + ( type ) ) + ":<sp>values<sp>found" ) ) ; } }
|
org . junit . Assert . assertThat ( subject . getCleanValue ( ) . toString ( ) , org . hamcrest . Matchers . is ( "foo<sp>bar" ) )
|
paramsCountTest ( ) { int inputSize = 10 ; int layerWithBiasNeuronsCnt = 13 ; int layerWithoutBiasNeuronsCnt = 17 ; org . apache . ignite . ml . nn . architecture . MLPArchitecture conf = new org . apache . ignite . ml . nn . architecture . MLPArchitecture ( inputSize ) . withAddedLayer ( layerWithBiasNeuronsCnt , true , Activators . SIGMOID ) . withAddedLayer ( layerWithoutBiasNeuronsCnt , false , Activators . SIGMOID ) ; "<AssertPlaceHolder>" ; } parametersCount ( ) { return paramsMeta . size ( ) ; }
|
org . junit . Assert . assertEquals ( ( ( ( layerWithBiasNeuronsCnt * inputSize ) + layerWithBiasNeuronsCnt ) + ( layerWithoutBiasNeuronsCnt * layerWithBiasNeuronsCnt ) ) , conf . parametersCount ( ) )
|
testBooleanFunctionCallOnObject ( ) { v8 . executeVoidScript ( "function<sp>add(x,<sp>y)<sp>{return<sp>x<sp>&&<sp>y;}" ) ; v8 . executeVoidScript ( "adder<sp>=<sp>{};" ) ; v8 . executeVoidScript ( "adder.addFuction<sp>=<sp>add;" ) ; com . eclipsesource . v8 . V8Object object = v8 . getObject ( "adder" ) ; com . eclipsesource . v8 . V8Array parameters = new com . eclipsesource . v8 . V8Array ( v8 ) ; parameters . push ( true ) ; parameters . push ( false ) ; boolean result = object . executeBooleanFunction ( "addFuction" , parameters ) ; parameters . close ( ) ; "<AssertPlaceHolder>" ; object . close ( ) ; } close ( ) { if ( ! ( v8Array . isReleased ( ) ) ) { v8Array . close ( ) ; } }
|
org . junit . Assert . assertFalse ( result )
|
testEquals ( ) { @ tec . units . ri . spi . SuppressWarnings ( "rawtypes" ) tec . units . ri . spi . Range r2 = tec . units . ri . quantity . QuantityRange . of ( min , max , res ) ; "<AssertPlaceHolder>" ; } of ( javax . measure . Quantity , javax . measure . Quantity , javax . measure . Quantity ) { return new tec . units . ri . quantity . QuantityRange ( minimum , maximum , resolution ) ; }
|
org . junit . Assert . assertEquals ( r2 , range )
|
testFindStudentById ( ) { com . mybatis3 . domain . Student student = com . mybatis3 . services . StudentServiceTest . studentService . findStudentById ( 1 ) ; "<AssertPlaceHolder>" ; System . out . println ( student ) ; } findStudentById ( int ) { com . mybatis3 . domain . Student student = null ; java . sql . Connection conn = null ; try { conn = getDatabaseConnection ( ) ; java . lang . String sql = "select<sp>*<sp>from<sp>students<sp>where<sp>stud_id=?" ; java . sql . PreparedStatement pstmt = conn . prepareStatement ( sql ) ; pstmt . setInt ( 1 , studId ) ; java . sql . ResultSet rs = pstmt . executeQuery ( ) ; if ( rs . next ( ) ) { student = new com . mybatis3 . domain . Student ( ) ; student . setStudId ( rs . getInt ( "stud_id" ) ) ; student . setName ( rs . getString ( "name" ) ) ; student . setEmail ( rs . getString ( "email" ) ) ; student . setDob ( rs . getDate ( "dob" ) ) ; } } catch ( java . sql . SQLException e ) { throw new java . lang . RuntimeException ( e ) ; } finally { if ( conn != null ) { try { conn . close ( ) ; } catch ( java . sql . SQLException e ) { } } } return student ; }
|
org . junit . Assert . assertNotNull ( student )
|
testGetConfigurationByNameForMissedSchema ( ) { java . nio . file . Path schemaPath = java . nio . file . Paths . get ( java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) . getResource ( "generation/complexSchema.json" ) . toURI ( ) ) ; org . kaaproject . kaa . server . common . core . schema . BaseSchema configuraionSchema = new org . kaaproject . kaa . server . common . core . schema . BaseSchema ( new java . lang . String ( java . nio . file . Files . readAllBytes ( schemaPath ) ) ) ; org . kaaproject . kaa . server . common . core . algorithms . generation . DefaultRecordGenerationAlgorithm configurationProcessor = new org . kaaproject . kaa . server . common . core . algorithms . generation . DefaultRecordGenerationAlgorithmImpl ( configuraionSchema , new org . kaaproject . kaa . server . common . core . configuration . BaseDataFactory ( ) ) ; org . apache . avro . generic . GenericRecord generatedConfiguration = configurationProcessor . getConfigurationByName ( "missed" , "org.kaa.config" ) ; "<AssertPlaceHolder>" ; } getConfigurationByName ( java . lang . String , java . lang . String ) { if ( ( name == null ) || ( namespace == null ) ) { return null ; } if ( processedTypes . containsKey ( ( ( namespace + "." ) + name ) ) ) { return processedTypes . get ( ( ( namespace + "." ) + name ) ) ; } org . apache . avro . Schema schema = avroSchemaParser . getTypes ( ) . get ( ( ( namespace + "." ) + name ) ) ; if ( schema != null ) { return ( ( org . apache . avro . generic . GenericRecord ) ( processType ( schema , null ) ) ) ; } return null ; }
|
org . junit . Assert . assertNull ( generatedConfiguration )
|
testRearrangementCationReaction ( ) { org . openscience . cdk . reaction . IReactionProcess type = new org . openscience . cdk . reaction . type . RearrangementCationReaction ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( type )
|
when_eventsStop_then_wmStops ( ) { p . reportEvent ( com . hazelcast . jet . core . WatermarkPolicy_withFixedLagTest . LAG ) ; for ( int i = 0 ; i < 10 ; i ++ ) { "<AssertPlaceHolder>" ; } } getCurrentWatermark ( ) { return Long . MIN_VALUE ; }
|
org . junit . Assert . assertEquals ( 0 , p . getCurrentWatermark ( ) )
|
testStackWrapping ( ) { try { eval ( "var<sp>a<sp>=<sp>42;<sp>a();<sp>" ) ; org . junit . Assert . fail ( "should<sp>have<sp>thrown" ) ; } catch ( org . dynjs . exception . ThrowException e ) { "<AssertPlaceHolder>" . isNull ( ) ; } } getCause ( ) { java . lang . Throwable cause = super . getCause ( ) ; if ( cause != null ) { return cause ; } if ( ( this . value ) instanceof org . dynjs . exception . JSObject ) { java . lang . Object jsCause = ( ( org . dynjs . exception . JSObject ) ( this . value ) ) . get ( this . context , "cause" ) ; if ( jsCause instanceof java . lang . Throwable ) { return ( ( java . lang . Throwable ) ( jsCause ) ) ; } else if ( ( jsCause != null ) && ( jsCause != ( Types . UNDEFINED ) ) ) { return new org . dynjs . exception . ThrowException ( this . context , jsCause ) ; } } return null ; }
|
org . junit . Assert . assertThat ( e . getCause ( ) )
|
testUniqueIdValues ( ) { java . util . List < java . lang . Short > retrievedIdValues = new java . util . ArrayList < java . lang . Short > ( ) ; for ( eu . bitwalker . useragentutils . Application application : eu . bitwalker . useragentutils . Application . values ( ) ) { "<AssertPlaceHolder>" ; retrievedIdValues . add ( application . getId ( ) ) ; } } getId ( ) { return id ; }
|
org . junit . Assert . assertTrue ( ( ! ( retrievedIdValues . contains ( application . getId ( ) ) ) ) )
|
testSetDuration ( ) { System . out . println ( "setDuration" ) ; com . bixly . pastevid . screencap . components . progressbar . FFMpegTask instance = new com . bixly . pastevid . screencap . components . progressbar . FFMpegTask ( ) ; instance . setDuration ( 100 ) ; int expResult = 0 ; int result = instance . getProgress ( ) ; "<AssertPlaceHolder>" ; } getProgress ( ) { return ( ( int ) ( ( ( double ) ( ( this . seconds ) * 100 ) ) / ( ( double ) ( this . duration ) ) ) ) ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testBuildWithOrderBy ( ) { org . lnu . is . domain . contact . type . ContactType context = new org . lnu . is . domain . contact . type . ContactType ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "abbrName" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . DESC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>ContactType<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>ORDER<sp>BY<sp>e.abbrName<sp>ASC,<sp>e.name<sp>DESC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . contact . type . ContactType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; }
|
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
|
shouldVerifyAppendCallAndReturnStreamOfJsonEnvelopes ( ) { final uk . gov . justice . services . eventsourcing . source . core . EventStream eventStream = mock ( uk . gov . justice . services . eventsourcing . source . core . EventStream . class ) ; final uk . gov . justice . services . messaging . JsonEnvelope jsonEnvelope_1 = mock ( uk . gov . justice . services . messaging . JsonEnvelope . class ) ; final uk . gov . justice . services . messaging . JsonEnvelope jsonEnvelope_2 = mock ( uk . gov . justice . services . messaging . JsonEnvelope . class ) ; eventStream . append ( java . util . stream . Stream . of ( jsonEnvelope_1 , jsonEnvelope_2 ) ) ; final java . util . stream . Stream < uk . gov . justice . services . messaging . JsonEnvelope > jsonEnvelopeStream = uk . gov . justice . services . test . utils . core . helper . EventStreamMockHelper . verifyAppendAndGetArgumentFrom ( eventStream ) ; final java . util . List < uk . gov . justice . services . messaging . JsonEnvelope > jsonEnvelopes = jsonEnvelopeStream . collect ( toList ( ) ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String , javax . ws . rs . core . MultivaluedMap ) { return headers . containsKey ( header ) ; }
|
org . junit . Assert . assertThat ( jsonEnvelopes , org . hamcrest . Matchers . contains ( jsonEnvelope_1 , jsonEnvelope_2 ) )
|
pathToBufferRoot ( ) { org . apache . jackrabbit . oak . plugins . document . Path p = org . apache . jackrabbit . oak . plugins . document . Path . ROOT ; org . apache . jackrabbit . oak . plugins . document . persistentCache . DataTypeUtil . pathToBuffer ( p , wb ) ; java . nio . ByteBuffer rb = org . apache . jackrabbit . oak . plugins . document . persistentCache . DataTypeUtilTest . readBufferFrom ( wb ) ; "<AssertPlaceHolder>" ; } pathFromBuffer ( java . nio . ByteBuffer ) { int numElements = org . h2 . mvstore . DataUtils . readVarInt ( buffer ) ; java . util . List < java . lang . String > elements = new java . util . ArrayList ( numElements ) ; for ( int i = 0 ; i < numElements ; i ++ ) { elements . add ( StringDataType . INSTANCE . read ( buffer ) ) ; } java . lang . String firstElement = elements . get ( ( ( elements . size ( ) ) - 1 ) ) ; org . apache . jackrabbit . oak . plugins . document . Path p ; if ( firstElement . isEmpty ( ) ) { p = org . apache . jackrabbit . oak . plugins . document . Path . ROOT ; } else { p = new org . apache . jackrabbit . oak . plugins . document . Path ( firstElement ) ; } for ( int i = ( elements . size ( ) ) - 2 ; i >= 0 ; i -- ) { p = new org . apache . jackrabbit . oak . plugins . document . Path ( p , elements . get ( i ) ) ; } return p ; }
|
org . junit . Assert . assertEquals ( p , org . apache . jackrabbit . oak . plugins . document . persistentCache . DataTypeUtil . pathFromBuffer ( rb ) )
|
testTruncDateColumn_Day ( ) { java . lang . String sqlText = java . lang . String . format ( "select<sp>trunc(d,<sp>\'day\')<sp>as<sp>\"truncd\",<sp>d,<sp>t,<sp>n<sp>from<sp>%s" , com . splicemachine . derby . impl . sql . execute . operations . TruncateFunctionIT . QUALIFIED_TABLE_NAME ) ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . TruncateFunctionIT . spliceClassWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "truncd<sp>|<sp>D<sp>|<sp>T<sp>|<sp>N<sp>|\n" + ( "--------------------------------------------------------------\n" + "1988-12-26<sp>|1988-12-26<sp>|2000-06-07<sp>17:12:30.0<sp>|12345.6789000<sp>|" ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
|
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
|
testParseDlVlanPcpErr ( ) { params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "dl_vlan_pcp" , "dl_vlan_pcp" ) ; } } ; target = new org . o3project . odenos . core . component . network . flow . query . OFPFlowMatchQuery ( params ) ; "<AssertPlaceHolder>" ; } parse ( ) { if ( ! ( super . parse ( ) ) ) { return false ; } if ( ! ( org . o3project . odenos . core . component . network . BasicQuery . checkMapExactly ( this . actions , new java . lang . String [ ] { } ) ) ) { return false ; } return true ; }
|
org . junit . Assert . assertThat ( target . parse ( ) , org . hamcrest . CoreMatchers . is ( false ) )
|
testRead ( ) { java . io . DataInputStream in = new java . io . DataInputStream ( new java . io . ByteArrayInputStream ( new byte [ ] { 1 , 2 , 3 , 4 } ) ) ; com . amazonaws . proprot . TlvRaw tlv = adapter . read ( new com . amazonaws . proprot . InputAssist ( in , false ) , 3 ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
|
org . junit . Assert . assertArrayEquals ( new byte [ ] { 1 , 2 , 3 } , tlv . getValue ( ) )
|
testSingleValue ( ) { java . lang . Boolean result = ( ( java . lang . Boolean ) ( _allFunction . apply ( "#value#<sp>>=<sp>1" , 2 ) ) ) ; "<AssertPlaceHolder>" ; } apply ( java . math . BigDecimal , java . math . BigDecimal ) { return n1 . pow ( n2 . intValue ( ) ) ; }
|
org . junit . Assert . assertTrue ( result )
|
manageDeletionProcess_VSERVER_DELETING_NoMail ( ) { org . oscm . app . iaas . data . FlowState flowState = org . oscm . app . iaas . data . FlowState . VSERVER_DELETING ; org . oscm . app . iaas . data . FlowState newState = null ; paramHandler . getIaasContext ( ) . setVSystemStatus ( "NORMAL" ) ; doReturn ( Boolean . TRUE ) . when ( vServerProcessor . vserverComm ) . isVServerDestroyed ( any ( org . oscm . app . iaas . PropertyHandler . class ) ) ; newState = vServerProcessor . manageDeletionProcess ( "controllerId" , "instanceId" , paramHandler , flowState , newState ) ; "<AssertPlaceHolder>" ; verify ( platformService , times ( 0 ) ) . sendMail ( java . util . Collections . singletonList ( any ( java . lang . String . class ) ) , any ( java . lang . String . class ) , any ( java . lang . String . class ) ) ; } manageDeletionProcess ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState , org . oscm . app . iaas . data . FlowState ) { boolean vSysInNormalState = VSystemStatus . NORMAL . equals ( paramHandler . getIaasContext ( ) . getVSystemStatus ( ) ) ; java . lang . String fwStatus = fwComm . getFirewallStatus ( paramHandler ) ; switch ( flowState ) { case VSERVER_DELETION_REQUESTED : if ( ( paramHandler . getControllerWaitTime ( ) ) != 0 ) { paramHandler . suspendProcessInstanceFor ( paramHandler . getControllerWaitTime ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . WAITING_BEFORE_STOP ; break ; } case WAITING_BEFORE_STOP : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STOPPED_FOR_DELETION , paramHandler ) ) { java . lang . String status = vserverComm . getVServerStatus ( paramHandler ) ; if ( VServerStatus . RUNNING . equals ( status ) ) { vserverComm . stopVServer ( paramHandler ) ; } else if ( VServerStatus . STOPPED . equals ( status ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STOPPED_FOR_DELETION ; } } break ; case VSERVER_STOPPED_FOR_DELETION : if ( vdiskInfo . isAttachedVDisksFound ( paramHandler ) ) { if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DETACHING , paramHandler ) ) ) { vdiskInfo . detachVDisks ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSDISK_DETACHING ; } } else { if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_DELETING , paramHandler ) ) ) { if ( FWStatus . RUNNING . equals ( fwStatus ) ) { java . lang . String status = vserverComm . getVServerStatus ( paramHandler ) ; if ( VServerStatus . STOPPED . equals ( status ) ) { vserverComm . destroyVServer ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVER_DELETING ; } } else { if ( checkNextStatus ( controllerId , instanceId , FlowState . FW_STARTING_FOR_VSERVER_DELETION , paramHandler ) ) { fwComm . startFirewall ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . FW_STARTING_FOR_VSERVER_DELETION ; } } } } break ; case FW_STARTING_FOR_VSERVER_DELETION : if ( FWStatus . RUNNING . equals ( fwStatus ) ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . FW_STARTED_FOR_VSERVER_DELETION , paramHandler ) ) { java . lang . String status = vserverComm . getVServerStatus ( paramHandler ) ; if ( VServerStatus . STOPPED . equals ( status ) ) { vserverComm . destroyVServer ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVER_DELETING ; } } } break ; case VSERVER_DELETING : if ( vserverComm . isVServerDestroyed ( paramHandler ) ) { if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . DESTROYED , paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . DESTROYED ; java . lang . String mail = paramHandler . getMailForCompletion ( ) ; java . lang . String subscriptionId = paramHandler . getSettings ( ) . getOriginalSubscriptionId ( ) ; if ( mail != null ) { java . lang . String locale = getTechnicalProviderLocale ( controllerId , paramHandler ) ; java . lang . String subject = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_manual_disposal.subject" , instanceId , subscriptionId ) ; java . lang . String text = org . oscm . app . iaas . i18n . Messages . get ( locale , "mail_VSERVER_manual_disposal.text" , instanceId , subscriptionId ) ; platformService . sendMail ( java . util . Collections . singletonList ( mail ) , subject , text ) ; } } } break ; case VSDISK_DETACHING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DETACHED , paramHandler ) ) { if ( vdiskInfo . areVDisksDetached ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSDISK_DETACHED ; } } break ; case VSDISK_DETACHED : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DELETING , paramHandler ) ) ) { vdiskInfo . destroyVDisks ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSDISK_DELETING ; } break ; case VSDISK_DELETING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DESTROYED , paramHandler ) ) { if ( vdiskInfo . areVDisksDestroyed ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSDISK_DESTROYED ; } } break ; case VSDISK_DESTROYED : if ( FWStatus . RUNNING .
|
org . junit . Assert . assertEquals ( FlowState . DESTROYED , newState )
|
initialize_A$String ( ) { org . junithelper . core . config . Configuration config = new org . junithelper . core . config . Configuration ( ) ; org . junithelper . core . extractor . ConstructorMetaExtractor target = new org . junithelper . core . extractor . ConstructorMetaExtractor ( config ) ; java . lang . String sourceCodeString = "package<sp>hoge;<sp>public<sp>class<sp>Sample<sp>{<sp>public<sp>void<sp>doSomething(String<sp>str)<sp>{}<sp>}" ; org . junithelper . core . extractor . ConstructorMetaExtractor actual = target . initialize ( sourceCodeString ) ; org . junithelper . core . extractor . ConstructorMetaExtractor expected = target ; "<AssertPlaceHolder>" ; } initialize ( org . eclipse . jface . preference . IPreferenceStore ) { if ( store == null ) { store = org . junithelper . plugin . Activator . getDefault ( ) . getPreferenceStore ( ) ; } directoryPathOfProductSourceCode = store . getString ( Preference . Common . srcMainPath ) ; directoryPathOfTestSourceCode = store . getString ( Preference . Common . srcTestPath ) ; outputFileEncoding = store . getString ( Preference . Common . outputFileEncoding ) ; lineBreakPolicy = store . getString ( Preference . Common . lineBreakPolicy ) ; useSoftTabs = store . getBoolean ( Preference . Common . useSoftTabs ) ; softTabSize = store . getInt ( Preference . Common . softTabSize ) ; isTestMethodNameArgsRequired = store . getBoolean ( Preference . TestMethodGen . enabledArgs ) ; isTestMethodNameReturnRequired = store . getBoolean ( Preference . TestMethodGen . enabledReturn ) ; isExceptionPatternRequired = store . getBoolean ( Preference . TestMethodGen . enabledException ) ; isTemplateImplementationRequired = store . getBoolean ( Preference . TestMethodGen . enabledTestMethodSampleImpl ) ; isPublicRequired = store . getBoolean ( Preference . TestMethodGen . includePublic ) ; isProtectedRequired = store . getBoolean ( Preference . TestMethodGen . includeProtected ) ; isPackageLocalRequired = store . getBoolean ( Preference . TestMethodGen . includePackageLocal ) ; isAccessorExcluded = store . getBoolean ( Preference . TestMethodGen . excludesAccessors ) ; isMockJMock2 = org . junithelper . plugin . page . PreferenceLoader . isUsingJMock2 ( store ) ; isMockEasyMock = org . junithelper . plugin . page . PreferenceLoader . isUsingEasyMock ( store ) ; isMockMockito = org . junithelper . plugin . page . PreferenceLoader . isUsingMockito ( store ) ; isMockJMockit = org . junithelper . plugin . page . PreferenceLoader . isUsingJMockit ( store ) ; isArrangeActAssertCommentsRequired = org . junithelper . plugin . page . PreferenceLoader . isCommentsArrangeActAssert ( store ) ; isGivenWhenThenCommentsRequired = org . junithelper . plugin . page . PreferenceLoader . isCommentsGivenWhenThen ( store ) ; java . lang . String version = store . getString ( Preference . TestClassGen . junitVersion ) ; isJUnitVersion3 = version . equals ( Preference . TestClassGen . junitVersion3 ) ; isJUnitVersion4 = version . equals ( Preference . TestClassGen . junitVersion4 ) ; testMethodDelimiter = store . getString ( Preference . TestMethodGen . delimiter ) ; testMethodArgsPrefix = store . getString ( Preference . TestMethodGen . argsPrefix ) ; testMethodArgsDelimiter = store . getString ( Preference . TestMethodGen . argsDelimiter ) ; testMethodReturnPrefix = store . getString ( Preference . TestMethodGen . returnPrefix ) ; testMethodReturnDelimiter = store . getString ( Preference . TestMethodGen . returnDelimiter ) ; testMethodExceptionPrefix = store . getString ( Preference . TestMethodGen . exceptionPrefix ) ; testMethodExceptionDelimiter = store . getString ( Preference . TestMethodGen . exceptionDelimiter ) ; classToExtend = store . getString ( Preference . TestClassGen . classToExtend ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testOnException ( ) { java . util . concurrent . atomic . AtomicReference < org . slieb . throwables . java . lang . Throwable > reference = new java . util . concurrent . atomic . AtomicReference ( ) ; org . slieb . throwables . java . lang . Exception expected = new org . slieb . throwables . java . lang . Exception ( "expected" ) ; try { org . slieb . throwables . ToLongBiFunctionWithThrowable . castToLongBiFunctionWithThrowable ( ( v1 , v2 ) -> { throw expected ; } ) . onException ( reference :: set ) . applyAsLong ( null , null ) ; } catch ( java . lang . Throwable ignored ) { } "<AssertPlaceHolder>" ; } get ( ) { try { return getWithThrowable ( ) ; } catch ( java . lang . RuntimeException | java . lang . Error exception ) { throw exception ; } catch ( final java . lang . Throwable throwable ) { throw new org . slieb . throwables . SuppressedException ( throwable ) ; } }
|
org . junit . Assert . assertEquals ( expected , reference . get ( ) )
|
testSentenceText ( ) { gov . llnl . ontology . text . Sentence sent = new gov . llnl . ontology . text . Sentence ( 2 , 10 , 8 ) ; java . lang . String text = "abcdefghijlkmop" ; sent . setText ( text ) ; "<AssertPlaceHolder>" ; } sentenceText ( ) { return ( text ) == null ? null : text . substring ( start , end ) ; }
|
org . junit . Assert . assertEquals ( text . substring ( 2 , 10 ) , sent . sentenceText ( ) )
|
insert_when_hasValue ( ) { org . tests . model . basic . ECustomId bean = new org . tests . model . basic . ECustomId ( "gotId" ) ; java . lang . String explicitId = org . avaje . moduuid . ModUUID . newShortId ( ) ; bean . setId ( explicitId ) ; io . ebean . Ebean . save ( bean ) ; org . tests . model . basic . ECustomId found = io . ebean . Ebean . find ( org . tests . model . basic . ECustomId . class , explicitId ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
|
org . junit . Assert . assertEquals ( found . getName ( ) , bean . getName ( ) )
|
testIsIngangsdatumGelijkInMeegegevenAkten ( ) { final nl . bzk . migratiebrp . bericht . model . lo3 . impl . Tb02Bericht bericht = new nl . bzk . migratiebrp . bericht . model . lo3 . impl . Tb02Bericht ( ) ; final java . util . List < nl . bzk . migratiebrp . conversie . model . lo3 . syntax . Lo3CategorieWaarde > waarden = maakLijstBetrokkenOuderMetNaamwijziging ( ) ; java . lang . reflect . Method parseInhoud = bericht . getClass ( ) . getDeclaredMethod ( "parseInhoud" , java . util . List . class ) ; parseInhoud . setAccessible ( true ) ; bericht . setHeader ( Lo3HeaderVeld . AKTENUMMER , "1QC1234" ) ; parseInhoud . invoke ( bericht , waarden ) ; "<AssertPlaceHolder>" ; } isIngangsdatumGelijkInMeegegevenAkten ( ) { java . lang . String ingangsdatum = null ; boolean result = true ; for ( final nl . bzk . migratiebrp . conversie . model . lo3 . syntax . Lo3CategorieWaarde waarde : categorieen ) { if ( waarde . getElementen ( ) . containsKey ( Lo3ElementEnum . ELEMENT_8510 ) ) { if ( ingangsdatum == null ) { ingangsdatum = waarde . getElement ( Lo3ElementEnum . ELEMENT_8510 ) ; } else { result = result && ( waarde . getElement ( Lo3ElementEnum . ELEMENT_8510 ) . equals ( ingangsdatum ) ) ; } } } return result ; }
|
org . junit . Assert . assertTrue ( bericht . isIngangsdatumGelijkInMeegegevenAkten ( ) )
|
testRawAnswerStructureNameRegex ( ) { org . batfish . datamodel . NetworkFactory nf = new org . batfish . datamodel . NetworkFactory ( ) ; org . batfish . datamodel . Configuration c = nf . configurationBuilder ( ) . setConfigurationFormat ( ConfigurationFormat . CISCO_IOS ) . build ( ) ; org . batfish . datamodel . routing_policy . RoutingPolicy rp1 = nf . routingPolicyBuilder ( ) . setOwner ( c ) . setName ( "selected-rp1" ) . build ( ) ; nf . routingPolicyBuilder ( ) . setOwner ( c ) . setName ( "leftout-rp2" ) . build ( ) ; java . util . Map < java . lang . String , org . batfish . datamodel . Configuration > configurations = com . google . common . collect . ImmutableMap . of ( "node1" , c ) ; org . batfish . question . namedstructures . NamedStructuresQuestion question = new org . batfish . question . namedstructures . NamedStructuresQuestion ( org . batfish . question . namedstructures . NamedStructuresAnswererTest . ALL_NODES , org . batfish . datamodel . questions . NamedStructureSpecifier . ALL , "selected.*" , false , null ) ; com . google . common . collect . Multiset < org . batfish . datamodel . table . Row > rows = org . batfish . question . namedstructures . NamedStructuresAnswerer . rawAnswer ( question , configurations . keySet ( ) , configurations , org . batfish . question . namedstructures . NamedStructuresAnswerer . createMetadata ( question ) . toColumnMap ( ) ) ; com . google . common . collect . Multiset < org . batfish . datamodel . table . Row > expected = com . google . common . collect . HashMultiset . create ( com . google . common . collect . ImmutableList . of ( org . batfish . datamodel . table . Row . builder ( ) . put ( NamedStructuresAnswerer . COL_NODE , new org . batfish . datamodel . pojo . Node ( "node1" ) ) . put ( NamedStructuresAnswerer . COL_STRUCTURE_TYPE , NamedStructureSpecifier . ROUTING_POLICY ) . put ( NamedStructuresAnswerer . COL_STRUCTURE_NAME , "selected-rp1" ) . put ( NamedStructuresAnswerer . COL_STRUCTURE_DEFINITION , org . batfish . question . namedstructures . NamedStructuresAnswerer . insertedObject ( rp1 , NamedStructureSpecifier . ROUTING_POLICY ) ) . build ( ) ) ) ; "<AssertPlaceHolder>" ; } build ( ) { checkState ( ( ( _networkId ) != null ) , "Missing<sp>networkId" ) ; checkState ( ( ( _snapshotId ) != null ) , "Missing<sp>snapshotId" ) ; checkState ( ( ( _workType ) != null ) , "Missing<sp>workType" ) ; return new org . batfish . coordinator . WorkDetails ( _networkId , _snapshotId , _isDifferential , _workType , _referenceSnapshotId , _analysisId , _questionId ) ; }
|
org . junit . Assert . assertThat ( rows , org . hamcrest . Matchers . equalTo ( expected ) )
|
testDigestAuthenticationNoRealm ( ) { final org . apache . hc . core5 . http . HttpRequest request = new org . apache . hc . core5 . http . message . BasicHttpRequest ( "Simple" , "/" ) ; final org . apache . hc . core5 . http . HttpHost host = new org . apache . hc . core5 . http . HttpHost ( "somehost" , 80 ) ; final org . apache . hc . client5 . http . auth . AuthScope authScope = new org . apache . hc . client5 . http . auth . AuthScope ( host , "realm1" , null ) ; final org . apache . hc . client5 . http . impl . auth . BasicCredentialsProvider credentialsProvider = new org . apache . hc . client5 . http . impl . auth . BasicCredentialsProvider ( ) ; final org . apache . hc . client5 . http . auth . Credentials creds = new org . apache . hc . client5 . http . auth . UsernamePasswordCredentials ( "username" , "password" . toCharArray ( ) ) ; credentialsProvider . setCredentials ( authScope , creds ) ; final java . lang . String challenge = "Digest<sp>no-realm=\"realm1\",<sp>nonce=\"f2a3f18799759d4f1a1c068b92b573cb\"" ; final org . apache . hc . client5 . http . auth . AuthChallenge authChallenge = org . apache . hc . client5 . http . impl . auth . TestDigestScheme . parse ( challenge ) ; final org . apache . hc . client5 . http . impl . auth . DigestScheme authscheme = new org . apache . hc . client5 . http . impl . auth . DigestScheme ( ) ; authscheme . processChallenge ( authChallenge , null ) ; "<AssertPlaceHolder>" ; authscheme . generateAuthResponse ( host , request , null ) ; } isResponseReady ( org . apache . hc . core5 . http . HttpHost , org . apache . hc . client5 . http . auth . CredentialsProvider , org . apache . hc . core5 . http . protocol . HttpContext ) { org . apache . hc . core5 . util . Args . notNull ( host , "Auth<sp>host" ) ; org . apache . hc . core5 . util . Args . notNull ( credentialsProvider , "CredentialsProvider" ) ; final org . apache . hc . client5 . http . auth . Credentials credentials = credentialsProvider . getCredentials ( new org . apache . hc . client5 . http . auth . AuthScope ( host , getRealm ( ) , getName ( ) ) , context ) ; if ( credentials != null ) { this . username = credentials . getUserPrincipal ( ) . getName ( ) ; this . password = credentials . getPassword ( ) ; return true ; } this . username = null ; this . password = null ; return false ; }
|
org . junit . Assert . assertTrue ( authscheme . isResponseReady ( host , credentialsProvider , null ) )
|
testQueryByDisjunctivePriorityStatements ( ) { startExternalTaskProcesses ( 5 ) ; java . util . List < org . camunda . bpm . engine . history . HistoricExternalTaskLog > externalTaskLogs = historyService . createHistoricExternalTaskLogQuery ( ) . priorityLowerThanOrEquals ( 1L ) . priorityHigherThanOrEquals ( 4L ) . list ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( ( ( historicProcessInstanceIds . size ( ) ) + ( historicDecisionInstanceIds . size ( ) ) ) + ( historicCaseInstanceIds . size ( ) ) ) + ( historicBatchIds . size ( ) ) ; }
|
org . junit . Assert . assertThat ( externalTaskLogs . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
|
testConstructorRecipientList ( ) { java . util . Collection < java . lang . Long > list = java . util . Arrays . asList ( 1L , 3L ) ; org . eurekastreams . server . action . execution . notification . NotificationBatch sut = new org . eurekastreams . server . action . execution . notification . NotificationBatch ( org . eurekastreams . server . action . execution . notification . NotificationBatchTest . TYPE , list ) ; java . util . Collection < java . lang . Long > result = sut . getRecipients ( ) . get ( org . eurekastreams . server . action . execution . notification . NotificationBatchTest . TYPE ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return cache . get ( inKey ) ; }
|
org . junit . Assert . assertEquals ( list , result )
|
setAsText_shouldSetUsingName ( ) { org . openmrs . propertyeditor . PrivilegeEditor editor = new org . openmrs . propertyeditor . PrivilegeEditor ( ) ; editor . setAsText ( "Some<sp>Privilege" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
|
org . junit . Assert . assertNotNull ( editor . getValue ( ) )
|
testRandomModelAttachmentController ( ) { java . lang . String nonExistingNamespace = org . eclipse . vorto . repository . server . it . TestUtils . createRandomString ( 10 ) . toLowerCase ( ) ; repositoryServer . perform ( get ( ( ( ( ( "/api/v1/attachments/" + nonExistingNamespace ) + ":" ) + ( testModel . modelName ) ) + ":5000.0.0" ) ) . with ( userCreator ) ) . andExpect ( status ( ) . isNotFound ( ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { org . eclipse . vorto . repository . core . impl . StorageItem item = storage . get ( key ) ; if ( ( item != null ) && ( item . isExpired ( ) ) ) { remove ( key ) ; item = null ; } return item ; }
|
org . junit . Assert . assertTrue ( true )
|
testDebugPDBStructure ( ) { org . openscience . cdk . interfaces . IPDBStructure structure = new org . openscience . cdk . debug . DebugPDBStructure ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( structure )
|
scanNdkInexactMatchVersion ( ) { java . nio . file . Path expectedPath = createTmpNdkVersions ( com . facebook . buck . android . toolchain . ndk . impl . AndroidNdkResolver . NDK_POST_R11_VERSION_FILENAME , "ndk-dir-r11" , "Pkg.Desc<sp>=<sp>Android<sp>NDK\nPkg.Revision<sp>=<sp>11.2" , "ndk-dir-r12" , "Pkg.Desc<sp>=<sp>Android<sp>NDK\nPkg.Revision<sp>=<sp>12.4" , "ndk-dir-r13" , "Pkg.Desc<sp>=<sp>Android<sp>NDK\nPkg.Revision<sp>=<sp>13.2" ) [ 2 ] ; com . facebook . buck . android . toolchain . ndk . impl . AndroidNdkResolver resolver = new com . facebook . buck . android . toolchain . ndk . impl . AndroidNdkResolver ( tmpDir . getRoot ( ) . getFileSystem ( ) , com . google . common . collect . ImmutableMap . of ( "ANDROID_NDK_REPOSITORY" , tmpDir . getRoot ( ) . toString ( ) ) , com . facebook . buck . android . FakeAndroidBuckConfig . builder ( ) . setNdkVersion ( "13" ) . build ( ) ) ; "<AssertPlaceHolder>" ; } getNdkOrThrow ( ) { if ( ( ! ( ndk . isPresent ( ) ) ) && ( ndkErrorMessage . isPresent ( ) ) ) { throw new com . facebook . buck . core . exceptions . HumanReadableException ( ndkErrorMessage . get ( ) ) ; } return ndk . get ( ) ; }
|
org . junit . Assert . assertEquals ( expectedPath , resolver . getNdkOrThrow ( ) )
|
testSingleStepDescending ( ) { org . apache . commons . functor . range . IntegerRange range = org . apache . commons . functor . range . Ranges . integerRange ( 2 , BoundType . CLOSED , ( - 2 ) , BoundType . OPEN , ( - 1 ) ) ; java . util . List < java . lang . Integer > expected = java . util . Arrays . asList ( 2 , 1 , 0 , ( - 1 ) ) ; java . util . Collection < java . lang . Integer > 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 )
|
testEqualsWithDifferentTypes ( ) { final com . annimon . stream . Optional < java . lang . Integer > optInt = com . annimon . stream . Optional . of ( 10 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( ! ( obj instanceof com . annimon . stream . OptionalBoolean ) ) { return false ; } com . annimon . stream . OptionalBoolean other = ( ( com . annimon . stream . OptionalBoolean ) ( obj ) ) ; return ( isPresent ) && ( other . isPresent ) ? ( value ) == ( other . value ) : ( isPresent ) == ( other . isPresent ) ; }
|
org . junit . Assert . assertFalse ( optInt . equals ( 10 ) )
|
validate_shouldFailIfTheNameIsAnEmptyString ( ) { org . openmrs . ConceptReferenceTerm term = new org . openmrs . ConceptReferenceTerm ( ) ; term . setName ( "" ) ; term . setCode ( "code" ) ; term . setConceptSource ( org . openmrs . api . context . Context . getConceptService ( ) . getConceptSource ( 1 ) ) ; org . springframework . validation . Errors errors = new org . springframework . validation . BindException ( term , "term" ) ; new org . openmrs . validator . ConceptReferenceTermValidator ( ) . validate ( term , errors ) ; "<AssertPlaceHolder>" ; } hasFieldErrors ( java . lang . String ) { return new org . openmrs . test . matchers . HasFieldErrors ( field , null ) ; }
|
org . junit . Assert . assertEquals ( true , errors . hasFieldErrors ( "name" ) )
|
testCreateNewPlan ( ) { com . devopsbuddy . backend . persistence . domain . backend . Plan basicPlan = createPlan ( PlansEnum . BASIC ) ; planRepository . save ( basicPlan ) ; com . devopsbuddy . backend . persistence . domain . backend . Plan retrievedPlan = planRepository . findOne ( PlansEnum . BASIC . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
|
org . junit . Assert . assertNotNull ( retrievedPlan )
|
testGetHead_withEmptyMessage ( ) { java . lang . String json = "{<sp>\"head\":<sp>{},<sp>\"operations\":<sp>[]<sp>}" ; org . eclipse . rap . rwt . internal . protocol . Message message = new org . eclipse . rap . rwt . internal . protocol . Message ( org . eclipse . rap . json . JsonObject . readFrom ( json ) ) ; "<AssertPlaceHolder>" ; } getHead ( ) { return head ; }
|
org . junit . Assert . assertEquals ( new org . eclipse . rap . json . JsonObject ( ) , message . getHead ( ) )
|
test_hashCode ( ) { org . joda . beans . sample . Person a1 = new org . joda . beans . sample . Person ( ) ; org . joda . beans . sample . Person a2 = new org . joda . beans . sample . Person ( ) ; a1 . setForename ( "Stephen" ) ; a2 . setForename ( "Stephen" ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return ( beanType . hashCode ( ) ) + 3 ; }
|
org . junit . Assert . assertEquals ( a1 . hashCode ( ) , a2 . hashCode ( ) )
|
callActive6 ( java . net . URL ) { int count = com . acme . multinode . grid . TestUtils . readInt ( baseURL . openStream ( ) ) ; System . out . println ( ( "Cache<sp>incremented,<sp>current<sp>count:<sp>" + count ) ) ; "<AssertPlaceHolder>" ; } openStream ( ) { org . jboss . osgi . testing . OSGiManifestBuilder builder = org . jboss . osgi . testing . OSGiManifestBuilder . newInstance ( ) ; builder . addBundleSymbolicName ( archive . getName ( ) ) ; builder . addBundleManifestVersion ( 2 ) ; builder . addBundleActivator ( com . acme . osgi . SimpleActivator . class . getName ( ) ) ; builder . addExportPackages ( com . acme . osgi . SimpleOSGiServiceTestCase . class ) ; builder . addImportPackages ( "org.jboss.arquillian.junit" ) ; builder . addImportPackages ( "org.jboss.shrinkwrap.api" , "org.jboss.shrinkwrap.api.asset" , "org.jboss.shrinkwrap.api.spec" ) ; builder . addImportPackages ( "javax.inject" , "org.junit" , "org.junit.runner" ) ; return builder . openStream ( ) ; }
|
org . junit . Assert . assertEquals ( 6 , count )
|
convertFilterValue_should_convert_state_name_to_state_id_if_state_name_is_ProcessInstanceState ( ) { final java . io . Serializable convertFilterValue = searchProcessInstanceDescriptor . convertFilterValue ( ProcessInstanceSearchDescriptor . STATE_NAME , ProcessInstanceState . ERROR ) ; "<AssertPlaceHolder>" ; } convertFilterValue ( java . lang . String , java . io . Serializable ) { if ( filterValue instanceof org . bonitasoft . engine . bpm . flownode . TaskPriority ) { return org . bonitasoft . engine . core . process . instance . model . STaskPriority . valueOf ( ( ( org . bonitasoft . engine . bpm . flownode . TaskPriority ) ( filterValue ) ) . name ( ) ) ; } return filterValue ; }
|
org . junit . Assert . assertEquals ( 7 , convertFilterValue )
|
testThrowOnEmptyServersProp ( ) { java . util . Properties props = new java . util . Properties ( ) ; props . setProperty ( Options . PROP_SERVERS , "" ) ; new io . nats . client . Options . Builder ( props ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { if ( ( ( this . username ) != null ) && ( ( this . token ) != null ) ) { throw new java . lang . IllegalStateException ( "Options<sp>can't<sp>have<sp>token<sp>and<sp>username" ) ; } if ( ( servers . size ( ) ) == 0 ) { server ( io . nats . client . Options . DEFAULT_URL ) ; } else if ( ( servers . size ( ) ) == 1 ) { java . net . URI serverURI = servers . get ( 0 ) ; if ( ( "tls" . equals ( serverURI . getScheme ( ) ) ) && ( ( this . sslContext ) == null ) ) { try { this . sslContext = javax . net . ssl . SSLContext . getDefault ( ) ; } catch ( java . security . NoSuchAlgorithmException e ) { throw new java . lang . IllegalStateException ( "Unable<sp>to<sp>create<sp>default<sp>SSL<sp>context" , e ) ; } } else if ( ( "opentls" . equals ( serverURI . getScheme ( ) ) ) && ( ( this . sslContext ) == null ) ) { this . sslContext = io . nats . client . impl . SSLUtils . createOpenTLSContext ( ) ; } } if ( ( this . executor ) == null ) { java . lang . String threadPrefix = ( ( ( this . connectionName ) != null ) && ( ( this . connectionName ) != "" ) ) ? this . connectionName : io . nats . client . Options . DEFAULT_THREAD_NAME_PREFIX ; this . executor = java . util . concurrent . Executors . newCachedThreadPool ( ) ; this . executor = new java . util . concurrent . ThreadPoolExecutor ( 0 , Integer . MAX_VALUE , 500L , java . util . concurrent . TimeUnit . MILLISECONDS , new java . util . concurrent . SynchronousQueue < java . lang . Runnable > ( ) , new io . nats . client . Options . DefaultThreadFactory ( threadPrefix ) ) ; } return new io . nats . client . Options ( this ) ; }
|
org . junit . Assert . assertFalse ( true )
|
whenElementIsOnStack_thenIndexOfReturnsItsIndex ( ) { java . util . Stack < java . lang . Integer > intStack = new java . util . Stack ( ) ; intStack . push ( 5 ) ; int indexOf = intStack . indexOf ( 5 ) ; "<AssertPlaceHolder>" ; } indexOf ( java . lang . Object ) { for ( int i = 0 ; i < ( internal . length ) ; i ++ ) { if ( object . equals ( internal [ i ] ) ) { return i ; } } return - 1 ; }
|
org . junit . Assert . assertEquals ( 0 , indexOf )
|
whenCheckingIfCollectionContainsElementsByCustomMatch2_thenContains ( ) { final java . util . Set < java . lang . String > theCollection = com . google . common . collect . Sets . newHashSet ( "a" , "bc" , "def" ) ; final boolean contains = ! ( com . google . common . collect . Sets . filter ( theCollection , new com . google . common . base . Predicate < java . lang . String > ( ) { @ org . baeldung . guava . Override public final boolean apply ( final java . lang . String input ) { return ( input . length ( ) ) == 1 ; } } ) . isEmpty ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( internal . length ) == 0 ; }
|
org . junit . Assert . assertTrue ( contains )
|
testGetItemExpiry ( ) { long expResult = 0L ; long result = instance . getItemExpiry ( ) ; "<AssertPlaceHolder>" ; } getItemExpiry ( ) { return itemexpiry ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
hasChangedWhenPropertyCommentChangedButValueIsUndecryptedShouldReturnFalse ( ) { java . lang . String decryptedValue = ResourceEditProperty . UNDECRYPTED ; resourceEditProperty = new ch . puzzle . itc . mobiliar . builders . ResourceEditPropertyBuilder ( ) . withValue ( decryptedValue ) . build ( ) ; resourceEditProperty . setPropertyComment ( "otherComment" ) ; boolean hasChanged = resourceEditProperty . hasChanged ( ) ; "<AssertPlaceHolder>" ; } hasChanged ( ) { boolean isDecrypted = ( ( propertyValue ) != null ) && ( propertyValue . equals ( ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditProperty . UNDECRYPTED ) ) ; boolean isEqualToOriginalValue = ( ( ( originalValue ) == null ) && ( ( propertyValue ) == null ) ) || ( ( ( originalValue ) != null ) && ( originalValue . equals ( propertyValue ) ) ) ; boolean isEqualPropertyComment = ( ( ( originalPropertyComment ) == null ) && ( ( propertyComment ) == null ) ) || ( ( ( originalPropertyComment ) != null ) && ( originalPropertyComment . equals ( propertyComment ) ) ) ; if ( isDecrypted || ( isReset ( ) ) ) { return false ; } else { return ( ! isEqualToOriginalValue ) || ( ! isEqualPropertyComment ) ; } }
|
org . junit . Assert . assertFalse ( hasChanged )
|
testPropertyIsEqualToIntLiteral ( ) { net . opengis . filter . v_1_1_0 . FilterType filterType = cswFilterDelegate . propertyIsEqualTo ( propertyName , intLiteral ) ; java . lang . String cqlText = org . codice . ddf . spatial . ogc . csw . catalog . source . CswCqlTextFilter . getInstance ( ) . getCqlText ( filterType ) ; "<AssertPlaceHolder>" ; } getCqlText ( net . opengis . filter . v_1_1_0 . FilterType ) { org . geotools . xml . Parser parser = new org . geotools . xml . Parser ( new org . geotools . filter . v1_1 . OGCConfiguration ( ) ) ; try { java . io . StringReader reader = new java . io . StringReader ( marshalFilterType ( filterType ) ) ; java . lang . Object parsedFilter = parser . parse ( reader ) ; if ( parsedFilter instanceof org . opengis . filter . Filter ) { org . opengis . filter . Filter filterToCql = ( ( org . opengis . filter . Filter ) ( parsedFilter ) ) ; org . codice . ddf . spatial . ogc . csw . catalog . source . CswCqlTextFilter . LOGGER . debug ( "Filter<sp>to<sp>Convert<sp>to<sp>CQL<sp>=><sp>{}" , filterToCql ) ; java . lang . String cql = org . geotools . filter . text . ecql . ECQL . toCQL ( filterToCql ) ; org . codice . ddf . spatial . ogc . csw . catalog . source . CswCqlTextFilter . LOGGER . debug ( "Generated<sp>CQL<sp>from<sp>Filter<sp>=><sp>{}" , cql ) ; return cql ; } else { throw new ddf . catalog . source . UnsupportedQueryException ( "Query<sp>did<sp>not<sp>produce<sp>a<sp>valid<sp>filter." ) ; } } catch ( java . io . IOException e ) { throw new ddf . catalog . source . UnsupportedQueryException ( "Unable<sp>to<sp>create<sp>CQL<sp>Filter." , e ) ; } catch ( org . xml . sax . SAXException e ) { throw new ddf . catalog . source . UnsupportedQueryException ( "Unable<sp>to<sp>create<sp>CQL<sp>Filter." , e ) ; } catch ( javax . xml . parsers . ParserConfigurationException e ) { throw new ddf . catalog . source . UnsupportedQueryException ( "Unable<sp>to<sp>create<sp>CQL<sp>Filter." , e ) ; } catch ( javax . xml . bind . JAXBException e ) { throw new ddf . catalog . source . UnsupportedQueryException ( "Unable<sp>to<sp>create<sp>CQL<sp>Filter." , e ) ; } }
|
org . junit . Assert . assertEquals ( propertyIsEqualTo , cqlText )
|
testNotNull ( ) { "<AssertPlaceHolder>" ; } not ( org . apache . commons . functor . BinaryPredicate ) { return null == that ? null : new org . apache . commons . functor . core . composite . BinaryNot < L , R > ( that ) ; }
|
org . junit . Assert . assertNull ( org . apache . commons . functor . core . composite . BinaryNot . not ( null ) )
|
testGeenTechnischeSleutelPartner ( ) { final nl . bzk . brp . model . bericht . kern . HuwelijkGeregistreerdPartnerschapBericht relatieBericht = maakRelatie ( nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . huwelijkgeregistreerdpartnerschap . acties . registratieaanvanghuwelijkpartnerschap . BRBY0409Test . BSN_PERSOON_1 , null , nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . huwelijkgeregistreerdpartnerschap . acties . registratieaanvanghuwelijkpartnerschap . BRBY0409Test . NEDERLAND ) ; final java . util . Map < java . lang . String , nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView > bestaandeBetrokkenen = maakBestaandeBetrokkenen ( nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . huwelijkgeregistreerdpartnerschap . acties . registratieaanvanghuwelijkpartnerschap . BRBY0409Test . BSN_PERSOON_1 , nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . huwelijkgeregistreerdpartnerschap . acties . registratieaanvanghuwelijkpartnerschap . BRBY0409Test . BSN_PERSOON_2 , true , true , true , true ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > resultaat = brby0409 . voerRegelUit ( null , relatieBericht , null , bestaandeBetrokkenen ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , resultaat . size ( ) )
|
nextNAt0 ( ) { org . openscience . cdk . isomorphism . AbstractVFState state = create ( 5 , 10 ) ; "<AssertPlaceHolder>" ; } nextN ( int ) { if ( ( size ) == 0 ) return 0 ; for ( int i = n + 1 ; i < ( g1 . length ) ; i ++ ) if ( ( ( m1 [ i ] ) == ( org . openscience . cdk . isomorphism . AbstractVFState . UNMAPPED ) ) && ( ( t1 [ i ] ) > 0 ) ) return i ; for ( int i = n + 1 ; i < ( g1 . length ) ; i ++ ) if ( ( m1 [ i ] ) == ( org . openscience . cdk . isomorphism . AbstractVFState . UNMAPPED ) ) return i ; return nMax ( ) ; }
|
org . junit . Assert . assertThat ( state . nextN ( ( - 1 ) ) , org . hamcrest . CoreMatchers . is ( 0 ) )
|
testCloneDTCellValueWhenDTCellValue52IsNull ( ) { "<AssertPlaceHolder>" ; } cloneDTCellValue ( org . drools . workbench . models . guided . dtable . shared . model . DTCellValue52 ) { if ( dcv == null ) { return null ; } return new org . drools . workbench . models . guided . dtable . shared . model . DTCellValue52 ( dcv ) ; }
|
org . junit . Assert . assertNull ( plugin . cloneDTCellValue ( null ) )
|
terminal_operation_nonematch ( ) { boolean noElementEqualTo5 = java . util . stream . IntStream . of ( 1 , 2 , 3 ) . noneMatch ( ( p ) -> p == 5 ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( noElementEqualTo5 )
|
testType ( ) { "<AssertPlaceHolder>" ; } createProperty ( ) { return new net . sourceforge . pmd . properties . FloatProperty ( "testFloat" , "Test<sp>float<sp>property" , net . sourceforge . pmd . properties . FloatPropertyTest . MIN , net . sourceforge . pmd . properties . FloatPropertyTest . MAX , 9.0F , 1.0F ) ; }
|
org . junit . Assert . assertNotNull ( createProperty ( ) . type ( ) )
|
shouldUseConfigSerializer ( ) { org . simpleframework . xml . Serializer mock = mock ( org . simpleframework . xml . Serializer . class ) ; when ( config . get ( ( ( getClass ( ) . getName ( ) ) + ( SimpleXmlFactory . SERIALIZER ) ) ) ) . thenReturn ( mock ) ; "<AssertPlaceHolder>" ; verify ( config , never ( ) ) . getBooleanFalse ( ) ; verify ( config , never ( ) ) . getBooleanTrue ( ) ; verify ( config , never ( ) ) . getDateFormat ( ) ; verify ( config ) . get ( ( ( getClass ( ) . getName ( ) ) + ( SimpleXmlFactory . SERIALIZER ) ) ) ; } createSerializer ( org . codegist . crest . CRestConfig , java . lang . Class ) { java . lang . String prefix = source . getName ( ) ; org . simpleframework . xml . Serializer serializer = crestConfig . get ( ( prefix + ( org . codegist . crest . serializer . simplexml . SimpleXmlFactory . SERIALIZER ) ) ) ; if ( serializer != null ) { return serializer ; } java . util . Map < java . lang . Class , org . simpleframework . xml . transform . Transform > registry = new java . util . HashMap < java . lang . Class , org . simpleframework . xml . transform . Transform > ( ) ; registry . put ( java . util . Date . class , new org . codegist . crest . serializer . simplexml . DateMatcher ( crestConfig . getDateFormat ( ) ) ) ; registry . put ( org . codegist . crest . serializer . simplexml . Boolean . class , new org . codegist . crest . serializer . simplexml . BooleanMatcher ( crestConfig . getBooleanTrue ( ) , crestConfig . getBooleanFalse ( ) ) ) ; registry . put ( boolean . class , registry . get ( org . codegist . crest . serializer . simplexml . Boolean . class ) ) ; return new org . simpleframework . xml . core . Persister ( new org . codegist . crest . serializer . simplexml . MatcherRegistry ( registry ) ) ; }
|
org . junit . Assert . assertSame ( mock , org . codegist . crest . serializer . simplexml . SimpleXmlFactory . createSerializer ( config , getClass ( ) ) )
|
testChangeCET2CEST ( ) { java . util . Calendar start = new java . util . GregorianCalendar ( java . util . TimeZone . getTimeZone ( "Europe/Berlin" ) ) ; start . clear ( ) ; start . set ( 2017 , Calendar . MARCH , 26 , 1 , 30 , 0 ) ; javax . ejb . ScheduleExpression schedule = new javax . ejb . ScheduleExpression ( ) ; schedule . hour ( "*" ) . minute ( "0/15" ) . second ( "0" ) . timezone ( "Europe/Berlin" ) . start ( start . getTime ( ) ) ; org . jboss . as . ejb3 . timerservice . schedule . CalendarBasedTimeout calendarTimeout = new org . jboss . as . ejb3 . timerservice . schedule . CalendarBasedTimeout ( schedule ) ; java . util . Calendar firstTimeout = calendarTimeout . getFirstTimeout ( ) ; "<AssertPlaceHolder>" ; if ( ( ( ( ( ( ( ( firstTimeout . get ( Calendar . YEAR ) ) != 2017 ) || ( ( firstTimeout . get ( Calendar . MONTH ) ) != ( java . util . Calendar . MARCH ) ) ) || ( ( firstTimeout . get ( Calendar . DAY_OF_MONTH ) ) != 26 ) ) || ( ( firstTimeout . get ( Calendar . HOUR_OF_DAY ) ) != 1 ) ) || ( ( firstTimeout . get ( Calendar . MINUTE ) ) != 30 ) ) || ( ( firstTimeout . get ( Calendar . SECOND ) ) != 0 ) ) || ( ( firstTimeout . get ( Calendar . DST_OFFSET ) ) != 0 ) ) { org . junit . Assert . fail ( ( "Start<sp>time<sp>unexpected<sp>:<sp>" + ( firstTimeout . toString ( ) ) ) ) ; } java . util . Calendar current = firstTimeout ; for ( int i = 0 ; i < 3 ; i ++ ) { java . util . Calendar next = calendarTimeout . getNextTimeout ( current ) ; if ( ( current . getTimeInMillis ( ) ) != ( ( next . getTimeInMillis ( ) ) - 900000 ) ) { org . junit . Assert . fail ( ( ( ( "Schedule<sp>is<sp>more<sp>than<sp>15<sp>minutes<sp>from<sp>" + ( current . getTime ( ) ) ) + "<sp>to<sp>" ) + ( next . getTime ( ) ) ) ) ; } current = next ; } if ( ( ( ( ( ( ( current . get ( Calendar . YEAR ) ) != 2017 ) || ( ( current . get ( Calendar . MONTH ) ) != ( java . util . Calendar . MARCH ) ) ) || ( ( current . get ( Calendar . DAY_OF_MONTH ) ) != 26 ) ) || ( ( current . get ( Calendar . HOUR_OF_DAY ) ) != 3 ) ) || ( ( current . get ( Calendar . MINUTE ) ) != 15 ) ) || ( ( current . get ( Calendar . DST_OFFSET ) ) != 3600000 ) ) { org . junit . Assert . fail ( ( "End<sp>time<sp>unexpected<sp>:<sp>" + ( current . toString ( ) ) ) ) ; } } getFirstTimeout ( ) { return this . firstTimeout ; }
|
org . junit . Assert . assertNotNull ( firstTimeout )
|
testSetText ( ) { org . kie . workbench . common . forms . fields . shared . fieldTypes . basic . selectors . IntegerSelectorOption opt = new org . kie . workbench . common . forms . fields . shared . fieldTypes . basic . selectors . IntegerSelectorOption ( ) ; opt . setText ( org . kie . workbench . common . forms . fields . shared . fieldTypes . basic . selectors . LABEL_B ) ; "<AssertPlaceHolder>" ; } getText ( ) { return text ; }
|
org . junit . Assert . assertSame ( org . kie . workbench . common . forms . fields . shared . fieldTypes . basic . selectors . LABEL_B , opt . getText ( ) )
|
testGetByteValue ( ) { "<AssertPlaceHolder>" ; } getByteValue ( org . drools . core . common . InternalWorkingMemory , java . lang . Object ) { return ( ( byte ) ( getCharValue ( workingMemory , object ) ) ) ; }
|
org . junit . Assert . assertEquals ( 1 , this . reader . getByteValue ( null , this . bean ) )
|
testCreateGrant ( ) { org . opendaylight . aaa . api . model . Domain domain = h2Store . createDomain ( "sdn" , true ) ; org . opendaylight . aaa . api . model . Role role = h2Store . createRole ( "temp" , "temp<sp>domain" , "Temp<sp>Testing<sp>role" ) ; org . opendaylight . aaa . api . model . User user = h2Store . createUser ( "test" , "pass" , "domain" , "desc" , "email" , true , "SALT" ) ; org . opendaylight . aaa . api . model . Grant grant = h2Store . createGrant ( domain . getDomainid ( ) , user . getUserid ( ) , role . getRoleid ( ) ) ; "<AssertPlaceHolder>" ; } getRoleid ( ) { return roleid ; }
|
org . junit . Assert . assertEquals ( true , ( grant != null ) )
|
serverGroup ( ) { org . jboss . hal . dmr . ResourceAddress input = new org . jboss . hal . dmr . ResourceAddress ( ) . add ( "server-group" , "main-server-group" ) ; org . jboss . hal . dmr . ResourceAddress expected = new org . jboss . hal . dmr . ResourceAddress ( ) . add ( "server-group" , "*" ) ; org . jboss . hal . dmr . ResourceAddress result = processor . apply ( input ) ; "<AssertPlaceHolder>" ; } apply ( org . jboss . hal . meta . AddressTemplate ) { org . jboss . hal . meta . AddressTemplate modified = org . jboss . hal . meta . AddressTemplate . ROOT ; if ( ( template != null ) && ( ! ( AddressTemplate . ROOT . equals ( template ) ) ) ) { java . util . List < java . lang . String [ ] > segments = stream ( template . spliterator ( ) , false ) . map ( ( segment ) -> { if ( segment . contains ( "=" ) ) { return com . google . common . base . Splitter . on ( '=' ) . omitEmptyStrings ( ) . trimResults ( ) . limit ( 2 ) . splitToList ( segment ) . toArray ( new java . lang . String [ 2 ] ) ; } return new java . lang . String [ ] { segment , null } ; } ) . collect ( toList ( ) ) ; java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; org . jboss . hal . meta . description . SegmentProcessor . process ( segments , ( segment ) -> { builder . append ( "/" ) . append ( segment [ 0 ] ) ; if ( ( segment [ 1 ] ) != null ) { builder . append ( "=" ) . append ( segment [ 1 ] ) ; } } ) ; modified = org . jboss . hal . meta . AddressTemplate . of ( builder . toString ( ) ) ; } org . jboss . hal . meta . description . ResourceDescriptionTemplateProcessor . logger . debug ( "{}<sp>-><sp>{}" , template , modified ) ; return modified ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
can_not_create_with_same_id ( ) { final org . apache . rya . indexing . entity . model . Type type = new org . apache . rya . indexing . entity . model . Type ( new org . apache . rya . api . domain . RyaIRI ( "urn:icecream" ) , com . google . common . collect . ImmutableSet . < org . apache . rya . api . domain . RyaIRI > builder ( ) . add ( new org . apache . rya . api . domain . RyaIRI ( "urn:brand" ) ) . add ( new org . apache . rya . api . domain . RyaIRI ( "urn:flavor" ) ) . add ( new org . apache . rya . api . domain . RyaIRI ( "urn:cost" ) ) . build ( ) ) ; final org . apache . rya . indexing . entity . storage . TypeStorage storage = new org . apache . rya . indexing . entity . storage . mongo . MongoTypeStorage ( super . getMongoClient ( ) , org . apache . rya . indexing . entity . storage . mongo . MongoTypeStorageIT . RYA_INSTANCE_NAME ) ; storage . create ( type ) ; boolean failed = false ; try { storage . create ( type ) ; } catch ( final org . apache . rya . indexing . entity . storage . TypeStorage . TypeStorageException e ) { failed = true ; } "<AssertPlaceHolder>" ; } create ( org . apache . rya . indexing . entity . model . Type ) { requireNonNull ( type ) ; try { mongo . getDatabase ( ryaInstanceName ) . getCollection ( org . apache . rya . indexing . entity . storage . mongo . MongoTypeStorage . COLLECTION_NAME ) . insertOne ( org . apache . rya . indexing . entity . storage . mongo . MongoTypeStorage . TYPE_CONVERTER . toDocument ( type ) ) ; } catch ( final com . mongodb . MongoException e ) { throw new org . apache . rya . indexing . entity . storage . mongo . TypeStorageException ( ( ( "Failed<sp>to<sp>create<sp>Type<sp>with<sp>ID<sp>'" + ( type . getId ( ) . getData ( ) ) ) + "'." ) , e ) ; } }
|
org . junit . Assert . assertTrue ( failed )
|
shouldSetPasswordToNull ( ) { this . connectionInfo . setPassword ( null ) ; "<AssertPlaceHolder>" ; } getPassword ( ) { return this . password ; }
|
org . junit . Assert . assertNull ( this . connectionInfo . getPassword ( ) )
|
testGetFormId ( ) { org . wikidata . wdtk . datamodel . helpers . FormIdValue o1 = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeFormIdValue ( "L42-F1" , "foo" ) ; org . wikidata . wdtk . datamodel . helpers . FormIdValue o2 = factory . getFormIdValue ( "L42-F1" , "foo" ) ; "<AssertPlaceHolder>" ; } getFormIdValue ( java . lang . String , java . lang . String ) { return new org . wikidata . wdtk . datamodel . implementation . FormIdValueImpl ( id , siteIri ) ; }
|
org . junit . Assert . assertEquals ( o1 , o2 )
|
testPersonConstructLimitOffset1 ( ) { java . lang . String query = "PREFIX<sp>:<sp><http://example.org/marriage/voc#>\n" + ( ( ( ( ( ( ( ( "\n" + "CONSTRUCT<sp>{\n" ) + "<sp>?x<sp>a<sp>:Persona<sp>.<sp>\n" ) + "}\n" ) + "WHERE<sp>{\n" ) + "<sp>?x<sp>a<sp>:Person<sp>.\n" ) + "}\n" ) + "OFFSET<sp>3\n" ) + "LIMIT<sp>1" ) ; int count = runConstructQuery ( query ) ; "<AssertPlaceHolder>" ; } runConstructQuery ( java . lang . String ) { int count = 0 ; try ( it . unibz . inf . ontop . owlapi . connection . OWLConnection conn = it . unibz . inf . ontop . owlapi . MarriageTest . REASONER . getConnection ( ) ; it . unibz . inf . ontop . owlapi . connection . OWLStatement st = conn . createStatement ( ) ) { it . unibz . inf . ontop . owlapi . resultset . GraphOWLResultSet rs = st . executeConstructQuery ( constructQuery ) ; while ( rs . hasNext ( ) ) { org . semanticweb . owlapi . model . OWLAxiom axiom = rs . next ( ) ; it . unibz . inf . ontop . owlapi . MarriageTest . LOGGER . debug ( axiom . toString ( ) ) ; count ++ ; } } return count ; }
|
org . junit . Assert . assertEquals ( 0 , count )
|
testSetHeaderBackground ( ) { org . eclipse . swt . graphics . Color color = new org . eclipse . swt . graphics . Color ( display , 1 , 2 , 3 ) ; table . setHeaderBackground ( color ) ; "<AssertPlaceHolder>" ; } getHeaderBackground ( ) { checkWidget ( ) ; return headerBackground ; }
|
org . junit . Assert . assertEquals ( color , table . getHeaderBackground ( ) )
|
testScheduleRDFPyTranform ( ) { boolean tag = true ; java . lang . String csvDirect = "csv" ; java . lang . String modelDirect = "model" ; java . lang . String standardRdfDirect = "standardrdf" ; try { java . io . File [ ] fileList = new java . io . File ( getTestResource ( modelDirect ) . toURI ( ) ) . listFiles ( new java . io . FilenameFilter ( ) { @ edu . isi . karma . rdf . Override public boolean accept ( java . io . File dir , java . lang . String name ) { return ( ! ( name . startsWith ( "-model.ttl" 2 ) ) ) && ( name . endsWith ( "-model.ttl" 1 ) ) ; } } ) ; for ( int i = 0 ; i < ( fileList . length ) ; i ++ ) { java . io . File modelFile = fileList [ i ] ; edu . isi . karma . rdf . TestCSVFileRdfGenerator . logger . info ( ( "Load<sp>file:<sp>" + ( modelFile . getName ( ) ) ) ) ; java . lang . String name = modelFile . getName ( ) . replace ( "-model.ttl" , "" ) ; java . io . File standardRdfFile = new java . io . File ( getTestResource ( ( ( ( standardRdfDirect + "-model.ttl" 5 ) + name ) + "-rdf.ttl" ) ) . toURI ( ) ) ; java . io . File csvFile = new java . io . File ( getTestResource ( ( ( ( csvDirect + "-model.ttl" 5 ) + name ) + "-model.ttl" 3 ) ) . toURI ( ) ) ; if ( ! ( standardRdfFile . exists ( ) ) ) { edu . isi . karma . rdf . TestCSVFileRdfGenerator . logger . error ( ( standardRdfFile + "<sp>doesn't<sp>exist" ) ) ; continue ; } if ( ! ( csvFile . exists ( ) ) ) { edu . isi . karma . rdf . TestCSVFileRdfGenerator . logger . error ( ( csvFile + "<sp>doesn't<sp>exist" ) ) ; continue ; } java . io . StringWriter sw = new java . io . StringWriter ( ) ; java . io . PrintWriter pw = new java . io . PrintWriter ( sw ) ; generateRdfFile ( csvFile , InputType . CSV , modelFile . getName ( ) , modelFile , pw ) ; java . util . HashSet < java . lang . String > standardSet = getFileContent ( standardRdfFile ) ; java . util . HashSet < java . lang . String > generatedSet = getHashSet ( sw . toString ( ) . split ( java . lang . System . getProperty ( "line.separator" ) ) ) ; if ( ( ! ( standardSet . containsAll ( generatedSet ) ) ) || ( ! ( generatedSet . containsAll ( standardSet ) ) ) ) { tag = false ; outputError ( standardSet , generatedSet , modelFile . getName ( ) ) ; } else { edu . isi . karma . rdf . TestCSVFileRdfGenerator . logger . info ( ( ( modelFile . getName ( ) ) + "-model.ttl" 4 ) ) ; } pw . close ( ) ; } "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { edu . isi . karma . rdf . TestCSVFileRdfGenerator . logger . error ( "Exception" , e ) ; org . junit . Assert . fail ( ( "-model.ttl" 0 + ( e . getMessage ( ) ) ) ) ; } } close ( ) { recordReader . close ( ) ; }
|
org . junit . Assert . assertEquals ( tag , true )
|
issuanceProtocolIdemix ( ) { java . lang . String engineSuffix = "idemix" ; this . deleteStorageDirectory ( "user_storage" ) ; eu . abc4trust . services . user . UserServiceFactory userServiceFactory = new eu . abc4trust . services . user . UserServiceFactory ( ) ; eu . abc4trust . xml . URISet credentials = userServiceFactory . listCredentials ( ) ; "<AssertPlaceHolder>" ; eu . abc4trust . services . TestScenarioFactory testScenarioFactory = new eu . abc4trust . services . TestScenarioFactory ( ) ; java . net . URI credentialUid = testScenarioFactory . issuanceProtocol ( engineSuffix ) . first . getCredentialUID ( ) ; this . deleteCredential ( credentialUid ) ; } getURI ( ) { return technology ; }
|
org . junit . Assert . assertTrue ( credentials . getURI ( ) . isEmpty ( ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.