input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testPublicModifer ( ) { com . thoughtworks . qdox . model . impl . AbstractJavaEntity entity = newAbstractJavaEntity ( ) ; entity . setModifiers ( java . util . Collections . singletonList ( "public" ) ) ; "<AssertPlaceHolder>" ; } isPublic ( ) { return isModifierPresent ( "public" ) ; }
org . junit . Assert . assertTrue ( entity . isPublic ( ) )
testRemove ( ) { com . liferay . journal . model . JournalFolder newJournalFolder = addJournalFolder ( ) ; _persistence . remove ( newJournalFolder ) ; com . liferay . journal . model . JournalFolder existingJournalFolder = _persistence . fetchByPrimaryKey ( newJournalFolder . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertNull ( existingJournalFolder )
batchedProxyChainedStyleNoVerisons ( ) { java . lang . String host = "host.com" ; java . lang . String path = ( "/proxy/" + ( DefaultProxyUriManager . CHAINED_PARAMS_TOKEN ) ) + "/path" ; java . util . List < org . apache . shindig . common . uri . Uri > resources = com . google . common . collect . ImmutableList . < org . apache . shindig . common . uri . Uri > of ( org . apache . shindig . gadgets . uri . DefaultProxyUriManagerTest . RESOURCE_1 , org . apache . shindig . gadgets . uri . DefaultProxyUriManagerTest . RESOURCE_2 , org . apache . shindig . gadgets . uri . DefaultProxyUriManagerTest . RESOURCE_3 ) ; java . util . List < org . apache . shindig . common . uri . Uri > uris = makeAndGet ( host , path , true , true , resources ) ; "<AssertPlaceHolder>" ; for ( int i = 0 ; i < 3 ; ++ i ) { verifyChainedUri ( resources . get ( i ) , uris . get ( i ) , true , true , null , false , host , path ) ; } } size ( ) { java . util . List < java . lang . Object [ ] > s = stackHolder . get ( ) ; if ( s == null ) { return 0 ; } else { return s . size ( ) ; } }
org . junit . Assert . assertEquals ( 3 , uris . size ( ) )
testGetFamilies ( ) { java . lang . String [ ] expectedFamilies = new java . lang . String [ ] { "Databases<sp>NoSQL/MarkLogic" , "Big<sp>Data/MarkLogic" } ; java . lang . String [ ] actualFamilies = definition . getFamilies ( ) ; "<AssertPlaceHolder>" ; } getFamilies ( ) { return new java . lang . String [ ] { org . talend . components . processing . definition . ProcessingFamilyDefinition . NAME } ; }
org . junit . Assert . assertArrayEquals ( expectedFamilies , actualFamilies )
testExtractMinuteTime ( ) { java . lang . String sqlText = ( "select<sp>t,<sp>EXTRACT(MINUTE<sp>FROM<sp>t)<sp>as<sp>\"MINUTE\"<sp>from<sp>" + ( com . splicemachine . derby . utils . SpliceDateFunctionsIT . tableWatcherI ) ) + "<sp>order<sp>by<sp>t" ; try ( com . splicemachine . derby . utils . ResultSet rs = methodWatcher . executeQuery ( sqlText ) ) { java . lang . String expected = "T<sp>|MINUTE<sp>|\n" + ( ( ( ( ( ( "------------------\n" + "00:00:01<sp>|<sp>0<sp>|\n" ) + "10:30:29<sp>|<sp>30<sp>|\n" 1 ) + "10:30:29<sp>|<sp>30<sp>|\n" ) + "18:44:28<sp>|<sp>44<sp>|\n" ) + "10:30:29<sp>|<sp>30<sp>|\n" 0 ) + "23:59:59<sp>|<sp>59<sp>|" ) ; "<AssertPlaceHolder>" ; } } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
eb14_misdirectedRequest ( ) { try { org . apache . juneau . rest . client . remote . EndToEndInterfaceTest . ieb . misdirectedRequest ( ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . juneau . rest . client . remote . MisdirectedRequest e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return msg ; }
org . junit . Assert . assertEquals ( "foo" , e . getMessage ( ) )
testCollect ( ) { rapaio . data . Frame x = rapaio . data . SolidFrame . byVars ( rapaio . data . VarInt . seq ( 10 ) ) ; java . lang . Object [ ] a1 = x . stream ( ) . toArray ( ) ; java . lang . Object [ ] a2 = x . stream ( ) . toArray ( java . lang . Object [ ] :: new ) ; for ( int i = 0 ; i < 10 ; i ++ ) { "<AssertPlaceHolder>" ; } } toArray ( rapaio . experiment . io . json . IntFunction ) { return stream . toArray ( generator ) ; }
org . junit . Assert . assertEquals ( a1 [ i ] , a2 [ i ] )
testNullPOJO ( ) { "<AssertPlaceHolder>" ; } mapFrom ( java . lang . Object ) { if ( obj == null ) { return null ; } else { return new io . vertx . core . json . JsonObject ( ( ( io . vertx . core . json . Map < java . lang . String , java . lang . Object > ) ( Json . mapper . convertValue ( obj , io . vertx . core . json . Map . class ) ) ) ) ; } }
org . junit . Assert . assertNull ( io . vertx . core . json . JsonObject . mapFrom ( null ) )
shouldReplaceIncorrectLabels ( ) { java . util . List < java . lang . String > labels = java . util . Arrays . asList ( "authme" , "wrong" ) ; fr . xephi . authme . command . CommandDescription command = fr . xephi . authme . command . TestCommandsUtil . getCommandWithLabel ( fr . xephi . authme . command . help . HelpProviderTest . commands , "authme" , "register" ) ; java . util . List < java . lang . String > result = fr . xephi . authme . command . help . HelpProvider . filterCorrectLabels ( command , labels ) ; "<AssertPlaceHolder>" ; } filterCorrectLabels ( fr . xephi . authme . command . CommandDescription , java . util . List ) { java . util . List < fr . xephi . authme . command . CommandDescription > commands = fr . xephi . authme . command . CommandUtils . constructParentList ( command ) ; java . util . List < java . lang . String > correctLabels = new java . util . ArrayList ( ) ; boolean foundIncorrectLabel = false ; for ( int i = 0 ; i < ( commands . size ( ) ) ; ++ i ) { if ( ( ( ! foundIncorrectLabel ) && ( i < ( labels . size ( ) ) ) ) && ( commands . get ( i ) . hasLabel ( labels . get ( i ) ) ) ) { correctLabels . add ( labels . get ( i ) ) ; } else { foundIncorrectLabel = true ; correctLabels . add ( commands . get ( i ) . getLabels ( ) . get ( 0 ) ) ; } } return correctLabels ; }
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . contains ( "authme" , "register" ) )
testParseSimpleNoDecimals ( ) { java . lang . String source = "1<sp>+<sp>1i" ; org . hipparchus . complex . Complex expected = new org . hipparchus . complex . Complex ( 1 , 1 ) ; org . hipparchus . complex . Complex actual = complexFormat . parse ( source ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { java . text . ParsePosition parsePosition = new java . text . ParsePosition ( 0 ) ; org . hipparchus . geometry . euclidean . twod . Vector2D result = parse ( source , parsePosition ) ; if ( ( parsePosition . getIndex ( ) ) == 0 ) { throw new org . hipparchus . exception . MathIllegalStateException ( org . hipparchus . exception . LocalizedCoreFormats . CANNOT_PARSE_AS_TYPE , source , parsePosition . getErrorIndex ( ) , org . hipparchus . geometry . euclidean . twod . Vector2D . class ) ; } return result ; }
org . junit . Assert . assertEquals ( expected , actual )
testVirtualShowItemThrowsSetData ( ) { final org . eclipse . swt . widgets . LoggingListener log = new org . eclipse . swt . widgets . LoggingListener ( ) ; tree = new org . eclipse . swt . widgets . Tree ( shell , org . eclipse . swt . SWT . VIRTUAL ) ; tree . setItemCount ( 100 ) ; tree . setSize ( 100 , 100 ) ; tree . addListener ( SWT . SetData , log ) ; log . clear ( ) ; tree . showItem ( tree . getItem ( 30 ) ) ; "<AssertPlaceHolder>" ; } getItems ( ) { return items ; }
org . junit . Assert . assertTrue ( log . getItems ( ) . contains ( tree . getItem ( 30 ) ) )
testRemoveZeroesWhenCpuBecomesNegative ( ) { org . apache . storm . scheduler . resource . normalization . NormalizedResources resources = new org . apache . storm . scheduler . resource . normalization . NormalizedResources ( normalize ( java . util . Collections . singletonMap ( Constants . COMMON_CPU_RESOURCE_NAME , 1 ) ) ) ; org . apache . storm . scheduler . resource . normalization . NormalizedResources removedResources = new org . apache . storm . scheduler . resource . normalization . NormalizedResources ( normalize ( java . util . Collections . singletonMap ( Constants . COMMON_CPU_RESOURCE_NAME , 2 ) ) ) ; resources . remove ( removedResources , new org . apache . storm . scheduler . resource . normalization . ResourceMetrics ( new org . apache . storm . metric . StormMetricsRegistry ( ) ) ) ; "<AssertPlaceHolder>" ; } getTotalCpu ( ) { return normalizedResources . getTotalCpu ( ) ; }
org . junit . Assert . assertThat ( resources . getTotalCpu ( ) , org . hamcrest . CoreMatchers . is ( 0.0 ) )
testValidUri1 ( ) { connectionUri = "postgresql://" ; actualConfiguration = io . reactiverse . pgclient . PgConnectOptions . fromUri ( connectionUri ) ; expectedConfiguration = new io . reactiverse . pgclient . PgConnectOptions ( ) ; "<AssertPlaceHolder>" ; } fromUri ( java . lang . String ) { io . vertx . core . json . JsonObject parsedConfiguration = io . reactiverse . pgclient . impl . PgConnectionUriParser . parse ( connectionUri ) ; return new io . reactiverse . pgclient . PgConnectOptions ( parsedConfiguration ) ; }
org . junit . Assert . assertEquals ( expectedConfiguration , actualConfiguration )
case4 ( ) { org . openstack . atlas . usagerefactor . List < org . openstack . atlas . service . domain . usage . entities . LoadBalancerMergedHostUsage > mergedRecords = usagePollerHelper . processExistingEvents ( lbHostMap ) ; "<AssertPlaceHolder>" ; org . openstack . atlas . usagerefactor . junit . AssertLoadBalancerMergedHostUsage . hasValues ( 1234 , 123 , 0L , 0L , 0L , 0L , 0 , 0 , 1 , 0 , UsageEvent . UNSUSPEND_LOADBALANCER , "2013-04-10<sp>20:02:00" , mergedRecords . get ( 0 ) ) ; org . openstack . atlas . usagerefactor . junit . AssertLoadBalancerMergedHostUsage . hasValues ( 1234 , 123 , 30L , 0L , 150L , 0L , 0 , 0 , 1 , 5 , UsageEvent . SSL_MIXED_ON , "2013-04-10<sp>20:03:00" , mergedRecords . get ( 1 ) ) ; org . openstack . atlas . usagerefactor . junit . AssertLoadBalancerMergedHostUsage . hasValues ( 1234 , 123 , 40L , 110L , 40L , 230L , 0 , 0 , 1 , 3 , UsageEvent . SSL_ONLY_ON , "2013-04-10<sp>20:04:00" , mergedRecords . get ( 2 ) ) ; } size ( ) { return size ; }
org . junit . Assert . assertEquals ( 3 , mergedRecords . size ( ) )
happyPathTestCacheEnabled ( ) { java . util . Calendar currentTime = java . util . GregorianCalendar . getInstance ( ) ; currentTime . set ( 2017 , 2 , 5 , 3 , 30 ) ; when ( timeService . getCurrentTime ( ) ) . thenReturn ( currentTime . getTime ( ) ) ; java . util . Calendar currentTimeMinus2Minutes = java . util . GregorianCalendar . getInstance ( ) ; currentTimeMinus2Minutes . set ( 2017 , 2 , 5 , 3 , 28 ) ; when ( metadataCache . getLastRefreshTime ( ) ) . thenReturn ( currentTimeMinus2Minutes . getTime ( ) ) ; com . intuit . wasabi . assignment . cache . impl . AssignmentsMetadataCacheHealthCheck healthCheck = new com . intuit . wasabi . assignment . cache . impl . AssignmentsMetadataCacheHealthCheck ( metadataCache , timeService , metadataCacheInterval , allowedStaleTime , metadataCacheEnabled ) ; com . codahale . metrics . health . HealthCheck . Result result = healthCheck . check ( ) ; "<AssertPlaceHolder>" ; } isHealthy ( ) { return healthy ; }
org . junit . Assert . assertThat ( result . isHealthy ( ) , org . hamcrest . core . Is . is ( true ) )
Create3G_test9 ( ) { com . att . aro . core . configuration . pojo . Profile3G profile3g = mock ( com . att . aro . core . configuration . pojo . Profile3G . class ) ; when ( profile3g . getProfileType ( ) ) . thenReturn ( ProfileType . T3G ) ; when ( profile3g . getIdleDchPromoAvg ( ) ) . thenReturn ( 12000.0 ) ; when ( profile3g . getIdleDchPromoMin ( ) ) . thenReturn ( 1000.0 ) ; when ( profile3g . getIdleDchPromoMax ( ) ) . thenReturn ( 20000.0 ) ; when ( profile3g . getFachDchPromoAvg ( ) ) . thenReturn ( 1000.0 ) ; when ( profile3g . getFachDchPromoMin ( ) ) . thenReturn ( 2500.0 ) ; when ( profile3g . getFachDchPromoMax ( ) ) . thenReturn ( 6000.0 ) ; when ( profile3g . getDchFachTimer ( ) ) . thenReturn ( 5000.0 ) ; when ( profile3g . getFachIdleTimer ( ) ) . thenReturn ( 10000.0 ) ; double traceDuration = 2000.0 ; java . util . List < com . att . aro . core . packetanalysis . pojo . PacketInfo > packetlist = new java . util . ArrayList < com . att . aro . core . packetanalysis . pojo . PacketInfo > ( ) ; when ( pktInfoArray [ 0 ] . getTimeStamp ( ) ) . thenReturn ( ( ( date . getTime ( ) ) - 7500.0 ) ) ; when ( pktInfoArray [ 0 ] . getDir ( ) ) . thenReturn ( PacketDirection . DOWNLINK ) ; when ( pktInfoArray [ 0 ] . getLen ( ) ) . thenReturn ( 1000 ) ; when ( pktInfoArray [ 0 ] . getStateMachine ( ) ) . thenReturn ( RRCState . STATE_DCH ) ; packetlist . add ( pktInfoArray [ 0 ] ) ; when ( pktInfoArray [ 1 ] . getTimeStamp ( ) ) . thenReturn ( ( ( date . getTime ( ) ) + 10000.0 ) ) ; when ( pktInfoArray [ 1 ] . getDir ( ) ) . thenReturn ( PacketDirection . DOWNLINK ) ; when ( pktInfoArray [ 1 ] . getLen ( ) ) . thenReturn ( 1000 ) ; when ( pktInfoArray [ 1 ] . getStateMachine ( ) ) . thenReturn ( RRCState . STATE_DCH ) ; packetlist . add ( pktInfoArray [ 1 ] ) ; when ( pktInfoArray [ 2 ] . getTimeStamp ( ) ) . thenReturn ( ( ( date . getTime ( ) ) + 15000.0 ) ) ; when ( pktInfoArray [ 2 ] . getDir ( ) ) . thenReturn ( PacketDirection . DOWNLINK ) ; when ( pktInfoArray [ 2 ] . getLen ( ) ) . thenReturn ( 1000 ) ; when ( pktInfoArray [ 2 ] . getStateMachine ( ) ) . thenReturn ( RRCState . STATE_DCH ) ; packetlist . add ( pktInfoArray [ 2 ] ) ; java . util . List < com . att . aro . core . packetanalysis . pojo . RrcStateRange > testList = rrcStateRangeFactory . create ( packetlist , profile3g , traceDuration ) ; "<AssertPlaceHolder>" ; } size ( ) { return sessionTable . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , testList . size ( ) )
testOptionalToStream ( ) { java . util . Optional < java . lang . String > op = java . util . Optional . ofNullable ( "String<sp>value" ) ; java . util . stream . Stream < java . lang . String > strOptionalStream = op . stream ( ) ; java . util . stream . Stream < java . lang . String > filteredStream = strOptionalStream . filter ( ( str ) -> { return ( str != null ) && ( str . startsWith ( "String" ) ) ; } ) ; "<AssertPlaceHolder>" ; } count ( ) { return 2L ; }
org . junit . Assert . assertEquals ( 1 , filteredStream . count ( ) )
initJdbcPropertyStore ( ) { org . springframework . jdbc . datasource . embedded . EmbeddedDatabaseBuilder b2 = new org . springframework . jdbc . datasource . embedded . EmbeddedDatabaseBuilder ( ) ; org . springframework . jdbc . datasource . embedded . EmbeddedDatabase db2 = b2 . setType ( EmbeddedDatabaseType . HSQL ) . build ( ) ; org . ff4j . property . store . JdbcPropertyStore jdbcStore2 = new org . ff4j . property . store . JdbcPropertyStore ( db2 , "ff4j.xml" ) ; "<AssertPlaceHolder>" ; } build ( ) { return builder . get ( ) ; }
org . junit . Assert . assertNotNull ( jdbcStore2 )
testConverter1 ( ) { com . gargoylesoftware . htmlunit . html . HtmlPage page = webClient . getPage ( ( ( webUrl ) + "faces/converter/converter1.xhtml" ) ) ; "<AssertPlaceHolder>" ; } getPage ( java . lang . String ) { lastpage = ( ( com . gargoylesoftware . htmlunit . html . HtmlPage ) ( client . getPage ( getURL ( path ) ) ) ) ; if ( ( sessionId ) == null ) { parseSession ( lastpage ) ; } return lastpage ; }
org . junit . Assert . assertNotNull ( page )
checkTest ( ) { com . navercorp . pinpoint . web . vo . Application application = new com . navercorp . pinpoint . web . vo . Application ( com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleCheckerTest . FROM_SERVICE_NAME , com . navercorp . pinpoint . common . trace . ServiceType . STAND_ALONE ) ; com . navercorp . pinpoint . web . alarm . collector . MapStatisticsCallerDataCollector dataCollector = new com . navercorp . pinpoint . web . alarm . collector . MapStatisticsCallerDataCollector ( com . navercorp . pinpoint . web . alarm . DataCollectorFactory . DataCollectorCategory . CALLER_STAT , application , com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleCheckerTest . dao , java . lang . System . currentTimeMillis ( ) , 300000 ) ; com . navercorp . pinpoint . web . alarm . vo . Rule rule = new com . navercorp . pinpoint . web . alarm . vo . Rule ( com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleCheckerTest . FROM_SERVICE_NAME , com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleCheckerTest . SERVICE_TYPE , CheckerCategory . ERROR_COUNT_TO_CALLEE . getName ( ) , 5 , "testGroup" , false , false , ( ( com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleCheckerTest . TO_SERVICE_NAME ) + 1 ) ) ; com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleeChecker checker = new com . navercorp . pinpoint . web . alarm . checker . ErrorCountToCalleeChecker ( dataCollector , rule ) ; checker . check ( ) ; "<AssertPlaceHolder>" ; } isDetected ( ) { return detected ; }
org . junit . Assert . assertTrue ( checker . isDetected ( ) )
whenRandomDices_0point5_returnsStrategy2 ( ) { com . graphhopper . jsprit . core . algorithm . SearchStrategyManager managerUnderTest = new com . graphhopper . jsprit . core . algorithm . SearchStrategyManager ( ) ; com . graphhopper . jsprit . core . algorithm . SearchStrategy mockedStrategy1 = mock ( com . graphhopper . jsprit . core . algorithm . SearchStrategy . class ) ; com . graphhopper . jsprit . core . algorithm . SearchStrategy mockedStrategy2 = mock ( com . graphhopper . jsprit . core . algorithm . SearchStrategy . class ) ; when ( mockedStrategy1 . getId ( ) ) . thenReturn ( "strat1" ) ; when ( mockedStrategy2 . getId ( ) ) . thenReturn ( "strat2" ) ; managerUnderTest . addStrategy ( mockedStrategy1 , 0.2 ) ; managerUnderTest . addStrategy ( mockedStrategy2 , 0.8 ) ; java . util . Random mockedRandom = mock ( java . util . Random . class ) ; managerUnderTest . setRandom ( mockedRandom ) ; when ( mockedRandom . nextDouble ( ) ) . thenReturn ( 0.5 ) ; "<AssertPlaceHolder>" ; } getRandomStrategy ( ) { if ( ( random ) == null ) throw new java . lang . IllegalStateException ( "randomizer<sp>is<sp>null.<sp>make<sp>sure<sp>you<sp>set<sp>random<sp>object<sp>correctly" ) ; double randomFig = random . nextDouble ( ) ; double sumProbabilities = 0.0 ; for ( int i = 0 ; i < ( weights . size ( ) ) ; i ++ ) { sumProbabilities += ( weights . get ( i ) ) / ( sumWeights ) ; if ( randomFig < sumProbabilities ) { return strategies . get ( i ) ; } } throw new java . lang . IllegalStateException ( "no<sp>search-strategy<sp>found" ) ; }
org . junit . Assert . assertThat ( managerUnderTest . getRandomStrategy ( ) , org . hamcrest . CoreMatchers . is ( mockedStrategy2 ) )
isActivationAllowed_SuspendedSubscriptionNoPaymentEnabled ( ) { subscription . setStatus ( SubscriptionStatus . SUSPENDED ) ; subscription . setBillingContact ( null ) ; subscription . setPaymentInfo ( pInfo ) ; doReturn ( false ) . when ( accService ) . isPaymentTypeEnabled ( org . oscm . subscriptionservice . bean . SubscriptionServiceBeanSubscriptionActivation . SERVICE_KEY , 0 ) ; isActivationAllowed = subBean . isActivationAllowed ( subscription , true ) ; "<AssertPlaceHolder>" ; } isActivationAllowed ( org . oscm . domobjects . Subscription , boolean ) { if ( subscription == null ) { return false ; } if ( activateExpiredSubscription && ( ( subscription . getStatus ( ) ) == ( org . oscm . internal . types . enumtypes . SubscriptionStatus . EXPIRED ) ) ) { return true ; } if ( ( subscription . getStatus ( ) ) != ( org . oscm . internal . types . enumtypes . SubscriptionStatus . SUSPENDED ) ) { return false ; } if ( ! ( subscription . getPriceModel ( ) . isChargeable ( ) ) ) { return true ; } if ( ( subscription . getBillingContact ( ) ) == null ) { return false ; } org . oscm . domobjects . PaymentType subPayType = null ; org . oscm . domobjects . PaymentInfo paymentInfo = subscription . getPaymentInfo ( ) ; if ( paymentInfo != null ) { subPayType = paymentInfo . getPaymentType ( ) ; } if ( subPayType == null ) { return false ; } long serviceKey = subscription . getProduct ( ) . getKey ( ) ; boolean paymentEnabled ; paymentEnabled = accountService . isPaymentTypeEnabled ( serviceKey , subPayType . getKey ( ) ) ; return paymentEnabled ; }
org . junit . Assert . assertFalse ( isActivationAllowed )
testUpdateBatchKeeperActive ( ) { for ( com . ctrip . xpipe . redis . console . model . RedisTbl redisTbl : redises ) { redisTbl . setKeeperActive ( ( ! ( redisTbl . isKeeperActive ( ) ) ) ) ; } redisDao . updateBatchKeeperActive ( redises ) ; for ( com . ctrip . xpipe . redis . console . model . RedisTbl redisTbl : redises ) { com . ctrip . xpipe . redis . console . model . RedisTbl byPK = redisDao . findByPK ( redisTbl . getId ( ) ) ; "<AssertPlaceHolder>" ; } } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( redisTbl . isKeeperActive ( ) , byPK . isKeeperActive ( ) )
testBasic_OrderFail ( ) { restrictions = in . cubestack . android . lib . storm . criteria . StormRestrictions . restrictionsFor ( in . cubestack . apps . android . storm . entitites . RestrictionTestEntity . class ) ; "<AssertPlaceHolder>" ; in . cubestack . android . lib . storm . criteria . Restriction res = restrictions . equals ( "name" , "Supal<sp>Dubey" ) ; in . cubestack . android . lib . storm . criteria . Order order = in . cubestack . android . lib . storm . criteria . Order . orderFor ( in . cubestack . apps . android . storm . entitites . RestrictionTestEntity . class , new java . lang . String [ ] { "dsds" } , SortOrder . DESC ) ; res . sqlString ( order ) ; } restrictionsFor ( java . lang . Class ) { try { return new in . cubestack . android . lib . storm . criteria . StormRestrictions ( in . cubestack . android . lib . storm . core . EntityMetaDataCache . getMetaData ( entity ) ) ; } catch ( java . lang . Exception ex ) { throw new in . cubestack . android . lib . storm . core . StormRuntimeException ( ( "Invalid<sp>entity,<sp>please<sp>check<sp>your<sp>mapppings<sp>for<sp>" + ( entity . getName ( ) ) ) , ex ) ; } }
org . junit . Assert . assertNotNull ( restrictions )
cache_remains_active_on_server_on_client_close ( ) { org . terracotta . management . entity . sample . client . CacheFactory cacheFactory = new org . terracotta . management . entity . sample . client . CacheFactory ( java . net . URI . create ( "passthrough://stripe-1:9510" ) , "cat-clinic" ) ; cacheFactory . init ( ) ; org . terracotta . management . entity . sample . Cache cache = cacheFactory . getCache ( "cache" ) ; cache . put ( "client1" , "Mat" ) ; cacheFactory . close ( ) ; cacheFactory = new org . terracotta . management . entity . sample . client . CacheFactory ( java . net . URI . create ( "passthrough://stripe-1:9510" ) , "cat-clinic" ) ; cacheFactory . init ( ) ; cache = cacheFactory . getCache ( "cache" ) ; try { "<AssertPlaceHolder>" ; } finally { cacheFactory . close ( ) ; } } get ( java . util . concurrent . Future ) { return future . get ( timeout , TimeUnit . MILLISECONDS ) ; }
org . junit . Assert . assertThat ( cache . get ( "client1" ) , org . hamcrest . CoreMatchers . equalTo ( "Mat" ) )
testOriginalMultipleCalls ( ) { byte [ ] fileID1 = fileIDGenerator . getUpdatedFileID ( ) ; byte [ ] fileID2 = fileIDGenerator . getUpdatedFileID ( ) ; "<AssertPlaceHolder>" ; } getUpdatedFileID ( ) { return fixedFileID ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( fileID1 , fileID2 ) )
testInSimpleAsArray ( ) { java . util . List < java . lang . String > items = new java . util . LinkedList ( ) ; java . lang . String expected = "swift<sp>in<sp>(" ; int i = 0 ; int inBlockSize = config . getInt ( DatabaseConfigFactory . IN_OPERATOR_BLOCK_SIZE ) ; for ( ; i < ( inBlockSize - 1 ) ; i ++ ) { expected += i + ",<sp>" ; items . add ( ( "" + i ) ) ; } expected += i + ")" ; items . add ( ( "" + i ) ) ; org . hibernate . criterion . Criterion crit = org . candlepin . model . CPRestrictions . in ( "swift" , items . toArray ( ) ) ; org . hibernate . criterion . InExpression ie = ( ( org . hibernate . criterion . InExpression ) ( crit ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( this . getClass ( ) . getName ( ) ) ; builder . append ( "<sp>[" ) ; java . util . Iterator < E > iterator = this . collection . iterator ( ) ; while ( iterator . hasNext ( ) ) { builder . append ( iterator . next ( ) ) ; if ( iterator . hasNext ( ) ) { builder . append ( ",<sp>" ) ; } } builder . append ( ']' ) ; return builder . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , ie . toString ( ) )
testSaml2TokenHOKConfig ( ) { org . apache . cxf . service . Service service = createService ( ) ; java . util . Map < java . lang . String , java . lang . Object > inProperties = new java . util . HashMap ( ) ; inProperties . put ( ConfigurationConstants . ACTION , ( ( ( org . apache . wss4j . common . ConfigurationConstants . SAML_TOKEN_SIGNED ) + "<sp>" ) + ( org . apache . wss4j . common . ConfigurationConstants . SIGNATURE ) ) ) ; inProperties . put ( ConfigurationConstants . SIG_VER_PROP_FILE , "insecurity.properties" ) ; final java . util . Map < javax . xml . namespace . QName , java . lang . Object > customMap = new java . util . HashMap ( ) ; org . apache . cxf . ws . security . wss4j . saml . CustomSamlValidator validator = new org . apache . cxf . ws . security . wss4j . saml . CustomSamlValidator ( ) ; customMap . put ( WSConstants . SAML_TOKEN , validator ) ; customMap . put ( WSConstants . SAML2_TOKEN , validator ) ; inProperties . put ( WSS4JInInterceptor . VALIDATOR_MAP , customMap ) ; org . apache . cxf . ws . security . wss4j . WSS4JInInterceptor inInterceptor = new org . apache . cxf . ws . security . wss4j . WSS4JInInterceptor ( inProperties ) ; service . getInInterceptors ( ) . add ( inInterceptor ) ; 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 ( ) ) ; java . util . Map < java . lang . String , java . lang . Object > outConfig = new java . util . HashMap ( ) ; outConfig . put ( ConfigurationConstants . ACTION , ConfigurationConstants . SAML_TOKEN_SIGNED ) ; org . apache . cxf . ws . security . wss4j . saml . SAML2CallbackHandler callbackHandler = new org . apache . cxf . ws . security . wss4j . saml . SAML2CallbackHandler ( ) ; callbackHandler . setSignAssertion ( true ) ; callbackHandler . setConfirmationMethod ( SAML2Constants . CONF_HOLDER_KEY ) ; outConfig . put ( ConfigurationConstants . SAML_CALLBACK_REF , callbackHandler ) ; outConfig . put ( ConfigurationConstants . PW_CALLBACK_REF , new org . apache . cxf . ws . security . wss4j . saml . PasswordCallbackHandler ( ) ) ; outConfig . put ( ConfigurationConstants . SIGNATURE_USER , "alice" ) ; outConfig . put ( ConfigurationConstants . SIG_PROP_FILE , "alice.properties" ) ; outConfig . put ( ConfigurationConstants . SIG_KEY_ID , "DirectReference" ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ohandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ( outConfig ) ; client . getOutInterceptors ( ) . add ( ohandler ) ; try { echo . echo ( "test" ) ; org . junit . Assert . fail ( "Failure<sp>expected<sp>on<sp>receiving<sp>sender<sp>vouches<sp>instead<sp>of<sp>HOK" ) ; } catch ( org . apache . cxf . ws . security . wss4j . saml . javax ex ) { } validator . setRequireSenderVouches ( false ) ; try { echo . echo ( "test" ) ; org . junit . Assert . fail ( "Failure<sp>expected<sp>on<sp>receiving<sp>a<sp>SAML<sp>1.1<sp>Token<sp>instead<sp>of<sp>SAML<sp>2.0" ) ; } catch ( org . apache . cxf . ws . security . wss4j . saml . javax ex ) { } validator . setRequireSAML1Assertion ( false ) ; "<AssertPlaceHolder>" ; } echo ( int ) { return i ; }
org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) )
testConstructor ( ) { org . pentaho . platform . plugin . services . importexport . exportManifest . bindings . CronJobTrigger trigger = new org . pentaho . platform . plugin . services . importexport . exportManifest . bindings . CronJobTrigger ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( trigger )
shouldGetFromSpecifiedLifecycleId ( ) { given ( this . lifecycleFactory . getLifecycle ( "example" ) ) . willReturn ( this . lifecycle ) ; this . lifecycleAccessor . setServletContext ( this . servletContext ) ; this . lifecycleAccessor . setLifecycleId ( "example" ) ; javax . faces . lifecycle . Lifecycle actual = this . lifecycleAccessor . getLifecycle ( ) ; "<AssertPlaceHolder>" ; verify ( this . lifecycleFactory ) . getLifecycle ( "example" ) ; } getLifecycle ( ) { org . springframework . util . Assert . state ( ( ( this . servletContext ) != null ) , "ServletContext<sp>has<sp>not<sp>been<sp>set" ) ; if ( ( this . cachedLifecycle ) == null ) { java . lang . String lifecycleIdToUse = this . lifecycleId ; javax . faces . lifecycle . LifecycleFactory lifecycleFactory = ( ( javax . faces . lifecycle . LifecycleFactory ) ( javax . faces . FactoryFinder . getFactory ( FactoryFinder . LIFECYCLE_FACTORY ) ) ) ; if ( lifecycleIdToUse == null ) { lifecycleIdToUse = this . servletContext . getInitParameter ( FacesServlet . LIFECYCLE_ID_ATTR ) ; } if ( lifecycleIdToUse == null ) { lifecycleIdToUse = javax . faces . lifecycle . LifecycleFactory . DEFAULT_LIFECYCLE ; } this . cachedLifecycle = lifecycleFactory . getLifecycle ( lifecycleIdToUse ) ; } return this . cachedLifecycle ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( this . lifecycle ) )
testQueueLarge ( ) { int count = 1000 ; for ( int i = 1 ; i <= count ; i ++ ) { com . huffingtonpost . chronos . model . JobSpec aJob = com . huffingtonpost . chronos . model . TestAgent . getTestJob ( "Vincent<sp>Van<sp>Gogh" , dao ) ; long id = dao . createJob ( aJob ) ; aJob = dao . getJob ( id ) ; com . huffingtonpost . chronos . model . PlannedJob pj = new com . huffingtonpost . chronos . model . PlannedJob ( aJob , com . huffingtonpost . chronos . model . Utils . getCurrentTime ( ) ) ; dao . addToQueue ( pj ) ; } "<AssertPlaceHolder>" ; } getQueue ( java . lang . Long ) { return jobDao . getQueue ( id ) ; }
org . junit . Assert . assertEquals ( count , dao . getQueue ( null ) . size ( ) )
shouldNotFailWithAValidProject ( ) { org . apache . maven . project . MavenProject mp1 = createProjectParent ( ) ; org . apache . maven . project . MavenProject mp2 = createProjectChild1 ( mp1 ) ; org . apache . maven . project . MavenProject mp3 = createProjectChild2 ( mp1 ) ; java . util . List < org . apache . maven . project . MavenProject > theList = java . util . Arrays . asList ( mp1 , mp2 , mp3 ) ; setupSortedProjects ( theList ) ; rule . execute ( helper ) ; "<AssertPlaceHolder>" ; } execute ( org . apache . maven . enforcer . rule . api . EnforcerRuleHelper ) { org . apache . maven . plugin . logging . Log log = helper . getLog ( ) ; try { org . apache . maven . project . MavenProject project = ( ( org . apache . maven . project . MavenProject ) ( helper . evaluate ( "${project}" ) ) ) ; org . apache . maven . execution . MavenSession session = ( ( org . apache . maven . execution . MavenSession ) ( helper . evaluate ( "${session}" ) ) ) ; java . lang . String target = ( ( java . lang . String ) ( helper . evaluate ( "${project.build.directory}" ) ) ) ; java . lang . String artifactId = ( ( java . lang . String ) ( helper . evaluate ( "${project.artifactId}" ) ) ) ; org . apache . maven . artifact . resolver . ArtifactResolver resolver = ( ( org . apache . maven . artifact . resolver . ArtifactResolver ) ( helper . getComponent ( org . apache . maven . artifact . resolver . ArtifactResolver . class ) ) ) ; org . apache . maven . execution . RuntimeInformation rti = ( ( org . apache . maven . execution . RuntimeInformation ) ( helper . getComponent ( org . apache . maven . execution . RuntimeInformation . class ) ) ) ; log . info ( ( "${project}" 2 + target ) ) ; log . info ( ( "Retrieved<sp>ArtifactId:<sp>" + artifactId ) ) ; log . info ( ( "Retrieved<sp>Project:<sp>" + project ) ) ; log . info ( ( "Retrieved<sp>RuntimeInfo:<sp>" + rti ) ) ; log . info ( ( "${project}" 0 + session ) ) ; log . info ( ( "${project}" 1 + resolver ) ) ; if ( this . shouldIfail ) { throw new org . apache . maven . enforcer . rule . api . EnforcerRuleException ( "Failing<sp>because<sp>my<sp>param<sp>said<sp>so." ) ; } } catch ( org . codehaus . plexus . component . repository . exception . ComponentLookupException e ) { throw new org . apache . maven . enforcer . rule . api . EnforcerRuleException ( ( "Unable<sp>to<sp>lookup<sp>a<sp>component<sp>" + ( e . getLocalizedMessage ( ) ) ) , e ) ; } catch ( org . codehaus . plexus . component . configurator . expression . ExpressionEvaluationException e ) { throw new org . apache . maven . enforcer . rule . api . EnforcerRuleException ( ( "Unable<sp>to<sp>lookup<sp>an<sp>expression<sp>" + ( e . getLocalizedMessage ( ) ) ) , e ) ; } }
org . junit . Assert . assertTrue ( true )
getPass ( ) { java . lang . String result = encryptor . encrypt ( "root" ) ; System . out . println ( ( result + "----------------" ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) )
matches ( ) { "<AssertPlaceHolder>" ; } status ( int ) { return new simplehttp . matchers . HttpResponseStatusCodeMatcher ( expected ) ; }
org . junit . Assert . assertThat ( simplehttp . matchers . HttpResponseStatusCodeMatcher . status ( 200 ) . matches ( response ) , is ( true ) )
testGetParameterStringBooleanIntString ( ) { org . owasp . esapi . filters . SecurityWrapperRequestTest . ValidatorTestContainer validatorTester = new org . owasp . esapi . filters . SecurityWrapperRequestTest . ValidatorTestContainer ( mockValidator ) ; validatorTester . getValidInputReturns ( testValueCanonical ) ; org . powermock . api . mockito . PowerMockito . when ( mockRequest . getParameter ( testParameterName ) ) . thenReturn ( testParameterValue ) ; org . owasp . esapi . filters . SecurityWrapperRequest request = new org . owasp . esapi . filters . SecurityWrapperRequest ( mockRequest ) ; java . lang . String rval = request . getParameter ( testParameterName , false , testMaximumLength , testValidatorType ) ; "<AssertPlaceHolder>" ; validatorTester . verify ( testParameterValue , testValidatorType , testMaximumLength , false ) ; verify ( mockRequest , times ( 1 ) ) . getParameter ( testParameterName ) ; } getParameter ( java . lang . String , boolean , int , java . lang . String ) { java . lang . String orig = getHttpServletRequest ( ) . getParameter ( name ) ; java . lang . String clean = null ; try { clean = org . owasp . esapi . ESAPI . validator ( ) . getValidInput ( ( "HTTP<sp>parameter<sp>name:<sp>" + name ) , orig , regexName , maxLength , allowNull ) ; } catch ( org . owasp . esapi . errors . ValidationException e ) { } return clean ; }
org . junit . Assert . assertEquals ( testValueCanonical , rval )
testMillisSerialization ( ) { com . owlike . genson . Genson genson = createTimestampGenson ( java . time . OffsetDateTime . class , TimestampFormat . MILLIS ) ; java . lang . Long millis = 4534654564653L ; java . time . OffsetDateTime dt = java . time . OffsetDateTime . ofInstant ( java . time . Instant . ofEpochMilli ( millis ) , defaultZoneId ) ; "<AssertPlaceHolder>" ; } toString ( ) { return com . owlike . genson . ext . jsr353 . JSR353Bundle . toString ( this ) ; }
org . junit . Assert . assertEquals ( millis . toString ( ) , genson . serialize ( dt ) )
shutdownDuringCompactingSplitting ( ) { try ( org . apache . accumulo . core . client . AccumuloClient c = org . apache . accumulo . core . client . Accumulo . newClient ( ) . from ( getClientProps ( ) ) . build ( ) ) { java . lang . String tableName = getUniqueNames ( 1 ) [ 0 ] ; org . apache . accumulo . test . VerifyIngest . VerifyParams params = new org . apache . accumulo . test . VerifyIngest . VerifyParams ( getClientProps ( ) , tableName , 10000 ) ; c . tableOperations ( ) . create ( tableName ) ; c . tableOperations ( ) . setProperty ( tableName , Property . TABLE_SPLIT_THRESHOLD . getKey ( ) , "10K" ) ; java . lang . String splitThreshold = null ; for ( java . util . Map . Entry < java . lang . String , java . lang . String > entry : c . tableOperations ( ) . getProperties ( tableName ) ) { if ( entry . getKey ( ) . equals ( Property . TABLE_SPLIT_THRESHOLD . getKey ( ) ) ) { splitThreshold = entry . getValue ( ) ; break ; } } "<AssertPlaceHolder>" ; try { c . tableOperations ( ) . setProperty ( MetadataTable . NAME , Property . TABLE_SPLIT_THRESHOLD . getKey ( ) , "20K" ) ; org . apache . accumulo . test . TestIngest . ingest ( c , params ) ; c . tableOperations ( ) . flush ( tableName , null , null , false ) ; org . apache . accumulo . test . VerifyIngest . verifyIngest ( c , params ) ; getCluster ( ) . stop ( ) ; } finally { if ( ( getClusterType ( ) ) == ( ClusterType . STANDALONE ) ) { getCluster ( ) . start ( ) ; c . tableOperations ( ) . setProperty ( MetadataTable . NAME , Property . TABLE_SPLIT_THRESHOLD . getKey ( ) , splitThreshold ) ; } } } } getValue ( ) { setValue ( org . apache . accumulo . proxy . thrift . org . apache . thrift . TBaseHelper . rightSize ( value ) ) ; return ( value ) == null ? null : value . array ( ) ; }
org . junit . Assert . assertNotNull ( splitThreshold )
testGetAreaAtUL ( ) { when ( lienzoLayer . getLienzoLayer ( ) . getLayer ( ) . findShapeAtPoint ( eq ( 20 ) , eq ( 20 ) ) ) . thenReturn ( shape ) ; org . kie . workbench . common . stunner . core . graph . Node < org . kie . workbench . common . stunner . core . graph . content . view . View < ? > , org . kie . workbench . common . stunner . core . graph . Edge > node = canvasBoundsIndexerImpl . getAt ( 20 , 20 , 100 , 100 , parentNode ) ; "<AssertPlaceHolder>" ; } getAt ( double , double , double , double , org . kie . workbench . common . stunner . core . graph . Element ) { org . kie . workbench . common . stunner . core . graph . content . view . Point2D parentNodePosition ; double xToCheck = 0 ; double yToCheck = 0 ; if ( parentNode != null ) { parentNodePosition = org . kie . workbench . common . stunner . core . graph . util . GraphUtils . getComputedPosition ( parentNode . asNode ( ) ) ; xToCheck = x + ( parentNodePosition . getX ( ) ) ; yToCheck = y + ( parentNodePosition . getY ( ) ) ; } org . kie . workbench . common . stunner . core . graph . Node < org . kie . workbench . common . stunner . core . graph . content . view . View < ? > , org . kie . workbench . common . stunner . core . graph . Edge > element ; org . kie . workbench . common . stunner . core . graph . content . view . Point2D [ ] pointsToCheck = new org . kie . workbench . common . stunner . core . graph . content . view . Point2D [ 5 ] ; pointsToCheck [ 0 ] = new org . kie . workbench . common . stunner . core . graph . content . view . Point2D ( xToCheck , yToCheck ) ; pointsToCheck [ 1 ] = new org . kie . workbench . common . stunner . core . graph . content . view . Point2D ( ( xToCheck + width ) , yToCheck ) ; pointsToCheck [ 2 ] = new org . kie . workbench . common . stunner . core . graph . content . view . Point2D ( ( xToCheck + ( width / 2 ) ) , ( yToCheck + ( height / 2 ) ) ) ; pointsToCheck [ 3 ] = new org . kie . workbench . common . stunner . core . graph . content . view . Point2D ( xToCheck , ( yToCheck + height ) ) ; pointsToCheck [ 4 ] = new org . kie . workbench . common . stunner . core . graph . content . view . Point2D ( ( xToCheck + width ) , ( yToCheck + height ) ) ; for ( org . kie . workbench . common . stunner . core . graph . content . view . Point2D point : pointsToCheck ) { element = findElementAt ( point . getX ( ) , point . getY ( ) ) ; if ( element != null ) { if ( element != parentNode ) { return element ; } } } return null ; }
org . junit . Assert . assertNotNull ( node )
testReplaceGivenServerContextRoot ( ) { java . lang . String actual = flex . messaging . util . SettingsReplaceUtil . replaceAllTokensGivenServerName ( "http://{server.name}:{server.port}/{context.root}/foo.mxml" , "/dev" , "10.1.1.1" , "80" , "http" ) ; java . lang . String expected = "http://10.1.1.1:80/dev/foo.mxml" ; "<AssertPlaceHolder>" ; } replaceAllTokensGivenServerName ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { if ( url . startsWith ( "/" ) ) { url = ( serverProtocol + "://{server.name}:{server.port}" ) + url ; } url = flex . messaging . util . SettingsReplaceUtil . replaceContextPath ( url , contextPath ) ; java . lang . String token = flex . messaging . util . SettingsReplaceUtil . SERVER_NAME_TOKEN ; int serverNameIndex = url . indexOf ( flex . messaging . util . SettingsReplaceUtil . SERVER_NAME_ALT_TOKEN ) ; if ( serverNameIndex != ( - 1 ) ) { token = flex . messaging . util . SettingsReplaceUtil . SERVER_NAME_ALT_TOKEN ; url = flex . messaging . util . StringUtils . substitute ( url , flex . messaging . util . SettingsReplaceUtil . SERVER_NAME_ALT_TOKEN , flex . messaging . util . SettingsReplaceUtil . SERVER_NAME_TOKEN ) ; } serverNameIndex = url . indexOf ( flex . messaging . util . SettingsReplaceUtil . SERVER_NAME_TOKEN ) ; if ( ( serverName == null ) && ( serverNameIndex != ( - 1 ) ) ) { flex . messaging . MessageException me = new flex . messaging . MessageException ( ) ; me . setMessage ( flex . messaging . util . SettingsReplaceUtil . TOKEN_NOT_SUPPORTED , new java . lang . Object [ ] { token } ) ; throw me ; } else if ( ( serverName != null ) && ( serverNameIndex != ( - 1 ) ) ) { url = flex . messaging . util . StringUtils . substitute ( url , flex . messaging . util . SettingsReplaceUtil . SERVER_NAME_TOKEN , serverName ) ; } token = flex . messaging . util . SettingsReplaceUtil . SERVER_PORT_TOKEN ; int serverPortIndex = url . indexOf ( flex . messaging . util . SettingsReplaceUtil . SERVER_PORT_ALT_TOKEN ) ; if ( serverPortIndex != ( - 1 ) ) { token = flex . messaging . util . SettingsReplaceUtil . SERVER_PORT_ALT_TOKEN ; url = flex . messaging . util . StringUtils . substitute ( url , flex . messaging . util . SettingsReplaceUtil . SERVER_PORT_ALT_TOKEN , flex . messaging . util . SettingsReplaceUtil . SERVER_PORT_TOKEN ) ; } serverPortIndex = url . indexOf ( flex . messaging . util . SettingsReplaceUtil . SERVER_PORT_TOKEN ) ; if ( ( serverPort == null ) && ( serverPortIndex != ( - 1 ) ) ) { flex . messaging . MessageException me = new flex . messaging . MessageException ( ) ; me . setMessage ( flex . messaging . util . SettingsReplaceUtil . TOKEN_NOT_SUPPORTED , new java . lang . Object [ ] { token } ) ; throw me ; } else if ( ( serverPort != null ) && ( serverPortIndex != ( - 1 ) ) ) { url = flex . messaging . util . StringUtils . substitute ( url , flex . messaging . util . SettingsReplaceUtil . SERVER_PORT_TOKEN , serverPort ) ; } return flex . messaging . util . SettingsReplaceUtil . updateIPv6 ( url ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testMissingAfterSecondLast ( ) { System . out . println ( "binarySearch" ) ; int [ ] index = new int [ ] { 10 , 13 , 15 , 17 , 19 } ; int key = 18 ; int begin = 0 ; int end = 5 ; int expResult = - 5 ; int result = org . genemania . engine . matricks . Utils . myBinarySearch ( index , key , begin , end ) ; "<AssertPlaceHolder>" ; } myBinarySearch ( int [ ] , int , int , int ) { if ( ( ( indices . length ) == 0 ) || ( begin == end ) ) { return - 1 ; } end -- ; int mid = begin ; while ( begin <= end ) { mid = ( end + begin ) > > 1 ; if ( ( indices [ mid ] ) < key ) { begin = mid + 1 ; } else if ( ( indices [ mid ] ) > key ) { end = mid - 1 ; } else { return mid ; } } if ( ( indices [ mid ] ) < key ) { return ( - mid ) - 2 ; } else { return ( - mid ) - 1 ; } }
org . junit . Assert . assertEquals ( expResult , result )
noAnnotationReturnsNull ( ) { javax . ws . rs . ext . ParamConverter < java . lang . String > converter = provider . getConverter ( java . lang . String . class , java . lang . String . class , new java . lang . annotation . Annotation [ 0 ] ) ; "<AssertPlaceHolder>" ; } getConverter ( java . lang . Class , java . lang . reflect . Type , java . lang . annotation . Annotation [ ] ) { for ( java . lang . annotation . Annotation annotation : annotations ) { if ( annotation instanceof com . jakewharton . moshi . rs . Json ) { com . squareup . moshi . JsonAdapter < T > adapter = moshi . adapter ( genericType ) ; return new com . jakewharton . moshi . rs . MoshiParamConverterFactory . MoshiParamConverter ( adapter ) ; } } return null ; }
org . junit . Assert . assertNull ( converter )
maximumPacketLengthForInboundUnsequencedData ( ) { java . lang . String message = repeat ( 'X' , com . paritytrading . nassau . soupbintcp . SoupBinTCPSessionTest . MAX_RX_PAYLOAD_LENGTH ) ; client . send ( wrap ( message ) ) ; while ( ( serverMessages . collect ( ) . size ( ) ) != 1 ) server . receive ( ) ; "<AssertPlaceHolder>" ; } collect ( ) { return events ; }
org . junit . Assert . assertEquals ( asList ( message ) , serverMessages . collect ( ) )
testOrOnEmptyOptionalAndEmptySupplierOptional ( ) { final com . annimon . stream . OptionalDouble optional = com . annimon . stream . OptionalDouble . empty ( ) . or ( new com . annimon . stream . function . Supplier < com . annimon . stream . OptionalDouble > ( ) { @ com . annimon . stream . Override public com . annimon . stream . OptionalDouble get ( ) { return com . annimon . stream . OptionalDouble . empty ( ) ; } } ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return new com . annimon . stream . test . hamcrest . OptionalIntMatcher . IsEmptyMatcher ( ) ; }
org . junit . Assert . assertThat ( optional , isEmpty ( ) )
startProcess ( ) { org . activiti . engine . RepositoryService repositoryService = activitiRule . getRepositoryService ( ) ; repositoryService . createDeployment ( ) . addInputStream ( "process1.bpmn20.xml" , new java . io . FileInputStream ( filename ) ) . deploy ( ) ; org . activiti . engine . RuntimeService runtimeService = activitiRule . getRuntimeService ( ) ; java . util . Map < java . lang . String , java . lang . Object > variableMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; variableMap . put ( "echo" , "Activiti" ) ; org . activiti . engine . runtime . ProcessInstance processInstance = runtimeService . startProcessInstanceByKey ( "process1" , variableMap ) ; "<AssertPlaceHolder>" ; System . out . println ( ( ( ( "id<sp>" + ( processInstance . getId ( ) ) ) + "<sp>" ) + ( processInstance . getProcessDefinitionId ( ) ) ) ) ; }
org . junit . Assert . assertNotNull ( processInstance . getId ( ) )
testEvaluationAdjacent1 ( ) { java . lang . String query = buildFunction ( ContentFunctions . CONTENT_ADJACENT_FUNCTION_NAME , Constants . TERM_OFFSET_MAP_JEXL_VARIABLE_NAME , "'dog'" , "'cat'" ) ; 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 ; list1 = asList ( 1 ) ; list2 = asList ( 2 ) ; 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 ) ) ) ; 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 , true ) )
shouldNotEnableClusteringIfMissingDocument ( ) { org . modeshape . jcr . RepositoryConfiguration config = org . modeshape . jcr . RepositoryConfiguration . read ( "{<sp>'name'<sp>=<sp>'nm',<sp>'storage'<sp>:<sp>{}}" ) ; org . modeshape . jcr . RepositoryConfiguration . Clustering clusteringConfiguration = config . getClustering ( ) ; "<AssertPlaceHolder>" ; } isEnabled ( ) { return this . enabled . get ( ) ; }
org . junit . Assert . assertFalse ( clusteringConfiguration . isEnabled ( ) )
purgeEncounterType_shouldThrowErrorWhenTryingToDeleteEncounterTypeWhenEncounterTypesAreLocked ( ) { org . openmrs . api . EncounterService encounterService = org . openmrs . api . context . Context . getEncounterService ( ) ; org . openmrs . EncounterType encounterType = org . openmrs . api . context . Context . getEncounterService ( ) . getEncounterType ( 1 ) ; "<AssertPlaceHolder>" ; org . openmrs . GlobalProperty gp = new org . openmrs . GlobalProperty ( org . openmrs . util . OpenmrsConstants . GLOBAL_PROPERTY_ENCOUNTER_TYPES_LOCKED ) ; gp . setPropertyValue ( "true" ) ; org . openmrs . api . context . Context . getAdministrationService ( ) . saveGlobalProperty ( gp ) ; encounterService . purgeEncounterType ( encounterType ) ; } getEncounterType ( java . lang . Integer ) { return dao . getEncounterType ( encounterTypeId ) ; }
org . junit . Assert . assertNotNull ( encounterType )
testValidFile_doesntExist ( ) { when ( file . isFile ( ) ) . thenReturn ( Boolean . FALSE ) ; when ( file . exists ( ) ) . thenReturn ( Boolean . FALSE ) ; org . sejda . model . output . FileOrDirectoryTaskOutput instance = new org . sejda . model . output . FileOrDirectoryTaskOutput ( file ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( instance )
testGetAudioFolders ( ) { net . holmes . core . backend . manager . BackendManager backendManager = createMock ( net . holmes . core . backend . manager . BackendManager . class ) ; expect ( backendManager . getFolders ( net . holmes . core . backend . handler . AUDIO ) ) . andReturn ( newArrayList ( new net . holmes . core . backend . response . ConfigurationFolder ( "audiosTest" , "audiosTest" , "path" ) ) ) . atLeastOnce ( ) ; replay ( backendManager ) ; net . holmes . core . backend . handler . AudioFoldersHandler audioFoldersHandler = new net . holmes . core . backend . handler . AudioFoldersHandler ( backendManager ) ; "<AssertPlaceHolder>" ; verify ( backendManager ) ; } getAudioFolders ( ) { return getFolders ( ) ; }
org . junit . Assert . assertNotNull ( audioFoldersHandler . getAudioFolders ( ) )
testMatchesIsoCompatibleProprietaryCommandApdu_20800ProprietarySm ( ) { byte [ ] apdu = de . persosim . simulator . utils . HexString . toByteArray ( "8C208000" ) ; boolean result = de . persosim . simulator . apdu . CommandApduFactory . matchesIsoCompatibleProprietaryCommandApdu ( apdu ) ; "<AssertPlaceHolder>" ; } matchesIsoCompatibleProprietaryCommandApdu ( byte [ ] ) { de . persosim . simulator . apdu . CommandApdu command = new de . persosim . simulator . apdu . CommandApduImpl ( apdu ) ; if ( ( ( command . getCla ( ) ) == ( ( byte ) ( 140 ) ) ) || ( ( command . getCla ( ) ) == ( ( byte ) ( 128 ) ) ) ) { if ( ( ( command . getIns ( ) ) == ( ( byte ) ( 32 ) ) ) && ( ( command . getP1P2 ( ) ) == ( ( short ) ( 32768 ) ) ) ) { return true ; } if ( ( ( command . getIns ( ) ) == ( ( byte ) ( 42 ) ) ) && ( ( command . getP1P2 ( ) ) == ( ( short ) ( 44716 ) ) ) ) { return true ; } } return false ; }
org . junit . Assert . assertTrue ( result )
multipleViews ( ) { java . lang . String xml = ( ( ( ( "<Preload<sp>href='" + ( org . apache . shindig . gadgets . spec . PreloadTest . HREF ) ) + '\'' ) + "<sp>views='" ) + ( org . apache . commons . lang . StringUtils . join ( org . apache . shindig . gadgets . spec . PreloadTest . VIEWS , ',' ) ) ) + "'/>" ; org . apache . shindig . gadgets . spec . Preload preload = new org . apache . shindig . gadgets . spec . Preload ( org . apache . shindig . common . xml . XmlUtil . parse ( xml ) , org . apache . shindig . gadgets . spec . PreloadTest . SPEC_URL ) ; "<AssertPlaceHolder>" ; } getViews ( ) { return views ; }
org . junit . Assert . assertEquals ( org . apache . shindig . gadgets . spec . PreloadTest . VIEWS , preload . getViews ( ) )
delete ( ) { todoRepository . deleteById ( 101L ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 2 , todoRepository . count ( ) )
testDeviceCloudStatusEnumValues ( ) { for ( com . digi . xbee . api . models . DeviceCloudStatus status : dcStatuses ) "<AssertPlaceHolder>" ; } getID ( ) { return id ; }
org . junit . Assert . assertTrue ( ( ( status . getID ( ) ) >= 0 ) )
$and_logical_expression_returns_true_when_all_expressions_true ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'$and':<sp>[<sp>{'field':'field3','op':'$gt','rvalue':2},{'field':'field7.0.elemf1','op':'$eq','rvalue':'elvalue0_1'}]}" ) ; com . redhat . lightblue . eval . QueryEvaluator qe = com . redhat . lightblue . eval . QueryEvaluator . getInstance ( q , md ) ; com . redhat . lightblue . eval . QueryEvaluationContext ctx = qe . evaluate ( jsonDoc ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return result ; }
org . junit . Assert . assertTrue ( ctx . getResult ( ) )
testVersion ( ) { com . sap . core . odata . ref . model . Room room1 = new com . sap . core . odata . ref . model . Room ( 1 , null ) ; room1 . setVersion ( com . sap . core . odata . ref . model . RoomTest . VALUE_VERSION_NR ) ; "<AssertPlaceHolder>" ; } getVersion ( ) { return com . sap . core . odata . api . ODataServiceVersion . V20 ; }
org . junit . Assert . assertEquals ( com . sap . core . odata . ref . model . RoomTest . VALUE_VERSION_NR , room1 . getVersion ( ) )
testColumnDescList ( ) { org . seasar . extension . jdbc . EntityMeta entityMeta = entityMetaFactory . getEntityMeta ( org . seasar . extension . jdbc . gen . internal . desc . TableDescFactoryImplTest . Aaa . class ) ; org . seasar . extension . jdbc . gen . desc . TableDesc tableDesc = tableDescFactory . getTableDesc ( entityMeta ) ; "<AssertPlaceHolder>" ; } getColumnDescList ( ) { return java . util . Collections . unmodifiableList ( columnDescList ) ; }
org . junit . Assert . assertEquals ( 2 , tableDesc . getColumnDescList ( ) . size ( ) )
testImportTemplateInGroupFileFromDir ( ) { java . lang . String dir = getRandomDir ( ) ; writeFile ( dir , "x/a.st" , "a()<sp>::=<sp><<<sp><b()><sp>>>" ) ; java . lang . String groupFile = "b()<sp>::=<sp>\"group<sp>file<sp>b\"\n" + "c()<sp>::=<sp>\"group<sp>file<sp>c\"\n" ; writeFile ( dir , "y/group.stg" , groupFile ) ; org . stringtemplate . v4 . STGroup group1 = new org . stringtemplate . v4 . STGroupDir ( ( dir + "/x" ) ) ; org . stringtemplate . v4 . STGroup group2 = new org . stringtemplate . v4 . STGroupFile ( ( dir + "/y/group.stg" ) ) ; group1 . importTemplates ( group2 ) ; org . stringtemplate . v4 . ST st = group1 . getInstanceOf ( "a" ) ; java . lang . String expected = "<sp>group<sp>file<sp>b<sp>" ; java . lang . String result = ( st != null ) ? st . render ( ) : null ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
org . junit . Assert . assertEquals ( expected , result )
testConstantSetStrokeColor ( ) { org . orbisgis . coremap . renderer . se . AreaSymbolizer ls = getConstantSymbolizer ( ) ; org . orbisgis . legend . thematic . constant . UniqueSymbolArea usl = new org . orbisgis . legend . thematic . constant . UniqueSymbolArea ( ls ) ; usl . setLineColor ( Color . red ) ; "<AssertPlaceHolder>" ; } getLineColor ( ) { return null ; }
org . junit . Assert . assertTrue ( usl . getLineColor ( ) . equals ( Color . red ) )
shouldConvertLongToEntityAttribute ( ) { com . olacabs . fabric . manager . converter . JsonListConverter converter = new com . olacabs . fabric . manager . converter . JsonListConverter ( ) ; java . util . List list = converter . convertToEntityAttribute ( "[1,2]" ) ; "<AssertPlaceHolder>" ; } convertToEntityAttribute ( java . lang . String ) { try { return mapper . readValue ( source , com . olacabs . fabric . manager . bean . ExecutorConfig . class ) ; } catch ( final java . io . IOException e ) { log . error ( "Unable<sp>to<sp>parse<sp>ExecutorConfig<sp>source<sp>-<sp>{}" , e . getMessage ( ) , e ) ; throw new com . olacabs . fabric . manager . exception . FabricManagerException ( e ) ; } }
org . junit . Assert . assertEquals ( list . size ( ) , 2 )
testCardinality ( ) { int size = 1033 ; edu . ucla . sspace . util . SparseIntArray arr = new edu . ucla . sspace . util . SparseIntArray ( ) ; for ( int i = 1 ; i < size ; ++ i ) { arr . set ( i , i ) ; "<AssertPlaceHolder>" ; } } cardinality ( ) { return indices . length ; }
org . junit . Assert . assertEquals ( i , arr . cardinality ( ) )
metadata_xmlComplexTypePropertyComplexTypefalse ( ) { final java . lang . String entryName = "bar/90_contents/odatacol1/00_$metadata.xml" ; final java . lang . String filename = "/00_$metadata_compprop_type_circular_ref.xml" ; java . net . URL fileUrl = java . lang . ClassLoader . getSystemResource ( ( ( com . fujitsu . dc . test . unit . core . bar . BarFileValidateTest . RESOURCE_PATH ) + filename ) ) ; java . io . File file = new java . io . File ( fileUrl . getPath ( ) ) ; java . io . FileInputStream fis = null ; try { fis = new java . io . FileInputStream ( file ) ; com . fujitsu . dc . test . unit . core . bar . BarFileValidateTest . TestBarRunner testBarRunner = new com . fujitsu . dc . test . unit . core . bar . BarFileValidateTest . TestBarRunner ( ) ; boolean res = testBarRunner . registUserSchema ( entryName , fis , null ) ; "<AssertPlaceHolder>" ; return ; } catch ( com . fujitsu . dc . core . DcCoreException dce ) { org . junit . Assert . fail ( "Unexpected<sp>exception" ) ; } catch ( java . lang . Exception ex ) { org . junit . Assert . fail ( "Unexpected<sp>exception" ) ; } org . junit . Assert . fail ( "DcCoreException" ) ; } registUserSchema ( java . lang . String , java . io . InputStream , com . fujitsu . dc . core . model . DavCmp ) { org . odata4j . edm . EdmDataServices metadata = null ; try { java . io . InputStreamReader isr = new java . io . InputStreamReader ( new org . apache . commons . io . input . CloseShieldInputStream ( inputStream ) ) ; org . odata4j . stax2 . XMLFactoryProvider2 provider = org . odata4j . stax2 . staximpl . StaxXMLFactoryProvider2 . getInstance ( ) ; org . odata4j . stax2 . XMLInputFactory2 factory = provider . newXMLInputFactory2 ( ) ; org . odata4j . stax2 . XMLEventReader2 reader = factory . createXMLEventReader ( isr ) ; com . fujitsu . dc . core . odata . DcEdmxFormatParser parser = new com . fujitsu . dc . core . odata . DcEdmxFormatParser ( ) ; metadata = parser . parseMetadata ( reader ) ; } catch ( java . lang . Exception ex ) { com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "XMLParseException:<sp>" + ( ex . getMessage ( ) ) ) , ex . fillInStackTrace ( ) ) ; java . lang . String message = com . fujitsu . dc . core . DcCoreMessageUtils . getMessage ( "PL-BI-2002" ) ; writeOutputStream ( true , "PL-BI-1004" , entryName , message ) ; return false ; } catch ( java . lang . StackOverflowError tw ) { com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "XMLParseException:<sp>" + ( tw . getMessage ( ) ) ) , tw . fillInStackTrace ( ) ) ; java . lang . String message = com . fujitsu . dc . core . DcCoreMessageUtils . getMessage ( "PL-BI-2002" ) ; writeOutputStream ( true , "PL-BI-1004" , entryName , message ) ; return false ; } try { createComplexTypes ( metadata , davCmp ) ; createEntityTypes ( metadata , davCmp ) ; createAssociations ( metadata , davCmp ) ; } catch ( com . fujitsu . dc . core . DcCoreException e ) { writeOutputStream ( true , "PL-BI-1004" , entryName , e . getMessage ( ) ) ; com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "DcCoreException:<sp>" + ( e . getMessage ( ) ) ) ) ; return false ; } catch ( java . lang . Exception e ) { com . fujitsu . dc . core . bar . BarFileReadRunner . log . info ( ( "Regist<sp>Entity<sp>Error:<sp>" + ( e . getMessage ( ) ) ) , e . fillInStackTrace ( ) ) ; java . lang . String message = com . fujitsu . dc . core . DcCoreMessageUtils . getMessage ( "PL-BI-2003" ) ; writeOutputStream ( true , "PL-BI-1004" , entryName , message ) ; return false ; } return true ; }
org . junit . Assert . assertFalse ( res )
testResourcesMissingOnlyFrenchLabelsCount ( ) { java . util . Map < org . eclipse . rdf4j . model . Resource , java . util . Collection < java . lang . String > > incompleteLangCoverage = incompleteLanguageCoverage . getResult ( ) . getData ( ) ; java . util . List < org . eclipse . rdf4j . model . Value > foundResources = new java . util . ArrayList ( ) ; for ( org . eclipse . rdf4j . model . Value resource : incompleteLangCoverage . keySet ( ) ) { java . util . Collection < java . lang . String > missingLanguages = incompleteLangCoverage . get ( resource ) ; if ( ( ( missingLanguages . size ( ) ) == 1 ) && ( missingLanguages . contains ( "fr" ) ) ) { foundResources . add ( resource ) ; } } "<AssertPlaceHolder>" ; } size ( ) { return subset . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , foundResources . size ( ) )
wildcard_name_pattern_matches_part_of_name ( ) { gherkin . events . PickleEvent pickleEvent = createPickleWithName ( "a<sp>pickleEvent<sp>name" ) ; cucumber . runtime . filter . NamePredicate predicate = new cucumber . runtime . filter . NamePredicate ( asList ( java . util . regex . Pattern . compile ( "a<sp>.*<sp>name" ) ) ) ; "<AssertPlaceHolder>" ; } apply ( gherkin . events . PickleEvent ) { java . net . URI picklePath = java . net . URI . create ( pickleEvent . uri ) ; if ( ! ( lineFilters . containsKey ( picklePath ) ) ) { return true ; } for ( java . lang . Integer line : lineFilters . get ( picklePath ) ) { for ( gherkin . pickles . PickleLocation location : pickleEvent . pickle . getLocations ( ) ) { if ( line == ( location . getLine ( ) ) ) { return true ; } } } return false ; }
org . junit . Assert . assertTrue ( predicate . apply ( pickleEvent ) )
testParseNoTimeTrackingInfo ( ) { final com . atlassian . jira . rest . client . api . domain . Issue issue = parseIssue ( "/json/issue/valid-unassigned-no-time-tracking.json" ) ; "<AssertPlaceHolder>" ; } getTimeTracking ( ) { return timeTracking ; }
org . junit . Assert . assertNull ( issue . getTimeTracking ( ) )
deveObterDataOcorrenciaBaixaComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral retorno = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral ( ) ; final java . time . LocalDate dataOcorrenciaBaixa = java . time . LocalDate . from ( java . time . format . DateTimeFormatter . ofPattern ( "dd/MM/yyyy" ) . parse ( "20/10/2010" ) ) ; retorno . setDataOcorrenciaBaixa ( dataOcorrenciaBaixa ) ; "<AssertPlaceHolder>" ; } getDataOcorrenciaBaixa ( ) { return this . dataOcorrenciaBaixa ; }
org . junit . Assert . assertEquals ( dataOcorrenciaBaixa , retorno . getDataOcorrenciaBaixa ( ) )
setProtocolSetsProtocol ( ) { tests . unit . com . microsoft . azure . sdk . iot . device . DeviceClientConfig config = tests . unit . com . microsoft . azure . sdk . iot . device . Deencapsulation . newInstance ( tests . unit . com . microsoft . azure . sdk . iot . device . DeviceClientConfig . class , mockIotHubConnectionString ) ; tests . unit . com . microsoft . azure . sdk . iot . device . Deencapsulation . invoke ( config , "setProtocol" , IotHubClientProtocol . AMQPS ) ; tests . unit . com . microsoft . azure . sdk . iot . device . IotHubClientProtocol savedProtocol = tests . unit . com . microsoft . azure . sdk . iot . device . Deencapsulation . getField ( config , "protocol" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( IotHubClientProtocol . AMQPS , savedProtocol )
testRemoveCell ( ) { org . apache . poi . hssf . record . BlankRecord blankRecord1 = org . apache . poi . hssf . record . aggregates . TestValueRecordsAggregate . newBlankRecord ( ) ; valueRecord . insertCell ( blankRecord1 ) ; org . apache . poi . hssf . record . BlankRecord blankRecord2 = org . apache . poi . hssf . record . aggregates . TestValueRecordsAggregate . newBlankRecord ( ) ; valueRecord . removeCell ( blankRecord2 ) ; "<AssertPlaceHolder>" ; valueRecord . removeCell ( blankRecord2 ) ; } getValueRecords ( ) { java . util . List < org . apache . poi . hssf . record . CellValueRecordInterface > list = new java . util . ArrayList ( ) ; for ( org . apache . poi . hssf . record . CellValueRecordInterface rec : valueRecord ) { list . add ( rec ) ; } return java . util . Collections . unmodifiableList ( list ) ; }
org . junit . Assert . assertEquals ( 0 , getValueRecords ( ) . size ( ) )
getLibraries ( ) { "<AssertPlaceHolder>" ; } getLibraries ( ) { org . junit . Assert . assertTrue ( "Exactly<sp>one<sp>library<sp>has<sp>to<sp>be<sp>defined<sp>on<sp>build<sp>path" , ( ( buildPathsPropertyPage . getLibraries ( ) . size ( ) ) == 1 ) ) ; }
org . junit . Assert . assertTrue ( "Exactly<sp>one<sp>library<sp>has<sp>to<sp>be<sp>defined<sp>on<sp>build<sp>path" , ( ( buildPathsPropertyPage . getLibraries ( ) . size ( ) ) == 1 ) )
testSetRootDataMap ( ) { org . apache . cayenne . map . DataMap map = new org . apache . cayenne . map . DataMap ( "map" ) ; builder . setRoot ( map , QueryDescriptor . DATA_MAP_ROOT , null ) ; "<AssertPlaceHolder>" ; } getRoot ( ) { return root ; }
org . junit . Assert . assertSame ( map , builder . getRoot ( ) )
testAttributeNamePrefixedWithOperatorName ( ) { com . mitchellbosecke . pebble . PebbleEngine pebble = new com . mitchellbosecke . pebble . PebbleEngine . Builder ( ) . loader ( new com . mitchellbosecke . pebble . loader . StringLoader ( ) ) . strictVariables ( false ) . build ( ) ; com . mitchellbosecke . pebble . template . PebbleTemplate template = pebble . getTemplate ( "{{<sp>foo.org<sp>}}" ) ; java . util . Map < java . lang . String , java . lang . Object > context = new java . util . HashMap ( ) ; context . put ( "foo" , new com . mitchellbosecke . pebble . ParsingOdditiesTest . Foo ( "success" ) ) ; java . io . Writer writer = new java . io . StringWriter ( ) ; template . evaluate ( writer , context ) ; "<AssertPlaceHolder>" ; } toString ( ) { return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( "success" , writer . toString ( ) )
testGetSuspendingTriggerDefinitionNoHit ( ) { final org . oscm . domobjects . Organization org = createOrgAndSetTriggerDefinition ( false , false ) ; runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { public org . oscm . domobjects . Void call ( ) throws org . oscm . domobjects . Exception { org . oscm . domobjects . Organization storedOrg = mgr . getReference ( org . oscm . domobjects . Organization . class , org . getKey ( ) ) ; org . oscm . domobjects . TriggerDefinition suspendingTriggerDefinition = storedOrg . getSuspendingTriggerDefinition ( TriggerType . ACTIVATE_SERVICE ) ; "<AssertPlaceHolder>" ; return null ; } } ) ; } getSuspendingTriggerDefinition ( org . oscm . internal . types . enumtypes . TriggerType ) { org . oscm . domobjects . TriggerDefinition result = null ; for ( org . oscm . domobjects . TriggerDefinition td : this . triggerDefinitions ) { if ( ( ( td . getType ( ) ) == type ) && ( td . isSuspendProcess ( ) ) ) { if ( result != null ) { throw new org . oscm . internal . types . exception . SaaSSystemException ( java . lang . String . format ( "More<sp>than<sp>one<sp>suspending<sp>trigger<sp>definition<sp>found<sp>for<sp>organization<sp>'%s'.<sp>Data<sp>is<sp>inconsistent,<sp>operation<sp>aborted." , java . lang . String . valueOf ( getKey ( ) ) ) ) ; } result = td ; } } return result ; }
org . junit . Assert . assertNull ( suspendingTriggerDefinition )
testGetControl ( ) { org . eclipse . swt . widgets . Display display = new org . eclipse . swt . widgets . Display ( ) ; org . eclipse . swt . widgets . Control control = new org . eclipse . swt . widgets . Shell ( display ) ; org . eclipse . swt . dnd . DragSourceEffect dragSourceEffect = new org . eclipse . swt . dnd . DragSourceEffect ( control ) ; "<AssertPlaceHolder>" ; } getControl ( ) { return control ; }
org . junit . Assert . assertSame ( control , dragSourceEffect . getControl ( ) )
round ( ) { "<AssertPlaceHolder>" ; } round ( ) { return roundProvider . round ( ) ; }
org . junit . Assert . assertEquals ( 0 , subject . round ( ) )
withPrefix_shouldId1BeGreaterForSameSerials ( ) { org . asteriskjava . manager . event . BridgeEnterEvent bridgeEnterEvent1 = org . asteriskjava . manager . internal . backwardsCompatibility . bridge . BridgeEnterEventComparatorTest . createBridgeEnterEvent ( "some_prefix-1515590353.30" ) ; org . asteriskjava . manager . event . BridgeEnterEvent bridgeEnterEvent2 = org . asteriskjava . manager . internal . backwardsCompatibility . bridge . BridgeEnterEventComparatorTest . createBridgeEnterEvent ( "some_prefix-1515590350.30" ) ; int compareResult = bridgeEnterEventComparator . compare ( bridgeEnterEvent1 , bridgeEnterEvent2 ) ; "<AssertPlaceHolder>" ; } compare ( org . asteriskjava . manager . event . BridgeEnterEvent , org . asteriskjava . manager . event . BridgeEnterEvent ) { java . util . regex . Matcher uniqueId1Matcher = org . asteriskjava . manager . internal . backwardsCompatibility . bridge . BridgeEnterEventComparator . UNIQUE_ID_PATTERN . matcher ( o1 . getUniqueId ( ) ) ; java . util . regex . Matcher uniqueId2Matcher = org . asteriskjava . manager . internal . backwardsCompatibility . bridge . BridgeEnterEventComparator . UNIQUE_ID_PATTERN . matcher ( o2 . getUniqueId ( ) ) ; boolean find1 = uniqueId1Matcher . find ( ) ; boolean find2 = uniqueId2Matcher . find ( ) ; if ( find1 && find2 ) { long epochtime1 = java . lang . Long . valueOf ( uniqueId1Matcher . group ( 1 ) ) ; long epochtime2 = java . lang . Long . valueOf ( uniqueId2Matcher . group ( 1 ) ) ; int serial1 = java . lang . Integer . valueOf ( uniqueId1Matcher . group ( 2 ) ) ; int serial2 = java . lang . Integer . valueOf ( uniqueId2Matcher . group ( 2 ) ) ; return epochtime1 == epochtime2 ? java . lang . Integer . compare ( serial1 , serial2 ) : java . lang . Long . compare ( epochtime1 , epochtime2 ) ; } else if ( ( ! find1 ) && ( ! find2 ) ) { return 0 ; } else { return find1 ? 1 : - 1 ; } }
org . junit . Assert . assertEquals ( 1 , compareResult )
defaultSdkSocketOptionPresent ( ) { software . amazon . awssdk . http . nio . netty . internal . SdkChannelOptions channelOptions = new software . amazon . awssdk . http . nio . netty . internal . SdkChannelOptions ( ) ; java . util . Map < io . netty . channel . ChannelOption , java . lang . Object > expectedOptions = new java . util . HashMap ( ) ; expectedOptions . put ( ChannelOption . TCP_NODELAY , Boolean . TRUE ) ; "<AssertPlaceHolder>" ; } channelOptions ( ) { return java . util . Collections . unmodifiableMap ( options ) ; }
org . junit . Assert . assertEquals ( expectedOptions , channelOptions . channelOptions ( ) )
test ( ) { com . firefly . reactive . adapter . http . ReactiveHTTPClient c = Reactor . http . httpClient ( ) ; com . firefly . server . http2 . HTTP2ServerBuilder s = $ . httpServer ( ) ; s . router ( ) . get ( "/*" ) . asyncHandler ( ( ctx ) -> ctx . next ( new Promise < java . lang . String > ( ) { @ java . lang . Override public void succeeded ( java . lang . String result ) { ctx . end ( ) ; } @ java . lang . Override public void failed ( java . lang . Throwable x ) { ctx . setStatus ( HttpStatus . INTERNAL_SERVER_ERROR_500 ) . end ( x . getMessage ( ) ) ; } } ) ) . router ( ) . get ( "/reactor/hello" ) . asyncHandler ( ( ctx ) -> ctx . write ( "hello<sp>reactor" ) . succeed ( null ) ) . listen ( host , port ) ; c . get ( ( ( uri ) + "/reactor/hello" ) ) . toMono ( ) . map ( SimpleResponse :: getStringBody ) . doOnSuccess ( System . out :: println ) . doOnSuccess ( ( body ) -> "<AssertPlaceHolder>" ) . block ( ) ; s . stop ( ) ; c . stop ( ) ; } is ( java . lang . String ) { return _string . equalsIgnoreCase ( s ) ; }
org . junit . Assert . assertThat ( body , is ( "hello<sp>reactor" ) )
testRemoveInvalidMember ( ) { "<AssertPlaceHolder>" ; verify ( dlg , never ( ) ) . removeMember ( memberDlg ) ; verify ( autosaveMgr , times ( 1 ) ) . autosave ( ) ; } removeMember ( java . security . Principal ) { if ( ! ( isMember ( user ) ) ) { return false ; } else { throw new java . lang . UnsupportedOperationException ( "Removing<sp>members<sp>from<sp>external<sp>group<sp>principals<sp>is<sp>not<sp>supported." ) ; } }
org . junit . Assert . assertFalse ( group . removeMember ( memberDlg ) )
testBytesStore ( ) { @ org . jetbrains . annotations . NotNull net . openhft . chronicle . wire . Wire wire = createWire ( ) ; wire . write ( ) . object ( net . openhft . chronicle . bytes . Bytes . fromString ( "Hello" ) ) ; net . openhft . chronicle . bytes . Bytes b = net . openhft . chronicle . bytes . Bytes . elasticByteBuffer ( ) ; wire . read ( ) . bytes ( b ) ; "<AssertPlaceHolder>" ; b . release ( ) ; } toString ( ) { return ( ( "X{" + "text=" ) + ( text ) ) + '}' ; }
org . junit . Assert . assertEquals ( "Hello" , b . toString ( ) )
testBondOrTT ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( OR , new org . openscience . cdk . isomorphism . matchers . Expr ( TRUE ) , new org . openscience . cdk . isomorphism . matchers . Expr ( TRUE ) ) ; org . openscience . cdk . interfaces . IBond bond = mock ( org . openscience . cdk . interfaces . IBond . class ) ; "<AssertPlaceHolder>" ; } matches ( org . openscience . cdk . interfaces . IAtomContainer ) { return matches ( atomContainer , true ) ; }
org . junit . Assert . assertTrue ( expr . matches ( bond ) )
shouldRoundTripGenericAvroDataThroughKafka ( ) { org . apache . avro . Schema schema = new org . apache . avro . Schema . Parser ( ) . parse ( getClass ( ) . getResourceAsStream ( "/avro/io/confluent/examples/streams/wikifeed.avsc" ) ) ; org . apache . avro . generic . GenericRecord record = new org . apache . avro . generic . GenericData . Record ( schema ) ; record . put ( "user" , "alice" ) ; record . put ( "is_new" , true ) ; record . put ( "content" , "lorem<sp>ipsum" ) ; java . util . List < org . apache . avro . generic . GenericRecord > inputValues = java . util . Collections . singletonList ( record ) ; org . apache . kafka . streams . kstream . KStreamBuilder builder = new org . apache . kafka . streams . kstream . KStreamBuilder ( ) ; java . util . Properties streamsConfiguration = new java . util . Properties ( ) ; streamsConfiguration . put ( StreamsConfig . APPLICATION_ID_CONFIG , "generic-avro-integration-test" ) ; streamsConfiguration . put ( StreamsConfig . BOOTSTRAP_SERVERS_CONFIG , io . confluent . examples . streams . GenericAvroIntegrationTest . CLUSTER . bootstrapServers ( ) ) ; streamsConfiguration . put ( StreamsConfig . ZOOKEEPER_CONNECT_CONFIG , io . confluent . examples . streams . GenericAvroIntegrationTest . CLUSTER . zookeeperConnect ( ) ) ; streamsConfiguration . put ( StreamsConfig . KEY_SERDE_CLASS_CONFIG , org . apache . kafka . common . serialization . Serdes . ByteArray ( ) . getClass ( ) . getName ( ) ) ; streamsConfiguration . put ( StreamsConfig . VALUE_SERDE_CLASS_CONFIG , io . confluent . examples . streams . utils . GenericAvroSerde . class ) ; streamsConfiguration . put ( AbstractKafkaAvroSerDeConfig . SCHEMA_REGISTRY_URL_CONFIG , io . confluent . examples . streams . GenericAvroIntegrationTest . CLUSTER . schemaRegistryUrl ( ) ) ; streamsConfiguration . put ( ConsumerConfig . AUTO_OFFSET_RESET_CONFIG , "earliest" ) ; final org . apache . kafka . common . serialization . Serde < java . lang . String > stringSerde = org . apache . kafka . common . serialization . Serdes . String ( ) ; final org . apache . kafka . common . serialization . Serde < org . apache . avro . generic . GenericRecord > genericAvroSerde = new io . confluent . examples . streams . utils . GenericAvroSerde ( ) ; boolean isKeySerde = false ; genericAvroSerde . configure ( java . util . Collections . singletonMap ( AbstractKafkaAvroSerDeConfig . SCHEMA_REGISTRY_URL_CONFIG , io . confluent . examples . streams . GenericAvroIntegrationTest . CLUSTER . schemaRegistryUrl ( ) ) , isKeySerde ) ; org . apache . kafka . streams . kstream . KStream < java . lang . String , org . apache . avro . generic . GenericRecord > stream = builder . stream ( io . confluent . examples . streams . GenericAvroIntegrationTest . inputTopic ) ; stream . to ( stringSerde , genericAvroSerde , io . confluent . examples . streams . GenericAvroIntegrationTest . outputTopic ) ; org . apache . kafka . streams . KafkaStreams streams = new org . apache . kafka . streams . KafkaStreams ( builder , streamsConfiguration ) ; streams . start ( ) ; java . util . Properties producerConfig = new java . util . Properties ( ) ; producerConfig . put ( ProducerConfig . BOOTSTRAP_SERVERS_CONFIG , io . confluent . examples . streams . GenericAvroIntegrationTest . CLUSTER . bootstrapServers ( ) ) ; producerConfig . put ( ProducerConfig . ACKS_CONFIG , "all" ) ; producerConfig . put ( ProducerConfig . RETRIES_CONFIG , 0 ) ; producerConfig . put ( ProducerConfig . KEY_SERIALIZER_CLASS_CONFIG , org . apache . kafka . common . serialization . ByteArraySerializer . class ) ; producerConfig . put ( ProducerConfig . VALUE_SERIALIZER_CLASS_CONFIG , io . confluent . kafka . serializers . KafkaAvroSerializer . class ) ; producerConfig . put ( AbstractKafkaAvroSerDeConfig . SCHEMA_REGISTRY_URL_CONFIG , io . confluent . examples . streams . GenericAvroIntegrationTest . CLUSTER . schemaRegistryUrl ( ) ) ; io . confluent . examples . streams . IntegrationTestUtils . produceValuesSynchronously ( io . confluent . examples . streams . GenericAvroIntegrationTest . inputTopic , inputValues , producerConfig ) ; java . util . Properties consumerConfig = new java . util . Properties ( ) ; consumerConfig . put ( ConsumerConfig . BOOTSTRAP_SERVERS_CONFIG , io . confluent . examples . streams . GenericAvroIntegrationTest . CLUSTER . bootstrapServers ( ) ) ; consumerConfig . put ( ConsumerConfig . GROUP_ID_CONFIG , "generic-avro-integration-test-standard-consumer" ) ; consumerConfig . put ( ConsumerConfig . AUTO_OFFSET_RESET_CONFIG , "earliest" ) ; consumerConfig . put ( ConsumerConfig . KEY_DESERIALIZER_CLASS_CONFIG , org . apache . kafka . common . serialization . ByteArrayDeserializer . class ) ; consumerConfig . put ( ConsumerConfig . VALUE_DESERIALIZER_CLASS_CONFIG , io . confluent . kafka . serializers . KafkaAvroDeserializer . class ) ; consumerConfig . put ( AbstractKafkaAvroSerDeConfig . SCHEMA_REGISTRY_URL_CONFIG , io . confluent . examples . streams . GenericAvroIntegrationTest . CLUSTER . schemaRegistryUrl ( ) ) ; java . util . List < org . apache . avro . generic . GenericRecord > actualValues = io . confluent . examples . streams . IntegrationTestUtils . waitUntilMinValuesRecordsReceived ( consumerConfig , io . confluent . examples . streams . GenericAvroIntegrationTest . outputTopic , inputValues . size ( ) ) ; streams . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { inner . close ( ) ; }
org . junit . Assert . assertEquals ( inputValues , actualValues )
testNumActiveUpdatedOnCheckOut ( ) { com . bazaarvoice . ostrich . pool . SingleThreadedClientServiceCache < com . bazaarvoice . ostrich . pool . SingleThreadedClientServiceCacheTest . Service > cache = newCache ( ) ; cache . checkOut ( com . bazaarvoice . ostrich . pool . SingleThreadedClientServiceCacheTest . END_POINT ) ; "<AssertPlaceHolder>" ; } getNumActiveInstances ( com . bazaarvoice . ostrich . ServiceEndPoint ) { checkNotNull ( endPoint ) ; return _pool . getNumActive ( endPoint ) ; }
org . junit . Assert . assertEquals ( 1 , cache . getNumActiveInstances ( com . bazaarvoice . ostrich . pool . SingleThreadedClientServiceCacheTest . END_POINT ) )
testRemoteCFWithTCPandHA ( ) { java . util . Hashtable < java . lang . String , java . lang . String > props = new java . util . Hashtable ( ) ; props . put ( Context . INITIAL_CONTEXT_FACTORY , "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory" ) ; props . put ( "connectionFactory.myConnectionFactory" , "tcp://127.0.0.1:61616?ha=true" ) ; javax . naming . Context ctx = new javax . naming . InitialContext ( props ) ; org . apache . activemq . artemis . jms . client . ActiveMQConnectionFactory cf = ( ( org . apache . activemq . artemis . jms . client . ActiveMQConnectionFactory ) ( ctx . lookup ( "myConnectionFactory" ) ) ) ; "<AssertPlaceHolder>" ; } isHA ( ) { if ( org . apache . activemq . artemis . logs . AuditLogger . isEnabled ( ) ) { org . apache . activemq . artemis . logs . AuditLogger . isHA ( this . bridge ) ; } clearIO ( ) ; try { return configuration . isHA ( ) ; } finally { blockOnIO ( ) ; } }
org . junit . Assert . assertEquals ( true , cf . isHA ( ) )
getBooleanTrueT ( ) { final java . lang . Character value = 'T' ; final io . trane . ndbc . value . CharacterValue wrapper = new io . trane . ndbc . value . CharacterValue ( value ) ; "<AssertPlaceHolder>" ; } getBoolean ( ) { return ( get ( ) ) == 1 ; }
org . junit . Assert . assertEquals ( true , wrapper . getBoolean ( ) )
testGetLabelResource ( ) { System . out . println ( "getLabelResource" ) ; kg . apc . jmeter . threads . UltimateThreadGroupGui instance = new kg . apc . jmeter . threads . UltimateThreadGroupGui ( ) ; java . lang . String expResult = "UltimateThreadGroupGui" ; java . lang . String result = instance . getLabelResource ( ) ; "<AssertPlaceHolder>" ; } getLabelResource ( ) { return this . getClass ( ) . getSimpleName ( ) ; }
org . junit . Assert . assertEquals ( expResult , result )
testRemovesOneFileFromContainerWhenFileExistsForBDoc ( ) { org . digidoc4j . Container container = this . createEmptyContainer ( ) ; container . addDataFile ( "src/test/resources/testFiles/helper-files/test.txt" , "text/plain" ) ; container . removeDataFile ( "test.txt" ) ; "<AssertPlaceHolder>" ; } getDataFiles ( ) { return m_dataFiles ; }
org . junit . Assert . assertEquals ( 0 , container . getDataFiles ( ) . size ( ) )
testTwoExistingAuthorizerProfileDoesNotMatch2 ( ) { profile . addRole ( org . pac4j . core . authorization . checker . ROLE ) ; final org . pac4j . core . authorization . checker . List < org . pac4j . core . authorization . authorizer . Authorizer > authorizers = new org . pac4j . core . authorization . checker . ArrayList ( ) ; authorizers . add ( new org . pac4j . core . authorization . checker . DefaultAuthorizationCheckerTests . IdAuthorizer ( ) ) ; authorizers . add ( new org . pac4j . core . authorization . authorizer . RequireAnyRoleAuthorizer ( ROLE ) ) ; "<AssertPlaceHolder>" ; } isAuthorized ( org . pac4j . core . context . WebContext , org . pac4j . core . authorization . checker . List , org . pac4j . core . authorization . checker . List ) { assertTrue ( isNotEmpty ( profiles ) , "profiles<sp>must<sp>not<sp>be<sp>null<sp>or<sp>empty" ) ; if ( isNotEmpty ( authorizers ) ) { for ( org . pac4j . core . authorization . checker . Authorizer authorizer : authorizers ) { final boolean isAuthorized = authorizer . isAuthorized ( context , profiles ) ; org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . LOGGER . debug ( "Checking<sp>authorizer:<sp>{}<sp>-><sp>{}" , authorizer , isAuthorized ) ; if ( ! isAuthorized ) { return false ; } } } return true ; }
org . junit . Assert . assertFalse ( checker . isAuthorized ( null , profiles , authorizers ) )
setPropertyValueOnResourceForContextShouldThrowExceptionWhenPropertyNotFound ( ) { java . lang . String resourceGroupName = "resourceGroupName" ; java . lang . String releaseName = "releaseName" ; java . lang . String contextName = "contextName" ; java . lang . String propertyName = "propertyName" ; java . lang . String propertyValue = "propertyValue" ; java . lang . String typeName = "resourceGroupTypeName" ; ch . puzzle . itc . mobiliar . business . property . boundary . List < ch . puzzle . itc . mobiliar . business . property . boundary . ResourceEditProperty > properties = new ch . puzzle . itc . mobiliar . business . property . boundary . ArrayList ( ) ; ch . puzzle . itc . mobiliar . business . environment . entity . ContextEntity contextMock = mock ( ch . puzzle . itc . mobiliar . business . environment . entity . ContextEntity . class ) ; when ( resourceLocatorMock . getResourceByGroupNameAndRelease ( resourceGroupName , releaseName ) ) . thenReturn ( createWithIdNameAndTypeName ( 1 , resourceGroupName , typeName ) ) ; when ( contextLocatorMock . getContextByName ( contextName ) ) . thenReturn ( contextMock ) ; when ( propertyValueServiceMock . decryptProperties ( anyList ( ) ) ) . thenReturn ( properties ) ; "<AssertPlaceHolder>" ; editor . setPropertyValueOnResourceForContext ( resourceGroupName , releaseName , contextName , propertyName , propertyValue ) ; } isEmpty ( ) { if ( ( ( asProperties ) != null ) && ( ! ( asProperties . isEmpty ( ) ) ) ) { return false ; } if ( ( ( nodeProperties ) != null ) && ( ! ( nodeProperties . isEmpty ( ) ) ) ) { return false ; } if ( ( ( consumerUnit ) != null ) && ( ! ( consumerUnit . isEmpty ( ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( properties . isEmpty ( ) )
putAddNewPairSucceed ( ) { com . microsoft . azure . sdk . iot . deps . twin . TwinCollection twinCollection = new com . microsoft . azure . sdk . iot . deps . twin . TwinCollection ( ) ; twinCollection . putFinal ( tests . unit . com . microsoft . azure . sdk . iot . deps . twin . TwinCollectionTest . VALID_KEY_NAME , "NewNiceCar" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { java . lang . Object result = null ; synchronized ( lock ) { if ( property . containsKey ( key ) ) { result = property . get ( key ) . value ; } else { result = null ; } } return result ; }
org . junit . Assert . assertEquals ( "NewNiceCar" , twinCollection . get ( tests . unit . com . microsoft . azure . sdk . iot . deps . twin . TwinCollectionTest . VALID_KEY_NAME ) )
testWrongTag ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/private_input_without_default_wrong_tag.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . SlangSource . fromFile ( resource ) ) ; "<AssertPlaceHolder>" ; exception . expect ( io . cloudslang . lang . compiler . RuntimeException . class ) ; exception . expectMessage ( ( "Artifact<sp>{private_input_without_default}<sp>has<sp>unrecognized<sp>tag<sp>{action}.<sp>" + "Please<sp>take<sp>a<sp>look<sp>at<sp>the<sp>supported<sp>features<sp>per<sp>versions<sp>link" ) ) ; throw result . getErrors ( ) . get ( 0 ) ; } getErrors ( ) { return errors ; }
org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) )
testRemovedEnumConstant ( ) { japicmp . model . JApiClass abcToAb = getJApiClass ( japicmp . test . EnumsTest . jApiClasses , japicmp . test . Enums . AbcToAb . class . getName ( ) ) ; "<AssertPlaceHolder>" ; } isBinaryCompatible ( ) { return true ; }
org . junit . Assert . assertThat ( abcToAb . isBinaryCompatible ( ) , org . hamcrest . CoreMatchers . is ( false ) )
whenCreatingEmptyRoute_itMustReturnEmptyRoute ( ) { @ jsprit . core . problem . solution . route . SuppressWarnings ( "unused" ) jsprit . core . problem . solution . route . VehicleRoute route = jsprit . core . problem . solution . route . VehicleRoute . emptyRoute ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
testVersion1SecureRandomVersion ( ) { "<AssertPlaceHolder>" ; } timeRandomBasedUUID ( ) { return com . twelvemonkeys . util . UUIDFactory . createTimeBasedUUIDforNode ( com . twelvemonkeys . util . UUIDFactory . SECURE_RANDOM_NODE ) ; }
org . junit . Assert . assertEquals ( 1 , com . twelvemonkeys . util . UUIDFactory . timeRandomBasedUUID ( ) . version ( ) )
test130GetMapEndpointExtraParamsNoAmpAtEnd ( ) { java . io . InputStream is = org . deegree . protocol . wms . client . WMSClientTest . class . getResourceAsStream ( "wms130-capabilities-getmap-endpoint-extra-params-no-amp-at-end.xml" ) ; org . deegree . protocol . wms . client . WMSClient client = new org . deegree . protocol . wms . client . WMSClient ( new org . deegree . protocol . wms . client . WMS130CapabilitiesAdapter ( new org . deegree . commons . xml . XMLAdapter ( is ) . getRootElement ( ) ) ) ; org . deegree . protocol . wms . ops . GetMap getMap = createGetMap ( ) ; java . io . InputStream response = client . getMap ( getMap ) ; "<AssertPlaceHolder>" ; } getMap ( org . deegree . protocol . wms . client . GetMap ) { java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; map . put ( "WMSCLIENT.SERVER_NO_GETMAP_URL" 0 , "GetMap" ) ; map . put ( "version" , wmsVersion . toString ( ) ) ; map . put ( "WMSCLIENT.SERVER_NO_GETMAP_URL" 1 , "WMS" ) ; map . put ( "layers" , join ( "WMSCLIENT.SERVER_NO_GETMAP_URL" 4 , getMap . getLayers ( ) ) ) ; map . put ( "styles" , "" ) ; java . util . LinkedList < org . deegree . style . StyleRef > styles = new java . util . LinkedList < org . deegree . style . StyleRef > ( getMap . getStyles ( ) ) ; if ( ( styles . size ( ) ) > 0 ) { while ( ( styles . size ( ) ) < ( getMap . getLayers ( ) . size ( ) ) ) { styles . add ( new org . deegree . style . StyleRef ( "default" ) ) ; } map . put ( "styles" , join ( "WMSCLIENT.SERVER_NO_GETMAP_URL" 4 , styles ) ) ; } map . put ( "GetMap" 3 , java . lang . Integer . toString ( getMap . getWidth ( ) ) ) ; map . put ( "WMSCLIENT.SERVER_NO_GETMAP_URL" 3 , java . lang . Integer . toString ( getMap . getHeight ( ) ) ) ; map . put ( "GetMap" 4 , "GetMap" 1 ) ; org . deegree . geometry . Envelope bbox = getMap . getBoundingBox ( ) ; if ( axisFlipped ( bbox . getCoordinateSystem ( ) ) ) { map . put ( "GetMap" 6 , ( ( ( ( ( ( ( bbox . getMin ( ) . get0 ( ) ) + "WMSCLIENT.SERVER_NO_GETMAP_URL" 4 ) + ( bbox . getMin ( ) . get1 ( ) ) ) + "WMSCLIENT.SERVER_NO_GETMAP_URL" 4 ) + ( bbox . getMax ( ) . get0 ( ) ) ) + "WMSCLIENT.SERVER_NO_GETMAP_URL" 4 ) + ( bbox . getMax ( ) . get1 ( ) ) ) ) ; } else { map . put ( "GetMap" 6 , ( ( ( ( ( ( ( bbox . getMin ( ) . get1 ( ) ) + "WMSCLIENT.SERVER_NO_GETMAP_URL" 4 ) + ( bbox . getMin ( ) . get0 ( ) ) ) + "WMSCLIENT.SERVER_NO_GETMAP_URL" 4 ) + ( bbox . getMax ( ) . get1 ( ) ) ) + "WMSCLIENT.SERVER_NO_GETMAP_URL" 4 ) + ( bbox . getMax ( ) . get0 ( ) ) ) ) ; } if ( wmsVersion . equals ( org . deegree . protocol . wms . client . VERSION_111 ) ) { map . put ( "GetMap" 8 , getMap . getCoordinateSystem ( ) . getAlias ( ) ) ; } else { map . put ( "GetMap" 9 , getMap . getCoordinateSystem ( ) . getAlias ( ) ) ; } map . put ( "GetMap" 7 , getMap . getFormat ( ) ) ; if ( ( getMap . getOverriddenParameters ( ) ) != null ) { for ( java . util . Map . Entry < java . lang . String , java . lang . String > e : getMap . getOverriddenParameters ( ) . entrySet ( ) ) { if ( map . containsKey ( e . getKey ( ) . toLowerCase ( ) ) ) { org . deegree . protocol . wms . client . WMSClient . LOG . debug ( "GetMap" 0 , e . getKey ( ) ) ; map . put ( e . getKey ( ) . toLowerCase ( ) , e . getValue ( ) ) ; } else map . put ( e . getKey ( ) , e . getValue ( ) ) ; } } java . lang . String url = getAddress ( org . deegree . protocol . wms . client . GetMap , true ) ; if ( url == null ) { org . deegree . protocol . wms . client . WMSClient . LOG . warn ( get ( "WMSCLIENT.SERVER_NO_GETMAP_URL" ) , "WMSCLIENT.SERVER_NO_GETMAP_URL" 2 , capaDoc ) ; return null ; } url = repairGetUrl ( url ) ; java . lang . String query = url + ( toQueryString ( map ) ) ; java . net . URL theUrl = new java . net . URL ( query ) ; org . deegree . protocol . wms . client . WMSClient . LOG . debug ( ( "Connecting<sp>to<sp>URL<sp>" + theUrl ) ) ; java . net . URLConnection conn = org . deegree . commons . proxy . ProxySettings . openURLConnection ( theUrl , getHttpProxyUser ( true ) , getHttpProxyPassword ( true ) , httpBasicUser , httpBasicPass ) ; conn . setConnectTimeout ( ( ( connectionTimeout ) * 1000 ) ) ; conn . setReadTimeout ( ( ( requestTimeout ) * 1000 ) ) ; conn . connect ( ) ; org . deegree . protocol . wms
org . junit . Assert . assertNotNull ( response )
testEvents ( ) { org . cytoscape . view . model . CyNetworkView networkView = mock ( org . cytoscape . view . model . CyNetworkView . class ) ; org . cytoscape . view . model . events . UpdateNetworkPresentationEvent ev3 = new org . cytoscape . view . model . events . UpdateNetworkPresentationEvent ( networkView ) ; "<AssertPlaceHolder>" ; } getSource ( ) { return this . v1 ; }
org . junit . Assert . assertEquals ( networkView , ev3 . getSource ( ) )
testGetParametersWithDefaultEntityAndDisabledSecurity ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . department . Department entity = new org . lnu . is . domain . department . Department ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "status" , RowStatus . ACTIVE ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
testCreateHospitalAdmissionDiagnosisSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . hitsp . HospitalAdmissionDiagnosisSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . hitsp . builder . HITSPBuilderFactory . createHospitalAdmissionDiagnosisSectionBuilder ( ) ; org . openhealthtools . mdht . uml . cda . hitsp . HospitalAdmissionDiagnosisSection section = sectionBuilder . buildSection ( ) ; "<AssertPlaceHolder>" ; Diagnostician . INSTANCE . validate ( section ) ; org . openhealthtools . mdht . uml . cda . util . CDAUtil . saveSnippet ( section , System . out ) ; } buildSection ( ) { org . openhealthtools . mdht . uml . cda . Section section = CDAFactory . eINSTANCE . createSection ( ) ; construct ( section ) ; return section ; }
org . junit . Assert . assertNotNull ( section )
testGetFaultFlag ( ) { boolean expResult = false ; boolean result = instance . getFaultFlag ( ) ; "<AssertPlaceHolder>" ; } getFaultFlag ( ) { return faultFlag ; }
org . junit . Assert . assertEquals ( expResult , result )
entityAllPrimAllNull ( ) { final org . apache . olingo . commons . api . edm . EdmEntitySet edmEntitySet = org . apache . olingo . server . core . serializer . json . ODataJsonSerializerv01Test . entityContainer . getEntitySet ( "ESAllPrim" ) ; org . apache . olingo . commons . api . data . Entity entity = data . readAll ( edmEntitySet ) . getEntities ( ) . get ( 0 ) ; entity . getProperties ( ) . retainAll ( java . util . Collections . singletonList ( entity . getProperties ( ) . get ( 0 ) ) ) ; final java . lang . String resultString = org . apache . commons . io . IOUtils . toString ( serializer . entity ( org . apache . olingo . server . core . serializer . json . ODataJsonSerializerv01Test . metadata , edmEntitySet . getEntityType ( ) , entity , org . apache . olingo . server . api . serializer . EntitySerializerOptions . with ( ) . contextURL ( org . apache . olingo . commons . api . data . ContextURL . with ( ) . entitySet ( edmEntitySet ) . suffix ( Suffix . ENTITY ) . build ( ) ) . build ( ) ) . getContent ( ) ) ; final java . lang . String expectedResult = "{\"@context\":\"$metadata#ESAllPrim/$entity\"," + ( ( ( ( ( ( ( ( "\"@metadataEtag\":\"W/\\\"metadataETag\\\"\"," + "\"PropertyInt16\":32767," ) + "\"PropertyString\":null,\"PropertyBoolean\":null," ) + "\"PropertyByte\":null,\"PropertySByte\":null," ) + "\"PropertyInt32\":null,\"PropertyInt64\":null," ) + "\"PropertySingle\":null,\"PropertyDouble\":null,\"PropertyDecimal\":null," ) + "\"PropertyBinary\":null," ) + "\"PropertyDate\":null,\"PropertyDateTimeOffset\":null,\"PropertyDuration\":null," ) + "\"PropertyGuid\":null,\"PropertyTimeOfDay\":null}" ) ; "<AssertPlaceHolder>" ; } getContent ( ) { return new java . io . ByteArrayInputStream ( content . toByteArray ( ) ) ; }
org . junit . Assert . assertEquals ( expectedResult , resultString )
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . wiki . model . WikiPage . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . eq ( "pageId" , com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ) ; java . util . List < com . liferay . wiki . model . WikiPage > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
testNoNext ( ) { while ( itr . hasNext ( ) ) { itr . next ( ) ; } "<AssertPlaceHolder>" ; try { itr . next ( ) ; } catch ( java . util . NoSuchElementException e ) { return ; } org . junit . Assert . fail ( "Must<sp>throw<sp>NoSuchElementException" ) ; } hasNext ( ) { return ( elementsRead ) < ( elements ) ; }
org . junit . Assert . assertFalse ( itr . hasNext ( ) )