input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testNoParameterMetaData ( ) { java . lang . String query = "SELECT<sp>a_string,<sp>b_string<sp>FROM<sp>atable<sp>WHERE<sp>organization_id='000000000000000'" ; java . sql . Connection conn = java . sql . DriverManager . getConnection ( getUrl ( ) , org . apache . phoenix . util . PropertiesUtil . deepCopy ( TestUtil . TEST_PROPERTIES ) ) ; java . sql . PreparedStatement statement = conn . prepareStatement ( query ) ; java . sql . ParameterMetaData pmd = statement . getParameterMetaData ( ) ; "<AssertPlaceHolder>" ; } getParameterCount ( ) { return params . length ; }
|
org . junit . Assert . assertEquals ( 0 , pmd . getParameterCount ( ) )
|
downloadOnePOMFromSecondRepositoryAfterDummyRepoFails ( ) { final org . commonjava . indy . model . core . RemoteRepository repo = new org . commonjava . indy . model . core . RemoteRepository ( MAVEN_PKG_KEY , "dummy" , "http://www.nowhere.com/" ) ; final java . lang . String content = "This<sp>is<sp>a<sp>test" ; final java . lang . String path = "/org/apache/maven/maven-model/3.0.3/maven-model-3.0.3.pom" ; final org . commonjava . indy . model . core . RemoteRepository repo2 = new org . commonjava . indy . model . core . RemoteRepository ( MAVEN_PKG_KEY , "central" , "http://repo.maven.apache.org/maven2" ) ; fixture . getTransport ( ) . registerDownload ( new org . commonjava . maven . galley . model . ConcreteResource ( new org . commonjava . indy . model . galley . RepositoryLocation ( repo2 ) , path ) , new org . commonjava . maven . galley . testing . core . transport . job . TestDownload ( content . getBytes ( ) ) ) ; data . storeArtifactStore ( repo , summary , false , true , new org . commonjava . maven . galley . event . EventMetadata ( ) ) ; data . storeArtifactStore ( repo2 , summary , false , true , new org . commonjava . maven . galley . event . EventMetadata ( ) ) ; final java . util . List < org . commonjava . indy . model . core . ArtifactStore > repos = new java . util . ArrayList < org . commonjava . indy . model . core . ArtifactStore > ( ) ; repos . add ( repo ) ; repos . add ( repo2 ) ; final org . commonjava . maven . galley . model . Transfer stream = downloader . retrieveFirst ( repos , path , new org . commonjava . maven . galley . event . EventMetadata ( ) ) ; final java . lang . String downloaded = org . apache . commons . io . IOUtils . toString ( stream . openInputStream ( ) ) ; "<AssertPlaceHolder>" ; } openInputStream ( ) { return delegate . openInputStream ( ) ; }
|
org . junit . Assert . assertThat ( downloaded , org . hamcrest . CoreMatchers . equalTo ( content ) )
|
containsAmbiguousBases_should_match_readkmer ( ) { java . lang . String seq = "NANAANAAANAAAANAAAAANAAAAAANAAAAAAANAAAAAAAANNAAAAAAAANNNAAAAAAAANNN" ; au . edu . wehi . idsv . debruijn . VariantEvidence e = new au . edu . wehi . idsv . debruijn . VariantEvidence ( 4 , SCE ( au . edu . wehi . idsv . debruijn . FWD , withSequence ( seq , Read ( 0 , 5 , "8M60S" ) ) ) , getContext ( ) . getLinear ( ) ) ; int offset = 0 ; for ( au . edu . wehi . idsv . debruijn . ReadKmer rk : new au . edu . wehi . idsv . debruijn . ReadKmerIterable ( 4 , B ( seq ) , B ( seq ) ) ) { "<AssertPlaceHolder>" ; } } containsAmbiguousBases ( int ) { return ambiguous . get ( readKmerOffset ) ; }
|
org . junit . Assert . assertEquals ( rk . containsAmbiguousBases , e . containsAmbiguousBases ( ( offset ++ ) ) )
|
testGetIndentionWidth_asTree ( ) { org . eclipse . nebula . widgets . grid . GridTestUtil . createGridItems ( grid , 3 , 3 ) ; int indentationWidth = grid . getAdapter ( org . eclipse . nebula . widgets . grid . internal . IGridAdapter . class ) . getIndentationWidth ( ) ; "<AssertPlaceHolder>" ; } getAdapter ( java . lang . Class ) { if ( adapter == ( org . eclipse . rap . rwt . internal . lifecycle . WidgetLCA . class ) ) { return ( ( T ) ( org . eclipse . nebula . widgets . grid . internal . gridcolumnkit . GridColumnLCA . INSTANCE ) ) ; } return super . getAdapter ( adapter ) ; }
|
org . junit . Assert . assertEquals ( 16 , indentationWidth )
|
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . portal . tools . service . builder . test . model . BigDecimalEntry missingBigDecimalEntry = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
|
org . junit . Assert . assertNull ( missingBigDecimalEntry )
|
testWriteNotificationArea ( ) { java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; java . lang . StringBuilder str = new java . lang . StringBuilder ( ) ; com . ibm . ws . jmx . connector . datatypes . NotificationArea notification = new com . ibm . ws . jmx . connector . datatypes . NotificationArea ( ) ; try { notification . inboxURL = com . ibm . ws . jmx . connector . converter . JSONConverterTest . TEST_NOTIFICATION_AREA_INBOX ; notification . registrationsURL = com . ibm . ws . jmx . connector . converter . JSONConverterTest . TEST_NOTIFICATION_AREA_REGISTRATION ; notification . serverRegistrationsURL = com . ibm . ws . jmx . connector . converter . JSONConverterTest . TEST_NOTIFICATION_AREA_SERVER_REGISTRATION ; str . append ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . OPEN_JSON ) ; str . append ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . encloseString ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . N_REGISTRATIONS , notification . registrationsURL ) ) ; str . append ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . COMMA ) ; str . append ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . encloseString ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . N_SERVERREGISTRATIONS , notification . serverRegistrationsURL ) ) ; str . append ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . COMMA ) ; str . append ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . encloseString ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . N_INBOX , notification . inboxURL ) ) ; str . append ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . CLOSE_JSON ) ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ( "Exception<sp>encountered<sp>while<sp>setting<sp>up<sp>test<sp>parameters<sp>" + e ) ) ; } try { converter . writeNotificationArea ( out , notification ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ( "Exception<sp>encoutered<sp>" + e ) ) ; } } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( 128 ) ; sb . append ( getClass ( ) . getSimpleName ( ) ) ; sb . append ( '@' ) . append ( java . lang . Integer . toHexString ( hashCode ( ) ) ) ; sb . append ( "<sp>writing=" ) . append ( this . writing ) ; sb . append ( "<sp>closed=" ) . append ( this . closed ) ; sb . append ( "<sp>bufferedCount=" ) . append ( this . bufferedCount ) ; sb . append ( "<sp>bytesWritten=" ) . append ( this . bytesWritten ) ; sb . append ( "<sp>error=" ) . append ( this . error ) ; if ( null != ( this . output ) ) { sb . append ( "<sp>outindex=" ) . append ( this . outputIndex ) ; for ( int i = 0 ; i < ( this . output . length ) ; i ++ ) { sb . append ( "\r\n\t" ) . append ( this . output [ i ] ) ; } } return sb . toString ( ) ; }
|
org . junit . Assert . assertEquals ( out . toString ( ) , str . toString ( ) )
|
proceedFromDelegateMethodOnInjectableMockedClass ( mockit . DelegateInvocationProceedTest$ClassToBeMocked ) { new mockit . Expectations ( ) { { mocked . methodToBeMocked ( ) ; result = new mockit . Delegate ( ) { @ mockit . Mock boolean delegate ( mockit . Invocation inv ) { return inv . proceed ( ) ; } } ; } } ; "<AssertPlaceHolder>" ; } methodToBeMocked ( ) { return true ; }
|
org . junit . Assert . assertTrue ( mocked . methodToBeMocked ( ) )
|
currentTimeInMillis ( ) { net . time4j . SystemClock clock = SystemClock . INSTANCE ; "<AssertPlaceHolder>" ; } currentTimeInMillis ( ) { if ( ! ( this . isRunning ( ) ) ) { net . time4j . Moment m = this . currentTime ( ) ; return ( ( m . getPosixTime ( ) ) * 1000 ) + ( ( m . getNanosecond ( ) ) / ( net . time4j . clock . SntpConnector . MIO ) ) ; } long millis = SystemClock . MONOTONIC . currentTimeInMillis ( ) ; return millis + ( ( this . getLastOffset ( ( millis * 1000 ) ) ) / 1000 ) ; }
|
org . junit . Assert . assertThat ( clock . currentTimeInMillis ( ) , org . hamcrest . CoreMatchers . is ( java . lang . System . currentTimeMillis ( ) ) )
|
testGetByIdWithParent ( ) { category = service . getMinimalCategory ( service . getDefaultParent ( ) . getId ( ) , "Test<sp>Category<sp>2" ) ; int save = service . save ( category ) ; net . magja . model . category . Category category = service . getByIdWithParent ( save ) ; if ( category != null ) { if ( ( category . getParent ( ) ) != null ) { "<AssertPlaceHolder>" ; } else { org . junit . Assert . fail ( ) ; } } else { org . junit . Assert . fail ( ) ; } } getDefaultParent ( ) { return getByIdClean ( soapClient . getConfig ( ) . getDefaultRootCategoryId ( ) ) ; }
|
org . junit . Assert . assertEquals ( service . getDefaultParent ( ) . getId ( ) , category . getParent ( ) . getId ( ) )
|
testNoActivitiesDeserialize ( ) { java . lang . String xml = loadResource ( "transformer/fitbit_no_activity.xml" ) ; java . util . Collection < eu . dime . ps . semantic . model . dpo . Activity > activities = transformer . deserialize ( xml , "fitbit" , "/activity/@me/@all" , eu . dime . ps . semantic . model . dpo . Activity . class ) ; "<AssertPlaceHolder>" ; } size ( ) { return fifoList . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , activities . size ( ) )
|
testSetFieldArrayElement ( ) { com . nextdoor . bender . deserializer . json . GenericJsonEvent event = getEmptyEvent ( ) ; event . setField ( "$.arr" , java . util . Arrays . asList ( "one" ) ) ; event . setField ( "$.arr[0]" , "two" ) ; "<AssertPlaceHolder>" ; } getField ( java . lang . String ) { if ( ( this . payload ) == null ) { throw new com . nextdoor . bender . deserializer . FieldNotFoundException ( ( field + "<sp>is<sp>not<sp>in<sp>payload<sp>because<sp>payload<sp>is<sp>null" ) ) ; } com . google . gson . JsonObject json = this . payload . getAsJsonObject ( ) ; java . lang . Object obj ; try { obj = com . nextdoor . bender . deserializer . json . JsonPathProvider . read ( json , field ) ; } catch ( com . jayway . jsonpath . InvalidPathException e ) { throw new com . nextdoor . bender . deserializer . FieldNotFoundException ( ( ( "Field<sp>cannot<sp>be<sp>found<sp>because<sp>" + field ) + "<sp>is<sp>an<sp>invalid<sp>path" ) ) ; } if ( ( obj == null ) || ( obj instanceof com . google . gson . JsonNull ) ) { throw new com . nextdoor . bender . deserializer . FieldNotFoundException ( ( field + "<sp>is<sp>not<sp>in<sp>payload." ) ) ; } if ( obj instanceof com . google . gson . JsonPrimitive ) { if ( ( ( com . google . gson . JsonPrimitive ) ( obj ) ) . isString ( ) ) { return ( ( com . google . gson . JsonPrimitive ) ( obj ) ) . getAsString ( ) ; } } return obj ; }
|
org . junit . Assert . assertEquals ( "two" , ( ( java . lang . String ) ( event . getField ( "$.arr[0]" ) ) ) )
|
retrieveExplicitlyAssociatedProfileCase1 ( ) { org . restcomm . connect . core . service . profile . ProfileServiceTest . MockingService mocks = new org . restcomm . connect . core . service . profile . ProfileServiceTest . MockingService ( ) ; org . restcomm . connect . dao . entities . Account account = returnValidAccount ( mocks ) ; org . restcomm . connect . dao . entities . Profile expectedProfile = returnProfile ( mocks ) ; returnProfileAssociation ( new org . restcomm . connect . commons . dao . Sid ( expectedProfile . getSid ( ) ) , account . getSid ( ) , mocks ) ; org . restcomm . connect . dao . entities . Profile resultantProfile = mocks . profileService . retrieveExplicitlyAssociatedProfile ( account . getSid ( ) ) ; "<AssertPlaceHolder>" ; } getSid ( ) { return sid ; }
|
org . junit . Assert . assertEquals ( expectedProfile . getSid ( ) , resultantProfile . getSid ( ) )
|
testMaterieleHistorieGeenActueelDoorGeldigheid ( ) { final nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . PersoonGeslachtsaanduidingHistorie historie = new nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . PersoonGeslachtsaanduidingHistorie ( persoon , nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Geslachtsaanduiding . MAN ) ; historie . setDatumEindeGeldigheid ( 20120101 ) ; final nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . entity . AbstractEntityHistorieConverter < nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . PersoonGeslachtsaanduidingHistorie > converter = new nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . entity . PersoonGeslachtsaanduidingHistorieConverter ( ) ; final java . util . Set < nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . PersoonGeslachtsaanduidingHistorie > historieSet = new java . util . HashSet ( ) ; historieSet . add ( historie ) ; final java . lang . Object result = converter . getActueel ( historieSet ) ; "<AssertPlaceHolder>" ; } add ( T extends nl . bzk . brp . model . basis . ModelIdentificeerbaar ) { mutaties . add ( mutatie ) ; }
|
org . junit . Assert . assertNull ( result )
|
testDispatcher ( ) { mockRestClient ( restClient , true ) ; hudson . model . FreeStyleBuild build = executeBuild ( ) ; queue . waitForTicks ( 5 ) ; verifyRestClient ( restClient , build , true ) ; verifyAudit ( build , true ) ; mockRestClient ( restClient , true ) ; hudson . model . FreeStyleBuild build2 = executeBuild ( ) ; queue . waitForTicks ( 5 ) ; verifyRestClient ( restClient , build2 , true ) ; verifyAudit ( build2 , true ) ; "<AssertPlaceHolder>" ; } size ( ) { return queue . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , queue . size ( ) )
|
testGetRowCount_Throws_Exception_When_Pattern_Returns_Error ( ) { doAnswer ( ( invocation ) -> { java . lang . Object [ ] args = invocation . getArguments ( ) ; com . sun . jna . ptr . IntByReference reference = ( ( com . sun . jna . ptr . IntByReference ) ( args [ 0 ] ) ) ; reference . setValue ( 99 ) ; return 1 ; } ) . when ( rawPattern ) . getCurrentRowCount ( any ( ) ) ; mmarquee . automation . pattern . Grid item = new mmarquee . automation . pattern . Grid ( element ) ; item . rawPattern = rawPattern ; int count = item . rowCount ( ) ; "<AssertPlaceHolder>" ; } rowCount ( ) { com . sun . jna . ptr . IntByReference ibr = new com . sun . jna . ptr . IntByReference ( ) ; final int res = this . getPattern ( ) . getCurrentRowCount ( ibr ) ; if ( res != 0 ) { throw new mmarquee . automation . AutomationException ( res ) ; } return ibr . getValue ( ) ; }
|
org . junit . Assert . assertTrue ( ( count == 99 ) )
|
testTXSNVInExonForward ( ) { de . charite . compbio . jannovar . reference . GenomeVariant change = new de . charite . compbio . jannovar . reference . GenomeVariant ( new de . charite . compbio . jannovar . reference . GenomePosition ( de . charite . compbio . jannovar . reference . TranscriptSequenceChangeHelperTest . refDict , Strand . FWD , 1 , 6642119 , PositionType . ZERO_BASED ) , "A" , "C" ) ; java . lang . String resultTranscript = helperForward . getTranscriptWithChange ( change ) ; java . lang . StringBuilder expectedBuilder = new java . lang . StringBuilder ( infoForward . getSequence ( ) ) ; expectedBuilder . setCharAt ( 895 , 'C' ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "LegacyDeletion<sp>[deletedSeq=" + ( deletedSeq . toHGVSString ( ) ) ) + ",<sp>location=" ) + ( location ) ) + "]" ; }
|
org . junit . Assert . assertEquals ( expectedBuilder . toString ( ) , resultTranscript )
|
gettingNextProgrammeReturnsNextProgrammeIterable ( ) { com . google . common . collect . ImmutableList . Builder < com . metabroadcast . atlas . glycerin . model . Programme > programmesList = com . google . common . collect . ImmutableList . builder ( ) ; com . google . common . collect . ImmutableList . Builder < com . metabroadcast . atlas . glycerin . queries . ProgrammesQuery > programmesQueries = com . google . common . collect . ImmutableList . builder ( ) ; for ( int i = 0 ; i < 35 ; i ++ ) { programmesQueries . add ( programmesQuery ) ; } org . atlasapi . remotesite . bbc . nitro . PaginatedProgrammeRequest paginatedProgrammeRequest = new org . atlasapi . remotesite . bbc . nitro . PaginatedProgrammeRequest ( client , programmesQueries . build ( ) ) ; when ( client . execute ( any ( com . metabroadcast . atlas . glycerin . queries . ProgrammesQuery . class ) ) ) . thenReturn ( glycerinResponse ) ; when ( glycerinResponse . getNext ( ) ) . thenReturn ( glycerinResponse ) ; when ( glycerinResponse . getResults ( ) ) . thenReturn ( programmesList . build ( ) ) ; when ( glycerinResponse . getNext ( ) ) . thenReturn ( glycerinResponse ) ; when ( glycerinResponse . getResults ( ) ) . thenReturn ( com . google . common . collect . ImmutableList . of ( programme ) ) ; when ( glycerinResponse . hasNext ( ) ) . thenReturn ( true ) ; java . util . Iterator < java . util . List < com . metabroadcast . atlas . glycerin . model . Programme > > programmes = paginatedProgrammeRequest . iterator ( ) ; programmes . hasNext ( ) ; programmes . next ( ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { if ( ( currentResponse ) == null ) { return executeRequest ( ) ; } else { return currentResponse . hasNext ( ) ; } }
|
org . junit . Assert . assertTrue ( programmes . hasNext ( ) )
|
testClosing_3x3 ( ) { ij . process . ImageProcessor image = createImage_Square10x10 ( ) ; inra . ijpb . morphology . Strel strel = new inra . ijpb . morphology . strel . OctagonStrel ( 3 ) ; ij . process . ImageProcessor result = strel . closing ( image ) ; for ( int y = 0 ; y < ( image . getHeight ( ) ) ; y ++ ) { for ( int x = 0 ; x < ( image . getWidth ( ) ) ; x ++ ) { "<AssertPlaceHolder>" ; } } } get ( int , int ) { if ( x < 0 ) return ( ( int ) ( this . value ) ) ; if ( y < 0 ) return ( ( int ) ( this . value ) ) ; if ( x >= ( this . image . getWidth ( ) ) ) return ( ( int ) ( this . value ) ) ; if ( y >= ( this . image . getHeight ( ) ) ) return ( ( int ) ( this . value ) ) ; return this . image . get ( x , y ) ; }
|
org . junit . Assert . assertEquals ( image . get ( x , y ) , result . get ( x , y ) )
|
testResultNumReturnedIsZero ( ) { final java . lang . String TITLE = "title" ; final java . lang . String searchPhrase = "*" ; final int pageSize = 1 ; org . codice . ddf . spatial . ogc . wfs . v2_0_0 . catalog . source . WfsSource source = getWfsSource ( org . codice . ddf . spatial . ogc . wfs . v2_0_0 . catalog . source . TestWfsSource . ONE_TEXT_PROPERTY_SCHEMA , org . codice . ddf . spatial . ogc . wfs . v2_0_0 . catalog . source . MockWfsServer . getFilterCapabilities ( ) , Wfs20Constants . EPSG_4326_URN , 3 , false , true , 0 ) ; ddf . catalog . operation . impl . QueryImpl query = new ddf . catalog . operation . impl . QueryImpl ( builder . attribute ( Metacard . ANY_TEXT ) . is ( ) . like ( ) . text ( searchPhrase ) ) ; query . setPageSize ( pageSize ) ; org . opengis . filter . sort . SortBy sortBy = new ddf . catalog . filter . impl . SortByImpl ( TITLE , org . opengis . filter . sort . SortOrder . DESCENDING ) ; query . setSortBy ( sortBy ) ; ddf . catalog . operation . impl . QueryRequestImpl queryReq = new ddf . catalog . operation . impl . QueryRequestImpl ( query ) ; ddf . catalog . operation . SourceResponse resp = source . query ( queryReq ) ; "<AssertPlaceHolder>" ; } getResults ( ) { return delegate . getResults ( ) ; }
|
org . junit . Assert . assertEquals ( 3 , resp . getResults ( ) . size ( ) )
|
testOfferProducerWithAddressDoesNotTopOffCreditAboveThreshold ( ) { org . mockito . Mockito . when ( manager . getServer ( ) ) . thenReturn ( server ) ; org . mockito . Mockito . when ( server . getPagingManager ( ) ) . thenReturn ( pagingManager ) ; org . mockito . Mockito . when ( pagingManager . getPageStore ( any ( org . apache . activemq . artemis . api . core . SimpleString . class ) ) ) . thenReturn ( pagingStore ) ; org . mockito . ArgumentCaptor < java . lang . Runnable > argument = org . mockito . ArgumentCaptor . forClass ( org . apache . activemq . artemis . protocol . amqp . broker . Runnable . class ) ; org . apache . activemq . artemis . protocol . amqp . broker . AMQPSessionCallback session = new org . apache . activemq . artemis . protocol . amqp . broker . AMQPSessionCallback ( protonSPI , manager , connection , transportConnection , executor , operationContext ) ; org . mockito . Mockito . when ( receiver . getCredit ( ) ) . thenReturn ( ( ( AMQP_LOW_CREDITS_DEFAULT ) + 1 ) ) ; session . flow ( new org . apache . activemq . artemis . api . core . SimpleString ( "test" ) , org . apache . activemq . artemis . protocol . amqp . proton . ProtonServerReceiverContext . createCreditRunnable ( org . apache . activemq . artemis . protocol . amqp . broker . AMQP_CREDITS_DEFAULT , org . apache . activemq . artemis . protocol . amqp . broker . AMQP_LOW_CREDITS_DEFAULT , receiver , connection ) ) ; org . mockito . Mockito . verify ( pagingStore ) . checkMemory ( argument . capture ( ) ) ; "<AssertPlaceHolder>" ; argument . getValue ( ) . run ( ) ; org . mockito . Mockito . verify ( receiver , never ( ) ) . getRemoteCredit ( ) ; org . mockito . Mockito . verify ( receiver , never ( ) ) . flow ( anyInt ( ) ) ; } getValue ( ) { return value ; }
|
org . junit . Assert . assertNotNull ( argument . getValue ( ) )
|
testStreamIncludingIntermediateCommunities ( ) { final java . lang . String cypher = "CALL<sp>algo.louvain.stream('',<sp>'',<sp>{concurrency:1,<sp>includeIntermediateCommunities:<sp>true})<sp>" + "YIELD<sp>nodeId,<sp>communities" ; final com . carrotsearch . hppc . IntIntScatterMap testMap = new com . carrotsearch . hppc . IntIntScatterMap ( ) ; org . neo4j . graphalgo . algo . LouvainClusteringIntegrationTest . DB . execute ( cypher ) . accept ( ( row ) -> { final long community = ( ( List < java . lang . Long > ) ( row . get ( "communities" ) ) ) . get ( 0 ) ; System . out . println ( community ) ; testMap . addTo ( ( ( int ) ( community ) ) , 1 ) ; return false ; } ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
|
org . junit . Assert . assertEquals ( 3 , testMap . size ( ) )
|
testContains ( ) { java . lang . String string1 = "string<sp>1" ; l . add ( string1 ) ; l . add ( 0 , "string<sp>2" ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { synchronized ( lock ) { return super . contains ( o ) ; } }
|
org . junit . Assert . assertTrue ( l . contains ( string1 ) )
|
get ( ) { java . net . URI uri = new java . net . URI ( ( ( lodsve . web . utils . RestUtilsTest . baseUrl ) + "/demo/1" ) ) ; lodsve . web . utils . domain . Demo demo = lodsve . web . utils . RestUtils . get ( uri , lodsve . web . utils . domain . Demo . class ) ; "<AssertPlaceHolder>" ; } get ( java . net . URI , java . lang . Class ) { org . springframework . util . Assert . notNull ( url ) ; org . springframework . util . Assert . notNull ( responseType ) ; return lodsve . web . utils . RestUtils . restTemplate . getForObject ( url , responseType ) ; }
|
org . junit . Assert . assertNotNull ( demo )
|
testGetPermittedAccessTypesRepoInTrash ( ) { when ( mockNodeDao . getBenefactor ( org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . REPO_ENTITY_ID ) ) . thenReturn ( org . sagebionetworks . repo . model . jdo . KeyFactory . keyToString ( AuthorizationManagerImpl . TRASH_FOLDER_ID ) ) ; java . util . Set < java . lang . String > permitted = authorizationManager . getPermittedDockerActions ( org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . USER_INFO , org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . SERVICE , org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . REPOSITORY_TYPE , org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . REPOSITORY_PATH , org . sagebionetworks . repo . manager . AuthorizationManagerImplUnitTest . ACCESS_TYPES_STRING ) ; "<AssertPlaceHolder>" ; } toString ( ) { double percent = ( ( ( double ) ( currentIndex ) ) / ( ( double ) ( totalCount ) ) ) * 100.0 ; return java . lang . String . format ( "%1$-30s<sp>%2$10d/%3$-10d<sp>%4$8.2f<sp>%%" , message , currentIndex , totalCount , percent ) ; }
|
org . junit . Assert . assertTrue ( permitted . toString ( ) , permitted . isEmpty ( ) )
|
testIgnoreInserts ( ) { final com . hartwig . hmftools . common . variant . structural . StructuralVariant first = com . hartwig . hmftools . common . purple . copynumber . sv . StructuralVariantLegsFactoryTest . sv ( 100 , 200 , StructuralVariantType . INS , 0.25 , 0.25 ) ; final com . hartwig . hmftools . common . variant . structural . StructuralVariant second = com . hartwig . hmftools . common . purple . copynumber . sv . StructuralVariantLegsFactoryTest . sv ( 300 , 400 , StructuralVariantType . INS , 0.25 , 0.25 ) ; final java . util . List < com . hartwig . hmftools . common . variant . structural . StructuralVariant > variants = com . google . common . collect . Lists . newArrayList ( first , second ) ; final java . util . List < com . hartwig . hmftools . common . purple . copynumber . sv . StructuralVariantLegs > legs = com . hartwig . hmftools . common . purple . copynumber . sv . StructuralVariantLegsFactory . create ( variants ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( maxheap . size ( ) ) + ( minheap . size ( ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , legs . size ( ) )
|
testValidSymmetric ( ) { com . github . anno4j . Anno4j anno4j = new com . github . anno4j . Anno4j ( ) ; com . github . anno4j . ValidatedTransaction transaction = anno4j . createValidatedTransaction ( ) ; transaction . begin ( ) ; com . github . anno4j . transaction . ValidatedTransactionTest . SpecialTestResource resource1 = transaction . createObject ( com . github . anno4j . transaction . ValidatedTransactionTest . SpecialTestResource . class ) ; com . github . anno4j . transaction . ValidatedTransactionTest . SpecialTestResource resource2 = transaction . createObject ( com . github . anno4j . transaction . ValidatedTransactionTest . SpecialTestResource . class ) ; resource1 . setSymmetric ( com . google . common . collect . Sets . < com . github . anno4j . transaction . ValidatedTransactionTest . TestResource > newHashSet ( resource2 ) ) ; resource2 . setSymmetric ( com . google . common . collect . Sets . < com . github . anno4j . transaction . ValidatedTransactionTest . TestResource > newHashSet ( resource1 ) ) ; setValidCardinalities ( resource1 , resource2 ) ; boolean exceptionThrown = false ; try { transaction . commit ( ) ; } catch ( com . github . anno4j . ValidatedTransaction e ) { exceptionThrown = true ; } "<AssertPlaceHolder>" ; } commit ( ) { connection . commit ( ) ; }
|
org . junit . Assert . assertFalse ( exceptionThrown )
|
testInvokeMethodThrowingProviderRuntimeException ( ) { testProxyInvokesProviderMethod ( "testThrowsProviderRuntimeException" , new io . joynr . provider . PromiseListener ( ) { @ test . io . joynr . jeeintegration . Override public void onFulfillment ( java . lang . Object ... values ) { org . junit . Assert . fail ( "Should<sp>never<sp>get<sp>here" ) ; } @ test . io . joynr . jeeintegration . Override public void onRejection ( io . joynr . exceptions . JoynrException error ) { "<AssertPlaceHolder>" ; } } , false ) ; } onRejection ( io . joynr . exceptions . JoynrException ) { if ( error instanceof io . joynr . exceptions . JoynrRuntimeException ) { sendPublicationError ( ( ( io . joynr . exceptions . JoynrRuntimeException ) ( error ) ) , publicationInformation ) ; } else { sendPublicationError ( new joynr . exceptions . ProviderRuntimeException ( ( "Unexpected<sp>exception<sp>while<sp>calling<sp>getter<sp>for<sp>attribute<sp>" + ( publicationInformation . getSubscribedToName ( ) ) ) ) , publicationInformation ) ; } }
|
org . junit . Assert . assertTrue ( ( error instanceof joynr . exceptions . ProviderRuntimeException ) )
|
testCountValues ( ) { rapaio . core . tools . DVector dv = rapaio . core . tools . DVector . fromWeights ( true , rapaio . data . VarNominal . copy ( "?" , "a" , "b" , "c" ) , rapaio . data . VarDouble . copy ( 1.0 , 2.0 , 3.0 , 4.0 ) ) ; "<AssertPlaceHolder>" ; } countValues ( java . util . function . DoublePredicate ) { int count = 0 ; for ( int i = start ; i < ( values . length ) ; i ++ ) { if ( predicate . test ( values [ i ] ) ) { count ++ ; } } return count ; }
|
org . junit . Assert . assertEquals ( 2 , dv . countValues ( ( x ) -> x <= 2 ) )
|
testParseWithMappedQueryParamDefaultsToDecodeTrue ( ) { com . ocpsoft . pretty . config . PrettyUrlMapping mapping = config . getMappingById ( "4" ) ; java . util . List < com . ocpsoft . pretty . config . mapping . QueryParameter > params = mapping . getQueryParams ( ) ; com . ocpsoft . pretty . config . mapping . QueryParameter param = params . get ( 0 ) ; "<AssertPlaceHolder>" ; } decode ( ) { return new com . ocpsoft . pretty . faces . url . URL ( getDecodedSegments ( ) , metadata ) ; }
|
org . junit . Assert . assertTrue ( param . decode ( ) )
|
processReplaceTest ( ) { final java . lang . String anactXmlFilePath = "processor/bill/anact/2016-12-02-09.16.10.220257_ANACT_S08215.XML" ; processXmlFile ( anactXmlFilePath ) ; gov . nysenate . openleg . model . bill . Bill b = billDataService . getBill ( new gov . nysenate . openleg . model . bill . BaseBillId ( "S08215" , 2015 ) ) ; java . lang . String expectedS = "AN<sp>ACT<sp>to<sp>amend<sp>the<sp>executive<sp>law,<sp>in<sp>relation<sp>to<sp>the<sp>appointment<sp>of\n" + "interpreters<sp>to<sp>be<sp>used<sp>in<sp>parole<sp>board<sp>proceedings<sp>[altered]" ; java . lang . String actualClause = b . getAmendment ( Version . ORIGINAL ) . getActClause ( ) ; "<AssertPlaceHolder>" ; } getActClause ( ) { return actClause ; }
|
org . junit . Assert . assertEquals ( expectedS , actualClause )
|
testReportdir ( ) { java . io . File dir = tempDir ( ) ; java . io . File suite = tempScript ( "suite.mts" , "Test<sp>foo.mt<sp>Run" , dir ) ; java . io . File reportdir = new java . io . File ( dir , "/reports" ) ; task . setSuite ( suite ) ; task . setAgent ( "iOS" ) ; task . setReportdir ( reportdir ) ; task . execute ( ) ; java . io . File report = new java . io . File ( reportdir , "/TEST-suite.xml" ) ; "<AssertPlaceHolder>" ; } execute ( ) { com . gorillalogic . monkeytalk . processor . Runner runner = new com . gorillalogic . monkeytalk . processor . Runner ( agent , host , port ) ; if ( ( adb ) != null ) { runner . setAdb ( adb ) ; } else if ( ( ( agent ) != null ) && ( agent . equalsIgnoreCase ( "AndroidEmulator" ) ) ) { java . io . File adb = com . gorillalogic . monkeytalk . utils . AndroidUtils . getAdb ( ) ; runner . setAdb ( adb ) ; } if ( ( adbSerial ) != null ) { runner . setAgentProperty ( AndroidEmulatorAgent . ADB_SERIAL_PROP , adbSerial ) ; } if ( ( adbLocalPort ) > 0 ) { runner . setAgentProperty ( AndroidEmulatorAgent . ADB_LOCAL_PORT_PROP , java . lang . Integer . toString ( adbLocalPort ) ) ; } if ( ( adbRemotePort ) > 0 ) { runner . setAgentProperty ( AndroidEmulatorAgent . ADB_REMOTE_PORT_PROP , java . lang . Integer . toString ( adbRemotePort ) ) ; } runner . setReportdir ( reportdir ) ; runner . setScriptListener ( scriptListener ) ; runner . setSuiteListener ( suiteListener ) ; runner . setVerbose ( false ) ; runner . setGlobalTimeout ( timeout ) ; runner . setGlobalThinktime ( thinktime ) ; runner . setGlobalScreenshotOnError ( screenshotOnError ) ; runner . setTakeAfterScreenshot ( screenshots ) ; runner . setTakeAfterMetrics ( screenshots ) ; com . gorillalogic . monkeytalk . processor . PlaybackResult result = null ; try { if ( ( ( script ) != null ) && ( ( suite ) != null ) ) { throw new org . apache . tools . ant . BuildException ( "You<sp>cannot<sp>specify<sp>both<sp>script<sp>and<sp>suite<sp>in<sp>the<sp>run<sp>task." ) ; } else if ( ( ( script ) != null ) && ( ( text ) != null ) ) { throw new org . apache . tools . ant . BuildException ( "You<sp>cannot<sp>specify<sp>both<sp>script<sp>and<sp>inline<sp>commands<sp>in<sp>the<sp>run<sp>task." ) ; } else if ( ( ( suite ) != null ) && ( ( text ) != null ) ) { throw new org . apache . tools . ant . BuildException ( "You<sp>cannot<sp>specify<sp>both<sp>suite<sp>and<sp>inline<sp>commands<sp>in<sp>the<sp>run<sp>task." ) ; } if ( ! ( runner . waitUntilReady ( startup ) ) ) { throw new org . apache . tools . ant . BuildException ( ( ( "Unable<sp>to<sp>startup<sp>MonkeyTalk<sp>connection<sp>-<sp>timeout<sp>after<sp>" + ( startup ) ) + "s" ) ) ; } if ( ( script ) != null ) { if ( verbose ) { log ( ( ( "AndroidEmulator" 0 + ( script . getName ( ) ) ) + "..." ) ) ; } result = runner . run ( script , com . gorillalogic . monkeytalk . processor . Globals . parse ( globals ) ) ; } else if ( ( suite ) != null ) { if ( verbose ) { log ( ( ( "running<sp>suite<sp>" + ( suite . getName ( ) ) ) + "..." ) ) ; } runner . setScriptListener ( scriptListenerForSuite ) ; result = runner . run ( suite , com . gorillalogic . monkeytalk . processor . Globals . parse ( globals ) ) ; } else if ( ( text ) != null ) { java . io . File tmp = new java . io . File ( getProject ( ) . getBaseDir ( ) , com . gorillalogic . monkeytalk . ant . RunTask . TEMP_FILE ) ; java . lang . String subbed = getProject ( ) . replaceProperties ( text . trim ( ) ) ; try { com . gorillalogic . monkeytalk . utils . FileUtils . writeFile ( tmp , subbed ) ; } catch ( java . io . IOException ex ) { throw new org . apache . tools . ant . BuildException ( ex ) ; } result = runner . run ( tmp , com . gorillalogic . monkeytalk . processor . Globals . parse ( globals ) ) ; tmp . delete ( ) ; } else { throw new org . apache . tools . ant . BuildException ( "Nothing<sp>to<sp>run." ) ; } } catch ( java . lang . RuntimeException ex ) { throw new org . apache . tools . ant . BuildException ( ex . getMessage ( ) ) ; } if ( ( result . getStatus ( ) ) != ( com . gorillalogic . monkeytalk . processor . PlaybackStatus . OK ) ) { throw new org . apache . tools . ant . BuildException ( result . toString ( ) ) ; } if ( verbose ) { log ( "...done" ) ; } }
|
org . junit . Assert . assertTrue ( report . exists ( ) )
|
addsTestCasesForNames ( ) { java . lang . String testCaseName = "Frakking<sp>big<sp>test<sp>case" ; suite . addNewTestCase ( testCaseName ) ; "<AssertPlaceHolder>" ; } hasATestCaseNamed ( java . lang . String ) { return new org . junit . internal . matchers . TypeSafeMatcher < com . eviware . soapui . impl . wsdl . WsdlTestSuite > ( ) { @ com . eviware . soapui . utils . Override public boolean matchesSafely ( com . eviware . soapui . impl . wsdl . WsdlTestSuite wsdlTestSuite ) { return wsdlTestSuite . getTestCases ( ) . containsKey ( testCaseName ) ; } @ com . eviware . soapui . utils . Override public void describeTo ( org . hamcrest . Description description ) { description . appendText ( ( "a<sp>TestSuite<sp>with<sp>a<sp>test<sp>case<sp>named<sp>" + testCaseName ) ) ; } } ; }
|
org . junit . Assert . assertThat ( suite , hasATestCaseNamed ( testCaseName ) )
|
mimetype_ids_are_stable ( ) { final java . nio . file . Path tmpDir = org . exist . dom . persistent . SymbolTableTest . createTempDir ( ) ; org . exist . dom . persistent . SymbolTable symbolTable = createSymbolTable ( tmpDir ) ; final java . lang . String mimetype = "something/other" ; final int mimetypeId = symbolTable . getMimeTypeId ( mimetype ) ; symbolTable . close ( ) ; symbolTable = createSymbolTable ( tmpDir ) ; final java . lang . String roundTrippedMimetype = symbolTable . getMimeType ( mimetypeId ) ; symbolTable . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { java . util . Iterator < org . exist . indexing . spatial . AbstractGMLJDBCIndexWorker > i = workers . values ( ) . iterator ( ) ; while ( i . hasNext ( ) ) { org . exist . indexing . spatial . AbstractGMLJDBCIndexWorker worker = i . next ( ) ; worker . flush ( ) ; worker . setDocument ( null , ReindexMode . UNKNOWN ) ; } shutdownDatabase ( ) ; }
|
org . junit . Assert . assertEquals ( mimetype , roundTrippedMimetype )
|
validate_can_write_ACL_ordered_entries ( ) { final java . lang . SecurityManager mockSecurityManager = org . easymock . EasyMock . createMock ( org . exist . security . SecurityManager . class ) ; final org . exist . Database mockDatabase = org . easymock . EasyMock . createMock ( org . exist . Database . class ) ; final org . exist . storage . DBBroker mockBroker = org . easymock . EasyMock . createMock ( org . exist . storage . DBBroker . class ) ; final org . exist . security . Subject mockCurrentSubject = org . easymock . EasyMock . createMock ( org . exist . security . Subject . class ) ; expect ( mockSecurityManager . getDatabase ( ) ) . andReturn ( mockDatabase ) . times ( 2 ) ; expect ( mockDatabase . getActiveBroker ( ) ) . andReturn ( mockBroker ) . times ( 2 ) ; expect ( mockBroker . getCurrentSubject ( ) ) . andReturn ( mockCurrentSubject ) . times ( 2 ) ; expect ( mockCurrentSubject . hasDbaRole ( ) ) . andReturn ( true ) . times ( 2 ) ; final int ownerId = new java . util . Random ( ) . nextInt ( SecurityManagerImpl . MAX_USER_ID ) ; final int mode = 448 ; final int ownerGroupId = new java . util . Random ( ) . nextInt ( SecurityManagerImpl . MAX_GROUP_ID ) ; final org . exist . security . Subject mockUser = org . easymock . EasyMock . createMock ( org . exist . security . Subject . class ) ; final boolean mockUserHasDbaRole = false ; final int mockUserId = new java . util . Random ( ) . nextInt ( SecurityManagerImpl . MAX_USER_ID ) ; final int mockGroupId = new java . util . Random ( ) . nextInt ( SecurityManagerImpl . MAX_GROUP_ID ) ; expect ( mockUser . hasDbaRole ( ) ) . andReturn ( mockUserHasDbaRole ) ; expect ( mockUser . getId ( ) ) . andReturn ( mockUserId ) ; expect ( mockUser . getGroupIds ( ) ) . andReturn ( new int [ ] { mockGroupId } ) ; replay ( mockSecurityManager , mockDatabase , mockBroker , mockCurrentSubject , mockUser ) ; org . exist . security . SimpleACLPermission permission = new org . exist . security . SimpleACLPermission ( mockSecurityManager , ownerId , ownerGroupId , mode ) ; permission . addUserACE ( ACE_ACCESS_TYPE . DENIED , mockUserId , Permission . READ ) ; permission . addGroupACE ( ACE_ACCESS_TYPE . ALLOWED , mockGroupId , Permission . WRITE ) ; boolean isValid = permission . validate ( mockUser , Permission . WRITE ) ; verify ( mockSecurityManager , mockDatabase , mockBroker , mockCurrentSubject , mockUser ) ; "<AssertPlaceHolder>" ; } validate ( java . io . InputStream , java . lang . String ) { if ( ( grammarUrl != null ) && ( grammarUrl . startsWith ( "/" ) ) ) { grammarUrl = "xmldb:exist://" + grammarUrl ; } if ( ( grammarUrl != null ) && ( ( ( ( grammarUrl . endsWith ( ".rng" ) ) || ( grammarUrl . endsWith ( ".rnc" ) ) ) || ( grammarUrl . endsWith ( ".nvdl" ) ) ) || ( grammarUrl . endsWith ( ".sch" ) ) ) ) { return validateJing ( stream , grammarUrl ) ; } else { return validateParse ( stream , grammarUrl ) ; } }
|
org . junit . Assert . assertTrue ( isValid )
|
test_serialize_map_escape_double_quotation_marks ( ) { java . util . Map < java . lang . String , java . lang . String > map = new java . util . LinkedHashMap < java . lang . String , java . lang . String > ( ) ; java . lang . String value = "bo\"b" ; map . put ( "name" , value ) ; java . lang . String json = org . restfulwhois . rdap . common . util . JsonUtil . serializeMap ( map ) ; org . junit . Assert . assertEquals ( "{\"name\":\"bo\\\"b\"}" , json ) ; java . util . Map < java . lang . String , java . lang . String > desrializeMap = org . restfulwhois . rdap . common . util . JsonUtil . deserializeJsonToMap ( json ) ; "<AssertPlaceHolder>" ) ; } deserializeJsonToMap ( java . lang . String ) { java . util . Map < java . lang . String , java . lang . String > result = new java . util . LinkedHashMap < java . lang . String , java . lang . String > ( ) ; if ( org . apache . commons . lang . StringUtils . isBlank ( json ) ) { return result ; } try { result = org . restfulwhois . rdap . common . util . JsonUtil . objectMapper . readValue ( json , new com . fasterxml . jackson . core . type . TypeReference < java . util . LinkedHashMap < java . lang . String , java . lang . String > > ( ) { } ) ; } catch ( java . lang . Exception e ) { org . restfulwhois . rdap . common . util . JsonUtil . LOGGER . error ( "deserializateJsonToMap<sp>error:{}" , e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( "bo\"b" , desrializeMap . get ( "name" )
|
testChar ( ) { char t = 'a' ; t = roundTrip ( t , char . class ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( 'a' , t )
|
testGetDateParser_LocalTimeZone ( ) { java . sql . Date date = new java . sql . Date ( org . apache . phoenix . util . DateUtil . getDateTimeParser ( "yyyy-MM-dd" , PDate . INSTANCE , java . util . TimeZone . getDefault ( ) . getID ( ) ) . parseDateTime ( "1970-01-01" ) ) ; "<AssertPlaceHolder>" ; } valueOf ( org . apache . phoenix . expression . Expression ) { org . apache . phoenix . expression . ExpressionType type = org . apache . phoenix . expression . ExpressionType . classToEnumMap . get ( expression . getClass ( ) ) ; if ( type == null ) { throw new java . lang . IllegalArgumentException ( ( "No<sp>ExpressionType<sp>for<sp>" + ( expression . getClass ( ) ) ) ) ; } return type ; }
|
org . junit . Assert . assertEquals ( java . sql . Date . valueOf ( "1970-01-01" ) , date )
|
testUploadNoArtifact ( ) { com . xti . jenkins . plugin . awslambda . upload . DeployConfig deployConfig = new com . xti . jenkins . plugin . awslambda . upload . DeployConfig ( "location" , "description" , "function" , "handler" , 1024 , "role" , "runtime" , 30 , "full" , false , null , false , new java . util . ArrayList < java . lang . String > ( ) , new java . util . ArrayList < java . lang . String > ( ) ) ; when ( zipper . getZip ( any ( java . lang . String . class ) ) ) . thenReturn ( null ) ; when ( service . deployLambda ( any ( com . xti . jenkins . plugin . awslambda . upload . DeployConfig . class ) , any ( com . amazonaws . services . lambda . model . FunctionCode . class ) , any ( com . xti . jenkins . plugin . awslambda . upload . UpdateModeValue . class ) ) ) . thenReturn ( true ) ; com . xti . jenkins . plugin . awslambda . upload . LambdaUploader uploader = new com . xti . jenkins . plugin . awslambda . upload . LambdaUploader ( service , zipper , logger ) ; java . lang . Boolean uploaded = uploader . upload ( deployConfig ) ; verify ( logger , times ( 1 ) ) . log ( "%nStarting<sp>lambda<sp>deployment<sp>procedure" ) ; verify ( service , times ( 1 ) ) . deployLambda ( eq ( deployConfig ) , any ( com . amazonaws . services . lambda . model . FunctionCode . class ) , eq ( UpdateModeValue . Full ) ) ; "<AssertPlaceHolder>" ; } deployLambda ( com . xti . jenkins . plugin . awslambda . upload . DeployConfig , com . xti . jenkins . plugin . awslambda . service . FunctionCode , com . xti . jenkins . plugin . awslambda . upload . UpdateModeValue ) { if ( functionExists ( config . getFunctionName ( ) ) ) { if ( ( UpdateModeValue . Full . equals ( updateModeValue ) ) || ( UpdateModeValue . Config . equals ( updateModeValue ) ) ) { try { updateConfigurationOnly ( config ) ; } catch ( com . amazonaws . AmazonClientException ace ) { logger . log ( com . xti . jenkins . plugin . awslambda . util . LogUtils . getStackTrace ( ace ) ) ; return false ; } } if ( ( UpdateModeValue . Full . equals ( updateModeValue ) ) || ( UpdateModeValue . Code . equals ( updateModeValue ) ) ) { if ( functionCode != null ) { try { java . lang . String version = updateCodeOnly ( config . getFunctionName ( ) , functionCode , config . getPublish ( ) ) ; if ( ( config . getPublish ( ) ) && ( config . getCreateAlias ( ) ) ) { if ( aliasExists ( config . getAlias ( ) , config . getFunctionName ( ) ) ) { updateLambdaAlias ( config , version ) ; } else { createLambdaAliasFunction ( config , version ) ; } } } catch ( java . io . IOException e ) { logger . log ( com . xti . jenkins . plugin . awslambda . util . LogUtils . getStackTrace ( e ) ) ; return false ; } catch ( com . amazonaws . AmazonClientException ace ) { logger . log ( com . xti . jenkins . plugin . awslambda . util . LogUtils . getStackTrace ( ace ) ) ; return false ; } } else { logger . log ( "Could<sp>not<sp>find<sp>file<sp>to<sp>upload." ) ; return false ; } } return true ; } else { if ( functionCode != null ) { try { java . lang . String functionVersion = createLambdaFunction ( config , functionCode ) ; if ( ( config . getPublish ( ) ) && ( config . getCreateAlias ( ) ) ) { createLambdaAliasFunction ( config , functionVersion ) ; } return true ; } catch ( java . io . IOException e ) { logger . log ( com . xti . jenkins . plugin . awslambda . util . LogUtils . getStackTrace ( e ) ) ; return false ; } catch ( com . amazonaws . AmazonClientException ace ) { logger . log ( com . xti . jenkins . plugin . awslambda . util . LogUtils . getStackTrace ( ace ) ) ; return false ; } } else { logger . log ( "Could<sp>not<sp>find<sp>file<sp>to<sp>upload." ) ; return false ; } } }
|
org . junit . Assert . assertTrue ( uploaded )
|
testConstructEmptyDocumentList ( ) { final com . allanbank . mongodb . bson . impl . RootDocument element = new com . allanbank . mongodb . bson . impl . RootDocument ( ( ( java . util . List < com . allanbank . mongodb . bson . Element > ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } getElements ( ) { return myElements ; }
|
org . junit . Assert . assertTrue ( element . getElements ( ) . isEmpty ( ) )
|
testParseValueForDatabaseWrite ( ) { java . lang . Long expected = new java . lang . Long ( 123 ) ; java . lang . Object result = parser . parseValueForDatabaseWrite ( "123" ) ; "<AssertPlaceHolder>" ; } parseValueForDatabaseWrite ( java . lang . String ) { if ( Boolean . TRUE . toString ( ) . equalsIgnoreCase ( value ) ) { return Boolean . TRUE ; } else if ( Boolean . FALSE . toString ( ) . equalsIgnoreCase ( value ) ) { return Boolean . FALSE ; } throw new java . lang . IllegalArgumentException ( ( "Not<sp>a<sp>boolean:<sp>" + value ) ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
testSetNameInitPhase ( ) { context . setState ( LifecycleState . STARTING_PREP ) ; applicationSessionCookieConfig . setName ( "test" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return getPoolProperties ( ) . getName ( ) ; }
|
org . junit . Assert . assertTrue ( applicationSessionCookieConfig . getName ( ) . equals ( "test" ) )
|
shouldConvert ( ) { br . com . uol . pagseguro . api . utils . RequestMap expectedMap = new br . com . uol . pagseguro . api . utils . RequestMap ( ) ; expectedMap . putMap ( new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "transactionCode" , "code" ) ; } } ) ; br . com . uol . pagseguro . api . utils . RequestMap map = mapConverter . convert ( transactionIdentify ) ; "<AssertPlaceHolder>" ; } convert ( br . com . uol . pagseguro . api . common . domain . AccountRegisterSuggestion ) { if ( account == null ) { return null ; } br . com . uol . pagseguro . api . application . authorization . AccountV2XMLConverter convertedAccount = new br . com . uol . pagseguro . api . application . authorization . AccountV2XMLConverter ( ) ; convertedAccount . setEmail ( account . getEmail ( ) ) ; convertedAccount . setType ( account . getType ( ) ) ; convertedAccount . setPerson ( br . com . uol . pagseguro . api . application . authorization . AccountV2XMLConverter . PERSON_V_2_XML_CONVERTER . convert ( account . getPerson ( ) ) ) ; convertedAccount . setCompany ( br . com . uol . pagseguro . api . application . authorization . AccountV2XMLConverter . COMPANY_V_2_XML_CONVERTER . convert ( account . getCompany ( ) ) ) ; return convertedAccount ; }
|
org . junit . Assert . assertEquals ( expectedMap , map )
|
serialize ( ) { com . google . gson . Gson gson = com . github . seratch . jslack . common . json . GsonFactory . createSnakeCase ( ) ; com . github . seratch . jslack . api . model . event . UserTypingEvent event = new com . github . seratch . jslack . api . model . event . UserTypingEvent ( ) ; event . setChannel ( "c" ) ; event . setUser ( "u" ) ; java . lang . String generatedJson = gson . toJson ( event ) ; java . lang . String expectedJson = "{\"type\":\"user_typing\",\"channel\":\"c\",\"user\":\"u\"}" ; "<AssertPlaceHolder>" ; } createSnakeCase ( ) { return new com . google . gson . GsonBuilder ( ) . setFieldNamingPolicy ( FieldNamingPolicy . LOWER_CASE_WITH_UNDERSCORES ) . registerTypeAdapter ( com . github . seratch . jslack . api . model . block . LayoutBlock . class , new com . github . seratch . jslack . common . json . GsonLayoutBlockFactory ( ) ) . registerTypeAdapter ( com . github . seratch . jslack . api . model . block . composition . TextObject . class , new com . github . seratch . jslack . common . json . GsonTextObjectFactory ( ) ) . registerTypeAdapter ( com . github . seratch . jslack . api . model . block . ContextBlockElement . class , new com . github . seratch . jslack . common . json . GsonContextBlockElementFactory ( ) ) . registerTypeAdapter ( com . github . seratch . jslack . api . model . block . element . BlockElement . class , new com . github . seratch . jslack . common . json . GsonBlockElementFactory ( ) ) . create ( ) ; }
|
org . junit . Assert . assertThat ( generatedJson , org . hamcrest . CoreMatchers . is ( expectedJson ) )
|
testHasNextLast ( ) { System . out . println ( ( ( ( ( ( "hashNext(last):<sp>" + ( subItems ) ) + ",<sp>" ) + ( items ) ) + ",<sp>" ) + ( combinationsExpected ) ) ) ; org . util . combinatorial . Combination instance = new org . util . combinatorial . Combination ( subItems , items ) ; int [ ] indexes = new int [ instance . size ( ) ] ; for ( int i = 0 ; i < ( combinationsExpected ) ; i ++ ) { instance . next ( indexes ) ; } "<AssertPlaceHolder>" ; } hasNext ( ) { return ( hasNext ( 0 ) ) || ( hasNext ( ( ( indexes . length ) - 1 ) ) ) ; }
|
org . junit . Assert . assertFalse ( instance . hasNext ( ) )
|
shouldDownloadFileFromLocalMavenRepoWindows ( ) { java . nio . file . FileSystem filesystem = com . google . common . jimfs . Jimfs . newFileSystem ( com . google . common . jimfs . Configuration . windows ( ) ) ; java . nio . file . Path root = filesystem . getPath ( "C:\\Users\\bob\\.m2" ) ; java . nio . file . Files . createDirectories ( root ) ; java . net . URI uri = new java . net . URI ( "mvn:group:project:jar:0.1" ) ; java . nio . file . Path output = filesystem . getPath ( "output.txt" ) ; java . nio . file . Path source = root . resolve ( "group/project/0.1/project-0.1.jar" ) ; java . nio . file . Files . createDirectories ( source . getParent ( ) ) ; java . nio . file . Files . write ( source , "cake" . getBytes ( com . facebook . buck . file . downloader . impl . UTF_8 ) ) ; com . facebook . buck . file . downloader . Downloader downloader = new com . facebook . buck . file . downloader . impl . OnDiskMavenDownloader ( root ) ; downloader . fetch ( com . facebook . buck . event . BuckEventBusForTests . newInstance ( ) , uri , output ) ; java . lang . String result = new java . lang . String ( java . nio . file . Files . readAllBytes ( output ) , UTF_8 ) ; "<AssertPlaceHolder>" ; } equalTo ( com . facebook . buck . query . QueryEnvironment$Argument ) { return ( ( ( type . equals ( other . type ) ) && ( ( integer ) == ( other . integer ) ) ) && ( java . util . Objects . equals ( expression , other . expression ) ) ) && ( java . util . Objects . equals ( word , other . word ) ) ; }
|
org . junit . Assert . assertThat ( "cake" , org . hamcrest . Matchers . equalTo ( result ) )
|
testcancelLimitOrderFailure ( ) { java . util . concurrent . atomic . AtomicInteger limitOrderIdCounter = testConfig . getLimitOrderIdCounter ( ) ; int limitOrderId = limitOrderIdCounter . getAndIncrement ( ) ; try { tradingManager . cancelLimitOrder ( limitOrderId ) ; org . junit . Assert . fail ( ) ; } catch ( com . jboss . trading . api . exception . LimitOrderNotFoundException ex ) { "<AssertPlaceHolder>" ; } } getCancelLimitOrderErrorMsgPrefix ( ) { return cancelLimitOrderErrorMsgPrefix ; }
|
org . junit . Assert . assertEquals ( java . lang . String . format ( testConfig . getCancelLimitOrderErrorMsgPrefix ( ) , limitOrderId ) , ex . getMessage ( ) )
|
testCharacterConversionNoTypeInfo ( ) { final java . lang . Character v_Character = new java . lang . Character ( 'a' ) ; final org . apache . felix . configurator . impl . json . TypeConverter converter = new org . apache . felix . configurator . impl . json . TypeConverter ( null ) ; "<AssertPlaceHolder>" ; } convert ( org . apache . felix . gogo . runtime . CommandSession , java . lang . Class , java . lang . Object ) { int [ ] cost = new int [ 1 ] ; java . lang . Object ret = org . apache . felix . gogo . runtime . Reflective . coerce ( session , desiredType , in , cost ) ; if ( ret == ( Reflective . NO_MATCH ) ) { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "Cannot<sp>convert<sp>%s(%s)<sp>to<sp>%s" , in , ( in != null ? in . getClass ( ) : "null" ) , desiredType ) ) ; } return ret ; }
|
org . junit . Assert . assertNull ( converter . convert ( null , v_Character , null ) )
|
testShutdownTimeoutConfiguration ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; long shutdownTimeout = 5 ; conf . setTimeDuration ( org . apache . hadoop . util . SERVICE_SHUTDOWN_TIMEOUT , shutdownTimeout , TimeUnit . SECONDS ) ; "<AssertPlaceHolder>" ; } getShutdownTimeout ( org . apache . hadoop . conf . Configuration ) { long duration = conf . getTimeDuration ( org . apache . hadoop . util . SERVICE_SHUTDOWN_TIMEOUT , org . apache . hadoop . util . SERVICE_SHUTDOWN_TIMEOUT_DEFAULT , org . apache . hadoop . util . ShutdownHookManager . TIME_UNIT_DEFAULT ) ; if ( duration < ( org . apache . hadoop . util . ShutdownHookManager . TIMEOUT_MINIMUM ) ) { duration = org . apache . hadoop . util . ShutdownHookManager . TIMEOUT_MINIMUM ; } return duration ; }
|
org . junit . Assert . assertEquals ( org . apache . hadoop . util . SERVICE_SHUTDOWN_TIMEOUT , shutdownTimeout , org . apache . hadoop . util . ShutdownHookManager . getShutdownTimeout ( conf ) )
|
testStdCandidates ( ) { java . util . stream . Stream < java . lang . String > candidates = java . util . stream . Stream . of ( "1" , "3" , "5" ) ; java . util . List < org . ranksys . core . util . tuples . Tuple2od < java . lang . String > > result = recommender . getRecommendation ( "0" , candidates ) . getItems ( ) ; java . util . List < org . ranksys . core . util . tuples . Tuple2od < java . lang . String > > expected = java . util . Arrays . asList ( tuple ( "1" , 5.0 ) , tuple ( "3" , 3.0 ) , tuple ( "5" , 1.0 ) ) ; "<AssertPlaceHolder>" ; } tuple ( T1 , double ) { return new org . ranksys . core . util . tuples . Tuple2od ( v1 , v2 ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
testDiscretize ( ) { org . drools . definition . type . FactType age = getKbase ( ) . getFactType ( org . drools . pmml . pmml_4_1 . transformations . DiscretizeFieldsTest . packageName , "Age" ) ; org . drools . definition . type . FactType cat = getKbase ( ) . getFactType ( org . drools . pmml . pmml_4_1 . transformations . DiscretizeFieldsTest . packageName , "AgeCategories" ) ; "<AssertPlaceHolder>" ; getKSession ( ) . getWorkingMemoryEntryPoint ( "in_Age" ) . insert ( ( - 1 ) ) ; getKSession ( ) . fireAllRules ( ) ; checkFirstDataFieldOfTypeStatus ( age , true , true , null , ( - 1 ) ) ; checkFirstDataFieldOfTypeStatus ( cat , true , false , null , "infant" ) ; this . refreshKSession ( ) ; getKSession ( ) . getWorkingMemoryEntryPoint ( "in_Age" ) . insert ( 1 ) ; getKSession ( ) . fireAllRules ( ) ; checkFirstDataFieldOfTypeStatus ( age , true , false , null , 1 ) ; checkFirstDataFieldOfTypeStatus ( cat , true , false , null , "infant" ) ; this . refreshKSession ( ) ; getKSession ( ) . getWorkingMemoryEntryPoint ( "in_Age" ) . insert ( 9 ) ; getKSession ( ) . fireAllRules ( ) ; checkFirstDataFieldOfTypeStatus ( age , true , false , null , 9 ) ; checkFirstDataFieldOfTypeStatus ( cat , true , false , null , "young" ) ; this . refreshKSession ( ) ; getKSession ( ) . getWorkingMemoryEntryPoint ( "in_Age" ) . insert ( 30 ) ; getKSession ( ) . fireAllRules ( ) ; checkFirstDataFieldOfTypeStatus ( age , true , false , null , 30 ) ; checkFirstDataFieldOfTypeStatus ( cat , true , false , null , "mature" ) ; this . refreshKSession ( ) ; getKSession ( ) . getWorkingMemoryEntryPoint ( "in_Age" ) . insert ( 90 ) ; getKSession ( ) . fireAllRules ( ) ; checkFirstDataFieldOfTypeStatus ( age , true , false , null , 90 ) ; checkFirstDataFieldOfTypeStatus ( cat , true , false , null , "ancient" ) ; this . refreshKSession ( ) ; getKSession ( ) . getWorkingMemoryEntryPoint ( "in_Age" ) . insert ( 3000 ) ; getKSession ( ) . fireAllRules ( ) ; checkFirstDataFieldOfTypeStatus ( age , true , false , null , 3000 ) ; checkFirstDataFieldOfTypeStatus ( cat , true , false , null , "ancient" ) ; this . refreshKSession ( ) ; getKSession ( ) . getWorkingMemoryEntryPoint ( "in_Age" ) . insert ( 19 ) ; getKSession ( ) . fireAllRules ( ) ; checkFirstDataFieldOfTypeStatus ( age , true , false , null , 19 ) ; checkFirstDataFieldOfTypeStatus ( cat , true , false , null , "ancient" ) ; } getKSession ( ) { return kSession ; }
|
org . junit . Assert . assertNotNull ( getKSession ( ) . getWorkingMemoryEntryPoint ( "in_Age" ) )
|
multiThreadMultiDatabases ( ) { final com . arangodb . ArangoDB arangoDB = new com . arangodb . ArangoDB . Builder ( ) . build ( ) ; arangoDB . getVersion ( ) ; try { arangoDB . createDatabase ( "db1" ) ; arangoDB . createDatabase ( "db2" ) ; final com . arangodb . ArangoDatabase db1 = arangoDB . db ( "db1" ) ; final com . arangodb . ArangoDatabase db2 = arangoDB . db ( "db2" ) ; final java . util . Collection < java . lang . String > result = new java . util . concurrent . ConcurrentLinkedQueue < java . lang . String > ( ) ; final java . lang . Thread t1 = new java . lang . Thread ( ) { @ com . arangodb . internal . velocystream . Override public void run ( ) { try { db1 . query ( "return<sp>sleep(1)" , null , null , null ) ; result . add ( "1" ) ; } catch ( final com . arangodb . ArangoDBException e ) { } } } ; final java . lang . Thread t2 = new java . lang . Thread ( ) { @ com . arangodb . internal . velocystream . Override public void run ( ) { try { db2 . query ( "return<sp>sleep(1)" , null , null , null ) ; result . add ( "1" ) ; } catch ( final com . arangodb . ArangoDBException e ) { } } } ; t2 . start ( ) ; t1 . start ( ) ; t2 . join ( ) ; t1 . join ( ) ; "<AssertPlaceHolder>" ; } finally { arangoDB . db ( "db1" ) . drop ( ) ; arangoDB . db ( "db2" ) . drop ( ) ; } } query ( java . lang . String , java . util . Map , com . arangodb . model . AqlQueryOptions , java . lang . Class ) { final com . arangodb . velocystream . Request request = queryRequest ( query , bindVars , options ) ; final com . arangodb . internal . net . HostHandle hostHandle = new com . arangodb . internal . net . HostHandle ( ) ; final com . arangodb . entity . CursorEntity result = executor . execute ( request , com . arangodb . entity . CursorEntity . class , hostHandle ) ; return createCursor ( result , type , options , hostHandle ) ; }
|
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . Matchers . is ( 2 ) )
|
shouldDeleteIndexForGivenEntity ( ) { java . lang . Class < com . github . vanroy . springdata . jest . SampleEntity > clazz = com . github . vanroy . springdata . jest . SampleEntity . class ; elasticsearchTemplate . deleteIndex ( clazz ) ; "<AssertPlaceHolder>" ; } indexExists ( java . lang . String ) { return executeWithAcknowledge ( new io . searchbox . indices . IndicesExists . Builder ( indexName ) . build ( ) ) ; }
|
org . junit . Assert . assertThat ( elasticsearchTemplate . indexExists ( clazz ) , is ( false ) )
|
testExecutor ( ) { com . orientechnologies . orient . core . db . OrientDB orientDb = new com . orientechnologies . orient . core . db . OrientDB ( "embedded:" , com . orientechnologies . orient . core . db . OrientDBConfig . defaultConfig ( ) ) ; orientDb . create ( "test" , ODatabaseType . MEMORY ) ; com . orientechnologies . orient . core . db . OrientDBInternal internal = com . orientechnologies . orient . core . db . OrientDBInternal . extract ( orientDb ) ; com . orientechnologies . orient . core . db . Future < java . lang . Boolean > result = internal . execute ( "test" , "admin" , ( session ) -> { if ( ( session . isClosed ( ) ) && ( ( session . getUser ( ) ) == null ) ) { return false ; } return true ; } ) ; "<AssertPlaceHolder>" ; orientDb . close ( ) ; } get ( ) { return item ; }
|
org . junit . Assert . assertTrue ( result . get ( ) )
|
testReadWithGraphIdPredicate ( ) { java . util . List < org . gradoop . common . model . impl . pojo . GraphHead > testGraphs = new java . util . ArrayList ( getSocialGraphHeads ( ) ) . subList ( 1 , 3 ) ; org . gradoop . common . model . impl . id . GradoopIdSet ids = org . gradoop . common . model . impl . id . GradoopIdSet . fromExisting ( testGraphs . stream ( ) . map ( EPGMIdentifiable :: getId ) . collect ( java . util . stream . Collectors . toList ( ) ) ) ; org . gradoop . storage . impl . hbase . io . HBaseDataSource source = new org . gradoop . storage . impl . hbase . io . HBaseDataSource ( org . gradoop . storage . impl . hbase . io . HBaseDataSinkSourceTest . epgmStores [ storeIndex ] , getConfig ( ) ) ; source = source . applyGraphPredicate ( org . gradoop . storage . common . predicate . query . Query . elements ( ) . fromSets ( ids ) . noFilter ( ) ) ; "<AssertPlaceHolder>" ; org . gradoop . flink . model . impl . epgm . GraphCollection graphCollection = source . getGraphCollection ( ) ; java . util . Collection < org . gradoop . common . model . impl . pojo . GraphHead > loadedGraphHeads = graphCollection . getGraphHeads ( ) . collect ( ) ; java . util . Collection < org . gradoop . common . model . impl . pojo . Vertex > loadedVertices = graphCollection . getVertices ( ) . collect ( ) ; java . util . Collection < org . gradoop . common . model . impl . pojo . Edge > loadedEdges = graphCollection . getEdges ( ) . collect ( ) ; validateEPGMElementCollections ( testGraphs , loadedGraphHeads ) ; validateEPGMElementCollections ( getSocialVertices ( ) , loadedVertices ) ; validateEPGMGraphElementCollections ( getSocialVertices ( ) , loadedVertices ) ; validateEPGMElementCollections ( getSocialEdges ( ) , loadedEdges ) ; validateEPGMGraphElementCollections ( getSocialEdges ( ) , loadedEdges ) ; } isFilterPushedDown ( ) { return ( ( ( this . graphHeadQuery ) != null ) || ( ( this . vertexQuery ) != null ) ) || ( ( this . edgeQuery ) != null ) ; }
|
org . junit . Assert . assertTrue ( source . isFilterPushedDown ( ) )
|
testEmptyReaction ( ) { org . openscience . cdk . interfaces . IReaction singleReaction = super . builder . newInstance ( org . openscience . cdk . interfaces . IReaction . class ) ; org . openscience . cdk . renderer . elements . IRenderingElement root = generator . generate ( singleReaction , model ) ; java . util . List < org . openscience . cdk . renderer . elements . IRenderingElement > elements = elementUtil . getAllSimpleElements ( root ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cells . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , elements . size ( ) )
|
testAddProvidedProductWithAbsentProvidedProduct ( ) { org . candlepin . dto . api . v1 . PoolDTO dto = new org . candlepin . dto . api . v1 . PoolDTO ( ) ; org . candlepin . dto . api . v1 . PoolDTO . ProvidedProductDTO product = new org . candlepin . dto . api . v1 . PoolDTO . ProvidedProductDTO ( "test-id-provided-product-1" , "test-name-provided-product-1" ) ; "<AssertPlaceHolder>" ; } addProvidedProduct ( org . candlepin . dto . manifest . v1 . PoolDTO$ProvidedProductDTO ) { if ( isNullOrIncomplete ( providedProduct ) ) { throw new java . lang . IllegalArgumentException ( "providedProduct<sp>is<sp>null<sp>or<sp>incomplete" ) ; } if ( ( this . providedProducts ) == null ) { this . providedProducts = new java . util . HashSet ( ) ; } return this . providedProducts . add ( providedProduct ) ; }
|
org . junit . Assert . assertTrue ( dto . addProvidedProduct ( product ) )
|
testSetFilterName ( ) { java . lang . String filterName = "Module<sp>Filter" ; _filterDefinition . setName ( filterName ) ; "<AssertPlaceHolder>" ; } getName ( ) { return _name ; }
|
org . junit . Assert . assertEquals ( filterName , _filterDefinition . getName ( ) )
|
shouldGetAsObjectUsingStringValue ( ) { this . children . add ( newSelectItem ( 1 ) ) ; this . children . add ( newSelectItem ( 2 ) ) ; this . children . add ( newSelectItem ( 3 ) ) ; java . lang . Object object = this . converter . getAsObject ( this . context , this . component , "2" ) ; "<AssertPlaceHolder>" ; } getAsObject ( javax . faces . context . FacesContext , javax . faces . component . UIComponent , java . lang . String ) { if ( value == null ) { return null ; } return new org . springframework . springfaces . showcase . converter . SpringConvertedObject ( "forClassSpringConverter" , java . lang . Long . valueOf ( value ) ) ; }
|
org . junit . Assert . assertThat ( object , org . hamcrest . Matchers . is ( ( ( java . lang . Object ) ( 2 ) ) ) )
|
testDelete ( ) { io . katharsis . client . mock . models . Task task = new io . katharsis . client . mock . models . Task ( ) ; task . setId ( 1L ) ; task . setName ( "test" ) ; taskRepo . create ( task ) ; taskRepo . delete ( 1L ) ; java . util . List < io . katharsis . client . mock . models . Task > tasks = taskRepo . findAll ( new io . katharsis . legacy . queryParams . QueryParams ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return list . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , tasks . size ( ) )
|
toString_A$ ( ) { com . m3 . scalaflavor4j . RichFunction1 < java . lang . String , java . lang . Integer > count = new com . m3 . scalaflavor4j . RichFunction1 ( new com . m3 . scalaflavor4j . Function1 < java . lang . String , java . lang . Integer > ( ) { public com . m3 . scalaflavor4j . Integer apply ( java . lang . String t ) { return t . length ( ) ; } } ) ; java . lang . String actual = count . toString ( ) ; java . lang . String expected = "<function1>" ; "<AssertPlaceHolder>" ; } toString ( ) { return "<function5>" ; }
|
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
|
shouldExcludePort443 ( ) { final java . lang . String expected = "GET&https%3A%2F%2Fexample.com&oauth_callback%3Dhttp%253A%252F%252Fexample%252Fcallback" + ( "%26oauth_consumer_key%3DAS%2523%2524%255E%252A%2540%2526%26oauth_signature%3DOAuth-Signature" + "%26oauth_timestamp%3D123456" ) ; final java . lang . String baseString = extractor . extract ( requestPort443 ) ; "<AssertPlaceHolder>" ; } extract ( com . github . scribejava . core . model . Response ) { if ( ( response . getCode ( ) ) != 200 ) { throw new com . github . scribejava . core . exceptions . OAuthException ( ( ( "Response<sp>code<sp>is<sp>not<sp>200<sp>but<sp>'" + ( response . getCode ( ) ) ) + '\'' ) ) ; } final java . lang . String body = response . getBody ( ) ; com . github . scribejava . core . utils . Preconditions . checkEmptyString ( body , "Response<sp>body<sp>is<sp>incorrect.<sp>Can't<sp>extract<sp>a<sp>token<sp>from<sp>an<sp>empty<sp>string" ) ; final java . lang . String accessToken = com . github . scribejava . core . extractors . OAuth2AccessTokenExtractor . extractParameter ( body , com . github . scribejava . core . extractors . OAuth2AccessTokenExtractor . ACCESS_TOKEN_REGEX_PATTERN , true ) ; final java . lang . String tokenType = com . github . scribejava . core . extractors . OAuth2AccessTokenExtractor . extractParameter ( body , com . github . scribejava . core . extractors . OAuth2AccessTokenExtractor . TOKEN_TYPE_REGEX_PATTERN , false ) ; final java . lang . String expiresInString = com . github . scribejava . core . extractors . OAuth2AccessTokenExtractor . extractParameter ( body , com . github . scribejava . core . extractors . OAuth2AccessTokenExtractor . EXPIRES_IN_REGEX_PATTERN , false ) ; java . lang . Integer expiresIn ; try { expiresIn = ( expiresInString == null ) ? null : java . lang . Integer . valueOf ( expiresInString ) ; } catch ( java . lang . NumberFormatException nfe ) { expiresIn = null ; } final java . lang . String refreshToken = com . github . scribejava . core . extractors . OAuth2AccessTokenExtractor . extractParameter ( body , com . github . scribejava . core . extractors . OAuth2AccessTokenExtractor . REFRESH_TOKEN_REGEX_PATTERN , false ) ; final java . lang . String scope = com . github . scribejava . core . extractors . OAuth2AccessTokenExtractor . extractParameter ( body , com . github . scribejava . core . extractors . OAuth2AccessTokenExtractor . SCOPE_REGEX_PATTERN , false ) ; return new com . github . scribejava . core . model . OAuth2AccessToken ( accessToken , tokenType , expiresIn , refreshToken , scope , body ) ; }
|
org . junit . Assert . assertEquals ( expected , baseString )
|
testBuildFolderPathRootServicePathEncoding ( ) { System . out . println ( ( ( ( getTestTraceHead ( "[NGSIHDFSSinkTest.buildFolderPath]" ) ) + "[NGSIHDFSSinkTest.buildFolderPath]" 6 ) + "the<sp>encoding<sp>of<sp><service>/<entity>" ) ) ; java . lang . String backendImpl = null ; java . lang . String backendMaxConns = null ; java . lang . String backendMaxConnsPerRoute = null ; java . lang . String batchSize = null ; java . lang . String batchTime = null ; java . lang . String batchTTL = null ; java . lang . String csvSeparator = null ; java . lang . String dataModel = null ; java . lang . String enableEncoding = "true" ; java . lang . String enableGrouping = null ; java . lang . String enableLowercase = null ; java . lang . String fileFormat = null ; java . lang . String host = null ; java . lang . String password = "mypassword" ; java . lang . String port = null ; java . lang . String username = "[NGSIHDFSSinkTest.buildFolderPath]" 3 ; java . lang . String hive = "[NGSIHDFSSinkTest.buildFolderPath]" 7 ; java . lang . String krb5 = "[NGSIHDFSSinkTest.buildFolderPath]" 7 ; java . lang . String token = "[NGSIHDFSSinkTest.buildFolderPath]" 4 ; java . lang . String serviceAsNamespace = null ; com . telefonica . iot . cygnus . sinks . NGSIHDFSSink sink = new com . telefonica . iot . cygnus . sinks . NGSIHDFSSink ( ) ; sink . configure ( createContext ( backendImpl , backendMaxConns , backendMaxConnsPerRoute , batchSize , batchTime , batchTTL , csvSeparator , dataModel , enableEncoding , enableGrouping , enableLowercase , fileFormat , host , password , port , username , hive , krb5 , token , serviceAsNamespace ) ) ; java . lang . String service = "someService" ; java . lang . String servicePath = "/" ; java . lang . String entity = "someId=someType" ; try { java . lang . String builtTableName = sink . buildFolderPath ( service , servicePath , entity ) ; java . lang . String expecetedTableName = "[NGSIHDFSSinkTest.buildFolderPath]" 0 ; try { "<AssertPlaceHolder>" ; System . out . println ( ( ( ( ( ( getTestTraceHead ( "[NGSIHDFSSinkTest.buildFolderPath]" ) ) + "-<sp>OK<sp>-<sp>'" ) + builtTableName ) + "'<sp>is<sp>equals<sp>to<sp>the<sp>encoding<sp>of<sp>" ) + "[NGSIHDFSSinkTest.buildFolderPath]" 5 ) ) ; } catch ( java . lang . AssertionError e ) { System . out . println ( ( ( ( ( ( getTestTraceHead ( "[NGSIHDFSSinkTest.buildFolderPath]" ) ) + "-<sp>FAIL<sp>-<sp>'" ) + builtTableName ) + "[NGSIHDFSSinkTest.buildFolderPath]" 1 ) + "[NGSIHDFSSinkTest.buildFolderPath]" 5 ) ) ; throw e ; } } catch ( java . lang . Exception e ) { System . out . println ( ( ( getTestTraceHead ( "[NGSIHDFSSinkTest.buildFolderPath]" ) ) + "[NGSIHDFSSinkTest.buildFolderPath]" 2 ) ) ; throw e ; } createContext ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { org . apache . flume . Context context = new org . apache . flume . Context ( ) ; context . put ( "hdfs_port" 8 , backendImpl ) ; context . put ( "backend.max_conns" , backendMaxConns ) ; context . put ( "hdfs_port" 7 , backendMaxConnsPerRoute ) ; context . put ( "batchSize" , batchSize ) ; context . put ( "batchTime" , batchTime ) ; context . put ( "batchTTL" , batchTTL ) ; context . put ( "hdfs_port" 4 , csvSeparator ) ; context . put ( "hdfs_port" 5 , dataModel ) ; context . put ( "hdfs_port" 0 , enableEncoding ) ; context . put ( "hdfs_port" 2 , enableGrouping ) ; context . put ( "hdfs_port" 2 , enableLowercase ) ; context . put ( "hdfs_port" 1 , fileFormat ) ; context . put ( "hdfs_host" , host ) ; context . put ( "hdfs_password" , password ) ; context . put ( "hdfs_port" , port ) ; context . put ( "hdfs_username" , username ) ; context . put ( "hive" , hive ) ; context . put ( "krb5_auth" , krb5 ) ; context . put ( "hdfs_port" 3 , token ) ; context . put ( "hdfs_port" 6 , serviceAsNamespace ) ; return context ; }
|
org . junit . Assert . assertEquals ( expecetedTableName , builtTableName )
|
testProjectExtractYear ( ) { int delta = compareProject ( TpchTable . CUSTOMER , 6 , "extractYear(castDATE(c_acctbal))" ) ; "<AssertPlaceHolder>" ; } compareProject ( io . airlift . tpch . GenerationDefinition . TpchTable , double , java . lang . String ) { com . dremio . exec . physical . config . Project project = new com . dremio . exec . physical . config . Project ( java . util . Arrays . asList ( n ( expr , "res" ) ) , null ) ; return runBoth ( expr , table , scale , project , com . dremio . sabot . op . project . ProjectOperator . class ) ; }
|
org . junit . Assert . assertTrue ( ( delta > 0 ) )
|
testCleanCopy_accessesToCopyDontIfluenceOriginal ( ) { java . util . Map < java . lang . Integer , java . lang . Integer > sourceMap = newMap ( newList ( 1 , 2 ) , newList ( 5 , 6 ) ) ; localMap = new cern . entwined . TransactionalMap < java . lang . Integer , java . lang . Integer > ( sourceMap ) ; cern . entwined . TransactionalMap < java . lang . Integer , java . lang . Integer > copyMap = localMap . cleanCopy ( ) ; copyMap . containsKey ( 1 ) ; copyMap . containsKey ( 2 ) ; copyMap . containsKey ( 10 ) ; java . util . Map < java . lang . Integer , java . lang . Integer > globalMap = newMap ( newList ( 1 , 2 ) , newList ( 7 , 8 ) ) ; globalState = new cern . entwined . TransactionalMap < java . lang . Integer , java . lang . Integer > ( globalMap ) ; "<AssertPlaceHolder>" ; } commit ( cern . entwined . TransactionalQueue ) { cern . entwined . Utils . checkNull ( "Global<sp>state" , globalState ) ; if ( ( 0 != ( globalState . peekCount ) ) || ( ! ( globalState . tail . isEmpty ( ) ) ) ) { throw new java . lang . IllegalArgumentException ( "Global<sp>state<sp>map<sp>must<sp>be<sp>commited<sp>before<sp>calling<sp>this<sp>method" ) ; } if ( ( ( this . peekCount ) == 0 ) && ( tail . isEmpty ( ) ) ) { return globalState ; } int sourceSize = this . sourceQueue . size ( ) ; if ( ( this . peekCount ) != 0 ) { if ( ( globalState . globalPollCount ) != ( this . globalPollCount ) ) { throw new cern . entwined . exception . ConflictException ( "Queue's<sp>head<sp>was<sp>updated" ) ; } boolean pastSource = ( this . peekCount ) > sourceSize ; if ( pastSource && ( ( globalState . sourceQueue ) != ( this . sourceQueue ) ) ) { throw new cern . entwined . exception . ConflictException ( "Reading<sp>past<sp>source<sp>queue<sp>with<sp>tail<sp>concurrently<sp>updated" ) ; } } if ( ( ( this . pollCount ) == 0 ) && ( tail . isEmpty ( ) ) ) { return globalState ; } else { int globalSize = globalState . sourceQueue . size ( ) ; java . util . LinkedList < E > resultingList = new java . util . LinkedList < E > ( globalState . sourceQueue . subList ( java . lang . Math . min ( this . pollCount , globalSize ) , globalSize ) ) ; resultingList . addAll ( this . tail ) ; @ cern . entwined . SuppressWarnings ( "rawtypes" ) cern . entwined . TransactionalQueue < E > result = new cern . entwined . TransactionalQueue < E > ( resultingList , ( ( globalState . globalPollCount ) + ( this . pollCount ) ) , ( ( java . util . ListIterator ) ( EMPTY_ITERATOR ) ) , java . util . Collections . EMPTY_LIST ) ; return result ; } }
|
org . junit . Assert . assertSame ( globalState , localMap . commit ( globalState ) )
|
testSubAck_SendingClientNotFound ( ) { connectClientAndBroker ( ) ; net . xenqtt . message . SubscribeMessage message = new net . xenqtt . message . SubscribeMessage ( 123 , new java . lang . String [ 0 ] , new net . xenqtt . message . QoS [ 0 ] ) ; session . subscribe ( channelToClient1 , message ) ; verify ( channelToBroker ) . send ( same ( message ) ) ; "<AssertPlaceHolder>" ; session . channelClosed ( channelToClient1 , null ) ; reset ( channelToClient1 ) ; net . xenqtt . message . SubAckMessage ack = new net . xenqtt . message . SubAckMessage ( 1 , new net . xenqtt . message . QoS [ 0 ] ) ; session . subAck ( channelToBroker , ack ) ; verifyZeroInteractions ( channelToClient1 ) ; } getMessageId ( ) { return ( buffer . getShort ( 2 ) ) & 65535 ; }
|
org . junit . Assert . assertEquals ( 1 , message . getMessageId ( ) )
|
encodeBase64MultipleOf4Minus1CharactersSuccess ( ) { java . lang . String textToEncode = "This<sp>is<sp>a<sp>valid<sp>test<sp>(aBcDeFgHiJKLmnoPqRstuVWXyz)-012345678" ; java . lang . String expectedBase64Result = "VGhpcyBpcyBhIHZhbGlkIHRlc3QgKGFCY0RlRmdIaUpLTG1ub1BxUnN0dVZXWHl6KS0wMTIzNDU2Nzg=" ; byte [ ] result = com . microsoft . azure . sdk . iot . deps . util . Base64 . encodeBase64Local ( textToEncode . getBytes ( ) ) ; "<AssertPlaceHolder>" ; } getBytes ( ) { return this . body ; }
|
org . junit . Assert . assertEquals ( expectedBase64Result , new java . lang . String ( result ) )
|
testCreateMessageWithText ( ) { java . lang . String expectedPayload = "testing<sp>message<sp>with<sp>payload" ; com . amazon . sqs . javamessaging . message . SQSTextMessage sqsTextMessage = new com . amazon . sqs . javamessaging . message . SQSTextMessage ( expectedPayload ) ; java . lang . String actualPayload = sqsTextMessage . getText ( ) ; "<AssertPlaceHolder>" ; } getText ( ) { return text ; }
|
org . junit . Assert . assertEquals ( expectedPayload , actualPayload )
|
testDistinct ( ) { final org . apache . calcite . tools . PigRelBuilder builder = org . apache . calcite . tools . PigRelBuilder . create ( org . apache . calcite . test . PigRelBuilderTest . config ( ) . build ( ) ) ; final org . apache . calcite . rel . RelNode root = builder . scan ( "EMP" ) . project ( builder . field ( "DEPTNO" ) ) . distinct ( ) . build ( ) ; final java . lang . String plan = "LogicalAggregate(group=[{0}])\n" + ( "<sp>LogicalProject(DEPTNO=[$7])\n" + "<sp>LogicalTableScan(table=[[scott,<sp>EMP]])\n" ) ; "<AssertPlaceHolder>" ; } str ( java . lang . Object [ ] ) { return objects == null ? null : java . util . Arrays . stream ( objects ) . map ( Object :: toString ) . collect ( java . util . stream . Collectors . joining ( "\n" ) ) ; }
|
org . junit . Assert . assertThat ( str ( root ) , org . hamcrest . CoreMatchers . is ( plan ) )
|
justOnce ( ) { alluxio . master . journal . raft . OnceSupplier < java . lang . Integer > s = new alluxio . master . journal . raft . OnceSupplier ( 10 ) ; "<AssertPlaceHolder>" ; mThrown . expect ( alluxio . master . journal . raft . IllegalStateException . class ) ; s . get ( ) ; } get ( ) { if ( mInit ) { throw new java . lang . IllegalStateException ( "OnceSupplier<sp>called<sp>multiple<sp>times" ) ; } mInit = true ; return mValue ; }
|
org . junit . Assert . assertEquals ( 10 , ( ( long ) ( s . get ( ) ) ) )
|
shouldAcceptDeserializesAnnotation ( ) { "<AssertPlaceHolder>" ; } stereotype ( ) { return br . com . caelum . vraptor . deserialization . Deserializes . class ; }
|
org . junit . Assert . assertEquals ( handler . stereotype ( ) , br . com . caelum . vraptor . deserialization . Deserializes . class )
|
testTrueGeenSoortVerbintenisVerzoek ( ) { final java . util . Set < nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Relatie > relatieSet = java . util . Collections . singleton ( relatie ) ; org . mockito . Mockito . when ( persoon . getRelaties ( ) ) . thenReturn ( relatieSet ) ; org . mockito . Mockito . when ( relatie . getSoortRelatie ( ) ) . thenReturn ( SoortRelatie . HUWELIJK ) ; final nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht verzoek = new nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ( ) ; final nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType relatieType = new nl . bzk . migratiebrp . bericht . model . sync . generated . RelatieType ( ) ; verzoek . setRelatie ( relatieType ) ; "<AssertPlaceHolder>" ; } controleer ( nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Persoon , nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ) { final nl . bzk . migratiebrp . bericht . model . sync . generated . PersoonType persoon = verzoek . getPersoon ( ) ; if ( persoon == null ) { return false ; } return rootPersoon . getPersoonOverlijdenHistorieSet ( ) . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( subject . controleer ( persoon , verzoek ) )
|
testFetchByPrimaryKeyExisting ( ) { com . liferay . blade . samples . servicebuilder . model . Bar newBar = addBar ( ) ; com . liferay . blade . samples . servicebuilder . model . Bar existingBar = _persistence . fetchByPrimaryKey ( newBar . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } addBar ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . blade . samples . servicebuilder . model . Bar bar = _persistence . create ( pk ) ; bar . setUuid ( com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ) ; bar . setGroupId ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ; bar . setCompanyId ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ; bar . setUserId ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ; bar . setUserName ( com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ) ; bar . setCreateDate ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextDate ( ) ) ; bar . setModifiedDate ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextDate ( ) ) ; bar . setField1 ( com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ) ; bar . setField2 ( com . liferay . portal . kernel . test . util . RandomTestUtil . randomBoolean ( ) ) ; bar . setField3 ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextInt ( ) ) ; bar . setField4 ( com . liferay . portal . kernel . test . util . RandomTestUtil . nextDate ( ) ) ; bar . setField5 ( com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ) ; _bars . add ( _persistence . update ( bar ) ) ; return bar ; }
|
org . junit . Assert . assertEquals ( existingBar , newBar )
|
testDocumentReferenceResources ( ) { ca . uhn . fhir . rest . client . api . IGenericClient client = ourClient ; int initialSize = client . search ( ) . forResource ( ca . uhn . fhir . jpa . provider . r4 . DocumentReference . class ) . returnBundle ( ca . uhn . fhir . jpa . provider . r4 . Bundle . class ) . execute ( ) . getEntry ( ) . size ( ) ; java . lang . String resBody = org . apache . commons . io . IOUtils . toString ( ca . uhn . fhir . jpa . provider . r4 . ResourceProviderR4Test . class . getResource ( "/r4/documentreference.json" ) , StandardCharsets . UTF_8 ) ; client . create ( ) . resource ( resBody ) . execute ( ) ; int newSize = client . search ( ) . forResource ( ca . uhn . fhir . jpa . provider . r4 . DocumentReference . class ) . returnBundle ( ca . uhn . fhir . jpa . provider . r4 . Bundle . class ) . execute ( ) . getEntry ( ) . size ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return nativeArray . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , ( newSize - initialSize ) )
|
testConfig ( ) { com . am . jlfu . fileuploader . json . InitializationConfiguration config = uploadProcessor . getConfig ( null ) ; "<AssertPlaceHolder>" ; } getInByte ( ) { return inByte ; }
|
org . junit . Assert . assertNotNull ( config . getInByte ( ) )
|
testIntronic ( ) { java . lang . String [ ] legacyVariantStrings = new java . lang . String [ ] { "XXX:IVS3+3ins" , "XXX:IVS3-3insT" , "XXX:IVS3-3insTCT" , "XXX:IVS3-3ins3" } ; for ( java . lang . String legacyVariantString : legacyVariantStrings ) { de . charite . compbio . jannovar . hgvs . legacy . LegacyVariant variant = driver . parseLegacyChangeString ( legacyVariantString ) ; "<AssertPlaceHolder>" ; } } toLegacyString ( ) { return com . google . common . base . Joiner . on ( "" ) . join ( location . toLegacyString ( ) , "del" , deletedSeq . toHGVSString ( ) ) ; }
|
org . junit . Assert . assertEquals ( legacyVariantString , variant . toLegacyString ( ) )
|
testConvertToAvroDoubleWithE ( ) { java . lang . String expected = "1.23456789012345677E18" ; org . talend . daikon . avro . converter . AvroConverter < java . lang . Object , java . lang . String > converter = new org . talend . codegen . converter . BigDecimalStringDoubleConverter ( ) ; java . lang . String actual = converter . convertToAvro ( 1.23456789012345677E18 ) ; "<AssertPlaceHolder>" ; } convertToAvro ( java . math . BigDecimal ) { return value . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testGetListOfTrafficManagers ( ) { java . util . List < org . rackspace . stingray . client . list . Child > children = client . getTrafficManagers ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
|
org . junit . Assert . assertTrue ( ( ( children . size ( ) ) > 0 ) )
|
testAsInt ( ) { final org . jboss . dmr . BytesModelValue value = new org . jboss . dmr . BytesModelValue ( new byte [ ] { ( ( byte ) ( 0 ) ) } ) ; "<AssertPlaceHolder>" ; } asInt ( ) { return value ; }
|
org . junit . Assert . assertEquals ( 0 , value . asInt ( ) )
|
extensionTakesPrecedenceOverAutoResolved ( ) { org . mule . runtime . core . privileged . event . PrivilegedEvent event = this . < org . mule . runtime . core . privileged . event . PrivilegedEvent . Builder > getEventBuilder ( ) . message ( org . mule . runtime . api . message . Message . of ( "" ) ) . addVariable ( "foo" , "other" ) . build ( ) ; ( ( org . mule . runtime . core . internal . context . MuleContextWithRegistry ) ( muleContext ) ) . getRegistry ( ) . registerObject ( "key" , ( ( org . mule . runtime . core . internal . el . mvel . ExpressionLanguageExtension ) ( ( context ) -> context . addVariable ( "foo" , "bar" ) ) ) ) ; mvel . initialise ( ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . String , org . mule . runtime . api . metadata . DataType ) { try { return mvel . evaluate ( org . mule . runtime . core . internal . el . mvel . MVELExpressionLanguage . removeExpressionMarker ( expression ) , expectedOutputType , event , componentLocation , context , false ) ; } catch ( java . lang . Exception e ) { throw new org . mule . runtime . core . api . expression . ExpressionRuntimeException ( expressionEvaluationFailed ( e . getMessage ( ) , expression ) , e ) ; } }
|
org . junit . Assert . assertEquals ( "bar" , evaluate ( "foo" , event ) )
|
getGrantedTenantsIds ( ) { final java . util . Set < java . lang . String > tenantsAuth = new java . util . HashSet < java . lang . String > ( java . util . Arrays . asList ( "mockTenant-1" , "mockTenant-2" ) ) ; when ( repository . findById ( providerId ) ) . thenReturn ( java . util . Optional . of ( provider ) ) ; when ( provider . getTenantsAuth ( ) ) . thenReturn ( tenantsAuth ) ; final java . util . Set < java . lang . String > actualTenantsAuth = providerService . getGrantedTenantsIds ( providerId ) ; verify ( repository ) . findById ( providerId ) ; "<AssertPlaceHolder>" ; } getGrantedTenantsIds ( java . lang . String ) { return findAndThrowErrorIfNotExist ( new org . sentilo . web . catalog . domain . Provider ( providerId ) ) . getTenantsAuth ( ) ; }
|
org . junit . Assert . assertEquals ( actualTenantsAuth , tenantsAuth )
|
testNullAuthsFromConf ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( false ) ; org . apache . accumulo . core . security . Authorizations auths = org . apache . hadoop . hive . accumulo . serde . AccumuloSerDeParameters . getAuthorizationsFromConf ( conf ) ; "<AssertPlaceHolder>" ; } getAuthorizationsFromConf ( org . apache . hadoop . conf . Configuration ) { com . google . common . base . Preconditions . checkNotNull ( conf ) ; java . lang . String authorizationStr = conf . get ( org . apache . hadoop . hive . accumulo . serde . AccumuloSerDeParameters . AUTHORIZATIONS_KEY , null ) ; return org . apache . hadoop . hive . accumulo . serde . AccumuloSerDeParameters . getAuthorizationsFromValue ( authorizationStr ) ; }
|
org . junit . Assert . assertNull ( auths )
|
testFindStudentById ( ) { com . mybatis3 . domain . Student student = com . mybatis3 . services . StudentServiceTest . studentService . findStudentById ( 1 ) ; "<AssertPlaceHolder>" ; } findStudentById ( int ) { com . mybatis3 . domain . Student student = null ; java . sql . Connection conn = null ; try { conn = getDatabaseConnection ( ) ; java . lang . String sql = "select<sp>*<sp>from<sp>students<sp>where<sp>stud_id=?" ; java . sql . PreparedStatement pstmt = conn . prepareStatement ( sql ) ; pstmt . setInt ( 1 , studId ) ; java . sql . ResultSet rs = pstmt . executeQuery ( ) ; if ( rs . next ( ) ) { student = new com . mybatis3 . domain . Student ( ) ; student . setStudId ( rs . getInt ( "stud_id" ) ) ; student . setName ( rs . getString ( "name" ) ) ; student . setEmail ( rs . getString ( "email" ) ) ; student . setDob ( rs . getDate ( "dob" ) ) ; } } catch ( java . sql . SQLException e ) { throw new java . lang . RuntimeException ( e ) ; } finally { if ( conn != null ) { try { conn . close ( ) ; } catch ( java . sql . SQLException e ) { } } } return student ; }
|
org . junit . Assert . assertNotNull ( student )
|
test ( ) { java . net . URL url = org . apache . camel . util . ObjectHelper . loadResourceAsURL ( "org/apache/camel/itest/CamelJacksonFallbackConverterTest.xml" , org . apache . camel . itest . CamelJacksonFallbackConverterTest . class . getClassLoader ( ) ) ; installBlueprintAsBundle ( "CamelJacksonFallbackConverterTest" , url , true ) ; org . apache . camel . CamelContext camel = getOsgiService ( bundleContext , org . apache . camel . CamelContext . class ) ; camel . getGlobalOptions ( ) . put ( JacksonConstants . ENABLE_TYPE_CONVERTER , "true" ) ; camel . getGlobalOptions ( ) . put ( JacksonConstants . TYPE_CONVERTER_TO_POJO , "true" ) ; final org . apache . camel . itest . Pojo pojo = new org . apache . camel . itest . Pojo ( 1337 , "Constantine" ) ; final org . apache . camel . support . DefaultExchange exchange = new org . apache . camel . support . DefaultExchange ( camel ) ; final java . lang . String string = camel . getTypeConverter ( ) . mandatoryConvertTo ( java . lang . String . class , exchange , pojo ) ; org . apache . camel . itest . LOG . info ( "POJO<sp>-><sp>String:<sp>{}" , string ) ; final org . apache . camel . itest . Pojo copy = camel . getTypeConverter ( ) . mandatoryConvertTo ( org . apache . camel . itest . Pojo . class , exchange , string ) ; org . apache . camel . itest . LOG . info ( "String<sp>-><sp>POJO:<sp>{}" , copy ) ; "<AssertPlaceHolder>" ; } mandatoryConvertTo ( java . lang . Class , org . apache . camel . Exchange , java . lang . Object ) { T t = convertTo ( type , exchange , value ) ; if ( t == null ) { throw new org . apache . camel . NoTypeConversionAvailableException ( value , type ) ; } else { return t ; } }
|
org . junit . Assert . assertEquals ( pojo , copy )
|
testGetSaveAndRenameServiceCaller ( ) { final org . jboss . errai . common . client . api . Caller < org . kie . workbench . common . stunner . project . service . ProjectDiagramResourceService > expectedCaller = this . projectDiagramResourceServiceCaller ; final org . jboss . errai . common . client . api . Caller < ? extends org . uberfire . ext . editor . commons . service . support . SupportsSaveAndRename < org . kie . workbench . common . stunner . project . editor . ProjectDiagramResource , org . guvnor . common . services . shared . metadata . model . Metadata > > actualCaller = presenter . getSaveAndRenameServiceCaller ( ) ; "<AssertPlaceHolder>" ; } getSaveAndRenameServiceCaller ( ) { return projectDiagramResourceServiceCaller ; }
|
org . junit . Assert . assertEquals ( expectedCaller , actualCaller )
|
timeStampFormaterTest ( ) { java . lang . String formatPatten = org . diirt . util . config . SettingsProvider . getSetting ( "timeStampFormattingPattern" ) ; if ( formatPatten == null ) { formatPatten = "yyyy/MM/dd<sp>HH:mm:ss.SSS" ; } java . time . ZonedDateTime time = java . time . ZonedDateTime . ofInstant ( java . time . Instant . now ( ) , java . time . ZoneId . systemDefault ( ) ) ; java . lang . String expectedValue = java . time . format . DateTimeFormatter . ofPattern ( formatPatten ) . format ( time ) ; java . lang . String actualValue = TimeStampFormatter . TIMESTAMP_FORMAT . format ( time ) ; "<AssertPlaceHolder>" ; } format ( java . time . Duration ) { double seconds = org . diirt . util . time . TimeDuration . toSecondsDouble ( d ) ; long h = java . lang . Math . round ( ( seconds / 3600 ) ) ; long m = java . lang . Math . round ( ( ( seconds % 3600 ) / 60 ) ) ; long s = java . lang . Math . round ( ( seconds % 60 ) ) ; return java . lang . String . format ( "%d:%02d:%02d" , h , m , s ) ; }
|
org . junit . Assert . assertThat ( actualValue , org . hamcrest . CoreMatchers . equalTo ( expectedValue ) )
|
getNextTupleTest7 ( ) { java . util . List < edu . uci . ics . texera . api . tuple . Tuple > data = edu . uci . ics . texera . dataflow . nlp . entity . NlpEntityTestConstants . getTest7Tuple ( ) ; edu . uci . ics . texera . storage . DataWriter oneSentenceDataWriter = edu . uci . ics . texera . storage . RelationManager . getInstance ( ) . getTableDataWriter ( edu . uci . ics . texera . dataflow . nlp . entity . NlpEntityTest . ONE_SENTENCE_TABLE ) ; oneSentenceDataWriter . open ( ) ; for ( edu . uci . ics . texera . api . tuple . Tuple tuple : data ) { oneSentenceDataWriter . insertTuple ( tuple ) ; } oneSentenceDataWriter . close ( ) ; java . lang . String attribute1 = NlpEntityTestConstants . SENTENCE_ONE ; java . util . List < java . lang . String > attributeNames = new java . util . ArrayList ( ) ; attributeNames . add ( attribute1 ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > returnedResults = getQueryResults ( edu . uci . ics . texera . dataflow . nlp . entity . NlpEntityTest . ONE_SENTENCE_TABLE , attributeNames , NlpEntityType . ADJECTIVE ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > expectedResults = edu . uci . ics . texera . dataflow . nlp . entity . NlpEntityTestConstants . getTest7ResultTuples ( ) ; boolean contains = edu . uci . ics . texera . api . utils . TestUtils . equals ( expectedResults , returnedResults ) ; "<AssertPlaceHolder>" ; } equals ( java . util . List , java . util . List ) { expectedResults = Tuple . Builder . removeIfExists ( expectedResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; exactResults = Tuple . Builder . removeIfExists ( exactResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; if ( ( expectedResults . size ( ) ) != ( exactResults . size ( ) ) ) return false ; return ( expectedResults . containsAll ( exactResults ) ) && ( exactResults . containsAll ( expectedResults ) ) ; }
|
org . junit . Assert . assertTrue ( contains )
|
testAttemptToSetTableStatusToFailedConflict ( ) { java . lang . String tableId = "syn123" ; java . lang . String resetToken = tableStatusDAO . resetTableStatusToProcessing ( "syn123" ) ; org . sagebionetworks . repo . model . table . TableStatus status = tableStatusDAO . getTableStatus ( tableId ) ; "<AssertPlaceHolder>" ; tableStatusDAO . attemptToSetTableStatusToFailed ( tableId , ( resetToken + "invalidated" ) , "error" , "error<sp>details" ) ; } getTableStatus ( java . lang . String ) { if ( tableIdString == null ) throw new java . lang . IllegalArgumentException ( "TableId<sp>cannot<sp>be<sp>null" ) ; java . lang . Long tableId = org . sagebionetworks . repo . model . jdo . KeyFactory . stringToKey ( tableIdString ) ; org . springframework . jdbc . core . namedparam . SqlParameterSource param = new org . springframework . jdbc . core . namedparam . MapSqlParameterSource ( "tableId" , tableId ) ; org . sagebionetworks . repo . model . dbo . persistence . table . DBOTableStatus dbo = basicDao . getObjectByPrimaryKey ( org . sagebionetworks . repo . model . dbo . persistence . table . DBOTableStatus . class , param ) ; return org . sagebionetworks . repo . model . dbo . persistence . table . TableStatusUtils . createDTOFromDBO ( dbo ) ; }
|
org . junit . Assert . assertNotNull ( status )
|
getNaamgebruikTestOK ( ) { final nl . bzk . migratiebrp . conversie . model . brp . attribuut . BrpNaamgebruikCode wggCode = nl . bzk . migratiebrp . conversie . model . brp . attribuut . BrpNaamgebruikCode . E ; final nl . bzk . algemeenbrp . dal . domein . brp . enums . Naamgebruik expectedWgg = nl . bzk . algemeenbrp . dal . domein . brp . enums . Naamgebruik . EIGEN ; final java . lang . String expected = java . lang . String . format ( nl . bzk . migratiebrp . ggo . viewer . service . impl . Lo3StamtabelServiceTest . STRING_FORMAT , expectedWgg . getCode ( ) , expectedWgg . getNaam ( ) ) ; final java . lang . String resultWgg = lo3StamtabelService . getNaamgebruik ( wggCode . getWaarde ( ) ) ; "<AssertPlaceHolder>" ; } getWaarde ( ) { return waarde ; }
|
org . junit . Assert . assertEquals ( expected , resultWgg )
|
testCommitOverhead ( ) { java . io . File f = new java . io . File ( org . zoodb . test . testutil . TestTools . getDbFileName ( ) ) ; long len1 = f . length ( ) ; javax . jdo . PersistenceManager pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; pm . currentTransaction ( ) . begin ( ) ; pm . currentTransaction ( ) . commit ( ) ; org . zoodb . test . testutil . TestTools . closePM ( ) ; "<AssertPlaceHolder>" ; } length ( ) { return _delegate . length ( ) ; }
|
org . junit . Assert . assertEquals ( len1 , f . length ( ) )
|
testDateTimeToString ( ) { net . fortuna . ical4j . model . TimeZone tz = org . unitedinternet . cosmo . calendar . ICalDateTest . TIMEZONE_REGISTRY . getTimeZone ( "America/Los_Angeles" ) ; net . fortuna . ical4j . model . DateTime dt = new net . fortuna . ical4j . model . DateTime ( "20021010T120000" , tz ) ; java . lang . String test = ";VALUE=DATE-TIME;TZID=America/Los_Angeles:20021010T120000" ; java . lang . String result = new org . unitedinternet . cosmo . calendar . ICalDate ( dt ) . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return org . apache . commons . lang . builder . ToStringBuilder . reflectionToString ( this ) ; }
|
org . junit . Assert . assertEquals ( test , result )
|
testGenerateSearchDocumentIfNecessary_ChangeTypeCreateDoesNotExistInRepository ( ) { when ( mockSearchDocumentDriver . doesNodeExist ( "one" , "etag1" ) ) . thenReturn ( false ) ; when ( mockSearchDao . doesDocumentExist ( "one" , "etag1" ) ) . thenReturn ( false ) ; org . sagebionetworks . repo . model . search . Document generatedDoc = translator . generateSearchDocumentIfNecessary ( message ) ; "<AssertPlaceHolder>" ; verify ( mockSearchDocumentDriver ) . doesNodeExist ( "one" , "etag1" ) ; } generateSearchDocumentIfNecessary ( org . sagebionetworks . repo . model . message . ChangeMessage ) { if ( ( org . sagebionetworks . repo . model . ObjectType . ENTITY ) == ( change . getObjectType ( ) ) ) { if ( ( ( org . sagebionetworks . repo . model . message . ChangeType . CREATE ) == ( change . getChangeType ( ) ) ) || ( ( org . sagebionetworks . repo . model . message . ChangeType . UPDATE ) == ( change . getChangeType ( ) ) ) ) { return createUpdateDocument ( change . getObjectId ( ) , change . getObjectEtag ( ) ) ; } else if ( ( org . sagebionetworks . repo . model . message . ChangeType . DELETE ) == ( change . getChangeType ( ) ) ) { return createDeleteDocument ( change . getObjectId ( ) ) ; } else { throw new java . lang . IllegalArgumentException ( ( "Unknown<sp>change<sp>type:<sp>" + ( change . getChangeType ( ) ) ) ) ; } } if ( ( org . sagebionetworks . repo . model . ObjectType . WIKI ) == ( change . getObjectType ( ) ) ) { try { org . sagebionetworks . repo . model . dao . WikiPageKey key = wikiPageDao . lookupWikiKey ( change . getObjectId ( ) ) ; if ( ( org . sagebionetworks . repo . model . ObjectType . ENTITY ) == ( key . getOwnerObjectType ( ) ) ) { return createUpdateDocument ( key . getOwnerObjectId ( ) , null ) ; } } catch ( org . sagebionetworks . repo . web . NotFoundException e ) { org . sagebionetworks . repo . manager . search . ChangeMessageToSearchDocumentTranslator . log . debug ( ( ( ( "Wiki<sp>not<sp>found<sp>for<sp>id:<sp>" + ( change . getObjectId ( ) ) ) + "<sp>Message:" ) + ( e . getMessage ( ) ) ) ) ; } } return null ; }
|
org . junit . Assert . assertNull ( generatedDoc )
|
constructorWithRelativeButComplexPath ( ) { java . lang . String path = cruise . umple . util . SampleFileWriter . rationalize ( "test/data/Election" ) ; cruise . umple . compiler . UmpleFile file = new cruise . umple . compiler . UmpleFile ( path , "ElectionSystem.ump" ) ; "<AssertPlaceHolder>" ; } getFileName ( ) { return m_sFile ; }
|
org . junit . Assert . assertEquals ( "ElectionSystem.ump" , file . getFileName ( ) )
|
testGetRAPremiumsByRaHeaderNo_NegativeHeaderNo ( ) { java . lang . Integer raHeaderNo = - 1 ; org . oscarehr . common . model . BillingONPremium billONPrem1 = new org . oscarehr . common . model . BillingONPremium ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( billONPrem1 ) ; billONPrem1 . setRAHeaderNo ( 2 ) ; org . oscarehr . common . model . BillingONPremium billONPrem2 = new org . oscarehr . common . model . BillingONPremium ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( billONPrem2 ) ; billONPrem2 . setRAHeaderNo ( ( - 1 ) ) ; org . oscarehr . common . model . BillingONPremium billONPrem3 = new org . oscarehr . common . model . BillingONPremium ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( billONPrem3 ) ; billONPrem3 . setRAHeaderNo ( 3 ) ; org . oscarehr . common . model . BillingONPremium billONPrem4 = new org . oscarehr . common . model . BillingONPremium ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( billONPrem4 ) ; billONPrem4 . setRAHeaderNo ( ( - 1 ) ) ; dao . persist ( billONPrem1 ) ; dao . persist ( billONPrem2 ) ; dao . persist ( billONPrem3 ) ; dao . persist ( billONPrem4 ) ; java . util . List < org . oscarehr . common . model . BillingONPremium > expectedList = new java . util . ArrayList < org . oscarehr . common . model . BillingONPremium > ( java . util . Arrays . asList ( billONPrem2 , billONPrem4 ) ) ; java . util . List < org . oscarehr . common . model . BillingONPremium > resultList = dao . getRAPremiumsByRaHeaderNo ( raHeaderNo ) ; if ( ( resultList . size ( ) ) != ( expectedList . size ( ) ) ) { org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } boolean containsAllItems = resultList . containsAll ( expectedList ) ; "<AssertPlaceHolder>" ; } size ( ) { return references . size ( ) ; }
|
org . junit . Assert . assertTrue ( containsAllItems )
|
fakeTestMethod ( ) { "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( 5 , 5 )
|
type8_sig ( ) { org . jnbis . api . model . Nist decoded = decode ( org . jnbis . AnsiReferencesTest . FILES [ 7 ] ) ; commonAssert ( decoded ) ; "<AssertPlaceHolder>" ; } getSignatures ( ) { return signatureImages ; }
|
org . junit . Assert . assertEquals ( 1 , decoded . getSignatures ( ) . size ( ) )
|
defaultReplicaTableFactory ( ) { com . hotels . bdp . circustrain . core . replica . Replica replica = replicaFactory . newInstance ( tableReplication ) ; "<AssertPlaceHolder>" ; verify ( replicaTableFactoryPicker ) . newInstance ( tableReplication ) ; } newInstance ( java . lang . String ) { java . net . InetSocketAddress address = new com . hotels . bdp . circustrain . metrics . InetSocketAddressFactory ( ) . newInstance ( graphiteHost ) ; com . codahale . metrics . graphite . Graphite graphite = new com . codahale . metrics . graphite . Graphite ( address ) ; java . lang . String prefix = com . hotels . bdp . circustrain . api . util . DotJoiner . join ( graphitePrefix , qualifiedReplicaName ) ; return com . codahale . metrics . graphite . GraphiteReporter . forRegistry ( runningMetricRegistry ) . prefixedWith ( prefix ) . build ( graphite ) ; }
|
org . junit . Assert . assertNotNull ( replica )
|
testOnNodeDeletePreSuccess ( ) { @ org . o3project . odenos . component . aggregator . SuppressWarnings ( "serial" ) java . util . ArrayList < java . lang . String > array = new java . util . ArrayList < java . lang . String > ( ) { { add ( "network01" ) ; } } ; org . o3project . odenos . core . component . ConversionTable conversionTable = org . powermock . api . mockito . PowerMockito . spy ( new org . o3project . odenos . core . component . ConversionTable ( ) ) ; org . powermock . api . mockito . PowerMockito . doReturn ( "original" ) . when ( conversionTable , "getConnectionType" , org . o3project . odenos . component . aggregator . AggregatorTest . ORIGINAL_NW_ID ) ; org . powermock . api . mockito . PowerMockito . doReturn ( array ) . when ( conversionTable , "getNode" , anyString ( ) , anyString ( ) ) ; org . powermock . api . mockito . PowerMockito . doReturn ( conversionTable ) . when ( target , "conversionTable" ) ; org . powermock . api . mockito . PowerMockito . doReturn ( org . o3project . odenos . component . aggregator . AggregatorTest . AGGREGATED_NW_ID ) . when ( target , "getNetworkIdByType" , "aggregated" ) ; java . util . Map < java . lang . String , org . o3project . odenos . core . component . network . topology . Port > ports1 = new java . util . HashMap < java . lang . String , org . o3project . odenos . core . component . network . topology . Port > ( ) ; org . o3project . odenos . core . component . network . topology . Node node1 = new org . o3project . odenos . core . component . network . topology . Node ( "0" , "node1" , ports1 , new java . util . HashMap < java . lang . String , java . lang . String > ( ) ) ; "<AssertPlaceHolder>" ; } onNodeDeletePre ( java . lang . String , org . o3project . odenos . core . component . network . topology . Node ) { org . o3project . odenos . component . aggregator . Aggregator . log . debug ( "" ) ; java . lang . String connType = conversionTable ( ) . getConnectionType ( networkId ) ; if ( ( connType != null ) && ( connType . equals ( org . o3project . odenos . component . aggregator . Aggregator . AGGREGATED ) ) ) { return false ; } java . lang . String aggNetworkId = getNetworkIdByType ( org . o3project . odenos . component . aggregator . Aggregator . AGGREGATED ) ; if ( aggNetworkId == null ) { return false ; } org . o3project . odenos . core . component . NetworkInterface aggNetworkIf = networkInterfaces ( ) . get ( aggNetworkId ) ; if ( ( ( node . getPortMap ( ) ) != null ) && ( ( node . getPortMap ( ) . size ( ) ) != 0 ) ) { for ( java . lang . String pid : node . getPortMap ( ) . keySet ( ) ) { org . o3project . odenos . core . component . network . topology . Port orgPort = node . getPort ( pid ) ; java . lang . String aggPortId = getConvPortId ( networkId , orgPort . getNode ( ) , orgPort . getId ( ) ) ; if ( aggPortId == null ) { continue ; } java . lang . String [ ] aggPortList = aggPortId . split ( "::" ) ; aggNetworkIf . delPort ( aggPortList [ 1 ] , aggPortList [ 2 ] ) ; } } java . util . List < java . lang . String > aggNodes = conversionTable ( ) . getNode ( aggNetworkId , this . getObjectId ( ) ) ; if ( ( aggNodes . size ( ) ) == 1 ) { return true ; } conversionTable ( ) . delEntryNode ( networkId , node . getId ( ) ) ; return false ; }
|
org . junit . Assert . assertThat ( target . onNodeDeletePre ( org . o3project . odenos . component . aggregator . AggregatorTest . ORIGINAL_NW_ID , node1 ) , org . hamcrest . CoreMatchers . is ( true ) )
|
testHandleMessagesWhendeleteMsgs ( ) { javax . mail . Message [ ] msgs = new javax . mail . Message [ ] { message } ; int result ; when ( properties . getProperty ( "connect.delete.unhandled.msgs" ) ) . thenReturn ( "true" ) ; when ( properties . getProperty ( "connect.max.msgs.in.batch" , "25" ) ) . thenReturn ( "30" ) ; when ( mockStore . getFolder ( "INBOX" ) ) . thenReturn ( mockFolder ) ; when ( mockFolder . getMessageCount ( ) ) . thenReturn ( 1 ) ; when ( mockFolder . getMessages ( 1 , 1 ) ) . thenReturn ( msgs ) ; gov . hhs . fha . nhinc . mail . ImapMailReceiver receiver = new gov . hhs . fha . nhinc . mail . ImapMailReceiver ( properties ) { @ gov . hhs . fha . nhinc . mail . Override protected javax . mail . Folder getInbox ( javax . mail . Store store ) { return mockFolder ; } @ gov . hhs . fha . nhinc . mail . Override protected void handleMessageMonitoring ( ) { } } ; result = receiver . handleMessages ( handler ) ; "<AssertPlaceHolder>" ; verify ( message ) . setFlag ( Flags . Flag . DELETED , true ) ; } handleMessages ( gov . hhs . fha . nhinc . mail . MessageHandler ) { int numberOfMsgsHandled = 0 ; ( handlerInvocations ) ++ ; if ( gov . hhs . fha . nhinc . mail . ImapMailReceiver . LOG . isDebugEnabled ( ) ) { gov . hhs . fha . nhinc . mail . ImapMailReceiver . LOG . debug ( ( ( ( ( ( ( ( ( ( "handleMessages()<sp>invoked,<sp>(" + ( hashCode ( ) ) ) + "<sp>:<sp>" ) + ( java . lang . Thread . currentThread ( ) . getId ( ) ) ) + "),<sp>[" ) + ( imapHost ) ) + "],<sp>handler:<sp>" ) + ( handler . getClass ( ) . getName ( ) ) ) + ",<sp>invocation<sp>count:<sp>" ) + ( handlerInvocations ) ) ) ; } else { gov . hhs . fha . nhinc . mail . ImapMailReceiver . LOG . info ( "handleMessages()<sp>invoked" ) ; } javax . mail . Store store = getImapsStore ( ) ; javax . mail . Folder inbox = getInbox ( store ) ; javax . mail . Message [ ] messages = getMessages ( store , inbox ) ; for ( javax . mail . Message message : messages ) { boolean handledSuccessfully = handleMessage ( handler , message ) ; if ( handledSuccessfully ) { numberOfMsgsHandled ++ ; } } gov . hhs . fha . nhinc . mail . ImapMailReceiver . LOG . info ( ( ( "Handled<sp>" + numberOfMsgsHandled ) + "<sp>messages." ) ) ; gov . hhs . fha . nhinc . mail . MailUtils . closeQuietly ( store , inbox , MailUtils . FOLDER_EXPUNGE_INBOX_TRUE ) ; gov . hhs . fha . nhinc . mail . ImapMailReceiver . LOG . info ( "Call<sp>the<sp>message<sp>monitoring<sp>check<sp>here" ) ; handleMessageMonitoring ( ) ; return numberOfMsgsHandled ; }
|
org . junit . Assert . assertEquals ( result , 0 )
|
testListColumns ( ) { java . lang . String catalog = "testSchema" ; java . lang . String table = "testTable" ; java . sql . ResultSet rs = mock ( java . sql . ResultSet . class ) ; when ( dbmd . getColumns ( catalog , null , table , null ) ) . thenReturn ( rs ) ; java . sql . ResultSet result = jdbcMetadata . listColumns ( dbmd , catalog , table ) ; verify ( dbmd , times ( 1 ) ) . getColumns ( catalog , null , table , null ) ; "<AssertPlaceHolder>" ; } listColumns ( java . sql . DatabaseMetaData , java . lang . String , java . lang . String ) { return dbmd . getColumns ( null , schema , table , null ) ; }
|
org . junit . Assert . assertEquals ( rs , result )
|
testCreateAndAnalyze2 ( ) { org . orbisgis . legend . thematic . proportional . ProportionalPoint pp = new org . orbisgis . legend . thematic . proportional . ProportionalPoint ( ) ; pp . setOnVertex ( ) ; org . orbisgis . coremap . renderer . se . PointSymbolizer ps = ( ( org . orbisgis . coremap . renderer . se . PointSymbolizer ) ( pp . getSymbolizer ( ) ) ) ; org . orbisgis . legend . analyzer . symbolizers . PointSymbolizerAnalyzer psa = new org . orbisgis . legend . analyzer . symbolizers . PointSymbolizerAnalyzer ( ps ) ; "<AssertPlaceHolder>" ; } getLegend ( ) { return ( ( org . orbisgis . legend . LookupFieldName ) ( legend ) ) ; }
|
org . junit . Assert . assertTrue ( ( ( psa . getLegend ( ) ) instanceof org . orbisgis . legend . thematic . proportional . ProportionalPoint ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.