input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testGetPriceTextToDisplay_NoUnit ( ) { org . oscm . internal . vo . VOPriceModel priceModel = new org . oscm . internal . vo . VOPriceModel ( ) ; priceModel . setType ( PriceModelType . PRO_RATA ) ; priceModel . setCurrencyISOCode ( "USD" ) ; priceModel . setOneTimeFee ( java . math . BigDecimal . valueOf ( 60 ) ) ; priceModel . setPricePerUserAssignment ( BigDecimal . ZERO ) ; voService . setPriceModel ( priceModel ) ; org . oscm . ui . model . Service service = new org . oscm . ui . model . Service ( voService ) ; java . lang . String priceToDisplay = service . getPriceToDisplay ( ) ; java . lang . String expected = service . getPriceText ( ) ; "<AssertPlaceHolder>" ; } getPriceText ( ) { if ( ( priceText ) == null ) { initPriceText ( ) ; } return priceText ; }
org . junit . Assert . assertEquals ( expected , priceToDisplay )
testNegateHandlingTrue ( ) { java . lang . String negateProperty = "1-0_1-8-0:5:1" ; boolean negateState = org . openhab . binding . smartmeter . internal . conformity . negate . NegateHandler . shouldNegateState ( negateProperty , ( obis ) -> { return new org . openhab . binding . smartmeter . MeterValue < > ( obis , "65954" , null ) ; } ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( negateState )
resumeUrl ( ) { final java . lang . String url = new org . commonjava . indy . client . core . Indy ( org . commonjava . indy . promote . client . IndyPromoteClientModuleUrlsTest . BASE , new org . commonjava . indy . promote . client . IndyPromoteClientModule ( ) ) . module ( org . commonjava . indy . promote . client . IndyPromoteClientModule . class ) . resumeUrl ( ) ; "<AssertPlaceHolder>" ; } resumeUrl ( ) { final java . lang . String url = new org . commonjava . indy . client . core . Indy ( org . commonjava . indy . promote . client . IndyPromoteClientModuleUrlsTest . BASE , new org . commonjava . indy . promote . client . IndyPromoteClientModule ( ) ) . module ( org . commonjava . indy . promote . client . IndyPromoteClientModule . class ) . resumeUrl ( ) ; org . junit . Assert . assertThat ( url , org . hamcrest . CoreMatchers . equalTo ( ( ( ( org . commonjava . indy . promote . client . IndyPromoteClientModuleUrlsTest . BASE ) + "/" ) + ( IndyPromoteClientModule . PATHS_RESUME_PATH ) ) ) ) ; }
org . junit . Assert . assertThat ( url , org . hamcrest . CoreMatchers . equalTo ( ( ( ( org . commonjava . indy . promote . client . IndyPromoteClientModuleUrlsTest . BASE ) + "/" ) + ( IndyPromoteClientModule . PATHS_RESUME_PATH ) ) ) )
equals_leftOkRightNotAcquireLockOptions_returnsFalse ( ) { com . amazonaws . services . dynamodbv2 . AcquireLockOptions left = createLockOptions ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( other == null ) || ( ! ( other instanceof com . amazonaws . services . dynamodbv2 . AcquireLockOptions ) ) ) { return false ; } final com . amazonaws . services . dynamodbv2 . AcquireLockOptions otherOptions = ( ( com . amazonaws . services . dynamodbv2 . AcquireLockOptions ) ( other ) ) ; return ( ( ( ( ( ( ( ( ( ( ( ( ( java . util . Objects . equals ( this . partitionKey , otherOptions . partitionKey ) ) && ( java . util . Objects . equals ( this . sortKey , otherOptions . sortKey ) ) ) && ( java . util . Objects . equals ( this . data , otherOptions . data ) ) ) && ( java . util . Objects . equals ( this . replaceData , otherOptions . replaceData ) ) ) && ( java . util . Objects . equals ( this . deleteLockOnRelease , otherOptions . deleteLockOnRelease ) ) ) && ( java . util . Objects . equals ( this . acquireOnlyIfLockAlreadyExists , otherOptions . acquireOnlyIfLockAlreadyExists ) ) ) && ( java . util . Objects . equals ( this . refreshPeriod , otherOptions . refreshPeriod ) ) ) && ( java . util . Objects . equals ( this . additionalTimeToWaitForLock , otherOptions . additionalTimeToWaitForLock ) ) ) && ( java . util . Objects . equals ( this . timeUnit , otherOptions . timeUnit ) ) ) && ( java . util . Objects . equals ( this . additionalAttributes , otherOptions . additionalAttributes ) ) ) && ( java . util . Objects . equals ( this . sessionMonitor , otherOptions . sessionMonitor ) ) ) && ( java . util . Objects . equals ( this . updateExistingLockRecord , otherOptions . updateExistingLockRecord ) ) ) && ( java . util . Objects . equals ( this . shouldSkipBlockingWait , otherOptions . shouldSkipBlockingWait ) ) ) && ( java . util . Objects . equals ( this . acquireReleasedLocksConsistently , otherOptions . acquireReleasedLocksConsistently ) ) ; }
org . junit . Assert . assertFalse ( left . equals ( "" ) )
testPrepareStatement_Recover ( ) { java . sql . PreparedStatement secondTry = mock ( java . sql . PreparedStatement . class ) ; when ( connectionMock . prepareStatement ( anyString ( ) ) ) . thenThrow ( new java . sql . SQLException ( "E1" ) ) . thenReturn ( secondTry ) ; org . apache . cayenne . datasource . PoolAwareConnection paConnection = new org . apache . cayenne . datasource . PoolAwareConnection ( parentMock , connectionMock , null ) ; java . sql . PreparedStatement st = paConnection . prepareStatement ( "SELECT<sp>1" ) ; "<AssertPlaceHolder>" ; } prepareStatement ( java . lang . String ) { return connection . prepareStatement ( sql ) ; }
org . junit . Assert . assertSame ( secondTry , st )
get ( ) { final org . graylog . plugins . metrics . jmx . providers . JmxReporterProvider provider = new org . graylog . plugins . metrics . jmx . providers . JmxReporterProvider ( new org . graylog . plugins . metrics . jmx . MetricsJmxReporterConfiguration ( ) , new com . codahale . metrics . MetricRegistry ( ) ) ; final com . codahale . metrics . JmxReporter reporter = provider . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { final org . graylog . plugins . metrics . jmx . providers . JmxReporterProvider provider = new org . graylog . plugins . metrics . jmx . providers . JmxReporterProvider ( new org . graylog . plugins . metrics . jmx . MetricsJmxReporterConfiguration ( ) , new com . codahale . metrics . MetricRegistry ( ) ) ; final com . codahale . metrics . JmxReporter reporter = provider . get ( ) ; org . junit . Assert . assertNotNull ( reporter ) ; }
org . junit . Assert . assertNotNull ( reporter )
shouldPurgeContainer ( ) { org . javaswift . joss . model . Container create = account . getContainer ( "x" ) . create ( ) ; org . javaswift . joss . model . StoredObject object = create . getObject ( "y" ) ; object . uploadObject ( new byte [ 8192 ] ) ; ops . purgeContainer ( create , stopRequester , callback ) ; org . mockito . Mockito . verify ( callback , org . mockito . Mockito . atLeastOnce ( ) ) . onUpdateContainers ( org . mockito . Mockito . anyListOf ( org . javaswift . joss . model . Container . class ) ) ; "<AssertPlaceHolder>" ; } onUpdateContainers ( java . util . Collection ) { containers . clear ( ) ; for ( org . javaswift . joss . model . Container container : cs ) { if ( hideSegmentsContainers ) { if ( container . getName ( ) . endsWith ( SwiftUtils . segmentsContainerPostfix ) ) continue ; } containers . addElement ( container ) ; } statusPanel . onDeselectContainer ( ) ; }
org . junit . Assert . assertFalse ( create . exists ( ) )
testSetRunSequentially ( ) { hudson . matrix . MatrixProject childProject1 = new hudson . matrix . MatrixProjectTest . MatrixProjectMock ( "child1" ) ; childProject1 . setRunSequentially ( true ) ; "<AssertPlaceHolder>" ; } isRunSequentially ( ) { return hudson . util . CascadingUtil . getBooleanProjectProperty ( this , hudson . matrix . MatrixProject . RUN_SEQUENTIALLY_PROPERTY_NAME ) . getValue ( ) ; }
org . junit . Assert . assertTrue ( childProject1 . isRunSequentially ( ) )
checkVisitation ( ) { org . eclipse . ice . tests . datastructures . TestVisitor testVisitor = new org . eclipse . ice . tests . datastructures . TestVisitor ( ) ; org . eclipse . ice . datastructures . ICEObject . Component unknownComponent = new org . eclipse . ice . datastructures . form . GeometryComponent ( ) ; unknownComponent . accept ( testVisitor ) ; "<AssertPlaceHolder>" ; } wasVisited ( ) { return visited ; }
org . junit . Assert . assertTrue ( testVisitor . wasVisited ( ) )
getHashingStrategy ( ) { org . eclipse . collections . impl . map . strategy . mutable . UnifiedMapWithHashingStrategy < java . lang . Integer , java . lang . Object > map = org . eclipse . collections . impl . map . strategy . mutable . UnifiedMapWithHashingStrategy . newMap ( org . eclipse . collections . impl . map . strategy . mutable . UnifiedMapWithHashingStrategyTest . INTEGER_HASHING_STRATEGY ) ; "<AssertPlaceHolder>" ; } hashingStrategy ( ) { org . eclipse . collections . impl . map . strategy . mutable . UnifiedMapWithHashingStrategy < java . lang . Integer , java . lang . Integer > map = org . eclipse . collections . impl . map . strategy . mutable . UnifiedMapWithHashingStrategy . newWithKeysValues ( org . eclipse . collections . impl . map . strategy . mutable . UnifiedMapWithHashingStrategyTest . INTEGER_HASHING_STRATEGY , 1 , 1 , 2 , 2 ) ; org . junit . Assert . assertSame ( org . eclipse . collections . impl . map . strategy . mutable . UnifiedMapWithHashingStrategyTest . INTEGER_HASHING_STRATEGY , map . hashingStrategy ( ) ) ; }
org . junit . Assert . assertSame ( org . eclipse . collections . impl . map . strategy . mutable . UnifiedMapWithHashingStrategyTest . INTEGER_HASHING_STRATEGY , map . hashingStrategy ( ) )
verifySplitKeys ( ) { if ( com . splicemachine . derby . impl . load . HBaseBulkLoadIndexIT . notSupported ) return ; java . sql . ResultSet rs = methodWatcher . executeQuery ( ( "call<sp>syscs_util.get_regions('HBASEBULKLOADINDEXIT',<sp>'LINEITEM',<sp>" + "'L_SHIPDATE_IDX',null,<sp>null,null,null,null,null,null)" ) ) ; java . lang . String [ ] startKeys = new java . lang . String [ ] { "{<sp>NULL,<sp>NULL,<sp>NULL,<sp>NULL<sp>}" , "{<sp>1993-05-30,<sp>58476,<sp>5737.88,<sp>0.04<sp>}" , "{<sp>1995-02-01,<sp>133234,<sp>24077.37,<sp>0.03<sp>}" , "{<sp>1996-04-20,<sp>NULL,<sp>48881,<sp>0.06<sp>}" , "{<sp>1996-04-20,<sp>94751,<sp>48881,<sp>0.06<sp>}" } ; int i = 0 ; while ( rs . next ( ) ) { java . lang . String k = rs . getString ( 2 ) ; "<AssertPlaceHolder>" ; } } getString ( java . lang . String ) { try { if ( agent_ . loggingEnabled ( ) ) { agent_ . logWriter_ . traceEntry ( this , "getString" , columnName ) ; } return getString ( findColumnX ( columnName , "getString" ) ) ; } catch ( com . splicemachine . db . client . am . SqlException se ) { throw se . getSQLException ( ) ; } }
org . junit . Assert . assertEquals ( k , startKeys [ ( i ++ ) ] )
testCreate ( ) { org . oscarehr . hospitalReportManager . model . HRMSubClass entity = new org . oscarehr . hospitalReportManager . model . HRMSubClass ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
org . junit . Assert . assertNotNull ( entity . getId ( ) )
manageDomains_with_UPDATE_should_use_default_UPDATE_policy ( ) { final java . lang . String domainName = getDomainName ( "test_domain_update" ) ; org . springframework . data . simpledb . core . domain . DomainManager manager = new org . springframework . data . simpledb . core . domain . DomainManager ( ) ; manager . manageDomain ( domainName , null , sdb ) ; "<AssertPlaceHolder>" ; manager . dropDomain ( domainName , sdb ) ; } exists ( java . lang . String , com . amazonaws . services . simpledb . AmazonSimpleDB ) { try { com . amazonaws . services . simpledb . model . ListDomainsResult listDomainsResult = sdb . listDomains ( new com . amazonaws . services . simpledb . model . ListDomainsRequest ( ) ) ; java . util . List < java . lang . String > domainNames = listDomainsResult . getDomainNames ( ) ; java . lang . String nextToken = listDomainsResult . getNextToken ( ) ; while ( ( nextToken != null ) && ( ! ( nextToken . isEmpty ( ) ) ) ) { listDomainsResult = sdb . listDomains ( new com . amazonaws . services . simpledb . model . ListDomainsRequest ( ) . withNextToken ( nextToken ) ) ; domainNames . addAll ( listDomainsResult . getDomainNames ( ) ) ; nextToken = listDomainsResult . getNextToken ( ) ; } return domainNames . contains ( domainName ) ; } catch ( com . amazonaws . AmazonClientException amazonException ) { throw org . springframework . data . simpledb . exception . SimpleDbExceptionTranslator . getTranslatorInstance ( ) . translateAmazonClientException ( amazonException ) ; } }
org . junit . Assert . assertTrue ( manager . exists ( domainName , sdb ) )
getActiveProfilesById ( ) { java . util . List < org . apache . maven . shared . model . ModelProperty > modelProperties = new java . util . ArrayList < org . apache . maven . shared . model . ModelProperty > ( ) ; modelProperties . add ( new org . apache . maven . shared . model . ModelProperty ( org . apache . maven . project . builder . ProjectUri . xUri , null ) ) ; modelProperties . add ( new org . apache . maven . shared . model . ModelProperty ( ProjectUri . Profiles . xUri , null ) ) ; modelProperties . add ( new org . apache . maven . shared . model . ModelProperty ( ProjectUri . Profiles . Profile . xUri , null ) ) ; modelProperties . add ( new org . apache . maven . shared . model . ModelProperty ( ProjectUri . Profiles . Profile . id , "test" ) ) ; org . apache . maven . shared . model . impl . DefaultModelDataSource dataSource = new org . apache . maven . shared . model . impl . DefaultModelDataSource ( modelProperties , org . apache . maven . project . builder . PomTransformer . MODEL_CONTAINER_FACTORIES ) ; java . util . List < org . apache . maven . shared . model . InterpolatorProperty > interpolatorProperties = new java . util . ArrayList < org . apache . maven . shared . model . InterpolatorProperty > ( ) ; org . apache . maven . project . builder . profile . ProfileContext ctx = new org . apache . maven . project . builder . profile . ProfileContext ( dataSource , java . util . Arrays . asList ( "test" ) , null , interpolatorProperties ) ; java . util . Collection < org . apache . maven . shared . model . ModelContainer > profiles = ctx . getActiveProfiles ( ) ; "<AssertPlaceHolder>" ; } getActiveProfiles ( ) { if ( ( activeProfiles ) == null ) { activeProfiles = new java . util . ArrayList < java . lang . String > ( ) ; } return activeProfiles ; }
org . junit . Assert . assertTrue ( ( ( profiles . size ( ) ) == 1 ) )
isCanvasRootFalseTest ( ) { when ( diagram . getMetadata ( ) . getCanvasRootUUID ( ) ) . thenReturn ( "test" ) ; boolean isCanvasRoot = org . kie . workbench . common . stunner . core . client . canvas . util . CanvasLayoutUtils . isCanvasRoot ( diagram , parentNotCanvasRoot ) ; "<AssertPlaceHolder>" ; } isCanvasRoot ( org . kie . workbench . common . stunner . core . diagram . Diagram , org . kie . workbench . common . stunner . core . graph . Element ) { return ( null != parent ) && ( org . kie . workbench . common . stunner . core . client . canvas . util . CanvasLayoutUtils . isCanvasRoot ( diagram , parent . getUUID ( ) ) ) ; }
org . junit . Assert . assertFalse ( isCanvasRoot )
testGetAutoCommit ( ) { classUnderTest . setAutoCommit ( true ) ; "<AssertPlaceHolder>" ; } getAutoCommit ( ) { return _autoCommit ; }
org . junit . Assert . assertEquals ( true , classUnderTest . getAutoCommit ( ) )
serveAkka_RemoteToKontraktor ( ) { final int NUM_MSG = 50000000 ; final akka . actor . ActorSystem system = akka . actor . ActorSystem . create ( "reactive-interop" ) ; final akka . stream . Materializer mat = akka . stream . ActorMaterializer . create ( system ) ; org . nustaq . kontraktor . reactivestreams . KxReactiveStreams kxStreams = org . nustaq . kontraktor . reactivestreams . KxReactiveStreams . get ( ) ; org . nustaq . kontraktor . util . RateMeasure rm = new org . nustaq . kontraktor . util . RateMeasure ( "rate" ) ; java . util . concurrent . CountDownLatch count = new java . util . concurrent . CountDownLatch ( NUM_MSG ) ; java . lang . Iterable it = ( ) -> java . util . stream . IntStream . range ( 0 , NUM_MSG ) . mapToObj ( ( x ) -> x ) . iterator ( ) ; org . reactivestreams . Publisher < java . lang . Integer > pub = ( ( org . reactivestreams . Publisher < java . lang . Integer > ) ( akka . stream . javadsl . Source . from ( it ) . runWith ( akka . stream . javadsl . Sink . publisher ( ) , mat ) ) ) ; kxStreams . asKxPublisher ( pub ) . serve ( new org . nustaq . kontraktor . remoting . http . undertow . WebSocketPublisher ( ) . hostName ( "localhost" ) . port ( 6790 ) . urlPath ( "akka" ) ) ; new org . nustaq . kontraktor . reactivestreams . KxReactiveStreams ( true ) . connect ( examples . akka . Integer . class , new org . nustaq . kontraktor . remoting . websockets . WebSocketConnectable ( ) . url ( "ws://localhost:6790/akka" ) ) . subscribe ( ( res , err ) -> { if ( org . nustaq . kontraktor . Actors . isResult ( err ) ) { rm . count ( ) ; count . countDown ( ) ; } } ) ; int secondsWait = 50 ; while ( ( ( count . getCount ( ) ) > 0 ) && ( ( secondsWait -- ) > 0 ) ) { System . out . println ( ( "count:" + ( count . getCount ( ) ) ) ) ; java . lang . Thread . sleep ( 1000 ) ; } system . shutdown ( ) ; "<AssertPlaceHolder>" ; java . lang . Thread . sleep ( 1000 ) ; } getCount ( ) { return count . get ( ) ; }
org . junit . Assert . assertTrue ( ( ( count . getCount ( ) ) == 0 ) )
testExecuteInSequence ( ) { boolean b = caa . executeInSequence ( ) ; "<AssertPlaceHolder>" ; } executeInSequence ( ) { return true ; }
org . junit . Assert . assertFalse ( b )
testHost ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( SENDGRID_API_KEY ) ; sg . setHost ( "api.new.com" ) ; "<AssertPlaceHolder>" ; } getHost ( ) { return this . host ; }
org . junit . Assert . assertEquals ( sg . getHost ( ) , "api.new.com" )
nowTest ( ) { java . lang . String query = "select<sp>*<sp>{Filter(NOW())}" ; org . eclipse . rdf4j . query . parser . sparql . SPARQLParser parser = new org . eclipse . rdf4j . query . parser . sparql . SPARQLParser ( ) ; org . eclipse . rdf4j . query . parser . ParsedQuery pq = parser . parseQuery ( query , null ) ; org . eclipse . rdf4j . query . algebra . Filter filter = ( ( org . eclipse . rdf4j . query . algebra . Filter ) ( ( ( org . eclipse . rdf4j . query . algebra . Projection ) ( pq . getTupleExpr ( ) ) ) . getArg ( ) ) ) ; java . lang . String filterString = org . apache . rya . indexing . pcj . fluo . app . util . FilterSerializer . serialize ( filter ) ; org . eclipse . rdf4j . query . algebra . Filter deserializedFilter = org . apache . rya . indexing . pcj . fluo . app . util . FilterSerializer . deserialize ( filterString ) ; "<AssertPlaceHolder>" ; } deserialize ( java . lang . String ) { try { org . eclipse . rdf4j . query . parser . ParsedQuery pq = org . apache . rya . indexing . pcj . fluo . app . util . FilterSerializer . parser . parseQuery ( sparql , null ) ; org . apache . rya . indexing . pcj . fluo . app . util . FilterSerializer . FilterVisitor visitor = new org . apache . rya . indexing . pcj . fluo . app . util . FilterSerializer . FilterVisitor ( ) ; pq . getTupleExpr ( ) . visit ( visitor ) ; java . util . Set < org . eclipse . rdf4j . query . algebra . Filter > filters = visitor . getFilters ( ) ; if ( ( filters . size ( ) ) != 1 ) { throw new org . apache . rya . indexing . pcj . fluo . app . util . FilterSerializer . FilterParseException ( "Filter<sp>String<sp>must<sp>contain<sp>only<sp>one<sp>Filter." ) ; } return filters . iterator ( ) . next ( ) ; } catch ( java . lang . Exception e ) { throw new org . apache . rya . indexing . pcj . fluo . app . util . FilterSerializer . FilterParseException ( "Unable<sp>to<sp>parse<sp>Filter." , e ) ; } }
org . junit . Assert . assertEquals ( filter , deserializedFilter )
testGet ( ) { final com . olacabs . fabric . manager . domain . GlobalPropertyDomain saved = com . olacabs . fabric . manager . service . GlobalPropertyServiceTest . globalPropertyService . get ( com . olacabs . fabric . manager . service . GlobalPropertyServiceTest . globalProperty . getId ( ) ) ; "<AssertPlaceHolder>" ; } get ( int ) { return componentDAO . read ( id ) ; }
org . junit . Assert . assertEquals ( saved , com . olacabs . fabric . manager . service . GlobalPropertyServiceTest . globalProperty )
testProcessActionSameActionAndResult01 ( ) { when ( requestDataValueProcessor . processAction ( any ( javax . servlet . http . HttpServletRequest . class ) , anyString ( ) ) ) . thenReturn ( "action" ) ; when ( requestDataValueProcessor . processAction ( any ( javax . servlet . http . HttpServletRequest . class ) , anyString ( ) , nullable ( java . lang . String . class ) ) ) . thenReturn ( "action" ) ; java . lang . String result = compositeRequestDataValueProcessor . processAction ( request , "action" ) ; "<AssertPlaceHolder>" ; } processAction ( javax . servlet . http . HttpServletRequest , java . lang . String ) { return action ; }
org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( "action" ) )
testDelimitStringAndWrapEntriesWithQuotesWithEmptyList ( ) { java . util . ArrayList < java . lang . String > testList = new java . util . ArrayList < java . lang . String > ( ) ; java . lang . String delimitedString = org . openstack . atlas . service . domain . util . StringUtilities . DelimitStringAndWrapEntriesWithQuotes ( testList , ",<sp>" ) ; "<AssertPlaceHolder>" ; } DelimitStringAndWrapEntriesWithQuotes ( java . util . Collection , java . lang . String ) { java . lang . String newString = "" ; for ( java . lang . Object string : objects ) { newString += ( ( "'" + ( string . toString ( ) ) ) + "'" ) + delim ; } if ( ! ( newString . equals ( "" ) ) ) { newString = newString . substring ( 0 , ( ( newString . length ( ) ) - ( delim . length ( ) ) ) ) ; } return newString ; }
org . junit . Assert . assertEquals ( "" , delimitedString )
testFindTemplateSourceTemplateIsNull ( ) { com . ewcms . publication . service . TemplatePublishServiceable service = mock ( com . ewcms . publication . service . TemplatePublishServiceable . class ) ; when ( service . getTemplateByUniquePath ( any ( java . lang . String . class ) ) ) . thenReturn ( null ) ; com . ewcms . publication . freemarker . cache . DatabaseTemplateLoader loader = new com . ewcms . publication . freemarker . cache . DatabaseTemplateLoader ( service ) ; java . lang . Object source = loader . findTemplateSource ( "/test.html" ) ; "<AssertPlaceHolder>" ; } findTemplateSource ( java . lang . String ) { org . springframework . util . Assert . notNull ( name , "template<sp>uniquepath<sp>is<sp>null" ) ; java . lang . String path = org . apache . commons . lang . StringUtils . removeStart ( name , "/" ) ; com . ewcms . core . site . model . Template template = templateService . getTemplateByUniquePath ( path ) ; if ( template == null ) { com . ewcms . publication . freemarker . cache . DatabaseTemplateLoader . logger . debug ( "{}<sp>is<sp>not<sp>exist." , path ) ; return null ; } com . ewcms . core . site . model . TemplateEntity entity = template . getTemplateEntity ( ) ; if ( entity == null ) { com . ewcms . publication . freemarker . cache . DatabaseTemplateLoader . logger . debug ( "{}<sp>content<sp>is<sp>null" , path ) ; return null ; } byte [ ] content = entity . getTplEntity ( ) ; long lastTime = template . getUpdTime ( ) . getTime ( ) ; return new com . ewcms . publication . freemarker . cache . DatabaseTemplateLoader . TemplateSource ( path , content , lastTime ) ; }
org . junit . Assert . assertNull ( source )
testActiveSubscriptionShouldntReActivate ( ) { java . lang . String criteria = "Observation?code=111111111&_format=xml" ; java . lang . String payload = "application/fhir+json" ; createSubscription ( criteria , payload ) ; waitForActivatedSubscriptionCount ( 1 ) ; for ( int i = 0 ; i < 5 ; i ++ ) { int changes = this . mySubscriptionLoader . doSyncSubscriptionsForUnitTest ( ) ; "<AssertPlaceHolder>" ; } } doSyncSubscriptionsForUnitTest ( ) { int first = doSyncSubscriptionsWithRetry ( ) ; int second = doSyncSubscriptionsWithRetry ( ) ; return first + second ; }
org . junit . Assert . assertEquals ( 0 , changes )
shouldNotIndicateThatANormalSelectSupportsMulitpleOptions ( ) { org . openqa . selenium . support . ui . Select select = selectElementWithMultipleEqualTo ( null ) ; "<AssertPlaceHolder>" ; } isMultiple ( ) { java . lang . String multipleValue = select . getAttribute ( "multiple" ) ; boolean multiple = ( "true" . equals ( multipleValue ) ) || ( "multiple" . equals ( multipleValue ) ) ; return multiple ; }
org . junit . Assert . assertFalse ( select . isMultiple ( ) )
testWiFiEncryptionTypeEnumValues ( ) { for ( com . digi . xbee . api . models . WiFiEncryptionType encryptionType : encryptionTypeValues ) "<AssertPlaceHolder>" ; } getID ( ) { return id ; }
org . junit . Assert . assertTrue ( ( ( encryptionType . getID ( ) ) >= 0 ) )
testMySQLWithEFSProvisionedThroughput ( ) { final java . lang . String zoneStackName = "vpc/zone-legacy.yaml" 4 + ( this . random8String ( ) ) ; final java . lang . String vpcStackName = "CloudFrontAcmCertificate" 4 + ( this . random8String ( ) ) ; final java . lang . String stackName = "CloudFrontAcmCertificate" 8 + ( this . random8String ( ) ) ; final java . lang . String classB = "vpc/zone-legacy.yaml" 1 ; final java . lang . String keyName = "key-" + ( this . random8String ( ) ) ; final java . lang . String subDomainName = stackName ; final java . lang . String blogTitle = "Stay-AWSome" ; final java . lang . String blogPassword = this . random8String ( ) ; try { this . createKey ( keyName ) ; try { this . createStack ( zoneStackName , "vpc/zone-legacy.yaml" , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "vpc/zone-legacy.yaml" 0 ) . withParameterValue ( de . widdix . awscftemplates . Config . get ( Config . Key . DOMAIN_SUFFIX ) ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "vpc/zone-legacy.yaml" 7 ) . withParameterValue ( de . widdix . awscftemplates . Config . get ( Config . Key . HOSTED_ZONE_ID ) ) ) ; try { this . createStack ( vpcStackName , "vpc/zone-legacy.yaml" 6 , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 3 ) . withParameterValue ( classB ) ) ; try { this . createStack ( stackName , "vpc/zone-legacy.yaml" 2 , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "ParentVPCStack" ) . withParameterValue ( vpcStackName ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 1 ) . withParameterValue ( zoneStackName ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "vpc/zone-legacy.yaml" 5 ) . withParameterValue ( keyName ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "SubDomainNameWithDot" ) . withParameterValue ( ( subDomainName + "." ) ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" ) . withParameterValue ( de . widdix . awscftemplates . Config . get ( Config . Key . CLOUDFRONT_ACM_CERTIFICATE_ARN ) ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 9 ) . withParameterValue ( de . widdix . awscftemplates . Config . get ( Config . Key . ACM_CERTIFICATE_ARN ) ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 6 ) . withParameterValue ( blogTitle ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 5 ) . withParameterValue ( "admin" ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "vpc/zone-legacy.yaml" 8 ) . withParameterValue ( blogPassword ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 0 ) . withParameterValue ( "no-reply@widdix.de" ) , new com . amazonaws . services . cloudformation . model . Parameter ( ) . withParameterKey ( "CloudFrontAcmCertificate" 2 ) . withParameterValue ( "CloudFrontAcmCertificate" 7 ) ) ; final java . lang . String url = ( ( "https://" + subDomainName ) + "." ) + ( de . widdix . awscftemplates . Config . get ( Config . Key . DOMAIN_SUFFIX ) ) ; final java . util . concurrent . Callable < java . lang . String > callable = ( ) -> { final org . apache . http . HttpResponse response = de . taimos . httputils . WS . url ( url ) . timeout ( 10000 ) . get ( ) ; if ( ( de . taimos . httputils . WS . getStatus ( response ) ) != 200 ) { throw new java . lang . RuntimeException ( ( "vpc/zone-legacy.yaml" 3 + ( de . taimos . httputils . WS . getStatus ( response ) ) ) ) ; } return de . taimos . httputils . WS . getResponseAsString ( response ) ; } ; final java . lang . String response = this . retry ( callable ) ; "<AssertPlaceHolder>" ; } finally { this . deleteStackAndRetryOnFailure ( stackName ) ; } } finally { this . deleteStack ( vpcStackName ) ; } } finally { this . deleteStack ( zoneStackName ) ; } } finally { this . deleteKey ( keyName ) ; } } retry ( java . util . concurrent . Callable ) { final java . util . concurrent . Callable < T > wrapper = ( ) -> { try { return callable . call ( ) ; } catch ( final e ) { System . out . println ( ( "retry[]<sp>exception:<sp>" + ( de . widdix . awscftemplates . e . getMessage ( ) ) ) ) ; de . widdix . awscftemplates . e . printStackTrace ( ) ; throw de . widdix . awscftemplates . e ; } } ; final com . evanlennick . retry4j . RetryConfig config = new com . evanlennick . retry4j . RetryConfigBuilder ( ) . retryOnAnyException ( ) . withMaxNumberOfTries ( 30 ) . withDelayBetweenTries ( 10 , ChronoUnit . SECONDS ) . withFixedBackoff ( ) . build ( ) ; final com . evanlennick . retry4j . CallResults < java . lang . Object > results = new com . evanlennick . retry4j . CallExecutor ( config ) . execute ( wrapper ) ; return ( ( T ) ( results . getResult ( ) ) ) ;
org . junit . Assert . assertTrue ( response . contains ( blogTitle ) )
manageOperations_VSERVERS_STOPPING_NextStatusNotNormal ( ) { paramHandler . getIaasContext ( ) . setVSystemStatus ( org . oscm . app . iaas . VSystemProcessorBeanTest . NORMAL ) ; doReturn ( Boolean . FALSE ) . when ( vSystemProcessor ) . checkNextStatus ( org . oscm . app . iaas . VSystemProcessorBeanTest . CONTROLLER_ID , org . oscm . app . iaas . VSystemProcessorBeanTest . INSTANCE_ID , FlowState . FINISHED , paramHandler ) ; org . oscm . app . iaas . data . FlowState newState = vSystemProcessor . manageOperations ( org . oscm . app . iaas . VSystemProcessorBeanTest . CONTROLLER_ID , org . oscm . app . iaas . VSystemProcessorBeanTest . INSTANCE_ID , paramHandler , FlowState . VSERVERS_STOPPING ) ; "<AssertPlaceHolder>" ; } manageOperations ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState ) { boolean vSysInNormalState = VSystemStatus . NORMAL . equals ( paramHandler . getIaasContext ( ) . getVSystemStatus ( ) ) ; if ( ! vSysInNormalState ) { return null ; } org . oscm . app . iaas . data . FlowState newState = null ; switch ( flowState ) { case VSYSTEM_START_REQUESTED : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVERS_STARTING , paramHandler ) ) { if ( vsysComm . startAllEFMs ( paramHandler ) ) { vsysComm . startAllVServers ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVERS_STARTING ; } } break ; case VSERVERS_STARTING : if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { if ( vsysComm . getCombinedVServerState ( paramHandler , VSystemStatus . RUNNING ) ) { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } } break ; case VSYSTEM_STOP_REQUESTED : if ( ( paramHandler . getControllerWaitTime ( ) ) != 0 ) { paramHandler . suspendProcessInstanceFor ( paramHandler . getControllerWaitTime ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . WAITING_BEFORE_STOP ; break ; } case WAITING_BEFORE_STOP : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVERS_STOPPING , paramHandler ) ) { vsysComm . stopAllVServers ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVERS_STOPPING ; } break ; case VSERVERS_STOPPING : if ( checkNextStatus ( controllerId , instanceId , FlowState . FINISHED , paramHandler ) ) { if ( vsysComm . getCombinedVServerState ( paramHandler , VSystemStatus . STOPPED ) ) { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } } break ; default : } return newState ; }
org . junit . Assert . assertNull ( newState )
testBugArrayIndexOutOfBoundsExceptionInSTRuntimeMessage_getSourceLocation ( ) { java . lang . String templates = "main(doit<sp>=<sp>true)<sp>::=<sp>" + ( ( "\"<if(doit<sp>||<sp>other)><t(...)><endif>\"\n" + "t2()<sp>::=<sp>\"Hello\"\n" ) + "t(x={<(t2())>})<sp>::=<sp>\"<x>\"" ) ; writeFile ( tmpdir , "t.stg" , templates ) ; org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroupFile ( ( ( tmpdir ) + "/t.stg" ) ) ; org . stringtemplate . v4 . ST st = group . getInstanceOf ( "main" ) ; java . lang . String s = st . render ( ) ; "<AssertPlaceHolder>" ; org . stringtemplate . v4 . gui . STViz viz = st . inspect ( ) ; if ( interactive ) { viz . waitForClose ( ) ; } else { org . stringtemplate . v4 . test . TestEarlyEvaluation . waitUntilAnyWindowIsVisible ( 4000 ) ; viz . viewFrame . dispose ( ) ; org . stringtemplate . v4 . test . TestEarlyEvaluation . waitUntilAllWindowsAreClosed ( ) ; } } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
org . junit . Assert . assertEquals ( "t.stg" 0 , s )
testRadicalSiteRrGammaReaction ( ) { org . openscience . cdk . reaction . IReactionProcess type = new org . openscience . cdk . reaction . type . RadicalSiteRrGammaReaction ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( type )
listResults ( ) { final java . lang . String sparql = "testPcj" 0 + ( ( ( ( "{" + "FILTER(?age<sp><<sp>30)<sp>." ) + "?name<sp><http://hasAge><sp>?age." ) + "?name<sp><http://playsSport><sp>\"Soccer\"<sp>" ) + "}" ) ; final org . apache . accumulo . core . client . Connector accumuloConn = cluster . getConnector ( ) ; final java . lang . String pcjTableName = new org . apache . rya . indexing . pcj . storage . accumulo . PcjTableNameFactory ( ) . makeTableName ( getRyaInstanceName ( ) , "testPcj" ) ; final java . util . Set < org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder > varOrders = new org . apache . rya . indexing . pcj . storage . accumulo . ShiftVarOrderFactory ( ) . makeVarOrders ( new org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ( "testPcj" 1 ) ) ; final org . apache . rya . indexing . pcj . storage . accumulo . PcjTables pcjs = new org . apache . rya . indexing . pcj . storage . accumulo . PcjTables ( ) ; pcjs . createPcjTable ( accumuloConn , pcjTableName , varOrders , sparql ) ; final org . eclipse . rdf4j . query . impl . MapBindingSet alice = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; alice . addBinding ( "name" , org . apache . rya . indexing . pcj . storage . accumulo . PcjTablesIT . VF . createIRI ( "http://Alice" ) ) ; alice . addBinding ( "age" , org . apache . rya . indexing . pcj . storage . accumulo . PcjTablesIT . VF . createLiteral ( java . math . BigInteger . valueOf ( 14 ) ) ) ; final org . eclipse . rdf4j . query . impl . MapBindingSet bob = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; bob . addBinding ( "name" , org . apache . rya . indexing . pcj . storage . accumulo . PcjTablesIT . VF . createIRI ( "testPcj" 2 ) ) ; bob . addBinding ( "age" , org . apache . rya . indexing . pcj . storage . accumulo . PcjTablesIT . VF . createLiteral ( java . math . BigInteger . valueOf ( 16 ) ) ) ; final org . eclipse . rdf4j . query . impl . MapBindingSet charlie = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; charlie . addBinding ( "name" , org . apache . rya . indexing . pcj . storage . accumulo . PcjTablesIT . VF . createIRI ( "testPcj" 3 ) ) ; charlie . addBinding ( "age" , org . apache . rya . indexing . pcj . storage . accumulo . PcjTablesIT . VF . createLiteral ( java . math . BigInteger . valueOf ( 12 ) ) ) ; pcjs . addResults ( accumuloConn , pcjTableName , com . google . common . collect . Sets . newHashSet ( new org . apache . rya . api . model . VisibilityBindingSet ( alice ) , new org . apache . rya . api . model . VisibilityBindingSet ( bob ) , new org . apache . rya . api . model . VisibilityBindingSet ( charlie ) ) ) ; final java . util . Set < org . eclipse . rdf4j . query . BindingSet > results = new java . util . HashSet ( ) ; final org . apache . rya . api . utils . CloseableIterator < org . eclipse . rdf4j . query . BindingSet > resultsIt = pcjs . listResults ( accumuloConn , pcjTableName , new org . apache . accumulo . core . security . Authorizations ( ) ) ; try { while ( resultsIt . hasNext ( ) ) { results . add ( resultsIt . next ( ) ) ; } } finally { resultsIt . close ( ) ; } final java . util . Set < org . eclipse . rdf4j . query . BindingSet > expected = com . google . common . collect . Sets . newHashSet ( alice , bob , charlie ) ; "<AssertPlaceHolder>" ; } close ( ) { }
org . junit . Assert . assertEquals ( expected , results )
testLoad ( ) { E entity = this . saveOneEntity ( this . createInstance ( getDefaultConfig ( ) ) ) ; K id = entity . getId ( ) ; entity = crudOperations . load ( id ) ; "<AssertPlaceHolder>" ; } load ( java . lang . Long ) { return entityManager . find ( cn . bc . identity . domain . AuthData . class , id ) ; }
org . junit . Assert . assertNotNull ( entity )
testCorrectnessOfOutOfScopeProcessorPort2 ( ) { org . apache . taverna . scufl2 . api . profiles . ProcessorBinding pb = new org . apache . taverna . scufl2 . api . profiles . ProcessorBinding ( ) ; org . apache . taverna . scufl2 . api . core . Processor processor = new org . apache . taverna . scufl2 . api . core . Processor ( ) ; pb . setBoundProcessor ( processor ) ; org . apache . taverna . scufl2 . api . profiles . ProcessorOutputPortBinding pipb = new org . apache . taverna . scufl2 . api . profiles . ProcessorOutputPortBinding ( ) ; pipb . setParent ( pb ) ; org . apache . taverna . scufl2 . api . core . Processor otherProcessor = new org . apache . taverna . scufl2 . api . core . Processor ( ) ; org . apache . taverna . scufl2 . api . port . OutputProcessorPort elsewherePort = new org . apache . taverna . scufl2 . api . port . OutputProcessorPort ( ) ; elsewherePort . setParent ( otherProcessor ) ; pipb . setBoundProcessorPort ( elsewherePort ) ; org . apache . taverna . scufl2 . validation . correctness . CorrectnessValidator cv = new org . apache . taverna . scufl2 . validation . correctness . CorrectnessValidator ( ) ; org . apache . taverna . scufl2 . validation . correctness . ReportCorrectnessValidationListener rcvl = new org . apache . taverna . scufl2 . validation . correctness . ReportCorrectnessValidationListener ( ) ; cv . checkCorrectness ( pipb , false , rcvl ) ; java . util . Set < org . apache . taverna . scufl2 . validation . correctness . report . OutOfScopeValueProblem > outOfScopeValueProblems = rcvl . getOutOfScopeValueProblems ( ) ; boolean problem = false ; for ( org . apache . taverna . scufl2 . validation . correctness . report . OutOfScopeValueProblem nlp : outOfScopeValueProblems ) { if ( ( ( nlp . getBean ( ) . equals ( pipb ) ) && ( nlp . getFieldName ( ) . equals ( "boundProcessorPort" ) ) ) && ( nlp . getValue ( ) . equals ( elsewherePort ) ) ) { problem = true ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return ( getClass ( ) ) == ( obj . getClass ( ) ) ; }
org . junit . Assert . assertTrue ( problem )
test43getUserRolesByExternalID ( ) { destroySession ( ) ; setup ( ) ; org . apache . ranger . db . XXPortalUserRoleDao xPortalUserRoleDao = org . mockito . Mockito . mock ( org . apache . ranger . db . XXPortalUserRoleDao . class ) ; org . apache . ranger . view . VXUser vXUser = vxUser ( ) ; org . apache . ranger . view . VXPortalUser userProfile = userProfile ( ) ; java . util . List < org . apache . ranger . view . VXString > vStringRolesList = new java . util . ArrayList < org . apache . ranger . view . VXString > ( ) ; org . apache . ranger . view . VXString vXStringObj = new org . apache . ranger . view . VXString ( ) ; vXStringObj . setValue ( "ROLE_USER" ) ; vStringRolesList . add ( vXStringObj ) ; java . util . List < org . apache . ranger . entity . XXPortalUserRole > xPortalUserRoleList = new java . util . ArrayList < org . apache . ranger . entity . XXPortalUserRole > ( ) ; org . apache . ranger . entity . XXPortalUserRole XXPortalUserRole = new org . apache . ranger . entity . XXPortalUserRole ( ) ; XXPortalUserRole . setId ( org . apache . ranger . biz . TestXUserMgr . userId ) ; XXPortalUserRole . setUserId ( org . apache . ranger . biz . TestXUserMgr . userId ) ; XXPortalUserRole . setUserRole ( "ROLE_USER" ) ; xPortalUserRoleList . add ( XXPortalUserRole ) ; java . util . List < org . apache . ranger . entity . XXUserPermission > xUserPermissionsList = new java . util . ArrayList < org . apache . ranger . entity . XXUserPermission > ( ) ; org . apache . ranger . entity . XXUserPermission xUserPermissionObj = xxUserPermission ( ) ; xUserPermissionsList . add ( xUserPermissionObj ) ; java . util . List < org . apache . ranger . entity . XXGroupPermission > xGroupPermissionList = new java . util . ArrayList < org . apache . ranger . entity . XXGroupPermission > ( ) ; org . apache . ranger . entity . XXGroupPermission xGroupPermissionObj = xxGroupPermission ( ) ; xGroupPermissionList . add ( xGroupPermissionObj ) ; java . util . List < org . apache . ranger . view . VXGroupPermission > groupPermList = new java . util . ArrayList < org . apache . ranger . view . VXGroupPermission > ( ) ; org . apache . ranger . view . VXGroupPermission groupPermission = vxGroupPermission ( ) ; groupPermList . add ( groupPermission ) ; org . mockito . Mockito . when ( daoManager . getXXPortalUserRole ( ) ) . thenReturn ( xPortalUserRoleDao ) ; org . mockito . Mockito . when ( xPortalUserRoleDao . findByUserId ( org . apache . ranger . biz . TestXUserMgr . userId ) ) . thenReturn ( xPortalUserRoleList ) ; org . mockito . Mockito . when ( xUserMgr . getXUser ( org . apache . ranger . biz . TestXUserMgr . userId ) ) . thenReturn ( vXUser ) ; org . mockito . Mockito . when ( userMgr . getUserProfileByLoginId ( vXUser . getName ( ) ) ) . thenReturn ( userProfile ) ; java . util . List < java . lang . String > permissionList = new java . util . ArrayList < java . lang . String > ( ) ; permissionList . add ( RangerConstants . MODULE_USER_GROUPS ) ; org . apache . ranger . view . VXUser loggedInUser = vxUser ( ) ; java . util . List < java . lang . String > loggedInUserRole = new java . util . ArrayList < java . lang . String > ( ) ; loggedInUserRole . add ( RangerConstants . ROLE_ADMIN ) ; loggedInUser . setId ( 8L ) ; loggedInUser . setName ( "testuser" ) ; loggedInUser . setUserRoleList ( loggedInUserRole ) ; org . mockito . Mockito . when ( xUserService . getXUserByUserName ( "admin" ) ) . thenReturn ( loggedInUser ) ; org . apache . ranger . db . XXModuleDefDao mockxxModuleDefDao = org . mockito . Mockito . mock ( org . apache . ranger . db . XXModuleDefDao . class ) ; org . mockito . Mockito . when ( daoManager . getXXModuleDef ( ) ) . thenReturn ( mockxxModuleDefDao ) ; org . mockito . Mockito . when ( mockxxModuleDefDao . findAccessibleModulesByUserId ( 8L , 8L ) ) . thenReturn ( permissionList ) ; org . apache . ranger . view . VXStringList vXStringList = xUserMgr . getUserRolesByExternalID ( org . apache . ranger . biz . TestXUserMgr . userId ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . when ( restErrorUtil . createRESTException ( "User<sp>ID<sp>doesn't<sp>exist." , MessageEnums . INVALID_INPUT_DATA ) ) . thenThrow ( new javax . ws . rs . WebApplicationException ( ) ) ; thrown . expect ( javax . ws . rs . WebApplicationException . class ) ; org . mockito . Mockito . when ( userMgr . getUserProfileByLoginId ( ( ( java . lang . String ) ( org . mockito . Mockito . anyString ( ) ) ) ) ) . thenReturn ( null ) ; xUserMgr . getUserRolesByExternalID ( org . apache . ranger . biz . TestXUserMgr . userId ) ; } getUserRolesByExternalID ( java . lang . Long ) { org . apache . ranger . rest . VXStringList vXStringList = new org . apache . ranger . rest . VXStringList ( ) ; vXStringList = xUserMgr . getUserRolesByExternalID ( userId ) ; return vXStringList ; }
org . junit . Assert . assertNotNull ( vXStringList )
testAnalyzeSelectStatement_OK_WhereCondition_InExpression ( ) { final java . lang . String sql = "SELECT<sp>*<sp>FROM<sp>STUDENT<sp>WHERE<sp>ID<sp>IN<sp>('10010',<sp>'10011',<sp>'10012')" ; final org . codefamily . crabs . jdbc . lang . Statement actual = org . codefamily . crabs . jdbc . compiler . GrammarAnalyzer . analyze ( sql ) ; final org . codefamily . crabs . jdbc . lang . Statement expected = new org . codefamily . crabs . jdbc . lang . extension . statement . SelectStatement ( new org . codefamily . crabs . jdbc . compiler . SelectClause ( null , null , new org . codefamily . crabs . jdbc . compiler . SelectClause . ResultColumnDeclare ( ( ( java . lang . String ) ( null ) ) , new org . codefamily . crabs . jdbc . lang . expression . Reference ( ( ( java . lang . String ) ( null ) ) , org . codefamily . crabs . jdbc . lang . expression . Reference . ALL_COLUMN_IDENTIFIER ) ) ) , new org . codefamily . crabs . jdbc . compiler . FromClause ( new org . codefamily . crabs . jdbc . compiler . FromClause . SimpleTableDeclare ( null , "STUDENT" ) ) , new org . codefamily . crabs . jdbc . compiler . WhereClause ( new org . codefamily . crabs . jdbc . compiler . InExpression ( new org . codefamily . crabs . jdbc . lang . expression . Reference ( null , "ID" ) , new org . codefamily . crabs . jdbc . lang . expression . Constant ( "10010" ) , new org . codefamily . crabs . jdbc . lang . expression . Constant ( "10011" ) , new org . codefamily . crabs . jdbc . lang . expression . Constant ( "10012" ) ) ) , null , null , null , null ) ; "<AssertPlaceHolder>" ; } analyze ( java . lang . String ) { if ( sql == null ) { throw new java . lang . IllegalArgumentException ( "Argument[sql]<sp>is<sp>null." ) ; } final org . codefamily . crabs . jdbc . compiler . GrammarAnalyzer . GrammarAnalyzeContext context = new org . codefamily . crabs . jdbc . compiler . GrammarAnalyzer . GrammarAnalyzeContext ( sql ) ; context . toNextToken ( ) ; final org . codefamily . crabs . jdbc . lang . Statement statement = org . codefamily . crabs . jdbc . compiler . GrammarAnalyzer . StatementGrammarAnalyzer . analyze ( context ) ; context . toNextToken ( ) ; if ( ( ( context . currentTokenType ( ) ) == ( org . codefamily . crabs . jdbc . compiler . GrammarAnalyzer . TokenType . SYMBOL ) ) && ( ( context . currentTokenToSymbol ( ) ) == ';' ) ) { context . toNextToken ( ) ; } if ( ( context . currentTokenType ( ) ) == ( org . codefamily . crabs . jdbc . compiler . GrammarAnalyzer . TokenType . EOF ) ) { return statement ; } throw org . codefamily . crabs . jdbc . compiler . GrammarAnalyzer . newSQLException ( context , "Unexpected<sp>sql<sp>end." , context . currentTokenStartPosition ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
getActive_shouldCompareWithCurrentDateIfDateNull ( ) { org . openmrs . PatientState patientState = new org . openmrs . PatientState ( ) ; patientState . setStartDate ( leftRange ) ; patientState . setEndDate ( leftRange ) ; patientState . setVoided ( false ) ; boolean active = patientState . getActive ( null ) ; "<AssertPlaceHolder>" ; } getActive ( java . util . Date ) { if ( onDate == null ) { onDate = new java . util . Date ( ) ; } return ( ( ! ( getVoided ( ) ) ) && ( ( org . openmrs . util . OpenmrsUtil . compareWithNullAsEarliest ( startDate , onDate ) ) <= 0 ) ) && ( ( org . openmrs . util . OpenmrsUtil . compareWithNullAsLatest ( endDate , onDate ) ) > 0 ) ; }
org . junit . Assert . assertFalse ( active )
testReplaceGivenServerNull ( ) { try { java . lang . String actual = flex . messaging . util . SettingsReplaceUtil . replaceAllTokensGivenServerName ( "http://{server.name}:{server.port}/{context.root}/foo.mxml" , null , null , null , "http" ) ; org . junit . Assert . fail ( ( "MessageException<sp>expected.<sp>Result<sp>was<sp>" + actual ) ) ; } catch ( flex . messaging . MessageException me ) { java . lang . String error = "{context.root}<sp>token<sp>cannot" ; "<AssertPlaceHolder>" ; } } getMessage ( ) { return ( ( flex . messaging . messages . Message ) ( getSource ( ) ) ) ; }
org . junit . Assert . assertTrue ( me . getMessage ( ) . contains ( error ) )
pathUtilTest13 ( ) { java . io . File [ ] roots = java . io . File . listRoots ( ) ; java . io . File basePath = new java . io . File ( ( ( roots [ 0 ] ) + "some" ) ) ; java . io . File relativePath = new java . io . File ( ( ( ( ( ( ( ( roots [ 0 ] ) + "some" ) + ( java . io . File . separatorChar ) ) + "dir" ) + ( java . io . File . separatorChar ) ) + "dir2" ) + ( java . io . File . separatorChar ) ) ) ; java . lang . String path = org . jf . util . PathUtil . getRelativeFileInternal ( basePath , relativePath ) ; "<AssertPlaceHolder>" ; } getRelativeFileInternal ( java . io . File , java . io . File ) { java . util . ArrayList < java . lang . String > basePath = org . jf . util . PathUtil . getPathComponents ( canonicalBaseFile ) ; java . util . ArrayList < java . lang . String > pathToRelativize = org . jf . util . PathUtil . getPathComponents ( canonicalFileToRelativize ) ; if ( ! ( basePath . get ( 0 ) . equals ( pathToRelativize . get ( 0 ) ) ) ) { return canonicalFileToRelativize . getPath ( ) ; } int commonDirs ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( commonDirs = 1 ; ( commonDirs < ( basePath . size ( ) ) ) && ( commonDirs < ( pathToRelativize . size ( ) ) ) ; commonDirs ++ ) { if ( ! ( basePath . get ( commonDirs ) . equals ( pathToRelativize . get ( commonDirs ) ) ) ) { break ; } } boolean first = true ; for ( int i = commonDirs ; i < ( basePath . size ( ) ) ; i ++ ) { if ( ! first ) { sb . append ( File . separatorChar ) ; } else { first = false ; } sb . append ( ".." ) ; } first = true ; for ( int i = commonDirs ; i < ( pathToRelativize . size ( ) ) ; i ++ ) { if ( first ) { if ( ( sb . length ( ) ) != 0 ) { sb . append ( File . separatorChar ) ; } first = false ; } else { sb . append ( File . separatorChar ) ; } sb . append ( pathToRelativize . get ( i ) ) ; } if ( ( sb . length ( ) ) == 0 ) { return "." ; } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( path , ( ( "dir" + ( java . io . File . separatorChar ) ) + "dir2" ) )
testUAndQuery_DIGIT ( ) { java . lang . String inputStr = "0" ; java . lang . String matcher = "name=" + ( org . terasoluna . gfw . web . el . Functions . u ( inputStr ) ) ; java . util . Map < java . lang . String , java . lang . Object > map = new java . util . LinkedHashMap < java . lang . String , java . lang . Object > ( ) ; map . put ( "name" , inputStr ) ; java . lang . String actual = org . terasoluna . gfw . web . el . Functions . query ( map ) ; "<AssertPlaceHolder>" ; } query ( java . lang . Object ) { if ( params == null ) { return "" ; } java . lang . Class < ? > clazz = params . getClass ( ) ; if ( org . springframework . beans . BeanUtils . isSimpleValueType ( clazz ) ) { return "" ; } return org . terasoluna . gfw . web . el . Functions . mapToQuery ( org . terasoluna . gfw . web . el . Functions . OBJECT_TO_MAP_CONVERTER . convert ( params ) ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( matcher ) )
testHaalPersoonOp ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Persoon persoon = persoonJpaRepository . haalPersoonOp ( 1 ) ; "<AssertPlaceHolder>" ; } haalPersoonOp ( java . lang . Integer ) { try { return persoonVolledigRepository . leesGeserializeerdModel ( id ) ; } catch ( java . lang . Throwable e ) { nl . bzk . brp . bevraging . dataaccess . PersoonsLijstJpaService . LOGGER . error ( "{}" , e ) ; } return null ; }
org . junit . Assert . assertNotNull ( persoon )
testGetLogger ( ) { org . slf4j . Logger _logger = org . jacorb . notification . util . LogUtil . getLogger ( "name" ) ; "<AssertPlaceHolder>" ; } getLogger ( java . lang . String ) { return org . slf4j . LoggerFactory . getLogger ( name ) ; }
org . junit . Assert . assertNotNull ( _logger )
testCreateKey ( ) { java . lang . String key1 = factory . createKey ( java . lang . String . class , com . github . dozermapper . core . classmap . Long . class ) ; java . lang . String key2 = factory . createKey ( java . lang . String . class , com . github . dozermapper . core . classmap . Long . class ) ; "<AssertPlaceHolder>" ; } createKey ( java . lang . Class , java . lang . Class ) { return createKey ( srcClass , destClass , null ) ; }
org . junit . Assert . assertEquals ( key1 , key2 )
testFindAll ( ) { for ( int i = 0 ; i < 10 ; i ++ ) { org . blog . core . domain . Blog blog = new org . blog . core . domain . Blog ( ( "http://www.test.org/" + i ) ) ; blogService . save ( getServiceContext ( ) , blog ) ; } java . util . List < org . blog . core . domain . Blog > all = blogService . findAll ( getServiceContext ( ) ) ; "<AssertPlaceHolder>" ; } getServiceContext ( ) { return org . sculptor . framework . test . AppEngineTestHelper . getServiceContext ( ) ; }
org . junit . Assert . assertEquals ( 10 , all . size ( ) )
deleteCustomerTest ( ) { com . squareup . connect . models . Customer customer = api . createCustomer ( new com . squareup . connect . models . CreateCustomerRequest ( ) . givenName ( "Amelia" ) . familyName ( "Earhart" ) . emailAddress ( "Amelia.Earhart@example.com" ) ) . getCustomer ( ) ; com . squareup . connect . models . DeleteCustomerResponse response = api . deleteCustomer ( customer . getId ( ) ) ; "<AssertPlaceHolder>" ; } getErrors ( ) { return errors ; }
org . junit . Assert . assertTrue ( response . getErrors ( ) . isEmpty ( ) )
testIsCollapsedWhenItIsRightArrow ( ) { final elemental2 . dom . HTMLElement arrow = mock ( elemental2 . dom . HTMLElement . class ) ; final elemental2 . dom . DOMTokenList classList = mock ( elemental2 . dom . DOMTokenList . class ) ; arrow . classList = classList ; when ( classList . contains ( eq ( org . kie . workbench . common . dmn . client . editors . types . listview . RIGHT_ARROW_CSS_CLASS ) ) ) . thenReturn ( true ) ; doReturn ( arrow ) . when ( view ) . getArrow ( ) ; "<AssertPlaceHolder>" ; } isCollapsed ( ) { return isCollapsed ( getArrow ( ) ) ; }
org . junit . Assert . assertTrue ( view . isCollapsed ( ) )
forGuavaMediaTypes ( ) { final org . apache . isis . viewer . restfulobjects . applib . util . Parser < com . google . common . net . MediaType > parser = org . apache . isis . viewer . restfulobjects . applib . util . Parser . forGuavaMediaType ( ) ; final com . google . common . net . MediaType mediaType = com . google . common . net . MediaType . parse ( "application/json" ) ; final java . lang . String asString = parser . asString ( mediaType ) ; final com . google . common . net . MediaType valueOf = parser . valueOf ( asString ) ; "<AssertPlaceHolder>" ; } is ( org . apache . isis . core . metamodel . spec . feature . Contributed ) { return new com . google . common . base . Predicate < T > ( ) { @ org . apache . isis . core . metamodel . specloader . specimpl . Override public boolean apply ( org . apache . isis . core . metamodel . spec . feature . ObjectMember input ) { return contributed . isIncluded ( ) ; } } ; }
org . junit . Assert . assertThat ( valueOf , org . hamcrest . CoreMatchers . is ( mediaType ) )
shouldGetNumberOfDimensionsReturnTheCorrectValue ( ) { int dimension = 5 ; org . uma . jmetal . util . point . Point point = new org . uma . jmetal . util . point . impl . ArrayPoint ( dimension ) ; "<AssertPlaceHolder>" ; } getDimension ( ) { return point . length ; }
org . junit . Assert . assertEquals ( dimension , point . getDimension ( ) )
testTrain_RegressionDataSet_ExecutorService ( ) { System . out . println ( "train" ) ; jsat . regression . RegressionDataSet trainSet = jsat . FixedProblems . getSimpleRegression1 ( 150 , new java . util . Random ( 2 ) ) ; jsat . regression . RegressionDataSet testSet = jsat . FixedProblems . getSimpleRegression1 ( 50 , new java . util . Random ( 3 ) ) ; for ( boolean modification1 : new boolean [ ] { true , false } ) for ( jsat . classifiers . svm . SupportVectorLearner . CacheMode cacheMode : SupportVectorLearner . CacheMode . values ( ) ) { jsat . classifiers . svm . PlattSMO smo = new jsat . classifiers . svm . PlattSMO ( new jsat . distributions . kernels . RBFKernel ( 0.5 ) ) ; smo . setCacheMode ( cacheMode ) ; smo . setC ( 1 ) ; smo . setEpsilon ( 0.1 ) ; smo . setModificationOne ( modification1 ) ; smo . train ( trainSet , true ) ; double errors = 0 ; for ( int i = 0 ; i < ( testSet . size ( ) ) ; i ++ ) errors += java . lang . Math . pow ( ( ( testSet . getTargetValue ( i ) ) - ( smo . regress ( testSet . getDataPoint ( i ) ) ) ) , 2 ) ; "<AssertPlaceHolder>" ; } } size ( ) { return datapoints . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( errors / ( testSet . size ( ) ) ) < 1 ) )
testRemoveToken2 ( ) { org . apache . jackrabbit . oak . spi . security . authentication . token . TokenInfo info = tokenProvider . createToken ( userId , java . util . Collections . < java . lang . String , java . lang . Object > emptyMap ( ) ) ; "<AssertPlaceHolder>" ; } remove ( ) { com . google . common . base . Preconditions . checkState ( ( ! ( isEmpty ( ) ) ) , "Cannot<sp>remove<sp>item<sp>from<sp>empty<sp>list" ) ; org . apache . jackrabbit . oak . index . indexer . document . NodeStateEntry ret = head . next . data ; head . next . isValid = false ; head . next = head . next . next ; ( size ) -- ; memUsage -= ret . estimatedMemUsage ( ) ; if ( ( size ) == 0 ) { tail = head ; } return ret ; }
org . junit . Assert . assertTrue ( info . remove ( ) )
testIsOriginalURINotRewritten ( ) { org . hawkular . apm . api . model . trace . Consumer consumer = new org . hawkular . apm . api . model . trace . Consumer ( ) ; consumer . setUri ( org . hawkular . apm . api . utils . NodeUtilTest . ORIGINAL_URI ) ; "<AssertPlaceHolder>" ; } isOriginalURI ( org . hawkular . apm . api . model . trace . Node , java . lang . String ) { if ( node . getUri ( ) . equals ( uri ) ) { return true ; } if ( node . hasProperty ( org . hawkular . apm . api . utils . NodeUtil . APM_ORIGINAL_URI ) ) { return node . getProperties ( org . hawkular . apm . api . utils . NodeUtil . APM_ORIGINAL_URI ) . iterator ( ) . next ( ) . getValue ( ) . equals ( uri ) ; } return false ; }
org . junit . Assert . assertTrue ( org . hawkular . apm . api . utils . NodeUtil . isOriginalURI ( consumer , org . hawkular . apm . api . utils . NodeUtilTest . ORIGINAL_URI ) )
testDeclareRoles ( ) { final com . ibm . ws . container . service . metadata . MetaDataService mds = context . mock ( com . ibm . ws . container . service . metadata . MetaDataService . class ) ; final com . ibm . websphere . csi . J2EENameFactory jnf = context . mock ( com . ibm . websphere . csi . J2EENameFactory . class ) ; com . ibm . ws . webcontainer . osgi . webapp . WebAppConfiguration webAppConfig = new com . ibm . ws . webcontainer . osgi . webapp . WebAppConfiguration ( null , "name" ) ; com . ibm . ws . webcontainer31 . osgi . webapp . WebApp31 webApp = new com . ibm . ws . webcontainer31 . osgi . webapp . WebApp31 ( webAppConfig , null , null , mds , jnf , null ) ; webApp . withinContextInitOfProgAddListener = true ; boolean caughtUnsupportedOperationException = false ; try { webApp . declareRoles ( "someArg" ) ; } catch ( java . lang . UnsupportedOperationException uoe ) { caughtUnsupportedOperationException = true ; } "<AssertPlaceHolder>" ; com . ibm . ws . threadContext . ComponentMetaDataAccessorImpl . getComponentMetaDataAccessor ( ) . endContext ( ) ; } declareRoles ( java . lang . String [ ] ) { context . declareRoles ( arg0 ) ; }
org . junit . Assert . assertTrue ( caughtUnsupportedOperationException )
testNaturalZero ( ) { final int [ ] natural = org . hipparchus . util . MathArrays . natural ( 0 ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 0 , natural . length )
testUpdateAttachmentRetryOnce ( ) { _resource . configure ( "BigSwitchBcfResource" , _parameters ) ; when ( _bigswitchBcfApi . modifyAttachment ( ( ( java . lang . String ) ( any ( ) ) ) , ( ( java . lang . String ) ( any ( ) ) ) , ( ( com . cloud . network . bigswitch . AttachmentData ) ( any ( ) ) ) ) ) . thenThrow ( new com . cloud . network . bigswitch . BigSwitchBcfApiException ( ) ) . thenReturn ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; com . cloud . agent . api . BcfAnswer ans = ( ( com . cloud . agent . api . BcfAnswer ) ( _resource . executeRequest ( new com . cloud . agent . api . UpdateBcfAttachmentCommand ( "networkId" , "portId" , "tenantId" , "portname" ) ) ) ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return this . result ; }
org . junit . Assert . assertTrue ( ans . getResult ( ) )
testSignature ( ) { org . apache . cxf . service . Service service = createService ( ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties inProperties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; inProperties . setCallbackHandler ( new org . apache . cxf . ws . security . wss4j . TestPwdCallback ( ) ) ; java . util . Properties cryptoProperties = org . apache . wss4j . common . crypto . CryptoFactory . getProperties ( "insecurity.properties" , this . getClass ( ) . getClassLoader ( ) ) ; inProperties . setSignatureVerificationCryptoProperties ( cryptoProperties ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxInInterceptor inhandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxInInterceptor ( inProperties ) ; org . apache . cxf . ws . security . wss4j . WSS4JPrincipalInterceptor principalInterceptor = new org . apache . cxf . ws . security . wss4j . WSS4JPrincipalInterceptor ( ) ; principalInterceptor . setPrincipalName ( "CN=myAlias" ) ; service . getInInterceptors ( ) . add ( inhandler ) ; service . getInInterceptors ( ) . add ( principalInterceptor ) ; org . apache . cxf . ws . security . wss4j . Echo echo = createClientProxy ( ) ; org . apache . cxf . endpoint . Client client = org . apache . cxf . frontend . ClientProxy . getClient ( echo ) ; client . getInInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingInInterceptor ( ) ) ; client . getOutInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingOutInterceptor ( ) ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties properties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; java . util . List < org . apache . wss4j . stax . ext . WSSConstants . Action > actions = new java . util . ArrayList ( ) ; actions . add ( XMLSecurityConstants . SIGNATURE ) ; properties . setActions ( actions ) ; properties . setSignatureUser ( "myalias" ) ; java . util . Properties outCryptoProperties = org . apache . wss4j . common . crypto . CryptoFactory . getProperties ( "outsecurity.properties" , this . getClass ( ) . getClassLoader ( ) ) ; properties . setSignatureCryptoProperties ( outCryptoProperties ) ; properties . setCallbackHandler ( new org . apache . cxf . ws . security . wss4j . TestPwdCallback ( ) ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ohandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ( properties ) ; client . getOutInterceptors ( ) . add ( ohandler ) ; "<AssertPlaceHolder>" ; } echo ( int ) { return i ; }
org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) )
testBuildReportChunkSuccessfull2 ( ) { instance . buildReportChunk ( tchunk , doc , false ) ; java . util . ArrayList < java . lang . Object [ ] > events = docListener . getCapturedEvents ( ) ; "<AssertPlaceHolder>" ; java . lang . Object [ ] event = events . get ( 0 ) ; confirmParagraphAdded ( event , content ) ; } getCapturedEvents ( ) { return capturedEvents ; }
org . junit . Assert . assertTrue ( ( ( events . size ( ) ) == 1 ) )
testTaskSchedule ( ) { System . out . println ( "*****<sp>ResumableTimerTest.testTaskSchedule()<sp>*****" ) ; org . kaazing . net . impl . util . ResumableTimer timer = new org . kaazing . net . impl . util . ResumableTimer ( new java . lang . Runnable ( ) { @ org . kaazing . net . impl . util . Override public void run ( ) { System . out . println ( ( "Task<sp>scheduled<sp>at<sp>" + ( getFormattedDateTime ( ) ) ) ) ; } } , 5000 , false ) ; System . out . println ( ( "Starting<sp>timer<sp>at<sp>" + ( getFormattedDateTime ( ) ) ) ) ; timer . start ( ) ; try { java . lang . Thread . sleep ( 6000 ) ; "<AssertPlaceHolder>" ; timer . cancel ( ) ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; } finally { if ( timer != null ) { timer . cancel ( ) ; timer = null ; } } } didTaskExecute ( ) { return taskExecuted ; }
org . junit . Assert . assertTrue ( timer . didTaskExecute ( ) )
testParse ( ) { final java . lang . Object parsed = value . parseTextEntry ( null , "120" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( getActionMemento ( ) . getNameParmsId ( ) ) + "#" ) + ( getNumber ( ) ) ; }
org . junit . Assert . assertEquals ( "120" , parsed . toString ( ) )
testPopulateCxfSoapHeaderRequestFromExchange ( ) { org . apache . camel . component . cxf . DefaultCxfBinding cxfBinding = new org . apache . camel . component . cxf . DefaultCxfBinding ( ) ; cxfBinding . setHeaderFilterStrategy ( new org . apache . camel . support . DefaultHeaderFilterStrategy ( ) ) ; org . apache . camel . Exchange exchange = new org . apache . camel . support . DefaultExchange ( context ) ; org . apache . cxf . message . Exchange cxfExchange = new org . apache . cxf . message . ExchangeImpl ( ) ; java . util . Map < java . lang . String , java . lang . Object > requestContext = new java . util . HashMap ( ) ; java . lang . String expectedSoapActionHeader = "urn:hello:world" ; exchange . getIn ( ) . setHeader ( "soapAction" , expectedSoapActionHeader ) ; cxfBinding . populateCxfRequestFromExchange ( cxfExchange , exchange , requestContext ) ; java . lang . String actualSoapActionHeader = ( ( java . lang . String ) ( requestContext . get ( SoapBindingConstants . SOAP_ACTION ) ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return super . get ( key ) ; }
org . junit . Assert . assertEquals ( expectedSoapActionHeader , actualSoapActionHeader )
defaultDetectTest ( ) { java . lang . Class inClass = org . apache . streams . facebook . provider . FacebookEventClassifier . detectClass ( post ) ; "<AssertPlaceHolder>" ; } detectClass ( java . lang . String ) { java . util . Objects . requireNonNull ( json ) ; com . google . common . base . Preconditions . checkArgument ( org . apache . commons . lang . StringUtils . isNotEmpty ( json ) ) ; com . fasterxml . jackson . databind . node . ObjectNode objectNode ; try { objectNode = ( ( com . fasterxml . jackson . databind . node . ObjectNode ) ( org . apache . streams . jackson . StreamsJacksonMapper . getInstance ( ) . readTree ( json ) ) ) ; } catch ( java . io . IOException ex ) { org . apache . streams . facebook . provider . FacebookEventClassifier . LOGGER . error ( "Exception<sp>while<sp>trying<sp>to<sp>detect<sp>class:<sp>{}" , ex . getMessage ( ) ) ; return null ; } if ( ( objectNode . findValue ( "about" ) ) != null ) { return org . apache . streams . facebook . Page . class ; } else if ( ( objectNode . findValue ( "statusType" ) ) != null ) { return org . apache . streams . facebook . Post . class ; } else { return org . apache . streams . facebook . Post . class ; } }
org . junit . Assert . assertEquals ( inClass , org . apache . streams . facebook . Post . class )
testEqualsObject ( ) { final nl . moderniseringgba . migratie . conversie . model . lo3 . element . Lo3LandCode landCode = new nl . moderniseringgba . migratie . conversie . model . lo3 . element . Lo3LandCode ( "1234" ) ; final nl . moderniseringgba . migratie . conversie . model . lo3 . element . Lo3LandCode landCode2 = new nl . moderniseringgba . migratie . conversie . model . lo3 . element . Lo3LandCode ( "1234" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == null ) { return false ; } if ( obj == ( this ) ) { return true ; } if ( ( obj . getClass ( ) ) != ( getClass ( ) ) ) { return false ; } final nl . bzk . migratiebrp . util . common . Version . VersionLine rhs = ( ( nl . bzk . migratiebrp . util . common . Version . VersionLine ) ( obj ) ) ; return new org . apache . commons . lang3 . builder . EqualsBuilder ( ) . append ( this . group , rhs . group ) . append ( this . artifact , rhs . artifact ) . append ( this . version , rhs . version ) . append ( this . build , rhs . build ) . append ( this . revision , rhs . revision ) . isEquals ( ) ; }
org . junit . Assert . assertTrue ( landCode . equals ( landCode2 ) )
buildConfigurationRelease ( ) { com . sap . prd . mobile . ios . mios . xcodeprojreader . BuildConfiguration conf = configList . getBuildConfigurations ( ) . getByName ( "Release" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return getDict ( ) . getString ( "name" ) ; }
org . junit . Assert . assertEquals ( "Release" , conf . getName ( ) )
testNoRepeatsVisit2 ( ) { org . antlr . runtime . tree . TreeWizard wiz = new org . antlr . runtime . tree . TreeWizard ( org . antlr . test . TestTreeWizard . adaptor , org . antlr . test . TestTreeWizard . tokens ) ; org . antlr . runtime . tree . CommonTree t = ( ( org . antlr . runtime . tree . CommonTree ) ( wiz . create ( "(A<sp>B<sp>(A<sp>C<sp>B)<sp>B<sp>D<sp>D)" ) ) ) ; final java . util . List < java . lang . Object > elements = new java . util . ArrayList < java . lang . Object > ( ) ; wiz . visit ( t , wiz . getTokenType ( "C" ) , new org . antlr . runtime . tree . TreeWizard . Visitor ( ) { @ org . antlr . test . Override public void visit ( java . lang . Object t ) { elements . add ( t ) ; } } ) ; java . lang . String found = elements . toString ( ) ; java . lang . String expecting = "[C]" ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( "[" + ( grammar . name ) ) + "." ) + ( name ) ) + ",index=" ) + ( index ) ) + ",line=" ) + ( tree . getToken ( ) . getLine ( ) ) ) + "]" ; }
org . junit . Assert . assertEquals ( expecting , found )
testLongArray ( ) { long [ ] array = new long [ ] { 1 , 2 , 3 , 4 , 5 } ; java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; java . io . DataOutputStream dos = new java . io . DataOutputStream ( bos ) ; org . apache . giraph . utils . WritableUtils . writeLongArray ( dos , array ) ; dos . close ( ) ; byte [ ] data = bos . toByteArray ( ) ; java . io . DataInputStream input = new java . io . DataInputStream ( new java . io . ByteArrayInputStream ( data ) ) ; long [ ] result = org . apache . giraph . utils . WritableUtils . readLongArray ( input ) ; "<AssertPlaceHolder>" ; } readLongArray ( java . io . DataInput ) { long [ ] res = null ; int size = dataInput . readInt ( ) ; if ( size >= 0 ) { res = new long [ size ] ; for ( int i = 0 ; i < size ; i ++ ) { res [ i ] = dataInput . readLong ( ) ; } } return res ; }
org . junit . Assert . assertArrayEquals ( array , result )
givenEmployeeList_andNameFilterList_thenObtainFilteredEmployeeList_usingLambda ( ) { java . util . List < com . baeldung . collection . filtering . Employee > filteredList ; java . util . List < com . baeldung . collection . filtering . Employee > originalList = buildEmployeeList ( ) ; java . util . List < java . lang . String > nameFilter = employeeNameFilter ( ) ; filteredList = originalList . stream ( ) . filter ( ( employee ) -> nameFilter . contains ( employee . getName ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; }
org . junit . Assert . assertThat ( filteredList . size ( ) , org . hamcrest . Matchers . is ( nameFilter . size ( ) ) )
testRemove ( ) { org . jboss . dmr . ModelNode actual = org . hawkular . dmr . api . OperationBuilder . remove ( ) . address ( ) . subsystemDatasources ( ) . datasource ( org . hawkular . dmrclient . OperationBuilderTest . DATASOURCE_NAME ) . parentBuilder ( ) . build ( ) ; java . lang . String expected = "{\n" + ( ( ( ( ( "<sp>\"operation\"<sp>=><sp>\"remove\",\n" + "<sp>\"address\"<sp>=><sp>[\n" ) + "<sp>(\"subsystem\"<sp>=><sp>\"datasources\"),\n" ) + "<sp>(\"data-source\"<sp>=><sp>\"h2\")\n" ) + "<sp>]\n" ) + "}" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return java . lang . String . format ( "%s[value=%s]" , super . toString ( ) , getValue ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual . toString ( ) )
shouldNotCreateGlobalStateDirectory ( ) { initializeStateDirectory ( false ) ; final java . io . File globalStateDir = directory . globalStateDir ( ) ; "<AssertPlaceHolder>" ; } globalStateDir ( ) { final java . io . File dir = new java . io . File ( stateDir , "global" ) ; if ( ( ( createStateDirectory ) && ( ! ( dir . exists ( ) ) ) ) && ( ! ( dir . mkdir ( ) ) ) ) { throw new org . apache . kafka . streams . errors . ProcessorStateException ( java . lang . String . format ( "global<sp>state<sp>directory<sp>[%s]<sp>doesn't<sp>exist<sp>and<sp>couldn't<sp>be<sp>created" , dir . getPath ( ) ) ) ; } return dir ; }
org . junit . Assert . assertFalse ( globalStateDir . exists ( ) )
testMethod ( ) { SystemProperty . numWorkers . setProperty ( "2" ) ; final boolean [ ] result = new boolean [ ] { false } ; edu . rice . pcdp . PCDP . finish ( ( ) -> { result [ 0 ] = new edu . rice . pcdp . future . TestFutureCancel0 ( ) . run ( ) ; } ) ; "<AssertPlaceHolder>" ; } run ( ) { edu . rice . pcdp . PCDP . finish ( ( ) -> { final int acc0 = 1 ; async ( ( ) -> { int acc1 = 2 ; async ( ( ) -> { int acc2 = 3 ; async ( ( ) -> { int acc3 = ( acc0 + acc1 ) + acc2 ; res = acc3 == 6 ; } ) ; } ) ; } ) ; } ) ; return res ; }
org . junit . Assert . assertEquals ( true , result [ 0 ] )
testMin0 ( ) { limit . setMinimum ( "0" ) ; limit . setMinimum ( ( ( java . lang . String ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } getMinimum ( ) { return ( minimum ) == null ? null : minimum . toPlainString ( ) ; }
org . junit . Assert . assertNull ( limit . getMinimum ( ) )
northernNorthSouthNodeMultipleCrossings ( ) { getNorthSouthUpwardMultipleCrossingGraph ( ) ; int crossingCount = initCounterForLayerWithIndexAndCountInLayer ( 0 ) ; "<AssertPlaceHolder>" ; } initCounterForLayerWithIndexAndCountInLayer ( int ) { setUpIds ( ) ; int numPorts = 0 ; for ( org . eclipse . elk . alg . layered . graph . Layer l : getGraph ( ) ) { for ( org . eclipse . elk . alg . layered . graph . LNode lNode : l ) { numPorts += lNode . getPorts ( ) . size ( ) ; } } org . eclipse . elk . alg . layered . p3order . counting . CrossingsCounter counter = new org . eclipse . elk . alg . layered . p3order . counting . CrossingsCounter ( new int [ numPorts ] ) ; return counter . countNorthSouthPortCrossingsInLayer ( getGraph ( ) . toNodeArray ( ) [ layerIndex ] ) ; }
org . junit . Assert . assertThat ( crossingCount , org . hamcrest . CoreMatchers . is ( 3 ) )
testJUMP_2 ( ) { org . ethereum . vm . VM vm = new org . ethereum . vm . VM ( ) ; program = new org . ethereum . vm . Program ( org . spongycastle . util . encoders . Hex . decode ( "600C5860CC60DD60EE60FF" ) , invoke ) ; try { vm . step ( program ) ; vm . step ( program ) ; } finally { "<AssertPlaceHolder>" ; } } isStopped ( ) { return stopped ; }
org . junit . Assert . assertTrue ( program . isStopped ( ) )
testLimitWithNamedParam ( ) { com . orientechnologies . orient . core . sql . Map < java . lang . String , java . lang . Object > params = new com . orientechnologies . orient . core . sql . HashMap < java . lang . String , java . lang . Object > ( ) ; params . put ( "lim" , 2 ) ; com . orientechnologies . orient . core . sql . List < com . orientechnologies . orient . core . record . impl . ODocument > qResult = com . orientechnologies . orient . core . sql . OCommandExecutorSQLSelectTest . db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "select<sp>from<sp>foo<sp>limit<sp>:lim" ) ) . execute ( params ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>yet" ) ; }
org . junit . Assert . assertEquals ( qResult . size ( ) , 2 )
testEmpty ( ) { final fr . gouv . vitam . common . server . application . configuration . DbConfigurationImpl dbConfiguration0 = new fr . gouv . vitam . common . server . application . configuration . DbConfigurationImpl ( ) ; final java . util . List < fr . gouv . vitam . common . server . application . configuration . MongoDbNode > nodes = dbConfiguration0 . getMongoDbNodes ( ) ; "<AssertPlaceHolder>" ; } getMongoDbNodes ( ) { return mongoDbNodes ; }
org . junit . Assert . assertNull ( nodes )
should_add_memoized_path_to_frontier ( ) { au . edu . wehi . idsv . debruijn . positional . KmerPathNode n = N ( 1 , 1 , 1 ) ; au . edu . wehi . idsv . debruijn . positional . TraversalNode tn = new au . edu . wehi . idsv . debruijn . positional . TraversalNode ( new au . edu . wehi . idsv . debruijn . positional . KmerPathSubnode ( n ) , 0 ) ; au . edu . wehi . idsv . debruijn . positional . MemoizedTraverse mt = new au . edu . wehi . idsv . debruijn . positional . MemoizedTraverse ( ) ; mt . memoize ( tn ) ; "<AssertPlaceHolder>" ; } peekFrontier ( ) { if ( frontier . isEmpty ( ) ) return null ; return frontier . first ( ) ; }
org . junit . Assert . assertEquals ( tn , mt . peekFrontier ( ) )
testExistsWithNoValue ( ) { org . hl7 . fhir . r4 . utils . Patient patient = new org . hl7 . fhir . r4 . utils . Patient ( ) ; patient . setDeceased ( new org . hl7 . fhir . r4 . utils . BooleanType ( ) ) ; java . util . List < org . hl7 . fhir . r4 . utils . Base > eval = org . hl7 . fhir . r4 . utils . FhirPathEngineR4Test . ourEngine . evaluate ( patient , "Patient.deceased.exists()" ) ; org . hl7 . fhir . r4 . utils . FhirPathEngineR4Test . ourLog . info ( eval . toString ( ) ) ; "<AssertPlaceHolder>" ; } get ( int ) { if ( ( myOrderedTags ) == null ) { myOrderedTags = new java . util . ArrayList < ca . uhn . fhir . model . api . Tag > ( ) ; for ( ca . uhn . fhir . model . api . Tag next : myTagSet ) { myOrderedTags . add ( next ) ; } } return myOrderedTags . get ( theIndex ) ; }
org . junit . Assert . assertFalse ( ( ( org . hl7 . fhir . r4 . utils . BooleanType ) ( eval . get ( 0 ) ) ) . getValue ( ) )
testUpdateJobXml ( ) { java . lang . String jobName = "pr" ; java . lang . String xmlString = "<xml>some<sp>xml<sp>goes<sp>here</xml>" ; org . mockito . Mockito . when ( client . post_xml ( org . mockito . Mockito . anyString ( ) , org . mockito . Mockito . eq ( xmlString ) ) ) . thenReturn ( xmlString ) ; server . updateJob ( jobName , xmlString ) ; org . mockito . ArgumentCaptor < java . lang . String > captureString = org . mockito . ArgumentCaptor . forClass ( java . lang . String . class ) ; org . mockito . Mockito . verify ( client ) . post_xml ( org . mockito . Mockito . eq ( "/job/pr/config.xml" ) , captureString . capture ( ) ) ; "<AssertPlaceHolder>" ; } post_xml ( java . lang . String , java . lang . String ) { org . apache . http . client . methods . HttpPost request = new org . apache . http . client . methods . HttpPost ( api ( path ) ) ; if ( xml_data != null ) { request . setEntity ( new org . apache . http . entity . StringEntity ( xml_data , org . apache . http . entity . ContentType . APPLICATION_XML ) ) ; } org . apache . http . HttpResponse response = client . execute ( request , localContext ) ; int status = response . getStatusLine ( ) . getStatusCode ( ) ; if ( ( status < 200 ) || ( status >= 300 ) ) { throw new org . apache . http . client . HttpResponseException ( status , response . getStatusLine ( ) . getReasonPhrase ( ) ) ; } try { java . io . InputStream content = response . getEntity ( ) . getContent ( ) ; java . util . Scanner s = new java . util . Scanner ( content , com . offbytwo . jenkins . client . JenkinsHttpClient . CHARSET_UTF_8 ) ; java . lang . StringBuffer sb = new java . lang . StringBuffer ( ) ; while ( s . hasNext ( ) ) { sb . append ( s . next ( ) ) ; } return sb . toString ( ) ; } finally { org . apache . http . util . EntityUtils . consume ( response . getEntity ( ) ) ; } }
org . junit . Assert . assertEquals ( xmlString , captureString . getValue ( ) )
testMigrateVDBXML ( ) { java . io . File vdb = new java . io . File ( ( ( ( org . teiid . core . util . UnitTestUtil . getTestDataPath ( ) ) + "/" ) + "portfolio-vdb.xml" ) ) ; java . lang . String content = org . teiid . runtime . util . ConvertVDB . convert ( vdb ) ; java . lang . String expected = org . teiid . core . util . ObjectConverterUtil . convertFileToString ( new java . io . File ( ( ( ( org . teiid . core . util . UnitTestUtil . getTestDataPath ( ) ) + "/" ) + "portfolio-converted-vdb.ddl" ) ) ) ; "<AssertPlaceHolder>" ; } getTestDataPath ( ) { return org . teiid . core . util . UnitTestUtil . DEFAULT_TESTDATA_PATH ; }
org . junit . Assert . assertEquals ( expected , content )
constructor_varArgs ( ) { com . querydsl . core . types . Expression < java . lang . String > stringVal = com . querydsl . core . types . ConstantImpl . create ( "" ) ; com . querydsl . core . types . ProjectionsTest . VarArgs instance = com . querydsl . core . types . Projections . constructor ( com . querydsl . core . types . ProjectionsTest . VarArgs . class , stringVal , stringVal ) . newInstance ( "X" , "Y" ) ; "<AssertPlaceHolder>" ; } constructor ( java . lang . Class , com . querydsl . core . types . Class [ ] , com . querydsl . core . types . Expression [ ] ) { return new com . querydsl . core . types . ConstructorExpression < T > ( type , paramTypes , exprs ) ; }
org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "X" , "Y" } , instance . args )
testDeploymentId ( ) { org . camunda . bpm . engine . impl . cmmn . entity . repository . CaseDefinitionEntity activity = ( ( org . camunda . bpm . engine . impl . cmmn . entity . repository . CaseDefinitionEntity ) ( handler . handleElement ( caseDefinition , context ) ) ) ; java . lang . String deploymentId = context . getDeployment ( ) . getId ( ) ; "<AssertPlaceHolder>" ; } getDeploymentId ( ) { return deploymentId ; }
org . junit . Assert . assertEquals ( deploymentId , activity . getDeploymentId ( ) )
testEvaluationPhraseThreeTermFail ( ) { java . lang . String query = buildFunction ( phraseFunction , Constants . TERM_OFFSET_MAP_JEXL_VARIABLE_NAME , "'cat'" , "'dog'" , "'rat'" ) ; org . apache . commons . jexl2 . Expression expr = datawave . query . jexl . functions . ContentFunctionsTest . engine . createExpression ( query ) ; java . util . List < datawave . ingest . protobuf . TermWeightPosition > list1 ; java . util . List < datawave . ingest . protobuf . TermWeightPosition > list2 ; java . util . List < datawave . ingest . protobuf . TermWeightPosition > list3 ; list1 = asList ( 1 , 2 , 4 ) ; list2 = asList ( 5 , 7 , 9 ) ; list3 = asList ( 6 , 8 , 10 ) ; termOffSetMap . put ( "dog" , new datawave . query . jexl . functions . TermFrequencyList ( com . google . common . collect . Maps . immutableEntry ( new datawave . query . jexl . functions . TermFrequencyList . Zone ( "CONTENT" , true , eventId ) , list1 ) ) ) ; termOffSetMap . put ( "cat" , new datawave . query . jexl . functions . TermFrequencyList ( com . google . common . collect . Maps . immutableEntry ( new datawave . query . jexl . functions . TermFrequencyList . Zone ( "CONTENT" , true , eventId ) , list2 ) ) ) ; termOffSetMap . put ( "rat" , new datawave . query . jexl . functions . TermFrequencyList ( com . google . common . collect . Maps . immutableEntry ( new datawave . query . jexl . functions . TermFrequencyList . Zone ( "CONTENT" , true , eventId ) , list3 ) ) ) ; context . set ( Constants . TERM_OFFSET_MAP_JEXL_VARIABLE_NAME , termOffSetMap ) ; java . lang . Object o = expr . evaluate ( context ) ; "<AssertPlaceHolder>" ; } expect ( java . lang . Object , java . lang . Boolean ) { if ( null == result ) { return Boolean . FALSE . equals ( expected ) ; } if ( result instanceof java . lang . Boolean ) { return result . equals ( expected ) ; } return false ; }
org . junit . Assert . assertTrue ( datawave . query . jexl . functions . ContentFunctionsTest . expect ( o , false ) )
testReverseList ( ) { org . stringtemplate . v4 . ST e = new org . stringtemplate . v4 . ST ( "<reverse(names);<sp>separator=\",<sp>\">" ) ; e . add ( "names" , java . util . Arrays . asList ( "Ter" , "Tom" , "Sriram" ) ) ; java . lang . String expecting = "Sriram,<sp>Tom,<sp>Ter" ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
org . junit . Assert . assertEquals ( expecting , e . render ( ) )
testMapVerkeerdeStapelType ( ) { final java . util . Set < nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Stapel > stapels = new java . util . LinkedHashSet ( ) ; final nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Stapel stapel = new nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Stapel ( new nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Persoon ( nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . SoortPersoon . INGESCHREVENE ) , "01" , 0 ) ; final nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . StapelVoorkomen stapelVoorkomen = new nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . StapelVoorkomen ( stapel , 0 , nl . bzk . migratiebrp . synchronisatie . dal . service . impl . mapper . BrpIstKindMapperTest . ADMINISTRATIEVE_HANDELING ) ; stapel . addStapelVoorkomen ( stapelVoorkomen ) ; stapels . add ( stapel ) ; "<AssertPlaceHolder>" ; } map ( java . util . Set ) { if ( ( persoonAdresSet == null ) || ( persoonAdresSet . isEmpty ( ) ) ) { return null ; } else { return mapper . map ( persoonAdresSet . iterator ( ) . next ( ) . getPersoonAdresHistorieSet ( ) ) ; } }
org . junit . Assert . assertNull ( mapper . map ( stapels ) )
subscribeToMulticastCallCallsSubscriptionManagerWithCorrectArguments ( ) { io . joynr . proxy . ConnectorTest . TestBroadcastInterface . TestBroadcastListener listener = new io . joynr . proxy . ConnectorTest . TestBroadcastInterface . TestBroadcastAdapter ( ) ; joynr . OnChangeSubscriptionQos subscriptionQos = new joynr . OnChangeSubscriptionQos ( ) ; java . lang . String [ ] partitions = new java . lang . String [ ] { "partition1" , "partition2" , "partition3" } ; io . joynr . proxy . ConnectorInvocationHandler connector = createConnector ( ) ; "<AssertPlaceHolder>" ; try { java . lang . reflect . Method method = io . joynr . proxy . ConnectorTest . TestBroadcastInterface . class . getDeclaredMethod ( "subscribeToTestMulticast" , io . joynr . proxy . ConnectorTest . TestBroadcastInterface . TestBroadcastListener . class , joynr . OnChangeSubscriptionQos . class , java . lang . String [ ] . class ) ; io . joynr . proxy . invocation . MulticastSubscribeInvocation invocation = new io . joynr . proxy . invocation . MulticastSubscribeInvocation ( method , new java . lang . Object [ ] { listener , subscriptionQos , partitions } , null ) ; connector . executeSubscriptionMethod ( invocation ) ; verify ( subscriptionManager , times ( 1 ) ) . registerMulticastSubscription ( fromParticipantId , toDiscoveryEntries , invocation ) ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ( "Unexpected<sp>exception<sp>from<sp>multicast<sp>subscribe<sp>call:<sp>" + e ) ) ; } }
org . junit . Assert . assertNotNull ( connector )
testSplit2 ( ) { "<AssertPlaceHolder>" ; } split ( java . lang . String ) { if ( ( commandline == null ) || ( ( commandline . length ( ) ) == 0 ) ) { return new java . util . ArrayList < java . lang . String > ( ) ; } final java . util . List < java . lang . String > args = new java . util . ArrayList < java . lang . String > ( ) ; final java . lang . StringBuilder current = new java . lang . StringBuilder ( ) ; int mode = org . jacoco . core . runtime . CommandLineSupport . M_STRIP_WHITESPACE ; int endChar = org . jacoco . core . runtime . CommandLineSupport . BLANK ; for ( final char c : commandline . toCharArray ( ) ) { switch ( mode ) { case org . jacoco . core . runtime . CommandLineSupport . M_STRIP_WHITESPACE : if ( ! ( java . lang . Character . isWhitespace ( c ) ) ) { if ( c == ( org . jacoco . core . runtime . CommandLineSupport . QUOTE ) ) { endChar = org . jacoco . core . runtime . CommandLineSupport . QUOTE ; } else { current . append ( c ) ; endChar = org . jacoco . core . runtime . CommandLineSupport . BLANK ; } mode = org . jacoco . core . runtime . CommandLineSupport . M_PARSE_ARGUMENT ; } break ; case org . jacoco . core . runtime . CommandLineSupport . M_PARSE_ARGUMENT : if ( c == endChar ) { org . jacoco . core . runtime . CommandLineSupport . addArgument ( args , current ) ; mode = org . jacoco . core . runtime . CommandLineSupport . M_STRIP_WHITESPACE ; } else if ( c == ( org . jacoco . core . runtime . CommandLineSupport . SLASH ) ) { current . append ( org . jacoco . core . runtime . CommandLineSupport . SLASH ) ; mode = org . jacoco . core . runtime . CommandLineSupport . M_ESCAPED ; } else { current . append ( c ) ; } break ; case org . jacoco . core . runtime . CommandLineSupport . M_ESCAPED : if ( ( c == ( org . jacoco . core . runtime . CommandLineSupport . QUOTE ) ) || ( c == ( org . jacoco . core . runtime . CommandLineSupport . SLASH ) ) ) { current . setCharAt ( ( ( current . length ( ) ) - 1 ) , c ) ; } else if ( c == endChar ) { org . jacoco . core . runtime . CommandLineSupport . addArgument ( args , current ) ; mode = org . jacoco . core . runtime . CommandLineSupport . M_STRIP_WHITESPACE ; } else { current . append ( c ) ; } mode = org . jacoco . core . runtime . CommandLineSupport . M_PARSE_ARGUMENT ; break ; } } org . jacoco . core . runtime . CommandLineSupport . addArgument ( args , current ) ; return args ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( ) , org . jacoco . core . runtime . CommandLineSupport . split ( "" ) )
testSimpleBootStrap ( ) { "<AssertPlaceHolder>" ; } isInitialized ( ) { synchronized ( pt . ist . fenixframework . FenixFramework . INIT_LOCK ) { return pt . ist . fenixframework . FenixFramework . initialized ; } }
org . junit . Assert . assertTrue ( pt . ist . fenixframework . FenixFramework . isInitialized ( ) )
testGetSetSession ( ) { final java . util . Properties properties = new java . util . Properties ( java . lang . System . getProperties ( ) ) ; properties . setProperty ( EmailConstants . MAIL_TRANSPORT_PROTOCOL , EmailConstants . SMTP ) ; properties . setProperty ( EmailConstants . MAIL_PORT , java . lang . String . valueOf ( getMailServerPort ( ) ) ) ; properties . setProperty ( EmailConstants . MAIL_HOST , strTestMailServer ) ; properties . setProperty ( EmailConstants . MAIL_DEBUG , java . lang . String . valueOf ( false ) ) ; final javax . mail . Session mySession = javax . mail . Session . getInstance ( properties , null ) ; email . setMailSession ( mySession ) ; "<AssertPlaceHolder>" ; } getMailSession ( ) { if ( ( this . session ) == null ) { final java . util . Properties properties = new java . util . Properties ( java . lang . System . getProperties ( ) ) ; properties . setProperty ( EmailConstants . MAIL_TRANSPORT_PROTOCOL , EmailConstants . SMTP ) ; if ( org . apache . commons . mail . EmailUtils . isEmpty ( this . hostName ) ) { this . hostName = properties . getProperty ( EmailConstants . MAIL_HOST ) ; } if ( org . apache . commons . mail . EmailUtils . isEmpty ( this . hostName ) ) { throw new org . apache . commons . mail . EmailException ( "Cannot<sp>find<sp>valid<sp>hostname<sp>for<sp>mail<sp>session" ) ; } properties . setProperty ( EmailConstants . MAIL_PORT , this . smtpPort ) ; properties . setProperty ( EmailConstants . MAIL_HOST , this . hostName ) ; properties . setProperty ( EmailConstants . MAIL_DEBUG , java . lang . String . valueOf ( this . debug ) ) ; properties . setProperty ( EmailConstants . MAIL_TRANSPORT_STARTTLS_ENABLE , ( isStartTLSEnabled ( ) ? "true" : "false" ) ) ; properties . setProperty ( EmailConstants . MAIL_TRANSPORT_STARTTLS_REQUIRED , ( isStartTLSRequired ( ) ? "true" : "false" ) ) ; properties . setProperty ( EmailConstants . MAIL_SMTP_SEND_PARTIAL , ( isSendPartial ( ) ? "true" : "false" ) ) ; properties . setProperty ( EmailConstants . MAIL_SMTPS_SEND_PARTIAL , ( isSendPartial ( ) ? "true" : "false" ) ) ; if ( ( this . authenticator ) != null ) { properties . setProperty ( EmailConstants . MAIL_SMTP_AUTH , "true" ) ; } if ( isSSLOnConnect ( ) ) { properties . setProperty ( EmailConstants . MAIL_PORT , this . sslSmtpPort ) ; properties . setProperty ( EmailConstants . MAIL_SMTP_SOCKET_FACTORY_PORT , this . sslSmtpPort ) ; properties . setProperty ( EmailConstants . MAIL_SMTP_SOCKET_FACTORY_CLASS , "javax.net.ssl.SSLSocketFactory" ) ; properties . setProperty ( EmailConstants . MAIL_SMTP_SOCKET_FACTORY_FALLBACK , "false" ) ; } if ( ( ( isSSLOnConnect ( ) ) || ( isStartTLSEnabled ( ) ) ) && ( isSSLCheckServerIdentity ( ) ) ) { properties . setProperty ( EmailConstants . MAIL_SMTP_SSL_CHECKSERVERIDENTITY , "true" ) ; } if ( ( this . bounceAddress ) != null ) { properties . setProperty ( EmailConstants . MAIL_SMTP_FROM , this . bounceAddress ) ; } if ( ( this . socketTimeout ) > 0 ) { properties . setProperty ( EmailConstants . MAIL_SMTP_TIMEOUT , java . lang . Integer . toString ( this . socketTimeout ) ) ; } if ( ( this . socketConnectionTimeout ) > 0 ) { properties . setProperty ( EmailConstants . MAIL_SMTP_CONNECTIONTIMEOUT , java . lang . Integer . toString ( this . socketConnectionTimeout ) ) ; } this . session = javax . mail . Session . getInstance ( properties , this . authenticator ) ; } return this . session ; }
org . junit . Assert . assertEquals ( mySession , email . getMailSession ( ) )
testMonitor ( ) { final org . apache . druid . client . cache . MemcachedCache cache = org . apache . druid . client . cache . MemcachedCache . create ( memcachedCacheConfig ) ; final org . apache . druid . java . util . emitter . core . Emitter emitter = org . easymock . EasyMock . createNiceMock ( org . apache . druid . java . util . emitter . core . Emitter . class ) ; final java . util . Collection < org . apache . druid . java . util . emitter . core . Event > events = new java . util . ArrayList ( ) ; final org . apache . druid . java . util . emitter . service . ServiceEmitter serviceEmitter = new org . apache . druid . java . util . emitter . service . ServiceEmitter ( "service" , "host" , emitter ) { @ org . apache . druid . client . cache . Override public void emit ( org . apache . druid . java . util . emitter . core . Event event ) { events . add ( event ) ; } } ; while ( events . isEmpty ( ) ) { java . lang . Thread . sleep ( memcachedCacheConfig . getTimeout ( ) ) ; cache . doMonitor ( serviceEmitter ) ; } "<AssertPlaceHolder>" ; com . fasterxml . jackson . databind . ObjectMapper mapper = new org . apache . druid . jackson . DefaultObjectMapper ( ) ; for ( org . apache . druid . java . util . emitter . core . Event event : events ) { org . apache . druid . client . cache . MemcachedCacheTest . log . debug ( "Found<sp>event<sp>`%s`" , mapper . writeValueAsString ( event . toMap ( ) ) ) ; } } isEmpty ( ) { return ( length ( ) ) == 0 ; }
org . junit . Assert . assertFalse ( events . isEmpty ( ) )
testMapAllBoundaryEvents ( ) { org . camunda . bpm . model . bpmn . BpmnModelInstance testProcess = org . camunda . bpm . engine . test . api . runtime . migration . ModifiableBpmnModelInstance . modify ( ProcessModels . SUBPROCESS_PROCESS ) . activityBuilder ( "subProcess" ) . boundaryEvent ( "error" ) . error ( org . camunda . bpm . engine . test . api . runtime . migration . MigrationPlanCreationTest . ERROR_CODE ) . moveToActivity ( "subProcess" ) . boundaryEvent ( "escalation" ) . escalation ( org . camunda . bpm . engine . test . api . runtime . migration . MigrationPlanCreationTest . ESCALATION_CODE ) . done ( ) ; org . camunda . bpm . engine . repository . ProcessDefinition sourceProcessDefinition = testHelper . deployAndGetDefinition ( testProcess ) ; org . camunda . bpm . engine . repository . ProcessDefinition targetProcessDefinition = testHelper . deployAndGetDefinition ( testProcess ) ; org . camunda . bpm . engine . migration . MigrationPlan migrationPlan = runtimeService . createMigrationPlan ( sourceProcessDefinition . getId ( ) , targetProcessDefinition . getId ( ) ) . mapActivities ( "subProcess" , "subProcess" ) . mapActivities ( "error" , "error" ) . mapActivities ( "escalation" , "escalation" ) . mapActivities ( "userTask" , "userTask" ) . build ( ) ; "<AssertPlaceHolder>" . hasSourceProcessDefinition ( sourceProcessDefinition ) . hasTargetProcessDefinition ( targetProcessDefinition ) . hasInstructions ( migrate ( "subProcess" ) . to ( "subProcess" ) , migrate ( "error" ) . to ( "error" ) , migrate ( "escalation" ) . to ( "escalation" ) , migrate ( "userTask" ) . to ( "userTask" ) ) ; } build ( ) { return migrationPlan ; }
org . junit . Assert . assertThat ( migrationPlan )
isShowThirdCategory_NoCategory ( ) { givenModel ( newCategories ( false , "red" , "blue" ) , newEntries ( "s1" , "s2" ) ) ; boolean result = ctrl . isShowThirdCategory ( ) ; "<AssertPlaceHolder>" ; } isShowThirdCategory ( ) { return ( model . getNumberOfColumns ( ) ) == 3 ; }
org . junit . Assert . assertFalse ( result )
testSetWithBoolean ( ) { preferences . set ( "Developer<sp>Tools" , "Proxy<sp>Auto<sp>Connect" , true ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String , java . lang . String ) { for ( com . opera . core . systems . preferences . OperaPreference p : this ) { if ( ( p . getSection ( ) . equalsIgnoreCase ( section ) ) && ( p . getKey ( ) . equalsIgnoreCase ( key ) ) ) { return p ; } } return null ; }
org . junit . Assert . assertEquals ( true , preferences . get ( "Developer<sp>Tools" , "Proxy<sp>Auto<sp>Connect" ) . getValue ( ) )
doesntLogIfMultipleActivationProfilesButNoMatchingActiveProfiles ( ) { projectProperties . setProperty ( com . lassekoskela . maven . ACTIVATION_PROFILE_KEY , "some,<sp>other,<sp>thirdProfile" ) ; extension . afterProjectsRead ( session ) ; "<AssertPlaceHolder>" ; } afterProjectsRead ( org . apache . maven . execution . MavenSession ) { if ( shouldBeActive ( session , com . lassekoskela . maven . BuildTimelineExtension . ACTIVATION_PROPERTY_KEY , com . lassekoskela . maven . BuildTimelineExtension . ACTIVATION_PROFILE_KEY ) ) { registerExecutionListener ( session , new com . lassekoskela . maven . timeline . BuildTimelineListener ( logger ) ) ; } }
org . junit . Assert . assertNull ( log )
testPriorityLevel10 ( ) { int n = jannovar . common . VariantType . priorityLevel ( VariantType . STOPLOSS ) ; "<AssertPlaceHolder>" ; } priorityLevel ( jannovar . common . VariantType ) { switch ( vt ) { case FS_DELETION : case FS_INSERTION : case NON_FS_SUBSTITUTION : case FS_SUBSTITUTION : case MISSENSE : case NON_FS_DELETION : case NON_FS_INSERTION : case SPLICING : case STOPGAIN : case STOPLOSS : case FS_DUPLICATION : case NON_FS_DUPLICATION : case START_LOSS : return 1 ; case ncRNA_EXONIC : case ncRNA_SPLICING : return 2 ; case UTR3 : return 3 ; case UTR5 : return 4 ; case SYNONYMOUS : return 5 ; case INTRONIC : return 6 ; case ncRNA_INTRONIC : return 7 ; case UPSTREAM : case DOWNSTREAM : return 8 ; case INTERGENIC : return 9 ; case ERROR : return 10 ; default : return 10 ; } }
org . junit . Assert . assertEquals ( 1 , n )
stringParsingFromExistingStringMachine ( ) { unquietcode . tools . esm . StringStateMachine esm1 = new unquietcode . tools . esm . StringStateMachine ( ) ; esm1 . addTransition ( "one" , "two" ) ; esm1 . addTransition ( "two" , "one" ) ; esm1 . addTransition ( "two" , "Three" ) ; esm1 . addTransition ( "three" , "three" ) ; java . lang . String stringRepresentation = esm1 . toString ( ) ; unquietcode . tools . esm . StringStateMachine esm2 = new unquietcode . tools . esm . StringStateMachine ( ) ; unquietcode . tools . esm . StateMachineStringParser . configureStateMachine ( java . lang . String . class , stringRepresentation , esm2 ) ; "<AssertPlaceHolder>" ; } configureStateMachine ( java . lang . Class , java . lang . String , T extends unquietcode . tools . esm . FactoryStateMachine ) { unquietcode . tools . esm . StateMachineStringParser . configure ( clazz , new java . lang . StringBuilder ( string ) , stateMachine ) ; }
org . junit . Assert . assertEquals ( stringRepresentation , esm2 . toString ( ) )
testIsClosed ( ) { org . apache . druid . server . lookup . cache . loading . OnHeapLoadingCache onHeapLookupLoadingCache = new org . apache . druid . server . lookup . cache . loading . OnHeapLoadingCache ( 4 , 15 , 100L , 10L , 10L ) ; onHeapLookupLoadingCache . close ( ) ; "<AssertPlaceHolder>" ; } isClosed ( ) { return closed ; }
org . junit . Assert . assertTrue ( onHeapLookupLoadingCache . isClosed ( ) )
testNewifyConstructorReferences3 ( ) { org . codehaus . jdt . groovy . model . GroovyCompilationUnit foo = createUnit ( "p" , "def<sp>m()<sp>{\n" 3 , ( "package<sp>p\n" + ( ( ( "def<sp>m()<sp>{\n" 5 + "<sp>Foo(int<sp>i)<sp>{}\n" ) + "def<sp>m()<sp>{\n" 2 ) + "def<sp>m()<sp>{\n" 0 ) ) ) ; createUnit ( "def<sp>m()<sp>{\n" 1 , "Bar" , ( "import<sp>p.Foo\n" + ( ( ( ( ( "@Newify(Foo)\n" + "def<sp>m()<sp>{\n" ) + "<sp>Foo()\n" ) + "def<sp>m()<sp>{\n" 6 ) + "def<sp>m()<sp>{\n" 4 ) + "}\n" ) ) ) ; long ctorRefs = searchForReferences ( foo . getType ( "def<sp>m()<sp>{\n" 3 ) . getMethods ( ) [ 0 ] ) . stream ( ) . filter ( ( match ) -> ( ( org . eclipse . jdt . core . IMethod ) ( match . getElement ( ) ) ) . getResource ( ) . getName ( ) . equals ( "Bar.groovy" ) ) . count ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } org . codehaus . groovy . eclipse . quickfix . proposals . ProblemDescriptor other = ( ( org . codehaus . groovy . eclipse . quickfix . proposals . ProblemDescriptor ) ( obj ) ) ; if ( ! ( java . util . Arrays . equals ( messages , other . messages ) ) ) { return false ; } if ( ( type ) == null ) { if ( ( other . type ) != null ) { return false ; } } else if ( ! ( type . equals ( other . type ) ) ) { return false ; } return true ; }
org . junit . Assert . assertEquals ( 2 , ctorRefs )
testNamespaceIosb01 ( ) { org . dresdenocl . pivotmodel . Namespace namespace = org . dresdenocl . metamodels . xsd . test . TestXmlSchemaIOSB . modelUnderTest . findNamespace ( java . util . Arrays . asList ( new java . lang . String [ ] { org . dresdenocl . model . ModelConstants . ROOT_PACKAGE_NAME , "Iosb" } ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( namespace )
testIsReified ( ) { org . glassfish . hk2 . utilities . AliasDescriptor < org . glassfish . hk2 . tests . locator . alias . MyService > aliasDescriptor = getAliasDescriptor ( "testIsReified" , "foo" ) ; "<AssertPlaceHolder>" ; } isReified ( ) { return parent . isReified ( ) ; }
org . junit . Assert . assertTrue ( aliasDescriptor . isReified ( ) )
multiLevelBuy ( ) { book . enter ( 1 , Side . SELL , 1000 , 100 ) ; book . enter ( 2 , Side . SELL , 1001 , 100 ) ; book . enter ( 3 , Side . SELL , 999 , 50 ) ; book . enter ( 4 , Side . BUY , 1000 , 100 ) ; com . paritytrading . parity . match . Event firstAsk = new com . paritytrading . parity . match . Add ( 1 , Side . SELL , 1000 , 100 ) ; com . paritytrading . parity . match . Event secondAsk = new com . paritytrading . parity . match . Add ( 2 , Side . SELL , 1001 , 100 ) ; com . paritytrading . parity . match . Event thirdAsk = new com . paritytrading . parity . match . Add ( 3 , Side . SELL , 999 , 50 ) ; com . paritytrading . parity . match . Event firstMatch = new com . paritytrading . parity . match . Match ( 3 , 4 , Side . BUY , 999 , 50 , 0 ) ; com . paritytrading . parity . match . Event secondMatch = new com . paritytrading . parity . match . Match ( 1 , 4 , Side . BUY , 1000 , 50 , 50 ) ; "<AssertPlaceHolder>" ; } collect ( ) { return events ; }
org . junit . Assert . assertEquals ( asList ( firstAsk , secondAsk , thirdAsk , firstMatch , secondMatch ) , events . collect ( ) )
parsePageWithNoWikiText ( ) { org . wikireverse . commoncrawl . Page page = parse ( TestHelper . RESULT_1 , TestHelper . NO_WIKI_TEXT ) ; "<AssertPlaceHolder>" ; } getLinkUrls ( ) { return linkUrls ; }
org . junit . Assert . assertEquals ( 0 , page . getLinkUrls ( ) . size ( ) )
testForProxy_NoProxyAuth ( ) { org . eclipse . aether . RepositorySystemSession session = newSession ( ) ; org . eclipse . aether . repository . Proxy proxy = newProxy ( null ) ; org . eclipse . aether . repository . RemoteRepository repo = newRepo ( newAuth ( ) , proxy ) ; org . eclipse . aether . repository . AuthenticationContext context = org . eclipse . aether . repository . AuthenticationContext . forProxy ( session , repo ) ; "<AssertPlaceHolder>" ; } forProxy ( org . eclipse . aether . RepositorySystemSession , org . eclipse . aether . repository . RemoteRepository ) { org . eclipse . aether . repository . Proxy proxy = repository . getProxy ( ) ; return org . eclipse . aether . repository . AuthenticationContext . newInstance ( session , repository , proxy , ( proxy != null ? proxy . getAuthentication ( ) : null ) ) ; }
org . junit . Assert . assertNull ( context )