input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
decode_2 ( ) { final java . lang . String arg = "f" ; final java . lang . String exp = "Zg==" ; "<AssertPlaceHolder>" ; } decode ( byte [ ] ) { if ( ( data . length ) == 0 ) { return data ; } int lastRealDataIndex = ( data . length ) - 1 ; while ( ( data [ lastRealDataIndex ] ) == ( org . erlide . util . Base64 . EQUAL_SIGN ) ) { lastRealDataIndex -- ; } final int padBytes = ( ( data . length ) - 1 ) - lastRealDataIndex ; final int byteLength = ( ( ( data . length ) * 6 ) / 8 ) - padBytes ; final byte [ ] result = new byte [ byteLength ] ; int dataIndex = 0 ; int resultIndex = 0 ; int allBits = 0 ; final int resultChunks = ( lastRealDataIndex + 1 ) / 4 ; for ( int i = 0 ; i < resultChunks ; i ++ ) { allBits = 0 ; for ( int j = 0 ; j < 4 ; j ++ ) { allBits = ( allBits << 6 ) | ( org . erlide . util . Base64 . decodeDigit ( data [ ( dataIndex ++ ) ] ) ) ; } for ( int j = resultIndex + 2 ; j >= resultIndex ; j -- ) { result [ j ] = ( ( byte ) ( allBits & 255 ) ) ; allBits = allBits > > > 8 ; } resultIndex += 3 ; } if ( padBytes == 1 ) { allBits = 0 ; for ( int j = 0 ; j < 3 ; j ++ ) { allBits = ( allBits << 6 ) | ( org . erlide . util . Base64 . decodeDigit ( data [ ( dataIndex ++ ) ] ) ) ; } allBits = allBits << 6 ; allBits = allBits > > > 8 ; for ( int j = resultIndex + 1 ; j >= resultIndex ; j -- ) { result [ j ] = ( ( byte ) ( allBits & 255 ) ) ; allBits = allBits > > > 8 ; } } else if ( padBytes == 2 ) { allBits = 0 ; for ( int j = 0 ; j < 2 ; j ++ ) { allBits = ( allBits << 6 ) | ( org . erlide . util . Base64 . decodeDigit ( data [ ( dataIndex ++ ) ] ) ) ; } allBits = allBits << 6 ; allBits = allBits << 6 ; allBits = allBits > > > 8 ; allBits = allBits > > > 8 ; result [ resultIndex ] = ( ( byte ) ( allBits & 255 ) ) ; } return result ; }
org . junit . Assert . assertEquals ( arg , new java . lang . String ( org . erlide . util . Base64 . decode ( exp . getBytes ( ) ) ) )
testBuildWithDisabledSecurityConstraint ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . salary . type . SalaryType context = new org . lnu . is . domain . salary . type . SalaryType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>SalaryType<sp>e<sp>WHERE<sp>e.status=:status<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . salary . type . SalaryType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
test2SetFloat ( ) { float expected = 1.2F ; conf . setFloat ( "test2" , expected ) ; float actual = conf . getFloat ( "test2" ) ; "<AssertPlaceHolder>" ; } getFloat ( java . lang . String ) { java . lang . String value = get ( name ) ; if ( org . apache . commons . lang . StringUtils . isNotBlank ( value ) ) { return java . lang . Float . valueOf ( value ) ; } else { return null ; } }
org . junit . Assert . assertEquals ( expected , actual , 0 )
testDatetimeField ( ) { java . lang . String value = "2013-06-12<sp>12:30:11" ; org . fastcatsearch . ir . field . DatetimeField field = new org . fastcatsearch . ir . field . DatetimeField ( "A" , value ) ; org . fastcatsearch . ir . io . BytesDataInput input = write ( field ) ; org . fastcatsearch . ir . field . DatetimeField field2 = new org . fastcatsearch . ir . field . DatetimeField ( "A" ) ; field2 . readFrom ( input ) ; java . text . SimpleDateFormat sdfc = new java . text . SimpleDateFormat ( "yyyy-MM-dd<sp>HH:mm:ss" ) ; java . util . Date date = ( ( java . util . Date ) ( field2 . getValue ( ) ) ) ; java . lang . String value2 = sdfc . format ( date ) ; "<AssertPlaceHolder>" ; System . out . println ( value2 ) ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( value , value2 )
getMonthReservationsAllUsers ( ) { final org . silverpeas . resourcesmanager . web . ReservationEntity [ ] entities = getAt ( ( ( aMonthReservationResourceBaseURI ( ) ) + "/month/2013/02/14" ) , org . silverpeas . resourcesmanager . web . ReservationEntity [ ] . class ) ; "<AssertPlaceHolder>" ; } aMonthReservationResourceBaseURI ( ) { return ( "resourceManager/" + ( getExistingComponentInstances ( ) [ 0 ] ) ) + "/reservations" ; }
org . junit . Assert . assertNotNull ( entities )
createInternalPublicationTest ( ) { System . out . println ( "PublicationManagerIntegrationTest.createInternalPublicationTest" ) ; cz . metacentrum . perun . cabinet . model . Publication p = new cz . metacentrum . perun . cabinet . model . Publication ( ) ; p . setCategoryId ( publicationOne . getCategoryId ( ) ) ; p . setCreatedBy ( sess . getPerunPrincipal ( ) . getActor ( ) ) ; p . setCreatedDate ( new java . util . Date ( ) ) ; p . setExternalId ( 0 ) ; p . setIsbn ( "isbn<sp>123-4556-899" ) ; p . setMain ( "KERBEROS<sp>main<sp>zaznam." ) ; p . setPublicationSystemId ( 0 ) ; p . setTitle ( "Kerberos" ) ; p . setYear ( 2010 ) ; p . setRank ( 0.0 ) ; p . setLocked ( false ) ; p . setDoi ( "DOI" ) ; p . setCreatedByUid ( sess . getPerunPrincipal ( ) . getUserId ( ) ) ; p = getCabinetManager ( ) . createPublication ( sess , p ) ; "<AssertPlaceHolder>" ; p . setExternalId ( 0 ) ; p . setPublicationSystemId ( 0 ) ; try { getCabinetManager ( ) . createPublication ( sess , p ) ; } catch ( cz . metacentrum . perun . cabinet . bl . CabinetException ex ) { if ( ! ( ex . getType ( ) . equals ( ErrorCodes . PUBLICATION_ALREADY_EXISTS ) ) ) { org . junit . Assert . fail ( ( "Different<sp>exception<sp>was<sp>thrown<sp>when<sp>creating<sp>\"same\"<sp>internal<sp>publication:<sp>" + ex ) ) ; } } } getId ( ) { return id ; }
org . junit . Assert . assertTrue ( ( ( p . getId ( ) ) > 0 ) )
testReturnsPayloadWhenMatchesIfNoCaptureGroupDefined ( ) { addMessageToContextWithPayload ( "TESTfooTEST" ) ; java . lang . Object result = regexFuntion . call ( new java . lang . Object [ ] { "TEST\\w+TEST" } , context ) ; "<AssertPlaceHolder>" ; } call ( java . lang . Object [ ] , org . mule . runtime . api . el . BindingContext ) { return withContextClassLoader ( extensionClassLoader , ( ) -> invokeMethod ( method , componentInstance , parametersResolver . apply ( parameters ) ) ) ; }
org . junit . Assert . assertEquals ( "TESTfooTEST" , result )
testConvertAll ( ) { java . lang . Long id = 1L ; java . lang . String abbrName = "abbr<sp>Name" ; java . lang . String name = "n<sp>a<sp>m<sp>e" ; org . lnu . is . domain . honors . type . HonorType source = new org . lnu . is . domain . honors . type . HonorType ( ) ; source . setId ( id ) ; source . setAbbrName ( abbrName ) ; source . setName ( name ) ; java . util . List < org . lnu . is . domain . honors . type . HonorType > sources = java . util . Arrays . asList ( source ) ; org . lnu . is . resource . honor . type . HonorTypeResource expected = new org . lnu . is . resource . honor . type . HonorTypeResource ( ) ; expected . setId ( id ) ; expected . setAbbrName ( abbrName ) ; expected . setName ( name ) ; java . util . List < org . lnu . is . resource . honor . type . HonorTypeResource > expecteds = java . util . Arrays . asList ( expected ) ; java . util . List < org . lnu . is . resource . honor . type . HonorTypeResource > actuals = unit . convertAll ( sources ) ; "<AssertPlaceHolder>" ; } convertAll ( java . util . List ) { return convertAll ( sources , new java . util . ArrayList < TARGET > ( sources . size ( ) ) ) ; }
org . junit . Assert . assertEquals ( expecteds , actuals )
testNullTemplate ( ) { final java . lang . String result = templater . execute ( null , "test" , java . util . Collections . emptyMap ( ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNull ( result )
testGetSplits ( ) { org . apache . mahout . text . doc . SingleFieldDocument doc1 = new org . apache . mahout . text . doc . SingleFieldDocument ( "1" , "This<sp>is<sp>simple<sp>document<sp>1" ) ; org . apache . mahout . text . doc . SingleFieldDocument doc2 = new org . apache . mahout . text . doc . SingleFieldDocument ( "2" , "This<sp>is<sp>simple<sp>document<sp>2" ) ; org . apache . mahout . text . doc . SingleFieldDocument doc3 = new org . apache . mahout . text . doc . SingleFieldDocument ( "3" , "This<sp>is<sp>simple<sp>document<sp>3" ) ; commitDocuments ( getDirectory ( getIndexPath1AsFile ( ) ) , doc1 ) ; commitDocuments ( getDirectory ( getIndexPath1AsFile ( ) ) , doc2 ) ; commitDocuments ( getDirectory ( getIndexPath1AsFile ( ) ) , doc3 ) ; java . util . List < org . apache . mahout . text . LuceneSegmentInputSplit > splits = inputFormat . getSplits ( jobContext ) ; "<AssertPlaceHolder>" ; } size ( ) { return weights . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , splits . size ( ) )
testFindByHash ( ) { java . util . List < org . kaaproject . kaa . common . dto . TopicDto > topics = new java . util . ArrayList ( ) ; org . kaaproject . kaa . common . dto . TopicDto topicDto = new org . kaaproject . kaa . common . dto . TopicDto ( ) ; topicDto . setId ( "6123" ) ; topics . add ( topicDto ) ; byte [ ] hash = "hash" . getBytes ( ) ; int simpleHash = 123 ; org . kaaproject . kaa . common . dto . TopicListEntryDto topicListEntryDto = new org . kaaproject . kaa . common . dto . TopicListEntryDto ( 123 , hash , topics ) ; topicListEntryDao . save ( topicListEntryDto ) ; org . kaaproject . kaa . server . common . nosql . cassandra . dao . model . CassandraTopicListEntry topicListEntry = topicListEntryDao . findByHash ( hash ) ; "<AssertPlaceHolder>" ; } getSimpleHash ( ) { return simpleHash ; }
org . junit . Assert . assertEquals ( simpleHash , topicListEntry . getSimpleHash ( ) )
testIdentityCodingIsNotUsedInContentEncodingHeader ( ) { originResponse . setHeader ( "Content-Encoding" , "identity" ) ; backendExpectsAnyRequest ( ) . andReturn ( originResponse ) ; replayMocks ( ) ; final org . apache . hc . core5 . http . ClassicHttpResponse result = execute ( request ) ; verifyMocks ( ) ; boolean foundIdentity = false ; final java . util . Iterator < org . apache . hc . core5 . http . HeaderElement > it = org . apache . hc . core5 . http . message . MessageSupport . iterate ( result , HttpHeaders . CONTENT_ENCODING ) ; while ( it . hasNext ( ) ) { final org . apache . hc . core5 . http . HeaderElement elt = it . next ( ) ; if ( "identity" . equalsIgnoreCase ( elt . getName ( ) ) ) { foundIdentity = true ; } } "<AssertPlaceHolder>" ; } getName ( ) { return "MyBasic" ; }
org . junit . Assert . assertFalse ( foundIdentity )
testTrashAndRestoreWithApprovedStatusRestoreUniqueTitle ( ) { com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( group . getGroupId ( ) ) ; com . liferay . portal . kernel . model . BaseModel < ? > parentBaseModel = getParentBaseModel ( group , serviceContext ) ; baseModel = addBaseModel ( parentBaseModel , serviceContext ) ; baseModel = getBaseModel ( ( ( java . lang . Long ) ( baseModel . getPrimaryKeyObj ( ) ) ) ) ; java . lang . String uniqueTitle = getUniqueTitle ( baseModel ) ; moveBaseModelToTrash ( ( ( java . lang . Long ) ( baseModel . getPrimaryKeyObj ( ) ) ) ) ; com . liferay . portal . kernel . trash . TrashHandler trashHandler = com . liferay . portal . kernel . trash . TrashHandlerRegistryUtil . getTrashHandler ( getBaseModelClassName ( ) ) ; trashHandler . restoreTrashEntry ( com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) , getTrashEntryClassPK ( baseModel ) ) ; baseModel = getBaseModel ( ( ( java . lang . Long ) ( baseModel . getPrimaryKeyObj ( ) ) ) ) ; if ( uniqueTitle != null ) { "<AssertPlaceHolder>" ; } } getUniqueTitle ( com . liferay . portal . kernel . model . BaseModel ) { com . liferay . journal . model . JournalFolder folder = ( ( com . liferay . journal . model . JournalFolder ) ( baseModel ) ) ; java . lang . String name = folder . getName ( ) ; return _trashHelper . getOriginalTitle ( name ) ; }
org . junit . Assert . assertEquals ( uniqueTitle , getUniqueTitle ( baseModel ) )
nrt ( ) { org . apache . jackrabbit . oak . plugins . index . lucene . TestUtil . enableIndexingMode ( builder , FulltextIndexConstants . IndexingMode . NRT ) ; org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexDefinition idxDefn = new org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexDefinition ( root , builder . getNodeState ( ) , "/foo" ) ; "<AssertPlaceHolder>" ; } isNRTIndexingEnabled ( ) { return nrtIndexMode ; }
org . junit . Assert . assertTrue ( idxDefn . isNRTIndexingEnabled ( ) )
testSaveState ( ) { com . streamsets . datacollector . execution . store . SlavePipelineStateStore slavePipelineStateStore = new com . streamsets . datacollector . execution . store . SlavePipelineStateStore ( ) ; slavePipelineStateStore . saveState ( "user" , "pipe1" , "1" , PipelineStatus . EDITED , "msg" , new java . util . HashMap < java . lang . String , java . lang . Object > ( ) , ExecutionMode . STANDALONE , null , 0 , 0 ) ; "<AssertPlaceHolder>" ; try { slavePipelineStateStore . getState ( "blah" , "blah" ) ; org . junit . Assert . fail ( "Expected<sp>exception<sp>but<sp>didn't<sp>get<sp>any" ) ; } catch ( com . streamsets . datacollector . store . PipelineStoreException ex ) { } try { slavePipelineStateStore . saveState ( "user" , "pipe2" , "1" , PipelineStatus . EDITED , "msg" , new java . util . HashMap < java . lang . String , java . lang . Object > ( ) , ExecutionMode . STANDALONE , null , 0 , 0 ) ; org . junit . Assert . fail ( "Expected<sp>exception<sp>but<sp>didn't<sp>get<sp>any" ) ; } catch ( com . streamsets . datacollector . store . PipelineStoreException ex ) { } try { slavePipelineStateStore . saveState ( "user" , "pipe1" , "2" , PipelineStatus . EDITED , "msg" , new java . util . HashMap < java . lang . String , java . lang . Object > ( ) , ExecutionMode . STANDALONE , null , 0 , 0 ) ; org . junit . Assert . fail ( "Expected<sp>exception<sp>but<sp>didn't<sp>get<sp>any" ) ; } catch ( com . streamsets . datacollector . store . PipelineStoreException ex ) { } } getState ( java . lang . String , java . lang . String ) { try { return pipelineStateCache . get ( getNameAndRevString ( name , rev ) ) ; } catch ( java . util . concurrent . ExecutionException ex ) { if ( ( ex . getCause ( ) ) instanceof java . lang . RuntimeException ) { throw ( ( java . lang . RuntimeException ) ( ex . getCause ( ) ) ) ; } else if ( ( ex . getCause ( ) ) instanceof com . streamsets . datacollector . store . PipelineStoreException ) { throw ( ( com . streamsets . datacollector . store . PipelineStoreException ) ( ex . getCause ( ) ) ) ; } else { throw new com . streamsets . datacollector . store . PipelineStoreException ( com . streamsets . datacollector . util . ContainerError . CONTAINER_0114 , ex . toString ( ) , ex ) ; } } }
org . junit . Assert . assertEquals ( PipelineStatus . EDITED , slavePipelineStateStore . getState ( "pipe1" , "1" ) . getStatus ( ) )
doesTargetStorageSupportDiskOfferingTestDiskOfferingTagsDifferentFromdStorageTags ( ) { com . cloud . storage . DiskOfferingVO diskOfferingVoMock = org . mockito . Mockito . mock ( com . cloud . storage . DiskOfferingVO . class ) ; org . mockito . Mockito . doReturn ( "A,B" ) . when ( diskOfferingVoMock ) . getTags ( ) ; com . cloud . storage . StoragePool storagePoolMock = org . mockito . Mockito . mock ( com . cloud . storage . StoragePool . class ) ; org . mockito . Mockito . doReturn ( "C,D" ) . when ( volumeApiServiceImpl ) . getStoragePoolTags ( storagePoolMock ) ; boolean result = volumeApiServiceImpl . doesTargetStorageSupportDiskOffering ( storagePoolMock , diskOfferingVoMock ) ; "<AssertPlaceHolder>" ; } doesTargetStorageSupportDiskOffering ( com . cloud . storage . StoragePool , java . lang . String ) { if ( org . apache . commons . lang . StringUtils . isBlank ( diskOfferingTags ) ) { return true ; } java . lang . String storagePoolTags = getStoragePoolTags ( destPool ) ; if ( org . apache . commons . lang . StringUtils . isBlank ( storagePoolTags ) ) { return false ; } java . lang . String [ ] storageTagsAsStringArray = org . apache . commons . lang . StringUtils . split ( storagePoolTags , "," ) ; java . lang . String [ ] newDiskOfferingTagsAsStringArray = org . apache . commons . lang . StringUtils . split ( diskOfferingTags , "," ) ; return org . apache . commons . collections . CollectionUtils . isSubCollection ( java . util . Arrays . asList ( newDiskOfferingTagsAsStringArray ) , java . util . Arrays . asList ( storageTagsAsStringArray ) ) ; }
org . junit . Assert . assertFalse ( result )
level1Miss ( ) { final int i = 1 << ( ( com . zaxxer . sparsebits . SparseBitSet . SHIFT1 ) + ( com . zaxxer . sparsebits . SparseBitSet . SHIFT3 ) ) ; set . set ( i ) ; final int ret = set . previousClearBit ( i ) ; "<AssertPlaceHolder>" ; } previousClearBit ( int ) { if ( i < 0 ) { if ( i == ( - 1 ) ) return - 1 ; throw new java . lang . IndexOutOfBoundsException ( ( "i=" + i ) ) ; } final long [ ] [ ] [ ] bits = this . bits ; final int aSize = ( bits . length ) - 1 ; int w = i > > ( com . zaxxer . sparsebits . SparseBitSet . SHIFT3 ) ; int w3 = w & ( com . zaxxer . sparsebits . SparseBitSet . MASK3 ) ; int w2 = ( w > > ( com . zaxxer . sparsebits . SparseBitSet . SHIFT2 ) ) & ( com . zaxxer . sparsebits . SparseBitSet . MASK2 ) ; int w1 = w > > ( com . zaxxer . sparsebits . SparseBitSet . SHIFT1 ) ; if ( w1 > aSize ) return i ; w1 = java . lang . Math . min ( w1 , aSize ) ; int w4 = i % ( com . zaxxer . sparsebits . SparseBitSet . LENGTH4 ) ; long word ; long [ ] [ ] a2 ; long [ ] a3 ; for ( ; w1 >= 0 ; -- w1 ) { if ( ( a2 = bits [ w1 ] ) == null ) return ( ( ( ( w1 << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT1 ) ) + ( w2 << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT2 ) ) ) + w3 ) << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT3 ) ) + w4 ; for ( ; w2 >= 0 ; -- w2 ) { if ( ( a3 = a2 [ w2 ] ) == null ) return ( ( ( ( w1 << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT1 ) ) + ( w2 << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT2 ) ) ) + w3 ) << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT3 ) ) + w4 ; for ( ; w3 >= 0 ; -- w3 ) { if ( ( word = a3 [ w3 ] ) == 0 ) return ( ( ( ( w1 << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT1 ) ) + ( w2 << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT2 ) ) ) + w3 ) << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT3 ) ) + w4 ; for ( int bitIdx = w4 ; bitIdx >= 0 ; -- bitIdx ) { if ( ( word & ( 1L << bitIdx ) ) == 0 ) return ( ( ( ( w1 << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT1 ) ) + ( w2 << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT2 ) ) ) + w3 ) << ( com . zaxxer . sparsebits . SparseBitSet . SHIFT3 ) ) + bitIdx ; } w4 = com . zaxxer . sparsebits . SparseBitSet . LENGTH4_SIZE ; } w3 = com . zaxxer . sparsebits . SparseBitSet . LENGTH3_SIZE ; } w2 = com . zaxxer . sparsebits . SparseBitSet . LENGTH2_SIZE ; } return - 1 ; }
org . junit . Assert . assertEquals ( ( i - 1 ) , ret )
testSerialization ( ) { org . jfree . data . time . TimePeriodValuesCollection c1 = new org . jfree . data . time . TimePeriodValuesCollection ( ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( c1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . data . time . TimePeriodValuesCollection c2 = ( ( org . jfree . data . time . TimePeriodValuesCollection ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
org . junit . Assert . assertEquals ( c1 , c2 )
testPersoonGeenIndicatieDerdeHeeftGezag ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteiten = brby2019 . voerRegelUit ( maakPersoon ( SoortIndicatie . INDICATIE_ONDER_CURATELE , 2 , nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . gezagderde . BRBY2019Test . HEEFT_OUDERLIJK_GEZAG , nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . gezagderde . BRBY2019Test . HEEFT_OUDERSCHAP ) , maakPersoonBericht ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( berichtEntiteiten . isEmpty ( ) )
testCompressOnRollover ( ) { org . junit . Assume . assumeFalse ( isWindowsEnvironment ( ) ) ; final org . apache . nifi . provenance . RepositoryConfiguration config = org . apache . nifi . provenance . ITestPersistentProvenanceRepository . createConfiguration ( ) ; config . setMaxEventFileLife ( 500 , TimeUnit . MILLISECONDS ) ; config . setCompressOnRollover ( true ) ; repo = new org . apache . nifi . provenance . PersistentProvenanceRepository ( config , org . apache . nifi . provenance . ITestPersistentProvenanceRepository . DEFAULT_ROLLOVER_MILLIS ) ; repo . initialize ( getEventReporter ( ) , null , null , IdentifierLookup . EMPTY ) ; final java . lang . String uuid = "00000000-0000-0000-0000-000000000000" ; final java . util . Map < java . lang . String , java . lang . String > attributes = new java . util . HashMap ( ) ; attributes . put ( "abc" , "xyz" ) ; attributes . put ( "xyz" , "abc" ) ; attributes . put ( "filename" , ( "file-" + uuid ) ) ; final org . apache . nifi . provenance . ProvenanceEventBuilder builder = new org . apache . nifi . provenance . StandardProvenanceEventRecord . Builder ( ) ; builder . setEventTime ( java . lang . System . currentTimeMillis ( ) ) ; builder . setEventType ( ProvenanceEventType . RECEIVE ) ; builder . setTransitUri ( "nifi://unit-test" ) ; attributes . put ( "uuid" , uuid ) ; builder . fromFlowFile ( org . apache . nifi . provenance . TestUtil . createFlowFile ( 3L , 3000L , attributes ) ) ; builder . setComponentId ( "1234" ) ; builder . setComponentType ( "dummy<sp>processor" ) ; for ( int i = 0 ; i < 10 ; i ++ ) { builder . fromFlowFile ( org . apache . nifi . provenance . TestUtil . createFlowFile ( i , 3000L , attributes ) ) ; repo . registerEvent ( builder . build ( ) ) ; } repo . waitForRollover ( ) ; final java . io . File storageDir = config . getStorageDirectories ( ) . values ( ) . iterator ( ) . next ( ) ; final java . io . File compressedLogFile = new java . io . File ( storageDir , "0.prov.gz" ) ; "<AssertPlaceHolder>" ; } next ( ) { org . apache . nifi . remote . protocol . DataPacket next = this . next ; this . next = getNext ( ) ; return next ; }
org . junit . Assert . assertTrue ( compressedLogFile . exists ( ) )
getUpdateCountShouldReturnOne ( ) { org . neo4j . jdbc . bolt . BoltNeo4jPreparedStatement statement = mock ( org . neo4j . jdbc . bolt . BoltNeo4jPreparedStatement . class ) ; when ( statement . isClosed ( ) ) . thenReturn ( false ) ; when ( statement . getUpdateCount ( ) ) . thenCallRealMethod ( ) ; org . mockito . internal . util . reflection . Whitebox . setInternalState ( statement , "currentResultSet" , null ) ; org . powermock . reflect . Whitebox . setInternalState ( statement , "currentUpdateCount" , 1 ) ; "<AssertPlaceHolder>" ; } getUpdateCount ( ) { this . checkClosed ( ) ; int update = this . currentUpdateCount ; if ( ( this . currentResultSet ) != null ) { update = - 1 ; } else { this . currentUpdateCount = - 1 ; } return update ; }
org . junit . Assert . assertEquals ( 1 , statement . getUpdateCount ( ) )
should_return_this ( ) { org . fest . assertions . api . FileAssert returned = assertions . exists ( ) ; "<AssertPlaceHolder>" ; } exists ( ) { return exists ; }
org . junit . Assert . assertSame ( assertions , returned )
testEqualsObjectNotPacket ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) )
testDecorateEmptyText ( ) { "<AssertPlaceHolder>" ; } decorate ( java . lang . String , org . springframework . roo . support . util . AnsiEscapeCode [ ] ) { if ( org . apache . commons . lang3 . StringUtils . isEmpty ( text ) ) { return text ; } final java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( org . springframework . roo . support . util . AnsiEscapeCode . ANSI_ENABLED ) { for ( final org . springframework . roo . support . util . AnsiEscapeCode code : codes ) { sb . append ( code . code ) ; } } sb . append ( text ) ; if ( ( ( codes != null ) && ( ( codes . length ) > 0 ) ) && ( org . springframework . roo . support . util . AnsiEscapeCode . ANSI_ENABLED ) ) { sb . append ( org . springframework . roo . support . util . AnsiEscapeCode . OFF . code ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( "" , org . springframework . roo . support . util . AnsiEscapeCode . decorate ( "" , org . springframework . roo . support . util . AnsiEscapeCode . values ( ) [ 0 ] ) )
returnNullActiveJobGraphIfJobTabNotExists ( ) { org . pentaho . di . ui . spoon . job . JobGraph actualJobGraph = spoon . getActiveJobGraph ( ) ; "<AssertPlaceHolder>" ; } getActiveJobGraph ( ) { if ( ( ( ( delegates ) != null ) && ( ( delegates . tabs ) != null ) ) && ( ( tabfolder ) != null ) ) { org . pentaho . di . ui . spoon . TabMapEntry mapEntry = delegates . tabs . getTab ( tabfolder . getSelected ( ) ) ; if ( ( mapEntry != null ) && ( ( mapEntry . getObject ( ) ) instanceof org . pentaho . di . ui . spoon . job . JobGraph ) ) { return ( ( org . pentaho . di . ui . spoon . job . JobGraph ) ( mapEntry . getObject ( ) ) ) ; } } return null ; }
org . junit . Assert . assertNull ( actualJobGraph )
distributePortsOnSide_GivenCrossOnWesternSide_ShouldRemoveCrossing ( ) { org . eclipse . elk . alg . layered . graph . LNode [ ] leftNodes = addNodesToLayer ( 2 , makeLayer ( getGraph ( ) ) ) ; org . eclipse . elk . alg . layered . graph . LNode rightNode = addNodeToLayer ( makeLayer ( getGraph ( ) ) ) ; eastWestEdgeFromTo ( leftNodes [ 0 ] , rightNode ) ; eastWestEdgeFromTo ( leftNodes [ 1 ] , rightNode ) ; java . util . List < org . eclipse . elk . alg . layered . graph . LPort > expectedPortOrderRightNode = com . google . common . collect . Lists . newArrayList ( rightNode . getPorts ( ) . get ( 1 ) , rightNode . getPorts ( ) . get ( 0 ) ) ; distributePortsInCompleteGraph ( 4 ) ; "<AssertPlaceHolder>" ; } getPorts ( ) { if ( ( ports ) == null ) { ports = new org . eclipse . emf . ecore . util . EObjectContainmentWithInverseEList < org . eclipse . elk . graph . ElkPort > ( org . eclipse . elk . graph . ElkPort . class , this , org . eclipse . elk . graph . ElkGraphPackage . ELK_NODE__PORTS , org . eclipse . elk . graph . ElkGraphPackage . ELK_PORT__PARENT ) ; } return ports ; }
org . junit . Assert . assertThat ( rightNode . getPorts ( ) , org . hamcrest . CoreMatchers . is ( expectedPortOrderRightNode ) )
testUsingLocalhost ( ) { com . liferay . portal . kernel . theme . ThemeDisplay themeDisplay = initThemeDisplay ( company , group , publicLayout , com . liferay . portal . util . VIRTUAL_HOSTNAME ) ; java . lang . String virtualHostnameFriendlyURL = com . liferay . portal . kernel . util . PortalUtil . getLayoutURL ( publicLayout , themeDisplay , true ) ; themeDisplay . setServerName ( com . liferay . portal . util . LOCALHOST ) ; java . lang . String localhostFriendlyURL = com . liferay . portal . kernel . util . PortalUtil . getLayoutURL ( publicLayout , themeDisplay , true ) ; "<AssertPlaceHolder>" ; } getLayoutURL ( com . liferay . portal . kernel . model . Layout , com . liferay . portal . kernel . theme . ThemeDisplay , boolean ) { return com . liferay . portal . kernel . util . PortalUtil . getPortal ( ) . getLayoutURL ( layout , themeDisplay , doAsUser ) ; }
org . junit . Assert . assertEquals ( localhostFriendlyURL , virtualHostnameFriendlyURL )
generate_emptyCollections_shouldGenerateList ( ) { java . util . List < com . adobe . acs . commons . wcm . comparisons . PageCompareDataLine > left = java . util . Collections . emptyList ( ) ; java . util . List < com . adobe . acs . commons . wcm . comparisons . PageCompareDataLine > right = java . util . Collections . emptyList ( ) ; final java . util . List < com . adobe . acs . commons . wcm . comparisons . lines . Line < com . adobe . acs . commons . wcm . comparisons . PageCompareDataLine > > result = underTest . generate ( left , right ) ; "<AssertPlaceHolder>" ; } generate ( java . lang . Iterable , java . lang . Iterable ) { this . left = new com . adobe . acs . commons . wcm . comparisons . impl . lines . Stepper < T > ( left , toId ) ; this . right = new com . adobe . acs . commons . wcm . comparisons . impl . lines . Stepper < T > ( right , toId ) ; java . util . List < com . adobe . acs . commons . wcm . comparisons . lines . Line < T > > lines = new java . util . ArrayList < com . adobe . acs . commons . wcm . comparisons . lines . Line < T > > ( ) ; this . leftValue = this . left . next ( ) ; this . rightValue = this . right . next ( ) ; do { this . leftSpacer = this . right . positionOfIdAfterCurrent ( leftValue ) ; this . rightSpacer = this . left . positionOfIdAfterCurrent ( rightValue ) ; if ( ( ( ( leftValue ) != null ) && ( ( rightValue ) != null ) ) && ( toId . apply ( leftValue ) . equals ( toId . apply ( rightValue ) ) ) ) { addPair ( lines ) ; } else if ( ( ( leftSpacer ) < ( rightSpacer ) ) && ( ( leftSpacer ) > 0 ) ) { addWithLeftSpacers ( lines ) ; } else if ( ( rightSpacer ) > 0 ) { addWithRightSpacers ( lines ) ; } else if ( ( leftSpacer ) > 0 ) { addWithLeftSpacers ( lines ) ; } else { addSeperated ( lines ) ; } } while ( ( ( leftValue ) != null ) || ( ( rightValue ) != null ) ) ; return lines ; }
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( java . util . Collections . < com . adobe . acs . commons . wcm . comparisons . lines . Line < com . adobe . acs . commons . wcm . comparisons . PageCompareDataLine > > emptyList ( ) ) )
writeInt ( ) { final byte [ ] data = new byte [ ] { 4 , 3 , 2 , 1 } ; final java . io . ByteArrayOutputStream stream = new java . io . ByteArrayOutputStream ( ) ; final com . flagstone . transform . coder . SWFEncoder encoder = new com . flagstone . transform . coder . SWFEncoder ( stream ) ; encoder . writeInt ( 16909060 ) ; encoder . flush ( ) ; "<AssertPlaceHolder>" ; } flush ( ) { stream . write ( buffer , 0 , index ) ; stream . flush ( ) ; int diff ; if ( ( offset ) == 0 ) { diff = 0 ; } else { diff = 1 ; buffer [ 0 ] = buffer [ index ] ; } for ( int i = diff ; i < ( buffer . length ) ; i ++ ) { buffer [ i ] = 0 ; } pos += index ; index = 0 ; }
org . junit . Assert . assertArrayEquals ( data , stream . toByteArray ( ) )
testFindProductAvailableToSellQuantityProduct5AccSHOP50 ( ) { final java . util . List < org . yes . cart . domain . entity . Warehouse > shop10wh = warehouseService . getByShopId ( 50L , false ) ; java . util . Map < java . lang . String , java . math . BigDecimal > skusWarehouse = skuWarehouseService . getProductAvailableToSellQuantity ( 14004L , shop10wh ) ; "<AssertPlaceHolder>" ; } size ( ) { final net . sf . ehcache . Ehcache ehcache = ( ( net . sf . ehcache . Ehcache ) ( CACHE . getNativeCache ( ) ) ) ; return ehcache . getSize ( ) ; }
org . junit . Assert . assertEquals ( 0 , skusWarehouse . size ( ) )
testNestedParameterResolversAreOrdered ( ) { final org . axonframework . messaging . annotation . MultiParameterResolverFactoryTest . LowPrioParameterResolverFactory lowPrio = new org . axonframework . messaging . annotation . MultiParameterResolverFactoryTest . LowPrioParameterResolverFactory ( ) ; final org . axonframework . messaging . annotation . MultiParameterResolverFactoryTest . HighPrioParameterResolverFactory highPrio = new org . axonframework . messaging . annotation . MultiParameterResolverFactoryTest . HighPrioParameterResolverFactory ( ) ; testSubject = org . axonframework . messaging . annotation . MultiParameterResolverFactory . ordered ( mockFactory1 , new org . axonframework . messaging . annotation . MultiParameterResolverFactory ( lowPrio , mockFactory2 ) , new org . axonframework . messaging . annotation . MultiParameterResolverFactory ( highPrio ) ) ; "<AssertPlaceHolder>" ; } getDelegates ( ) { return java . util . Arrays . asList ( enhancers ) ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( highPrio , mockFactory1 , mockFactory2 , lowPrio ) , testSubject . getDelegates ( ) )
testGetConfiguration ( ) { org . apache . ambari . server . view . configuration . InstanceConfig instanceConfig = org . apache . ambari . server . view . configuration . InstanceConfigTest . getInstanceConfigs ( ) . get ( 0 ) ; org . apache . ambari . server . orm . entities . ViewEntity viewDefinition = org . apache . ambari . server . orm . entities . ViewEntityTest . getViewEntity ( ) ; org . apache . ambari . server . orm . entities . ViewInstanceEntity viewInstanceDefinition = new org . apache . ambari . server . orm . entities . ViewInstanceEntity ( viewDefinition , instanceConfig ) ; "<AssertPlaceHolder>" ; } getConfiguration ( ) { return instanceConfig ; }
org . junit . Assert . assertEquals ( instanceConfig , viewInstanceDefinition . getConfiguration ( ) )
testSearch ( ) { java . util . Date desapriskDate1 = new java . util . Date ( dfm . parse ( "20060101" ) . getTime ( ) ) ; java . util . Date desapriskDate2 = new java . util . Date ( dfm . parse ( "20050101" ) . getTime ( ) ) ; java . util . Date desapriskDate3 = new java . util . Date ( dfm . parse ( "20070101" ) . getTime ( ) ) ; java . util . Date desapriskTime1 = new java . util . Date ( dfm . parse ( "20060101" ) . getTime ( ) ) ; java . util . Date desapriskTime2 = new java . util . Date ( dfm . parse ( "20050101" ) . getTime ( ) ) ; java . util . Date desapriskTime3 = new java . util . Date ( dfm . parse ( "20070101" ) . getTime ( ) ) ; int formNo1 = 101 ; int formNo2 = 202 ; int demographicNo1 = 111 ; int demographicNo2 = 222 ; org . oscarehr . common . model . Desaprisk desaprisk1 = new org . oscarehr . common . model . Desaprisk ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( desaprisk1 ) ; desaprisk1 . setFormNo ( formNo1 ) ; desaprisk1 . setDemographicNo ( demographicNo1 ) ; desaprisk1 . setDesapriskDate ( desapriskDate1 ) ; desaprisk1 . setDesapriskTime ( desapriskTime1 ) ; dao . persist ( desaprisk1 ) ; org . oscarehr . common . model . Desaprisk desaprisk2 = new org . oscarehr . common . model . Desaprisk ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( desaprisk2 ) ; desaprisk2 . setFormNo ( formNo2 ) ; desaprisk2 . setDemographicNo ( demographicNo2 ) ; desaprisk2 . setDesapriskDate ( desapriskDate2 ) ; desaprisk2 . setDesapriskTime ( desapriskTime2 ) ; dao . persist ( desaprisk2 ) ; org . oscarehr . common . model . Desaprisk desaprisk3 = new org . oscarehr . common . model . Desaprisk ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( desaprisk3 ) ; desaprisk3 . setFormNo ( formNo1 ) ; desaprisk3 . setDemographicNo ( demographicNo1 ) ; desaprisk3 . setDesapriskDate ( desapriskDate3 ) ; desaprisk3 . setDesapriskTime ( desapriskTime3 ) ; dao . persist ( desaprisk3 ) ; org . oscarehr . common . model . Desaprisk expectedResult = desaprisk3 ; org . oscarehr . common . model . Desaprisk result = dao . search ( formNo1 , demographicNo1 ) ; "<AssertPlaceHolder>" ; } search ( java . lang . Integer , java . lang . Integer ) { java . lang . String sqlCommand = "select<sp>x<sp>from<sp>Desaprisk<sp>x<sp>where<sp>x.formNo<sp><=<sp>?<sp>and<sp>x.demographicNo=?<sp>order<sp>by<sp>x.formNo<sp>DESC,<sp>x.desapriskDate<sp>DESC,<sp>x.desapriskTime<sp>DESC" ; javax . persistence . Query query = entityManager . createQuery ( sqlCommand ) ; query . setParameter ( 1 , formNo ) ; query . setParameter ( 2 , demographicNo ) ; @ org . oscarehr . common . dao . SuppressWarnings ( "unchecked" ) java . util . List < org . oscarehr . common . model . Desaprisk > results = query . getResultList ( ) ; if ( ( results . size ( ) ) > 0 ) { return results . get ( 0 ) ; } return null ; }
org . junit . Assert . assertEquals ( expectedResult , result )
testForName_Inner ( ) { "<AssertPlaceHolder>" ; } forName ( java . lang . String ) { return net . greghaines . jesque . utils . ReflectionUtils . forName ( name , net . greghaines . jesque . utils . ReflectionUtils . getDefaultClassLoader ( ) ) ; }
org . junit . Assert . assertSame ( java . util . Map . Entry . class , net . greghaines . jesque . utils . ReflectionUtils . forName ( java . util . Map . Entry . class . getName ( ) ) )
shouldOrderRunningFirst ( ) { java . util . List < org . talend . dataprep . async . AsyncExecution > unOrderedAsyncs = com . google . common . collect . Lists . newArrayList ( buildAsyncExecution ( AsyncExecution . Status . NEW , 100L ) , buildAsyncExecution ( AsyncExecution . Status . DONE , 100L ) , buildAsyncExecution ( AsyncExecution . Status . RUNNING , 100L ) , buildAsyncExecution ( AsyncExecution . Status . CANCELLED , 100L ) , buildAsyncExecution ( AsyncExecution . Status . FAILED , 100L ) ) ; unOrderedAsyncs . sort ( naturalOrder ( ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { final org . talend . dataprep . dataset . store . metadata . file . File file = getFile ( id ) ; if ( file . getName ( ) . startsWith ( "." ) ) { org . talend . dataprep . dataset . store . metadata . file . FileSystemDataSetMetadataRepository . LOG . info ( "Ignore<sp>hidden<sp>file<sp>{}" , file . getName ( ) ) ; return null ; } if ( ! ( file . exists ( ) ) ) { org . talend . dataprep . dataset . store . metadata . file . FileSystemDataSetMetadataRepository . LOG . info ( "dataset<sp>#{}<sp>not<sp>found<sp>in<sp>file<sp>system" , id ) ; return null ; } java . util . concurrent . locks . ReentrantReadWriteLock lock = locks . getLock ( id ) ; lock . readLock ( ) . lock ( ) ; try ( org . talend . dataprep . dataset . store . metadata . file . FileInputStream fileInputStream = new org . talend . dataprep . dataset . store . metadata . file . FileInputStream ( file ) ; java . util . zip . GZIPInputStream input = new java . util . zip . GZIPInputStream ( fileInputStream ) ) { return mapper . readerFor ( org . talend . dataprep . api . dataset . DataSetMetadata . class ) . readValue ( input ) ; } catch ( org . talend . dataprep . dataset . store . metadata . file . IOException e ) { org . talend . dataprep . dataset . store . metadata . file . FileSystemDataSetMetadataRepository . LOG . error ( "unable<sp>to<sp>load<sp>dataset<sp>{}" , id , e ) ; return null ; } finally { lock . readLock ( ) . unlock ( ) ; } }
org . junit . Assert . assertEquals ( AsyncExecution . Status . RUNNING , unOrderedAsyncs . get ( 0 ) . getStatus ( ) )
testRemoveElementAt ( ) { v . add ( org . apache . tools . ant . util . VectorSetTest . O ) ; v . removeElementAt ( 0 ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( isReference ( ) ) { return getRef ( ) . size ( ) ; } dieOnCircularReference ( ) ; return streamArchives ( ) . mapToInt ( ArchiveFileSet :: size ) . sum ( ) ; }
org . junit . Assert . assertEquals ( 0 , v . size ( ) )
testSetDate ( ) { org . esa . snap . core . datamodel . Product product = new org . esa . snap . core . datamodel . Product ( "name" , "type" , 10 , 10 ) ; com . bc . calvalus . processing . beam . CalvalusProductIO . setDateToMerisSdrProduct ( product , "CCI-Fire-MERIS-SDR-L3-300m-v1.0-2008-12-07-v04h07.nc" ) ; long expected = ProductData . UTC . parse ( "2008-12-07" , "yyyy-MM-dd" ) . getAsDate ( ) . getTime ( ) ; long actual = product . getStartTime ( ) . getAsDate ( ) . getTime ( ) ; "<AssertPlaceHolder>" ; } getTime ( ) { return time ; }
org . junit . Assert . assertEquals ( expected , actual )
test_VisibilityWindowListener_multiple_shells ( ) { java . util . concurrent . atomic . AtomicBoolean secondChildCompleted = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; java . util . concurrent . atomic . AtomicInteger childCount = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; browser . addOpenWindowListener ( ( event ) -> { org . eclipse . swt . widgets . Shell childShell = new < org . eclipse . swt . tests . junit . shell > org . eclipse . swt . widgets . Shell ( ) ; childShell . setText ( ( "Child<sp>shell<sp>" + ( childCount . get ( ) ) ) ) ; childShell . setLayout ( new org . eclipse . swt . layout . FillLayout ( ) ) ; org . eclipse . swt . chromium . Browser browserChild = new org . eclipse . swt . chromium . Browser ( childShell , SWT . NONE ) ; event . browser = browserChild ; browserChild . setText ( "Child<sp>window" ) ; browserChild . addVisibilityWindowListener ( new org . eclipse . swt . browser . VisibilityWindowAdapter ( ) { java . util . concurrent . atomic . AtomicInteger invocationCount = new java . util . concurrent . atomic . AtomicInteger ( 1 ) ; java . util . concurrent . atomic . AtomicInteger childID = new java . util . concurrent . atomic . AtomicInteger ( childCount . get ( ) ) ; @ java . lang . Override public void show ( org . eclipse . swt . browser . WindowEvent event ) { if ( ( ( childID . get ( ) ) == 0 ) && ( ( invocationCount . get ( ) ) >= 2 ) ) { if ( ( event . location != null ) || ( event . size != null ) ) { fail ( "Child<sp>browser's<sp>visibility<sp>show<sp>listener<sp>should<sp>only<sp>be<sp>fired<sp>once" ) ; } } invocationCount . incrementAndGet ( ) ; } } ) ; if ( ( childCount . get ( ) ) == 1 ) { browserChild . addProgressListener ( new org . eclipse . swt . browser . ProgressAdapter ( ) { @ java . lang . Override public void completed ( org . eclipse . swt . browser . ProgressEvent event ) { secondChildCompleted . set ( true ) ; } } ) ; } childShell . open ( ) ; childCount . incrementAndGet ( ) ; } ) ; shell . open ( ) ; browser . setText ( ( "<html>" + ( ( ( ( "<script<sp>type='text/javascript'>" + "window.open();" ) + "window.open();" ) + "</script>\n" ) + "<body>This<sp>test<sp>uses<sp>javascript<sp>to<sp>open<sp>a<sp>new<sp>window.</body></html>" ) ) ) ; boolean passed = waitForPassCondition ( secondChildCompleted :: get ) ; java . lang . String errMsg = "\nTest<sp>timed<sp>out." ; "<AssertPlaceHolder>" ; } waitForPassCondition ( java . util . function . Supplier ) { return waitForPassCondition ( passTest , ( 1000 * ( secondsToWaitTillFail ) ) ) ; }
org . junit . Assert . assertTrue ( errMsg , passed )
testGetFileCharset_BIG5 ( ) { java . io . File file = org . apache . commons . io . FileUtils . toFile ( CLASS . getResource ( "chinese-gb18030.srt" ) ) ; "<AssertPlaceHolder>" . isEqualTo ( net . pms . util . CHARSET_GB18030 ) ; } getFileCharsetName ( net . pms . util . File ) { if ( file == null ) { return null ; } com . ibm . icu . text . CharsetMatch match = net . pms . util . FileUtil . getFileCharsetMatch ( file ) ; try { if ( java . nio . charset . Charset . isSupported ( match . getName ( ) ) ) { net . pms . util . FileUtil . LOGGER . debug ( "Detected<sp>charset<sp>\"{}\"<sp>in<sp>file<sp>\"{}\"" , match . getName ( ) , file . getAbsolutePath ( ) ) ; return match . getName ( ) . toUpperCase ( Locale . ROOT ) ; } net . pms . util . FileUtil . LOGGER . debug ( "Detected<sp>charset<sp>\"{}\"<sp>in<sp>file<sp>\"{}\",<sp>but<sp>cannot<sp>use<sp>it<sp>because<sp>it\'s<sp>not<sp>supported<sp>by<sp>the<sp>Java<sp>Virual<sp>Machine" , match . getName ( ) , file . getAbsolutePath ( ) ) ; return null ; } catch ( java . nio . charset . IllegalCharsetNameException e ) { net . pms . util . FileUtil . LOGGER . debug ( "Illegal<sp>charset<sp>\"{}\"<sp>deteceted<sp>in<sp>file<sp>\"{}\"" , match . getName ( ) , file . getAbsolutePath ( ) ) ; } net . pms . util . FileUtil . LOGGER . debug ( "Found<sp>no<sp>matching<sp>charset<sp>for<sp>file<sp>\"{}\"" , file . getAbsolutePath ( ) ) ; return null ; }
org . junit . Assert . assertThat ( net . pms . util . FileUtil . getFileCharsetName ( file ) )
test ( ) { mapper = new io . gravitee . management . services . dynamicproperties . provider . http . mapper . JoltMapper ( read ( "/jolt/specification.json" ) ) ; java . lang . String input = org . apache . commons . io . IOUtils . toString ( read ( "/jolt/custom-response.json" ) , java . nio . charset . Charset . defaultCharset ( ) ) ; java . util . Collection < io . gravitee . management . services . dynamicproperties . model . DynamicProperty > properties = mapper . map ( input ) ; "<AssertPlaceHolder>" ; } map ( java . lang . String ) { java . lang . String jsonProperties = source ; io . gravitee . management . services . dictionary . provider . http . mapper . ArrayList transformed ; if ( ( jsonProperties != null ) && ( ( jsonProperties . charAt ( 0 ) ) == '[' ) ) { transformed = ( ( io . gravitee . management . services . dictionary . provider . http . mapper . ArrayList ) ( chainr . transform ( com . bazaarvoice . jolt . JsonUtils . jsonToList ( source ) ) ) ) ; } else { transformed = ( ( io . gravitee . management . services . dictionary . provider . http . mapper . ArrayList ) ( chainr . transform ( com . bazaarvoice . jolt . JsonUtils . jsonToMap ( source ) ) ) ) ; } jsonProperties = com . bazaarvoice . jolt . JsonUtils . toJsonString ( transformed ) ; io . gravitee . management . services . dictionary . provider . http . mapper . List < java . lang . Object > items = com . bazaarvoice . jolt . JsonUtils . jsonToList ( jsonProperties ) ; java . lang . Object collect = items . stream ( ) . map ( ( item ) -> { Map < java . lang . String , java . lang . String > mapItem = ( ( Map < java . lang . String , java . lang . String > ) ( item ) ) ; java . lang . Object key = mapItem . get ( "key" ) ; if ( key instanceof java . lang . Number ) { return new io . gravitee . management . services . dictionary . model . DynamicProperty ( key . toString ( ) , mapItem . get ( "value" ) ) ; } else { return new io . gravitee . management . services . dictionary . model . DynamicProperty ( ( ( java . lang . String ) ( key ) ) , mapItem . get ( "value" ) ) ; } } ) . collect ( java . util . stream . Collectors . toList ( ) ) ; return ( ( io . gravitee . management . services . dictionary . provider . http . mapper . Collection < io . gravitee . management . services . dictionary . model . DynamicProperty > ) ( collect ) ) ; }
org . junit . Assert . assertFalse ( properties . isEmpty ( ) )
testDoesNotMeetArchitectureRequirements ( ) { org . rioproject . monitor . service . ProvisionRequest request = createProvisionRequest ( ) ; request . getServiceElement ( ) . setServiceLevelAgreements ( createServiceLevelAgreements ( false , true ) ) ; java . util . Collection < org . rioproject . monitor . service . SystemComponent > notSupported = instantiatorResource . meetsQualitativeRequirements ( request ) ; "<AssertPlaceHolder>" ; } meetsQualitativeRequirements ( org . rioproject . monitor . service . ProvisionRequest ) { org . rioproject . opstring . ServiceElement sElem = request . getServiceElement ( ) ; org . rioproject . sla . ServiceLevelAgreements sla = sElem . getServiceLevelAgreements ( ) ; org . rioproject . monitor . service . SystemComponent [ ] serviceRequirements = sla . getSystemRequirements ( ) . getSystemComponents ( ) ; org . rioproject . monitor . service . List < org . rioproject . monitor . service . SystemComponent > unsupportedRequirements = new org . rioproject . monitor . service . ArrayList < org . rioproject . monitor . service . SystemComponent > ( ) ; for ( org . rioproject . system . capability . PlatformCapability platformCapability : platformCapabilities ) { if ( platformCapability . supports ( serviceRequirement ) ) { if ( serviceRequirement . exclude ( ) ) { continue ; } supported = true ; break ; } } if ( ! supported ) { unsupportedRequirements . add ( serviceRequirement ) ; } } return unsupportedRequirements ; }
org . junit . Assert . assertTrue ( ( ( notSupported . size ( ) ) > 0 ) )
testWrite_02 ( ) { filterStream . write ( ( "<sp>*<sp>$Id" + "$" ) . getBytes ( ) ) ; filterStream . flush ( ) ; java . lang . String res = new java . lang . String ( result . toByteArray ( ) ) ; java . lang . String expected = "" ; "<AssertPlaceHolder>" ; } toByteArray ( ) { return this . buf ; }
org . junit . Assert . assertEquals ( expected , res )
testAddSongFileNoEvent ( ) { when ( playlistProperties . getLoad ( ) ) . thenReturn ( realPlaylistProperties . getLoad ( ) ) ; when ( serverStatus . getPlaylistVersion ( ) ) . thenReturn ( ( - 1 ) ) ; final org . bff . javampd . playlist . PlaylistChangeEvent [ ] changeEvent = new org . bff . javampd . playlist . PlaylistChangeEvent [ 1 ] ; playlist . addPlaylistChangeListener ( ( event ) -> changeEvent [ 0 ] = event ) ; playlist . addSong ( "testFile" , false ) ; "<AssertPlaceHolder>" ; } addSong ( org . bff . javampd . song . MPDSong , boolean ) { addSong ( song . getFile ( ) , fireEvent ) ; }
org . junit . Assert . assertNull ( changeEvent [ 0 ] )
testCreateDropTempTableWithConstraintsDerby ( ) { final java . lang . String tmpCreate = "DECLARE<sp>GLOBAL<sp>TEMPORARY<sp>TABLE<sp>%s.%s<sp>%s<sp>not<sp>logged<sp>on<sp>commit<sp>preserve<sp>rows" ; java . sql . Connection connection = methodWatcher . createConnection ( ) ; try { com . splicemachine . derby . test . framework . SQLClosures . execute ( connection , new com . splicemachine . derby . test . framework . SQLClosures . SQLAction < java . sql . Statement > ( ) { @ java . lang . Override public void execute ( java . sql . Statement statement ) throws java . lang . Exception { statement . execute ( java . lang . String . format ( tmpCreate , tableSchema . schemaName , com . splicemachine . derby . impl . sql . execute . actions . TempTableIT . CONSTRAINT_TEMP_TABLE , com . splicemachine . derby . impl . sql . execute . actions . TempTableIT . constraintTableDef ) ) ; com . splicemachine . derby . test . framework . SpliceUnitTest . loadTable ( statement , ( ( tableSchema . schemaName + "." ) + ( com . splicemachine . derby . impl . sql . execute . actions . TempTableIT . CONSTRAINT_TEMP_TABLE ) ) , com . splicemachine . derby . impl . sql . execute . actions . TempTableIT . empNameVals ) ; } } ) ; connection . commit ( ) ; com . splicemachine . derby . test . framework . SQLClosures . query ( connection , java . lang . String . format ( "select<sp>*<sp>from<sp>%s.%s" , com . splicemachine . derby . impl . sql . execute . actions . TempTableIT . tableSchema . schemaName , com . splicemachine . derby . impl . sql . execute . actions . TempTableIT . CONSTRAINT_TEMP_TABLE ) , new com . splicemachine . derby . test . framework . SQLClosures . SQLAction < java . sql . ResultSet > ( ) { @ java . lang . Override public void execute ( java . sql . ResultSet resultSet ) throws java . lang . Exception { "<AssertPlaceHolder>" ; } } ) ; com . splicemachine . derby . test . framework . SQLClosures . execute ( connection , new com . splicemachine . derby . test . framework . SQLClosures . SQLAction < java . sql . Statement > ( ) { @ java . lang . Override public void execute ( java . sql . Statement statement ) throws java . lang . Exception { statement . execute ( java . lang . String . format ( "drop<sp>table<sp>%s" , ( ( tableSchema . schemaName + "." ) + ( com . splicemachine . derby . impl . sql . execute . actions . TempTableIT . CONSTRAINT_TEMP_TABLE ) ) ) ) ; } } ) ; connection . commit ( ) ; com . splicemachine . derby . test . framework . SQLClosures . execute ( connection , new com . splicemachine . derby . test . framework . SQLClosures . SQLAction < java . sql . Statement > ( ) { @ java . lang . Override public void execute ( java . sql . Statement statement ) throws java . lang . Exception { try { statement . executeQuery ( java . lang . String . format ( "select<sp>*<sp>from<sp>%s" , ( ( tableSchema . schemaName + "." ) + ( com . splicemachine . derby . impl . sql . execute . actions . TempTableIT . CONSTRAINT_TEMP_TABLE ) ) ) ) ; fail ( "Expected<sp>exception<sp>querying<sp>temp<sp>table<sp>that<sp>no<sp>longer<sp>should<sp>exist." ) ; } catch ( e ) { } } } ) ; } finally { methodWatcher . closeAll ( ) ; } } resultSetSize ( com . splicemachine . derby . test . framework . ResultSet ) { int i = 0 ; while ( rs . next ( ) ) { i ++ ; } return i ; }
org . junit . Assert . assertEquals ( 5 , com . splicemachine . derby . test . framework . SpliceUnitTest . resultSetSize ( resultSet ) )
testConfigure ( ) { org . pentaho . reporting . engine . classic . core . modules . gui . base . PreviewPane reportPane = mock ( org . pentaho . reporting . engine . classic . core . modules . gui . base . PreviewPane . class ) ; doReturn ( 5.5 ) . when ( reportPane ) . getZoom ( ) ; doReturn ( new double [ ] { 5.0 , 5.5 , 10.4 , 15.0 } ) . when ( reportPane ) . getZoomFactors ( ) ; boolean result = plugin . configure ( reportPane ) ; verify ( reportPane ) . setZoom ( 10.4 ) ; "<AssertPlaceHolder>" ; } setZoom ( double ) { previewPane . setZoom ( zoomFactor ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( true ) ) )
countFuturesWithResultWithTimeoutTest ( ) { java . util . List < org . threadly . concurrent . future . ListenableFuture < java . lang . Boolean > > futures = new java . util . ArrayList ( ( ( TEST_QTY ) * 2 ) ) ; for ( int i = 0 ; i < ( ( TEST_QTY ) * 2 ) ; i ++ ) { futures . add ( org . threadly . concurrent . future . FutureUtils . immediateResultFuture ( ( ( i % 2 ) == 1 ) ) ) ; } "<AssertPlaceHolder>" ; } countFuturesWithResult ( java . lang . Iterable , T , long ) { if ( futures == null ) { return 0 ; } int resultCount = 0 ; long startTime = org . threadly . util . Clock . accurateForwardProgressingMillis ( ) ; long remainingTime ; for ( java . util . concurrent . Future < ? > f : futures ) { if ( ( remainingTime = timeoutInMillis - ( ( org . threadly . util . Clock . lastKnownForwardProgressingMillis ( ) ) - startTime ) ) <= 0 ) { throw new java . util . concurrent . TimeoutException ( ) ; } try { if ( comparisonResult == null ) { if ( ( f . get ( remainingTime , TimeUnit . MILLISECONDS ) ) == null ) { resultCount ++ ; } } else if ( comparisonResult . equals ( f . get ( remainingTime , TimeUnit . MILLISECONDS ) ) ) { resultCount ++ ; } } catch ( java . util . concurrent . CancellationException | java . util . concurrent . ExecutionException e ) { } } return resultCount ; }
org . junit . Assert . assertEquals ( org . threadly . concurrent . future . TEST_QTY , org . threadly . concurrent . future . FutureUtils . countFuturesWithResult ( futures , false , 100 ) )
shouldNotSeeNodeThatWasDeletedInTransaction ( ) { long nodeID = createNode ( ) ; try ( org . neo4j . graphdb . Transaction ignore = graphDatabaseAPI . beginTx ( ) ) { org . neo4j . kernel . api . KernelTransaction ktx = ktx ( ) ; ktx . dataWrite ( ) . nodeDelete ( nodeID ) ; try ( org . neo4j . internal . kernel . api . NodeValueIndexCursor cursor = seek ( ktx ) ) { "<AssertPlaceHolder>" ; } } } next ( ) { return false ; }
org . junit . Assert . assertFalse ( cursor . next ( ) )
testLongToInt ( ) { final java . lang . String drl1 = ( ( ( ( ( "import<sp>" + ( org . drools . modelcompiler . TypeCoercionTest . LongHolder . class . getCanonicalName ( ) ) ) + ";\n" ) + "rule<sp>R<sp>when\n" ) + "<sp>LongHolder(<sp>value<sp>==<sp>80<sp>)\n" ) + "then\n" ) + "end\n" ; org . kie . api . runtime . KieSession ksession = getKieSession ( drl1 ) ; ksession . insert ( new org . drools . modelcompiler . TypeCoercionTest . LongHolder ( ) ) ; "<AssertPlaceHolder>" ; } fireAllRules ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 1 , ksession . fireAllRules ( ) )
testTimer ( ) { com . vladmihalcea . flexypool . metric . codahale . CodahaleMetrics codahaleMetrics = new com . vladmihalcea . flexypool . metric . codahale . CodahaleMetrics ( configurationProperties , reservoirFactory ) ; when ( reservoirFactory . newInstance ( com . vladmihalcea . flexypool . metric . Timer . class , "timer" ) ) . thenReturn ( reservoir ) ; com . vladmihalcea . flexypool . metric . Timer timer = codahaleMetrics . timer ( "timer" ) ; verify ( reservoirFactory , times ( 1 ) ) . newInstance ( com . vladmihalcea . flexypool . metric . Timer . class , "timer" ) ; "<AssertPlaceHolder>" ; } newInstance ( java . lang . Class , java . lang . String ) { return new com . codahale . metrics . ExponentiallyDecayingReservoir ( ) ; }
org . junit . Assert . assertNotNull ( timer )
testInvokerWithSuperclass ( ) { net . neoremind . dynamicproxy . sample . Echo echo = factory . createInvokerProxy ( new net . neoremind . dynamicproxy . invoke . NullInvoker ( ) , new java . lang . Class [ ] { net . neoremind . dynamicproxy . sample . Echo . class , net . neoremind . dynamicproxy . sample . EchoImpl . class } ) ; "<AssertPlaceHolder>" ; } createInvokerProxy ( java . lang . ClassLoader , net . neoremind . dynamicproxy . ObjectInvoker , net . neoremind . dynamicproxy . Class [ ] ) { @ net . neoremind . dynamicproxy . SuppressWarnings ( "unchecked" ) T result = ( ( T ) ( getCapableProxyCreator ( proxyClasses ) . createInvokerProxy ( classLoader , invoker , proxyClasses ) ) ) ; return result ; }
org . junit . Assert . assertTrue ( ( echo instanceof net . neoremind . dynamicproxy . sample . EchoImpl ) )
createTableAs3 ( ) { makeSeparateAIS ( ) ; java . lang . String sql = "CREATE<sp>TABLE<sp>t1<sp>AS<sp>(SELECT<sp>c1,<sp>c2,<sp>c3<sp>FROM<sp>t2)<sp>WITH<sp>NO<sp>DATA" ; createTableAsCGenerateAIS ( ) ; com . foundationdb . sql . parser . StatementNode stmt = parser . parseStatement ( sql ) ; "<AssertPlaceHolder>" ; java . util . List < java . lang . String > columnNames = java . util . Arrays . asList ( "c1" , "c2" , "c3" ) ; com . foundationdb . sql . types . DataTypeDescriptor d = new com . foundationdb . sql . types . DataTypeDescriptor ( com . foundationdb . sql . types . TypeId . INTEGER_ID , false ) ; java . util . List < com . foundationdb . sql . types . DataTypeDescriptor > descriptors = java . util . Arrays . asList ( d , d , d ) ; com . foundationdb . sql . aisddl . TableDDL . createTable ( ddlFunctions , null , com . foundationdb . sql . aisddl . TableDDLTest . DEFAULT_SCHEMA , ( ( com . foundationdb . sql . parser . CreateTableNode ) ( stmt ) ) , null , descriptors , columnNames , null ) ; } createTableAsCGenerateAIS ( ) { com . foundationdb . sql . aisddl . TableDDLTest . dropTable = com . foundationdb . ais . model . TableName . create ( com . foundationdb . sql . aisddl . TableDDLTest . DEFAULT_SCHEMA , com . foundationdb . sql . aisddl . TableDDLTest . DEFAULT_TABLE ) ; builder . table ( com . foundationdb . sql . aisddl . TableDDLTest . DEFAULT_SCHEMA , com . foundationdb . sql . aisddl . TableDDLTest . DEFAULT_TABLE ) ; builder . column ( com . foundationdb . sql . aisddl . TableDDLTest . DEFAULT_SCHEMA , com . foundationdb . sql . aisddl . TableDDLTest . DEFAULT_TABLE , "c1" , 0 , "MCOMPAT" , "int" , false ) ; builder . column ( com . foundationdb . sql . aisddl . TableDDLTest . DEFAULT_SCHEMA , com . foundationdb . sql . aisddl . TableDDLTest . DEFAULT_TABLE , "c2" , 1 , "MCOMPAT" , "int" , false ) ; builder . column ( com . foundationdb . sql . aisddl . TableDDLTest . DEFAULT_SCHEMA , com . foundationdb . sql . aisddl . TableDDLTest . DEFAULT_TABLE , "c3" , 2 , "MCOMPAT" , "int" , false ) ; builder . basicSchemaIsComplete ( ) ; builder . groupingIsComplete ( ) ; }
org . junit . Assert . assertTrue ( ( stmt instanceof com . foundationdb . sql . parser . CreateTableNode ) )
testGetDescription ( ) { "<AssertPlaceHolder>" ; } getDescription ( ) { return this . description ; }
org . junit . Assert . assertEquals ( description , filter . getDescription ( ) )
buildFromNodeEntity ( ) { org . openstreetmap . osmosis . core . domain . v0_6 . Node node = mock ( org . openstreetmap . osmosis . core . domain . v0_6 . Node . class ) ; when ( node . getId ( ) ) . thenReturn ( 1L ) ; java . util . List < org . openstreetmap . osmosis . core . domain . v0_6 . Tag > tags = new java . util . ArrayList < org . openstreetmap . osmosis . core . domain . v0_6 . Tag > ( ) ; tags . add ( new org . openstreetmap . osmosis . core . domain . v0_6 . Tag ( "highway" , "primary" ) ) ; when ( node . getTags ( ) ) . thenReturn ( tags ) ; when ( node . getLatitude ( ) ) . thenReturn ( 1.0 ) ; when ( node . getLongitude ( ) ) . thenReturn ( 2.0 ) ; org . openstreetmap . osmosis . plugin . elasticsearch . model . entity . ESNode expected = ESNode . Builder . create ( ) . id ( 1L ) . location ( 1.0 , 2.0 ) . addTag ( "highway" , "primary" ) . build ( ) ; org . openstreetmap . osmosis . plugin . elasticsearch . model . entity . ESNode actual = ESNode . Builder . buildFromEntity ( node ) ; "<AssertPlaceHolder>" ; } buildFromEntity ( org . openstreetmap . osmosis . core . domain . v0_6 . Node ) { return new org . openstreetmap . osmosis . plugin . elasticsearch . model . entity . ESNode ( node ) ; }
org . junit . Assert . assertEquals ( expected , actual )
shouldFindEhourHome ( ) { net . rrm . ehour . appconfig . EhourHomeUtil . setEhourHome ( "src/test/resources/home" ) ; net . rrm . ehour . appconfig . EhourHomeFinder . fixEhourHome ( ) ; "<AssertPlaceHolder>" ; } getEhourHome ( ) { java . lang . String eHourHome = java . lang . System . getProperty ( net . rrm . ehour . appconfig . EhourHomeUtil . EHOUR_HOME ) ; if ( org . apache . commons . lang . StringUtils . isBlank ( eHourHome ) ) { eHourHome = java . lang . System . getenv ( net . rrm . ehour . appconfig . EhourHomeUtil . EHOUR_HOME ) ; } return eHourHome ; }
org . junit . Assert . assertEquals ( "src/test/resources/home" , net . rrm . ehour . appconfig . EhourHomeUtil . getEhourHome ( ) )
testMatchWithNoSchema ( ) { org . sonar . plugins . tsql . coverage . CoveredLinesReport [ ] lines = sut . match ( "[tes<sp>t].sql" , "src" , com . google . common . collect . ImmutableMap . of ( "dbo.test" , new org . sonar . plugins . tsql . coverage . CoveredLinesReport ( "[dbo].[test]" ) , "other.test" , new org . sonar . plugins . tsql . coverage . CoveredLinesReport ( "[other].[test" ) ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 2 , lines . length )
readData_NoFile ( ) { org . mockito . Mockito . when ( filereader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( false ) ; java . util . List < com . att . aro . core . peripheral . pojo . TemperatureEvent > listTemperatureEvent = traceDataReader . readData ( traceFolder , 0.0 ) ; "<AssertPlaceHolder>" ; } size ( ) { return sessionTable . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , listTemperatureEvent . size ( ) , 0 )
Property ( ) { java . lang . String testENTITY = "testEntity" ; org . odata4j . edm . EdmEntityType . Builder entityType = EntityType ( testENTITY ) ; java . util . List < org . odata4j . edm . EdmComplexType . Builder > cpBuilderList = new java . util . ArrayList < org . odata4j . edm . EdmComplexType . Builder > ( ) ; org . odata4j . edm . EdmComplexType . Builder ctBuilder = EntityTypecomplexProperty1 ( "newComplexType" , entityType ) ; cpBuilderList . add ( ctBuilder ) ; EntityTypesimpleProperty ( 84 , entityType ) ; org . odata4j . edm . EdmDataServices . Builder builder = org . odata4j . edm . EdmDataServices . newBuilder ( ) ; ComplexTypesimpleProperty ( 50 , ctBuilder ) ; org . odata4j . edm . EdmComplexType . Builder targetComplexTypeBuilder = ComplexTypecomplexProperty ( 5 , "newComplexType2" , ctBuilder ) ; cpBuilderList . add ( targetComplexTypeBuilder ) ; ComplexTypesimpleProperty ( 30 , targetComplexTypeBuilder ) ; org . odata4j . edm . EdmComplexType . Builder targetComplexTypeBuilder2 = ComplexTypecomplexProperty ( 2 , "newComplexType3" , targetComplexTypeBuilder ) ; cpBuilderList . add ( targetComplexTypeBuilder2 ) ; ComplexTypesimpleProperty ( 10 , targetComplexTypeBuilder2 ) ; org . odata4j . edm . EdmSchema . Builder schema = org . odata4j . edm . EdmSchema . newBuilder ( ) . addEntityTypes ( entityType ) . setNamespace ( com . fujitsu . dc . test . unit . core . model . impl . es . odata . PropertyLimitCheckerTest . NS ) . addComplexTypes ( cpBuilderList ) ; org . odata4j . edm . EdmDataServices metadata = builder . addSchemas ( schema ) . build ( ) ; com . fujitsu . dc . core . model . impl . es . doc . PropertyDocHandler handler = new com . fujitsu . dc . core . model . impl . es . doc . PropertyDocHandler ( ) ; org . json . simple . JSONObject staticFields = new org . json . simple . JSONObject ( ) ; staticFields . put ( "Type" , "Edm.String" ) ; handler . setStaticFields ( staticFields ) ; java . util . Map < java . lang . String , java . lang . String > entityTypeMap = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; entityTypeMap . put ( "_EntityType.Name_uniqueKey" , "testEntity" ) ; handler . setEntityTypeMap ( entityTypeMap ) ; handler . setEntityTypeId ( "_uniqueKey" ) ; java . util . Map < java . lang . String , java . lang . Object > manyToOneKindMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; manyToOneKindMap . put ( EntityType . EDM_TYPE_NAME , "_uniqueKey" ) ; handler . setManyToOnelinkId ( manyToOneKindMap ) ; com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker checker = new com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker ( metadata , handler ) ; java . util . List < com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError > errors = checker . checkPropertyLimits ( ) ; "<AssertPlaceHolder>" ; } checkPropertyLimits ( ) { java . util . List < com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError > result = new java . util . ArrayList < com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError > ( ) ; if ( null == ( metadata ) ) { return result ; } java . util . Iterator < org . odata4j . edm . EdmEntityType > iter = metadata . getEntityTypes ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { org . odata4j . edm . EdmEntityType target = iter . next ( ) ; checkPropertyLimitsForEntityTypeInternal ( result , target ) ; } java . util . Iterator < org . odata4j . edm . EdmComplexType > complexTypeIter = metadata . getComplexTypes ( ) . iterator ( ) ; while ( complexTypeIter . hasNext ( ) ) { int simplePropCount = 0 ; int complexPropCount = 0 ; org . odata4j . edm . EdmComplexType complexType = complexTypeIter . next ( ) ; for ( org . odata4j . edm . EdmProperty prop : complexType . getProperties ( ) ) { if ( prop . getName ( ) . startsWith ( "_" ) ) { continue ; } if ( prop . getType ( ) . isSimple ( ) ) { simplePropCount ++ ; } else { complexPropCount ++ ; } } if ( ( simpleMaxForOverAllLayers ) < simplePropCount ) { java . lang . String message = java . lang . String . format ( "Total<sp>property[%s]<sp>count<sp>exceeds<sp>the<sp>limit[%d]." , complexType . getName ( ) , simpleMaxForOverAllLayers ) ; com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . log . info ( message ) ; result . add ( new com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError ( complexType . getName ( ) , message ) ) ; } if ( ( complexMaxForOverallLayers ) < complexPropCount ) { java . lang . String message = java . lang . String . format ( "Total<sp>property[%s]<sp>count<sp>exceeds<sp>the<sp>limit[%d]." , complexType . getName ( ) , complexMaxForOverallLayers ) ; com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . log . info ( message ) ; result . add ( new com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError ( complexType . getName ( ) , message ) )
org . junit . Assert . assertEquals ( 1 , errors . size ( ) )
shouldFailWebSocketConnectionWhenServerSendOpcode14Frame ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . kaazing . gateway . transport . test . Expectations ( ) { { oneOf ( handler ) . sessionCreated ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionOpened ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; allowing ( handler ) . exceptionCaught ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) , with ( any ( org . kaazing . gateway . transport . wsn . specification . ws . connector . Exception . class ) ) ) ; allowing ( handler ) . sessionClosed ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; } } ) ; org . apache . mina . core . future . ConnectFuture connectFuture = connector . connect ( "ws://localhost:8080/echo" , null , handler ) ; connectFuture . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; k3po . finish ( ) ; } isConnected ( ) { return channel . isConnected ( ) ; }
org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) )
falsePositiveMetaClass ( ) { org . sonar . plugins . delphi . pmd . DelphiUnitBuilderTest builder = new org . sonar . plugins . delphi . pmd . DelphiUnitBuilderTest ( ) ; builder . appendDecl ( "type" ) ; builder . appendDecl ( "<sp>TMyClass<sp>=<sp>class" ) ; builder . appendDecl ( "<sp>end;" ) ; builder . appendDecl ( "<sp>TMetaClassClass<sp>=<sp>class<sp>of<sp>TMyClass;" ) ; analyse ( builder ) ; "<AssertPlaceHolder>" ; } toString ( java . util . List ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; builder . append ( "[" ) ; for ( org . sonar . api . issue . Issue issue : issues ) { builder . append ( toString ( issue ) ) . append ( ',' ) ; } builder . append ( "]" ) ; return builder . toString ( ) ; }
org . junit . Assert . assertThat ( toString ( issues ) , issues , is ( empty ( ) ) )
testProtocoloGetLinhaGetNull ( ) { br . com . senacrs . alp . aulas . trabalho12 . ProtocoloGet obj = null ; try { obj = new br . com . senacrs . alp . aulas . trabalho12 . ProtocoloGet ( null , br . com . senacrs . alp . aulas . trabalho12 . ProtocoloGetTest . HOST_WWW_EXAMPLE_COM ) ; org . junit . Assert . fail ( java . lang . String . valueOf ( obj ) ) ; } catch ( java . lang . IllegalArgumentException e ) { "<AssertPlaceHolder>" ; } }
org . junit . Assert . assertTrue ( true )
testEquals_after ( ) { final org . apache . rya . api . function . temporal . EqualsTemporalInstant function = new org . apache . rya . api . function . temporal . EqualsTemporalInstant ( ) ; final org . eclipse . rdf4j . model . Value [ ] args = new org . eclipse . rdf4j . model . Value [ 2 ] ; args [ 0 ] = org . apache . rya . api . function . temporal . EqualsTemporalFunctionsTest . VF . createLiteral ( org . apache . rya . api . function . temporal . EqualsTemporalFunctionsTest . TIME_20 . toString ( ) ) ; args [ 1 ] = org . apache . rya . api . function . temporal . EqualsTemporalFunctionsTest . VF . createLiteral ( org . apache . rya . api . function . temporal . EqualsTemporalFunctionsTest . TIME_10 . toString ( ) ) ; final org . eclipse . rdf4j . model . Value rez = function . evaluate ( org . apache . rya . api . function . temporal . EqualsTemporalFunctionsTest . VF , args ) ; "<AssertPlaceHolder>" ; } evaluate ( org . eclipse . rdf4j . model . ValueFactory , org . eclipse . rdf4j . model . Value [ ] ) { if ( ( args . length ) != 2 ) { throw new org . eclipse . rdf4j . query . algebra . evaluation . ValueExprEvaluationException ( ( ( ( getURI ( ) ) + "<sp>requires<sp>exactly<sp>2<sp>arguments,<sp>got<sp>" ) + ( args . length ) ) ) ; } final java . lang . String [ ] strInterval = args [ 1 ] . stringValue ( ) . split ( "/" ) ; if ( ( strInterval . length ) != 2 ) { throw new org . eclipse . rdf4j . query . algebra . evaluation . ValueExprEvaluationException ( ( ( ( ( getURI ( ) ) + "<sp>requires<sp>the<sp>second<sp>argument:<sp>" ) + ( args [ 1 ] ) ) + "<sp>to<sp>be<sp>2<sp>dates<sp>seperated<sp>by<sp>a<sp>\'/\'" ) ) ; } try { final java . time . ZonedDateTime date1 = java . time . ZonedDateTime . parse ( args [ 0 ] . stringValue ( ) ) ; final java . time . ZonedDateTime [ ] interval = new java . time . ZonedDateTime [ ] { java . time . ZonedDateTime . parse ( strInterval [ 0 ] ) , java . time . ZonedDateTime . parse ( strInterval [ 1 ] ) } ; final boolean result = relation ( date1 , interval ) ; return valueFactory . createLiteral ( result ) ; } catch ( final java . time . format . DateTimeParseException e ) { throw new org . eclipse . rdf4j . query . algebra . evaluation . ValueExprEvaluationException ( "Date/Times<sp>provided<sp>must<sp>be<sp>of<sp>the<sp>ISO-8601<sp>format.<sp>Example:<sp>2007-04-05T14:30Z" ) ; } }
org . junit . Assert . assertEquals ( org . apache . rya . api . function . temporal . EqualsTemporalFunctionsTest . VF . createLiteral ( false ) , rez )
testVarintCorrect ( ) { int numtests = 1000 ; java . util . Random r = new java . util . Random ( 0 ) ; for ( int i = 0 ; i < 5 ; i ++ ) { int min = ( ( int ) ( java . lang . Math . pow ( 2 , ( 7 * i ) ) ) ) ; int max = ( ( int ) ( java . lang . Math . min ( Integer . MAX_VALUE , java . lang . Math . pow ( 2 , ( 7 * ( i + 1 ) ) ) ) ) ) ; for ( int j = 0 ; j < numtests ; j ++ ) { int value = ( r . nextInt ( ( max - min ) ) ) + min ; java . nio . ByteBuffer b = java . nio . ByteBuffer . allocate ( ( i + 1 ) ) ; brown . tracingplane . atomlayer . ProtobufVarint . writeRawVarint32 ( b , value ) ; b . rewind ( ) ; "<AssertPlaceHolder>" ; } } } readRawVarint32 ( java . io . InputStream ) { byte tmp = brown . tracingplane . atomlayer . ProtobufVarint . readByte ( in ) ; if ( tmp >= 0 ) { return tmp ; } int result = tmp & 127 ; if ( ( tmp = brown . tracingplane . atomlayer . ProtobufVarint . readByte ( in ) ) >= 0 ) { result |= tmp << 7 ; } else { result |= ( tmp & 127 ) << 7 ; if ( ( tmp = brown . tracingplane . atomlayer . ProtobufVarint . readByte ( in ) ) >= 0 ) { result |= tmp << 14 ; } else { result |= ( tmp & 127 ) << 14 ; if ( ( tmp = brown . tracingplane . atomlayer . ProtobufVarint . readByte ( in ) ) >= 0 ) { result |= tmp << 21 ; } else { result |= ( tmp & 127 ) << 21 ; result |= ( tmp = brown . tracingplane . atomlayer . ProtobufVarint . readByte ( in ) ) << 28 ; if ( tmp < 0 ) { for ( int i = 0 ; i < 5 ; i ++ ) { if ( ( brown . tracingplane . atomlayer . ProtobufVarint . readByte ( in ) ) >= 0 ) { return result ; } } throw new brown . tracingplane . atomlayer . ProtobufVarint . MalformedVarintException ( ) ; } } } } return result ; }
org . junit . Assert . assertEquals ( value , brown . tracingplane . atomlayer . ProtobufVarint . readRawVarint32 ( b ) )
test_ ( ) { cfvbaibai . cardfantasy . test . func . SkillTestContext context = prepare ( 50 , 50 , "" ) ; context . addToField ( 0 , 0 ) ; cfvbaibai . cardfantasy . engine . Field fieldA = context . getPlayer ( 0 ) . getField ( ) ; context . startGame ( ) ; context . proceedOneRound ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cards . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , fieldA . size ( ) )
testMembers ( ) { no . tv2 . serf . client . SerfClientIT . logger . info ( "testMembers" ) ; System . out . println ( "testMembers" ) ; client1 . join ( com . google . common . collect . ImmutableList . < java . lang . String > of ( ( ( ( no . tv2 . serf . client . SerfClientIT . SERF2_IP ) + ":" ) + ( no . tv2 . serf . client . SerfClientIT . SERF2_PORT ) ) ) , false ) ; no . tv2 . serf . client . MembersResponse response = client1 . members ( ) ; "<AssertPlaceHolder>" ; } getMembers ( ) { return members ; }
org . junit . Assert . assertEquals ( 2 , response . getMembers ( ) . size ( ) )
testNullReturnedOnClosedParserOnNextFieldName ( ) { "<AssertPlaceHolder>" ; } nextFieldName ( ) { return ( nextToken ( ) ) == ( com . fasterxml . jackson . core . JsonToken . FIELD_NAME ) ? currentName ( ) : null ; }
org . junit . Assert . assertNull ( parser . nextFieldName ( ) )
combinationReaderTest ( ) { org . apache . uima . collection . CollectionReaderDescription reader = org . apache . uima . fit . factory . CollectionReaderFactory . createReaderDescription ( org . dkpro . similarity . uima . io . PlainTextCombinationReader . class , PlainTextCombinationReader . PARAM_INPUT_DIR , "classpath:/datasets/test/plaintext" , PlainTextCombinationReader . PARAM_LANGUAGE , "en" , PlainTextCombinationReader . PARAM_COMBINATION_STRATEGY , CombinationStrategy . SAME_ROW_ONLY . toString ( ) ) ; org . apache . uima . analysis_engine . AnalysisEngine engine = org . apache . uima . fit . factory . AnalysisEngineFactory . createEngine ( de . tudarmstadt . ukp . dkpro . core . io . xmi . XmiWriter . class , XmiWriter . PARAM_TARGET_LOCATION , "target/test" ) ; int i = 0 ; for ( org . apache . uima . jcas . JCas jcas : new org . apache . uima . fit . pipeline . JCasIterable ( reader ) ) { engine . process ( jcas ) ; i ++ ; } "<AssertPlaceHolder>" ; } process ( org . apache . uima . jcas . JCas ) { final java . util . List < java . lang . String > terms = new java . util . ArrayList < java . lang . String > ( ) ; try { for ( java . util . Map . Entry < org . apache . uima . cas . text . AnnotationFS , java . lang . String > entry : de . tudarmstadt . ukp . dkpro . core . api . featurepath . FeaturePathFactory . select ( jCas . getCas ( ) , featurePath ) ) { java . lang . String term = entry . getValue ( ) ; if ( isRelevant ( term ) ) { terms . add ( term ) ; } } } catch ( de . tudarmstadt . ukp . dkpro . core . api . featurepath . FeaturePathException e ) { throw new org . apache . uima . analysis_engine . AnalysisEngineProcessException ( e ) ; } if ( ( terms . size ( ) ) > ( minTermsPerDocument ) ) { final org . apache . lucene . document . Document doc = new org . apache . lucene . document . Document ( ) ; for ( java . lang . String term : terms ) { doc . add ( new org . apache . lucene . document . Field ( org . dkpro . similarity . algorithms . vsm . store . LuceneVectorReader . FIELD_NAME , term , Field . Store . YES , Field . Index . NOT_ANALYZED , Field . TermVector . YES ) ) ; } doc . add ( new org . apache . lucene . document . Field ( "id" , de . tudarmstadt . ukp . dkpro . core . api . metadata . type . DocumentMetaData . get ( jCas ) . getDocumentTitle ( ) , Field . Store . YES , Field . Index . NOT_ANALYZED , Field . TermVector . YES ) ) ; try { indexWriter . addDocument ( doc ) ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; } } }
org . junit . Assert . assertEquals ( 2 , i )
testToString ( ) { "<AssertPlaceHolder>" ; } toString ( ) { return "MongoEntity<sp>" + ( entityId ) ; }
org . junit . Assert . assertTrue ( ( ! ( "" . equals ( param . toString ( ) ) ) ) )
testSupportsRestart ( ) { "<AssertPlaceHolder>" ; } supportsRestart ( ) { return true ; }
org . junit . Assert . assertTrue ( operation . supportsRestart ( ) )
testSpecificSerializeDeserializeFromSchema ( ) { final org . apache . flink . api . java . tuple . Tuple3 < java . lang . Class < ? extends org . apache . avro . specific . SpecificRecord > , org . apache . avro . specific . SpecificRecord , org . apache . flink . types . Row > testData = org . apache . flink . formats . avro . utils . AvroTestUtils . getSpecificTestData ( ) ; final java . lang . String schemaString = testData . f1 . getSchema ( ) . toString ( ) ; final org . apache . flink . formats . avro . AvroRowSerializationSchema serializationSchema = new org . apache . flink . formats . avro . AvroRowSerializationSchema ( schemaString ) ; final org . apache . flink . formats . avro . AvroRowDeserializationSchema deserializationSchema = new org . apache . flink . formats . avro . AvroRowDeserializationSchema ( schemaString ) ; final byte [ ] bytes = serializationSchema . serialize ( testData . f2 ) ; final org . apache . flink . types . Row actual = deserializationSchema . deserialize ( bytes ) ; "<AssertPlaceHolder>" ; } deserialize ( org . apache . flink . core . memory . DataInputView ) { final int size = source . readInt ( ) ; final java . util . ArrayList < T > list = new java . util . ArrayList ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { list . add ( elementSerializer . deserialize ( source ) ) ; } return list ; }
org . junit . Assert . assertEquals ( testData . f2 , actual )
testBuildWithOrderBy ( ) { org . lnu . is . domain . admin . unit . AdminUnit context = new org . lnu . is . domain . admin . unit . AdminUnit ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "identifier" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "identifier1" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy3 = new org . lnu . is . pagination . OrderBy ( "identifier2" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy4 = new org . lnu . is . pagination . OrderBy ( "identifier3" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy5 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy6 = new org . lnu . is . pagination . OrderBy ( "begDate" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy7 = new org . lnu . is . pagination . OrderBy ( "endDate" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy8 = new org . lnu . is . pagination . OrderBy ( "fullName" , org . lnu . is . pagination . OrderByType . DESC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 , orderBy3 , orderBy4 , orderBy5 , orderBy6 , orderBy7 , orderBy8 ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>AdminUnit<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>ORDER<sp>BY<sp>e.identifier<sp>DESC,<sp>e.identifier1<sp>ASC,<sp>e.identifier2<sp>DESC,<sp>e.identifier3<sp>DESC,<sp>e.name<sp>ASC,<sp>e.begDate<sp>ASC,<sp>e.endDate<sp>ASC,<sp>e.fullName<sp>DESC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . admin . unit . AdminUnit > 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 ( expected , actualQuery )
indexDefnStorafe ( ) { java . util . Map < java . lang . String , java . lang . Object > config = getDefaultConfig ( ) ; config . put ( "disableStoredIndexDefinition" , true ) ; org . apache . sling . testing . mock . osgi . MockOsgi . activate ( service , context . bundleContext ( ) , config ) ; "<AssertPlaceHolder>" ; } isDisableStoredIndexDefinition ( ) { return org . apache . jackrabbit . oak . plugins . index . search . IndexDefinition . disableStoredIndexDefinition ; }
org . junit . Assert . assertTrue ( org . apache . jackrabbit . oak . plugins . index . search . IndexDefinition . isDisableStoredIndexDefinition ( ) )
testConvertProvideAndRegisterDocumentSet ( ) { org . openehealth . ipf . platform . camel . ihe . xds . core . converters . ProvideAndRegisterDocumentSet org = org . openehealth . ipf . commons . ihe . xds . core . SampleData . createProvideAndRegisterDocumentSet ( ) ; org . openehealth . ipf . commons . ihe . xds . core . ebxml . ebxml30 . ProvideAndRegisterDocumentSetRequestType converted = org . openehealth . ipf . platform . camel . ihe . xds . core . converters . EbXML30Converters . convert ( org ) ; org . openehealth . ipf . platform . camel . ihe . xds . core . converters . ProvideAndRegisterDocumentSet copy = org . openehealth . ipf . platform . camel . ihe . xds . core . converters . EbXML30Converters . convert ( converted ) ; "<AssertPlaceHolder>" ; } convert ( org . openehealth . ipf . platform . camel . ihe . xds . core . converters . ProvideAndRegisterDocumentSet ) { org . openehealth . ipf . platform . camel . ihe . xds . core . converters . ProvideAndRegisterDocumentSetTransformer transformer = new org . openehealth . ipf . platform . camel . ihe . xds . core . converters . ProvideAndRegisterDocumentSetTransformer ( org . openehealth . ipf . platform . camel . ihe . xds . core . converters . EbXML30Converters . factory ) ; return ( ( org . openehealth . ipf . platform . camel . ihe . xds . core . converters . ProvideAndRegisterDocumentSetRequestType ) ( transformer . toEbXML ( in ) . getInternal ( ) ) ) ; }
org . junit . Assert . assertEquals ( org , copy )
testSerialization2 ( ) { eu . europa . esig . dss . MockSignatureParameters testObj = new eu . europa . esig . dss . MockSignatureParameters ( ) ; testObj . setSignatureLevel ( SignatureLevel . XAdES_BASELINE_B ) ; testObj . setSignaturePackaging ( SignaturePackaging . DETACHED ) ; testObj . setSignWithExpiredCertificate ( false ) ; testObj . setDigestAlgorithm ( DigestAlgorithm . SHA1 ) ; testObj . bLevel ( ) . setSigningDate ( new java . util . Date ( ) ) ; java . util . List < java . lang . String > commitmentTypeIndication = new java . util . ArrayList < java . lang . String > ( ) ; commitmentTypeIndication . add ( "Test<sp>commitment" ) ; testObj . bLevel ( ) . setCommitmentTypeIndications ( commitmentTypeIndication ) ; eu . europa . esig . dss . Policy signaturePolicy = new eu . europa . esig . dss . Policy ( ) ; signaturePolicy . setDescription ( "description" ) ; signaturePolicy . setDigestAlgorithm ( DigestAlgorithm . MD5 ) ; signaturePolicy . setDigestValue ( new byte [ ] { 1 , 2 } ) ; signaturePolicy . setId ( "id" ) ; signaturePolicy . setSpuri ( "uri" ) ; testObj . bLevel ( ) . setSignaturePolicy ( signaturePolicy ) ; eu . europa . esig . dss . SignerLocation signerLocation = new eu . europa . esig . dss . SignerLocation ( ) ; signerLocation . setCountry ( "country" ) ; signerLocation . setLocality ( "locality" ) ; java . util . List < java . lang . String > postalAddress = new java . util . ArrayList < java . lang . String > ( ) ; postalAddress . add ( "Postal<sp>address" ) ; signerLocation . setPostalAddress ( postalAddress ) ; signerLocation . setPostalCode ( "postal<sp>code" ) ; signerLocation . setStateOrProvince ( "state" ) ; testObj . bLevel ( ) . setSignerLocation ( signerLocation ) ; byte [ ] serialized = eu . europa . esig . dss . SerializationTest . serialize ( testObj ) ; eu . europa . esig . dss . MockSignatureParameters unserialized = eu . europa . esig . dss . SerializationTest . unserialize ( serialized , eu . europa . esig . dss . MockSignatureParameters . class ) ; "<AssertPlaceHolder>" ; } unserialize ( byte [ ] , java . lang . Class ) { java . io . ByteArrayInputStream bais = new java . io . ByteArrayInputStream ( b ) ; java . io . ObjectInputStream ois = new java . io . ObjectInputStream ( bais ) ; java . lang . Object o = ois . readObject ( ) ; return clazz . cast ( o ) ; }
org . junit . Assert . assertEquals ( testObj , unserialized )
parseFunctionAnyParameters1 ( ) { java . util . List < java . lang . Object > parameters = org . diirt . datasource . util . FunctionParser . parseFunctionAnyParameter ( "foo(1.0)" ) ; "<AssertPlaceHolder>" ; } parseFunctionAnyParameter ( java . lang . String ) { return org . diirt . datasource . util . FunctionParser . parseFunctionAnyParameter ( "(\\w+)" , string ) ; }
org . junit . Assert . assertThat ( parameters , org . hamcrest . CoreMatchers . equalTo ( java . util . Arrays . asList ( ( ( java . lang . Object ) ( "foo" ) ) , 1.0 ) ) )
test_custom_host ( ) { serviceApi = new threescale . v3 . api . impl . ServiceApiDriver ( "1234abcd" , "example.com" ) ; "<AssertPlaceHolder>" ; } getHost ( ) { return host ; }
org . junit . Assert . assertEquals ( "example.com" , serviceApi . getHost ( ) )
testCalculatePadding ( ) { "<AssertPlaceHolder>" ; } calculatePadding ( int ) { return new byte [ 0 ] ; }
org . junit . Assert . assertArrayEquals ( record . calculatePadding ( 10 ) , new byte [ 0 ] )
testGetDateString ( ) { java . lang . String expected = "2059-11-31" ; java . lang . String results = org . sagebionetworks . logging . s3 . LogKeyUtils . getDateString ( 2059 , 11 , 31 ) ; "<AssertPlaceHolder>" ; } getDateString ( int , int , int ) { return java . lang . String . format ( org . sagebionetworks . logging . s3 . LogKeyUtils . DATE_TEMPLATE , year , month , day ) ; }
org . junit . Assert . assertEquals ( expected , results )
replace_3arg_NullValue2 ( ) { try { "<AssertPlaceHolder>" ; org . junit . Assert . fail ( "should<sp>have<sp>thrown<sp>an<sp>exception<sp>-<sp>null<sp>value<sp>not<sp>allowed" ) ; } catch ( java . lang . NullPointerException e ) { } } replace ( K , V , V ) { return new Semantic . UpdateExisting < K , V , java . lang . Boolean > ( ) { @ java . lang . Override public void update ( Progress < org . cache2k . core . operation . K , org . cache2k . core . operation . V , java . lang . Boolean > c , ExaminationEntry < org . cache2k . core . operation . K , org . cache2k . core . operation . V > e ) { if ( ( c . isPresentOrMiss ( ) ) && ( ( value == ( e . getValueOrException ( ) ) ) || ( ( value != null ) && ( value . equals ( e . getValueOrException ( ) ) ) ) ) ) { c . result ( true ) ; c . put ( newValue ) ; return ; } c . result ( false ) ; } } ; }
org . junit . Assert . assertFalse ( cache . replace ( 1L , "1" , null ) )
testHttpSpnegoChallenge ( ) { org . apache . hadoop . security . UserGroupInformation . loginUserFromKeytab ( clientPrincipal , keytabFile . getCanonicalPath ( ) ) ; java . lang . String challenge = org . apache . hadoop . yarn . client . util . YarnClientUtils . generateToken ( "localhost" ) ; "<AssertPlaceHolder>" ; } generateToken ( java . lang . String ) { org . apache . hadoop . security . UserGroupInformation currentUser = org . apache . hadoop . security . UserGroupInformation . getCurrentUser ( ) ; org . apache . hadoop . yarn . client . util . YarnClientUtils . LOG . debug ( "The<sp>user<sp>credential<sp>is<sp>{}" , currentUser ) ; java . lang . String challenge = currentUser . doAs ( new java . security . PrivilegedExceptionAction < java . lang . String > ( ) { @ org . apache . hadoop . yarn . client . util . Override public java . lang . String run ( ) throws org . apache . hadoop . yarn . client . util . Exception { try { org . ietf . jgss . Oid mechOid = org . apache . hadoop . security . authentication . util . KerberosUtil . getOidInstance ( "GSS_KRB5_MECH_OID" ) ; org . ietf . jgss . GSSManager manager = org . ietf . jgss . GSSManager . getInstance ( ) ; org . ietf . jgss . GSSName serverName = manager . createName ( ( "HTTP@" + server ) , GSSName . NT_HOSTBASED_SERVICE ) ; org . ietf . jgss . GSSContext gssContext = manager . createContext ( serverName . canonicalize ( mechOid ) , mechOid , null , GSSContext . DEFAULT_LIFETIME ) ; gssContext . requestMutualAuth ( true ) ; gssContext . requestCredDeleg ( true ) ; byte [ ] inToken = new byte [ 0 ] ; byte [ ] outToken = gssContext . initSecContext ( inToken , 0 , inToken . length ) ; gssContext . dispose ( ) ; org . apache . hadoop . yarn . client . util . YarnClientUtils . LOG . debug ( "Got<sp>valid<sp>challenge<sp>for<sp>host<sp>{}" , serverName ) ; return new java . lang . String ( org . apache . hadoop . yarn . client . util . YarnClientUtils . BASE_64_CODEC . encode ( outToken ) , java . nio . charset . StandardCharsets . US_ASCII ) ; } catch ( org . ietf . jgss . GSSException | java . lang . IllegalAccessException | java . lang . NoSuchFieldException | java . lang . ClassNotFoundException e ) { org . apache . hadoop . yarn . client . util . YarnClientUtils . LOG . error ( "Error:<sp>{}" , e ) ; throw new org . apache . hadoop . security . authentication . client . AuthenticationException ( e ) ; } } } ) ; return challenge ; }
org . junit . Assert . assertNotNull ( challenge )
testLastIndexAppended ( ) { try ( net . openhft . chronicle . queue . impl . single . ChronicleQueue chronicle = builder ( getTmpDir ( ) , this . wireType ) . build ( ) ) { net . openhft . chronicle . queue . impl . single . ExcerptAppender appender = chronicle . acquireAppender ( ) ; appender . writeDocument ( ( w ) -> w . writeEventName ( "hello" ) . text ( "world0" ) ) ; final long nextIndexToWrite = ( appender . lastIndexAppended ( ) ) + 1 ; appender . writeDocument ( ( w ) -> w . getValueOut ( ) . bytes ( new byte [ 0 ] ) ) ; "<AssertPlaceHolder>" ; } } bytes ( net . openhft . chronicle . queue . impl . single . ExcerptTailer ) { try ( net . openhft . chronicle . queue . impl . single . DocumentContext dc = tailer . readingDocument ( ) ) { if ( ! ( dc . isPresent ( ) ) ) return null ; net . openhft . chronicle . queue . impl . single . Bytes < ? > bytes = dc . wire ( ) . bytes ( ) ; long index = dc . index ( ) ; return new net . openhft . chronicle . queue . impl . single . SingleChronicleQueueTest . BytesWithIndex ( bytes , index ) ; } }
org . junit . Assert . assertEquals ( nextIndexToWrite , appender . lastIndexAppended ( ) )
testWidgetTypesExport ( ) { org . nuxeo . ecm . platform . forms . layout . api . WidgetTypeDefinition wTypeDef = service . getWidgetTypeDefinition ( WebLayoutManager . JSF_CATEGORY , "test" ) ; "<AssertPlaceHolder>" ; java . io . File file = org . nuxeo . runtime . api . Framework . createTempFile ( "widgettypes-export" , ".json" ) ; java . io . FileOutputStream out = new java . io . FileOutputStream ( file ) ; java . util . List < org . nuxeo . ecm . platform . forms . layout . api . WidgetTypeDefinition > wTypeDefs = new java . util . ArrayList ( ) ; wTypeDefs . add ( wTypeDef ) ; org . nuxeo . ecm . platform . forms . layout . io . JSONLayoutExporter . export ( wTypeDefs , out ) ; try ( java . io . InputStream written = new java . io . FileInputStream ( file ) ; java . io . InputStream expected = new java . io . FileInputStream ( org . nuxeo . common . utils . FileUtils . getResourcePathFromContext ( "widgettypes-export.json" ) ) ) { checkEquals ( expected , written ) ; } } getWidgetTypeDefinition ( java . lang . String , java . lang . String ) { org . nuxeo . ecm . platform . forms . layout . core . registries . WidgetTypeDefinitionRegistry reg = widgetTypeDefsByCat . get ( category ) ; if ( reg != null ) { return reg . getDefinition ( typeName ) ; } return null ; }
org . junit . Assert . assertNotNull ( wTypeDef )
testEmpty ( ) { java . lang . String queriesXML = "<parameters></parameters>" ; tl . lin . data . map . HMapIV < java . lang . String > returned = ivory . bloomir . util . QueryUtility . loadQueries ( com . google . common . io . ByteSource . wrap ( queriesXML . getBytes ( ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return ivory . lsh . data . SixtyFourBitSignature . NUM_BITS ; }
org . junit . Assert . assertEquals ( returned . size ( ) , 0 )
testFolderUnit ( ) { org . drools . modelcompiler . drlx . CompiledUnit unit = org . drools . modelcompiler . drlx . DrlxCompiler . compileFolders ( "src/test/resources/model" , "src/test/resources/unit2" ) ; org . kie . api . runtime . rule . RuleUnitExecutor executor = unit . createExecutor ( ) ; java . lang . reflect . Constructor < ? > personConstructor = unit . getConstructorFor ( "org.model.Person" , java . lang . String . class , int . class ) ; java . lang . reflect . Constructor < ? > childConstructor = unit . getConstructorFor ( "org.model.Child" , java . lang . String . class , int . class , int . class ) ; org . kie . api . runtime . rule . DataSource < ? > persons = executor . newDataSource ( "persons" , personConstructor . newInstance ( "Mario" , 43 ) , personConstructor . newInstance ( "Marilena" , 44 ) , childConstructor . newInstance ( "Sofia" , 5 , 10 ) ) ; org . kie . api . runtime . rule . RuleUnit ruleUnit = unit . getOrCreateRuleUnit ( ) ; "<AssertPlaceHolder>" ; } run ( org . junit . runner . notification . RunNotifier ) { for ( org . drools . workbench . models . testscenarios . shared . Scenario scenario : scenarios ) { runScenario ( notifier , scenario ) ; } }
org . junit . Assert . assertEquals ( 1 , executor . run ( ruleUnit ) )
testInjectionTargetMsgRef31 ( ) { java . util . List < java . lang . String > errors = testXMLMergeHelper ( 31 , "InjectionTargetMsgRef" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . toString ( "" ) ; }
org . junit . Assert . assertTrue ( errors . toString ( ) , errors . isEmpty ( ) )
testPerMinute_90s_elapse ( ) { org . joda . time . DateTime previousTime = new org . joda . time . DateTime ( 2013 , 1 , 1 , 14 , 1 , 31 ) ; org . jmxtrans . agent . QueryResult previous = new org . jmxtrans . agent . QueryResult ( "metric1" , 10 , previousTime . getMillis ( ) ) ; org . joda . time . DateTime currentTime = previousTime . plusSeconds ( 90 ) . plusMillis ( 45 ) ; org . jmxtrans . agent . QueryResult current = new org . jmxtrans . agent . QueryResult ( "metric1" , 40 , currentTime . getMillis ( ) ) ; org . jmxtrans . agent . QueryResult actualResult = writer . perMinute ( current , previous ) ; int actualPerMinuteValue = ( ( java . lang . Integer ) ( actualResult . getValue ( ) ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertThat ( actualPerMinuteValue , is ( 20 ) )
testGeneralPunctuationCategory ( ) { java . lang . String [ ] s = new java . lang . String [ ] { "," , "!" , "\"" , "#" , "%" , "&" , "'" , "(" , ")" , "-" , "." , "/" } ; java . lang . String regexp = "\\p{P}" ; for ( int i = 0 ; i < ( s . length ) ; i ++ ) { java . util . regex . Pattern pattern = java . util . regex . Pattern . compile ( regexp ) ; java . util . regex . Matcher matcher = pattern . matcher ( s [ i ] ) ; "<AssertPlaceHolder>" ; } } find ( ) { int length = string . length ( ) ; if ( ! ( hasTransparentBounds ( ) ) ) { length = rightBound ; } if ( ( ( matchResult . startIndex ) >= 0 ) && ( ( matchResult . mode ( ) ) == ( org . teavm . classlib . java . util . regex . TMatcher . MODE_FIND ) ) ) { matchResult . startIndex = matchResult . end ( ) ; if ( ( matchResult . end ( ) ) == ( matchResult . start ( ) ) ) { ( matchResult . startIndex ) ++ ; } return ( ( matchResult . startIndex ) <= length ) && ( find ( matchResult . startIndex ) ) ; } else { return find ( leftBound ) ; } }
org . junit . Assert . assertTrue ( matcher . find ( ) )
testGetChildren ( ) { org . orbisgis . coremap . renderer . se . common . Halo h = new org . orbisgis . coremap . renderer . se . common . Halo ( ) ; "<AssertPlaceHolder>" ; } getChildren ( ) { java . util . List < org . orbisgis . coremap . renderer . se . SymbolizerNode > ls = new java . util . ArrayList < org . orbisgis . coremap . renderer . se . SymbolizerNode > ( ) ; if ( ( graphic ) != null ) { ls . add ( graphic ) ; } if ( ( gapX ) != null ) { ls . add ( gapX ) ; } if ( ( gapY ) != null ) { ls . add ( gapY ) ; } return ls ; }
org . junit . Assert . assertTrue ( ( ( h . getChildren ( ) . size ( ) ) == 2 ) )
testAppendObjectWithNoTitleLeavesBufferUnchanged ( ) { t1 . append ( objectWithNoTitle ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( getActionMemento ( ) . getNameParmsId ( ) ) + "#" ) + ( getNumber ( ) ) ; }
org . junit . Assert . assertEquals ( name , t1 . toString ( ) )
testAuthenticationExceptionPropagatedFromMetadata ( ) { metadata . failedUpdate ( time . milliseconds ( ) , new org . apache . kafka . common . errors . AuthenticationException ( "Authentication<sp>failed" ) ) ; try { consumerClient . poll ( time . timer ( Duration . ZERO ) ) ; org . junit . Assert . fail ( "Expected<sp>authentication<sp>error<sp>thrown" ) ; } catch ( org . apache . kafka . common . errors . AuthenticationException e ) { "<AssertPlaceHolder>" ; } } getAndClearAuthenticationException ( ) { if ( ( authenticationException ) != null ) { org . apache . kafka . common . errors . AuthenticationException exception = authenticationException ; authenticationException = null ; return exception ; } else return null ; }
org . junit . Assert . assertNull ( metadata . getAndClearAuthenticationException ( ) )
shouldCheckIfBothExpressionsEvaluateToTrue ( ) { com . github . zafarkhaja . semver . expr . Expression left = new com . github . zafarkhaja . semver . expr . Expression ( ) { @ com . github . zafarkhaja . semver . expr . Override public boolean interpret ( com . github . zafarkhaja . semver . Version version ) { return true ; } } ; com . github . zafarkhaja . semver . expr . Expression right = new com . github . zafarkhaja . semver . expr . Expression ( ) { @ com . github . zafarkhaja . semver . expr . Override public boolean interpret ( com . github . zafarkhaja . semver . Version version ) { return true ; } } ; com . github . zafarkhaja . semver . expr . And and = new com . github . zafarkhaja . semver . expr . And ( left , right ) ; "<AssertPlaceHolder>" ; } interpret ( com . github . zafarkhaja . semver . Version ) { return ( left . interpret ( version ) ) || ( right . interpret ( version ) ) ; }
org . junit . Assert . assertTrue ( and . interpret ( null ) )
when_enableSplitBrainProtection_thenReturnsEnabled ( ) { com . hazelcast . jet . config . JobConfig config = new com . hazelcast . jet . config . JobConfig ( ) ; config . setSplitBrainProtection ( true ) ; "<AssertPlaceHolder>" ; } isSplitBrainProtectionEnabled ( ) { return splitBrainProtectionEnabled ; }
org . junit . Assert . assertTrue ( config . isSplitBrainProtectionEnabled ( ) )
testResetToCommittedOffset ( ) { org . apache . kafka . common . utils . Time time = new org . apache . kafka . common . utils . MockTime ( ) ; org . apache . kafka . clients . consumer . internals . SubscriptionState subscription = new org . apache . kafka . clients . consumer . internals . SubscriptionState ( new org . apache . kafka . common . utils . LogContext ( ) , OffsetResetStrategy . NONE ) ; org . apache . kafka . clients . consumer . internals . ConsumerMetadata metadata = createMetadata ( subscription ) ; org . apache . kafka . clients . MockClient client = new org . apache . kafka . clients . MockClient ( time , metadata ) ; initMetadata ( client , java . util . Collections . singletonMap ( topic , 1 ) ) ; org . apache . kafka . common . Node node = metadata . fetch ( ) . nodes ( ) . get ( 0 ) ; org . apache . kafka . clients . consumer . internals . PartitionAssignor assignor = new org . apache . kafka . clients . consumer . RoundRobinAssignor ( ) ; org . apache . kafka . clients . consumer . KafkaConsumer < java . lang . String , java . lang . String > consumer = newConsumer ( time , client , subscription , metadata , assignor , true , groupId ) ; consumer . assign ( singletonList ( tp0 ) ) ; client . prepareResponseFrom ( new org . apache . kafka . common . requests . FindCoordinatorResponse ( org . apache . kafka . common . protocol . Errors . NONE , node ) , node ) ; org . apache . kafka . common . Node coordinator = new org . apache . kafka . common . Node ( ( ( Integer . MAX_VALUE ) - ( node . id ( ) ) ) , node . host ( ) , node . port ( ) ) ; client . prepareResponseFrom ( offsetResponse ( java . util . Collections . singletonMap ( tp0 , 539L ) , Errors . NONE ) , coordinator ) ; consumer . poll ( Duration . ZERO ) ; "<AssertPlaceHolder>" ; } position ( org . apache . kafka . common . TopicPartition ) { ensureNotClosed ( ) ; if ( ! ( this . subscriptions . isAssigned ( partition ) ) ) throw new java . lang . IllegalArgumentException ( "You<sp>can<sp>only<sp>check<sp>the<sp>position<sp>for<sp>partitions<sp>assigned<sp>to<sp>this<sp>consumer." ) ; org . apache . kafka . clients . consumer . internals . SubscriptionState . FetchPosition position = this . subscriptions . position ( partition ) ; if ( position == null ) { updateFetchPosition ( partition ) ; position = this . subscriptions . position ( partition ) ; } return position . offset ; }
org . junit . Assert . assertEquals ( 539L , consumer . position ( tp0 ) )
testParseString ( ) { java . lang . Object dbValue = ColumnTypeInfo . STRING . parseValueForDatabaseWrite ( "foo" ) ; "<AssertPlaceHolder>" ; } parseValueForDatabaseWrite ( java . lang . String ) { if ( value == null ) { return null ; } return parser . parseValueForDatabaseWrite ( value ) ; }
org . junit . Assert . assertEquals ( "foo" , dbValue )
testGetHeader ( ) { org . pcap4j . packet . IcmpV4SourceQuenchPacket . IcmpV4SourceQuenchHeader h = packet . getHeader ( ) ; "<AssertPlaceHolder>" ; } getUnused ( ) { return unused ; }
org . junit . Assert . assertEquals ( unused , h . getUnused ( ) )
getModel_Initialized ( ) { ctrl . model = mock ( org . oscm . ui . dialog . classic . deletecustomerpricemodel . DeleteCustomerPriceModelModel . class ) ; org . oscm . ui . dialog . classic . deletecustomerpricemodel . DeleteCustomerPriceModelModel m = ctrl . getModel ( ) ; "<AssertPlaceHolder>" ; verifyZeroInteractions ( ctrl . ui ) ; } getModel ( ) { if ( ( model ) == null ) { model = new org . oscm . ui . model . Marketplace ( ) ; model . setRevenueSharesReadOnly ( ( ! ( isLoggedInAndPlatformOperator ( ) ) ) ) ; } return model ; }
org . junit . Assert . assertSame ( ctrl . model , m )
testSetFetchSizeOnMySQL ( ) { org . hibernate . search . spi . SearchIntegrator searchIntegrator = getExtendedSearchIntegrator ( ) ; org . hibernate . search . test . errorhandling . MockErrorHandler mockErrorHandler = org . hibernate . search . test . batchindexing . MassIndexerErrorReportingTest . getErrorHandler ( searchIntegrator ) ; org . hibernate . search . FullTextSession fullTextSession = org . hibernate . search . test . batchindexing . MassIndexerErrorReportingTest . prepareSomeData ( this ) ; fullTextSession . createIndexer ( org . hibernate . search . test . batchindexing . Book . class ) . idFetchSize ( Integer . MIN_VALUE ) . startAndWait ( ) ; getSession ( ) . close ( ) ; java . lang . String errorMessage = mockErrorHandler . getErrorMessage ( ) ; "<AssertPlaceHolder>" ; } getErrorMessage ( ) { return errorMessage ; }
org . junit . Assert . assertEquals ( null , errorMessage )
testContainsArrayContainer_IncludeSelf ( ) { org . roaringbitmap . Container rc = new org . roaringbitmap . RunContainer ( ) . add ( 0 , 10 ) ; org . roaringbitmap . Container subset = new org . roaringbitmap . ArrayContainer ( ) . add ( 0 , 10 ) ; "<AssertPlaceHolder>" ; } contains ( int ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>in<sp>ImmutableConciseSet" ) ; }
org . junit . Assert . assertTrue ( rc . contains ( subset ) )
testIsOnFocusModeWhenItReturnsFalse ( ) { final org . kie . workbench . common . dmn . client . editors . types . common . DataType dataType = mock ( org . kie . workbench . common . dmn . client . editors . types . common . DataType . class ) ; final elemental2 . dom . Element dataTypeRow = mock ( elemental2 . dom . Element . class ) ; dataTypeRow . classList = mock ( elemental2 . dom . DOMTokenList . class ) ; doReturn ( dataType ) . when ( view ) . getDataType ( ) ; doReturn ( dataTypeRow ) . when ( view ) . getRowElement ( dataType ) ; when ( dataTypeRow . classList . contains ( org . kie . workbench . common . dmn . client . editors . types . listview . FOCUSED_CSS_CLASS ) ) . thenReturn ( false ) ; "<AssertPlaceHolder>" ; } isOnFocusMode ( ) { return isFocusedDataType ( getRowElement ( getDataType ( ) ) ) ; }
org . junit . Assert . assertFalse ( view . isOnFocusMode ( ) )
testVoerRegelUitRegelGaatAf ( ) { final nl . bzk . brp . model . bericht . kern . PersoonBericht nieuweSituatie = new nl . bzk . brp . model . bericht . kern . PersoonBericht ( ) ; final nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl huidigeSituatie = maakPersoon ( SoortIndicatie . INDICATIE_SIGNALERING_MET_BETREKKING_TOT_VERSTREKKEN_REISDOCUMENT ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteits = new nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . reisdocument . BRBY0040 ( ) . voerRegelUit ( new nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView ( huidigeSituatie ) , nieuweSituatie , null , null ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Integer ) { final nl . bzk . brp . model . hisvolledig . kern . PersoonHisVolledig item = blobifierService . leesBlob ( id ) ; if ( item == null ) { throw new nl . bzk . brp . beheer . webapp . controllers . ErrorHandler . NotFoundException ( ) ; } return item ; }
org . junit . Assert . assertEquals ( nieuweSituatie , berichtEntiteits . get ( 0 ) )
injectInto ( ) { org . eclipse . collections . api . list . MutableList < java . lang . Integer > objects = org . eclipse . collections . impl . list . fixed . SingletonListTest . newWith ( 1 ) ; java . lang . Integer result = objects . injectInto ( 1 , AddFunction . INTEGER ) ; "<AssertPlaceHolder>" ; } valueOf ( K ) { return this . multimap . get ( subject ) ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 2 ) , result )