input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testZ3 ( ) { org . junit . Assume . assumeTrue ( ( ( java . lang . System . getenv ( "z3_path" ) ) != null ) ) ; org . evosuite . Properties . Z3_PATH = java . lang . System . getenv ( "z3_path" ) ; org . evosuite . Properties . DSE_SOLVER = Properties . SolverType . Z3_SOLVER ; org . evosuite . EvoSuite evosuite = new org . evosuite . EvoSuite ( ) ; java . lang . String targetClass = com . examples . with . different . packagename . concolic . Pat . class . getCanonicalName ( ) ; org . evosuite . Properties . TARGET_CLASS = targetClass ; org . evosuite . Properties . DSE_PROBABILITY = 1.0 ; org . evosuite . Properties . CRITERION = new org . evosuite . Properties . Criterion [ ] { org . evosuite . Properties . Criterion . LINE , org . evosuite . Properties . Criterion . BRANCH , org . evosuite . Properties . Criterion . EXCEPTION , org . evosuite . Properties . Criterion . WEAKMUTATION , org . evosuite . Properties . Criterion . OUTPUT , org . evosuite . Properties . Criterion . METHOD , org . evosuite . Properties . Criterion . METHODNOEXCEPTION , org . evosuite . Properties . Criterion . CBRANCH } ; java . lang . String [ ] command = new java . lang . String [ ] { "-generateSuite" , "-class" , targetClass } ; java . lang . Object result = evosuite . parseCommandLine ( command ) ; org . evosuite . ga . metaheuristics . GeneticAlgorithm < ? > ga = getGAFromResult ( result ) ; org . evosuite . testsuite . TestSuiteChromosome best = ( ( org . evosuite . testsuite . TestSuiteChromosome ) ( ga . getBestIndividual ( ) ) ) ; "<AssertPlaceHolder>" ; } getBestIndividual ( ) { org . evosuite . testsuite . TestSuiteChromosome best = this . generateSuite ( ) ; if ( best . getTestChromosomes ( ) . isEmpty ( ) ) { for ( T test : this . getNonDominatedSolutions ( this . population ) ) { best . addTest ( ( ( org . evosuite . testcase . TestChromosome ) ( test ) ) ) ; } for ( org . evosuite . testsuite . TestSuiteFitnessFunction suiteFitness : this . suiteFitnessFunctions . keySet ( ) ) { best . setCoverage ( suiteFitness , 0.0 ) ; best . setFitness ( suiteFitness , 1.0 ) ; } return ( ( T ) ( best ) ) ; } this . computeCoverageAndFitness ( best ) ; return ( ( T ) ( best ) ) ; }
org . junit . Assert . assertNotNull ( best )
testIsConnectedSuccessDisconnected ( ) { org . mockito . Mockito . doReturn ( CellularAssociationIndicationStatus . INITIALIZING ) . when ( cellularDevice ) . getCellularAssociationIndicationStatus ( ) ; "<AssertPlaceHolder>" ; } isConnected ( ) { com . digi . xbee . api . models . WiFiAssociationIndicationStatus status = getWiFiAssociationIndicationStatus ( ) ; return status == ( com . digi . xbee . api . models . WiFiAssociationIndicationStatus . SUCCESSFULLY_JOINED ) ; }
org . junit . Assert . assertFalse ( cellularDevice . isConnected ( ) )
testFoldOverlyLongNonWhitespace ( ) { java . lang . String ninety = "1234567890123456789012345678901234567890" + "12345678901234567890123456789012345678901234567890" ; java . lang . String input = java . lang . String . format ( "testing<sp>1<sp>2<sp>%s<sp>testing<sp>%s" , ninety , ninety ) ; java . lang . String expected = java . lang . String . format ( "testing<sp>1<sp>2\r\n<sp>%s\r\n<sp>testing\r\n<sp>%s" , ninety , ninety ) ; "<AssertPlaceHolder>" ; } fold ( java . lang . String , int ) { final int maxCharacters = 76 ; final int length = s . length ( ) ; if ( ( usedCharacters + length ) <= maxCharacters ) return s ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; int lastLineBreak = - usedCharacters ; int wspIdx = org . apache . james . mime4j . util . MimeUtil . indexOfWsp ( s , 0 ) ; while ( true ) { if ( wspIdx == length ) { sb . append ( s . substring ( java . lang . Math . max ( 0 , lastLineBreak ) ) ) ; return sb . toString ( ) ; } int nextWspIdx = org . apache . james . mime4j . util . MimeUtil . indexOfWsp ( s , ( wspIdx + 1 ) ) ; if ( ( nextWspIdx - lastLineBreak ) > maxCharacters ) { sb . append ( s . substring ( java . lang . Math . max ( 0 , lastLineBreak ) , wspIdx ) ) ; sb . append ( "\r\n" ) ; lastLineBreak = wspIdx ; } wspIdx = nextWspIdx ; } }
org . junit . Assert . assertEquals ( expected , org . apache . james . mime4j . util . MimeUtil . fold ( input , 0 ) )
getFiltersForZeroFilter ( ) { com . google . appengine . api . datastore . Query . CompositeFilterOperator operator = com . google . appengine . api . datastore . Query . CompositeFilterOperator . AND ; org . slim3 . datastore . FilterCriterion [ ] criteria = new org . slim3 . datastore . FilterCriterion [ 0 ] ; org . slim3 . datastore . CompositeCriterion criterion = new org . slim3 . datastore . CompositeCriterion ( meta , operator , criteria ) ; "<AssertPlaceHolder>" ; } getFilters ( ) { return filters ; }
org . junit . Assert . assertThat ( criterion . getFilters ( ) . length , org . hamcrest . CoreMatchers . is ( 0 ) )
ofYearMonthDayHourMinute ( ) { net . time4j . PlainDate date = net . time4j . PlainDate . of ( 2014 , Month . APRIL , 21 ) ; net . time4j . PlainTime time = net . time4j . PlainTime . of ( 19 , 45 ) ; "<AssertPlaceHolder>" ; } of ( int , int , int , int , int ) { return net . time4j . PlainTimestamp . of ( year , month , dayOfMonth , hour , minute , 0 ) ; }
org . junit . Assert . assertThat ( net . time4j . PlainTimestamp . of ( 2014 , 4 , 21 , 19 , 45 ) , org . hamcrest . CoreMatchers . is ( net . time4j . PlainTimestamp . of ( date , time ) ) )
testOnlyIncrement ( ) { if ( pipesDriverNotImplemented ( ) ) { return ; } io . yawp . repository . IdRef < io . yawp . repository . models . basic . PipedObjectCounter > counterId1 = id ( io . yawp . repository . models . basic . PipedObjectCounter . class , 1L ) ; io . yawp . repository . IdRef < io . yawp . repository . models . basic . PipedObjectCounter > counterId2 = id ( io . yawp . repository . models . basic . PipedObjectCounter . class , 2L ) ; io . yawp . repository . IdRef < io . yawp . repository . models . basic . PipedObjectCounter > counterId3 = id ( io . yawp . repository . models . basic . PipedObjectCounter . class , 3L ) ; yawp . save ( new io . yawp . repository . models . basic . PipedObject ( "xpto" , counterId1 ) ) ; yawp . save ( new io . yawp . repository . models . basic . PipedObject ( "xpto" , counterId1 ) ) ; yawp . save ( new io . yawp . repository . models . basic . PipedObject ( "xpto" , counterId2 ) ) ; yawp . save ( new io . yawp . repository . models . basic . PipedObject ( "xpto" , counterId2 ) ) ; yawp . save ( new io . yawp . repository . models . basic . PipedObject ( "xpto" , counterId2 ) ) ; yawp . save ( new io . yawp . repository . models . basic . PipedObject ( "xpto" , counterId3 ) ) ; awaitAsync ( 20 , TimeUnit . SECONDS ) ; io . yawp . repository . models . basic . PipedObjectCounterSum sum = yawp ( io . yawp . repository . models . basic . PipedObjectCounterSum . class ) . only ( ) ; "<AssertPlaceHolder>" ; } getSum ( ) { return sum ; }
org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 6 ) ) , sum . getSum ( ) )
testGetSuccessfulWrites ( ) { "<AssertPlaceHolder>" ; } getSuccessfulWrites ( ) { return java . util . Collections . unmodifiableList ( successfulWrites ) ; }
org . junit . Assert . assertEquals ( java . util . Collections . emptyList ( ) , writer . getSuccessfulWrites ( ) )
testGetSettingsPanel ( ) { System . out . println ( "getSettingsPanel" ) ; kg . apc . jmeter . vizualizers . AggregateReportGui instance = new kg . apc . jmeter . vizualizers . AggregateReportGui ( ) ; kg . apc . jmeter . vizualizers . JSettingsPanel result = instance . createSettingsPanel ( ) ; "<AssertPlaceHolder>" ; } createSettingsPanel ( ) { return new kg . apc . jmeter . vizualizers . JSettingsPanel ( this , ( ( ( ( ( ( ( JSettingsPanel . TIMELINE_OPTION ) | ( JSettingsPanel . GRADIENT_OPTION ) ) | ( JSettingsPanel . FINAL_ZEROING_OPTION ) ) | ( JSettingsPanel . LIMIT_POINT_OPTION ) ) | ( JSettingsPanel . MAXY_OPTION ) ) | ( JSettingsPanel . RELATIVE_TIME_OPTION ) ) | ( JSettingsPanel . MARKERS_OPTION ) ) ) ; }
org . junit . Assert . assertNotNull ( result )
builder_returnsBuilder ( ) { eu . chargetime . ocpp . wss . BaseWssSocketBuilder builder = eu . chargetime . ocpp . wss . BaseWssSocketBuilder . builder ( ) ; "<AssertPlaceHolder>" ; } builder ( ) { return new eu . chargetime . ocpp . wss . BaseWssSocketBuilder ( ) ; }
org . junit . Assert . assertThat ( builder , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . any ( eu . chargetime . ocpp . wss . BaseWssSocketBuilder . class ) ) )
testIsModerator ( ) { "<AssertPlaceHolder>" ; } isModerator ( ) { return isModerator ; }
org . junit . Assert . assertFalse ( header . isModerator ( ) )
testTopN1 ( ) { java . lang . String sqlText = "select<sp>top<sp>2<sp>*<sp>from<sp>t1<sp>union<sp>all<sp>select<sp>*<sp>from<sp>t2<sp>order<sp>by<sp>1,2" ; java . lang . String expected = ( com . splicemachine . derby . impl . sql . execute . operations . TimestampIT . extendedTimestamps ) ? "COL1<sp>|COL2<sp>|\n" + ( ( "-----------------------------\n" + "0001-01-01<sp>00:00:00.0<sp>|<sp>1<sp>|\n" ) + "0001-01-01<sp>00:00:00.0<sp>|<sp>1<sp>|" ) : "COL1<sp>|COL2<sp>|\n" + ( ( "-------------------------------\n" + "1677-09-20<sp>16:12:43.147<sp>|<sp>1<sp>|\n" ) + "1677-09-20<sp>16:12:43.147<sp>|<sp>1<sp>|" ) ; com . splicemachine . derby . impl . sql . execute . operations . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . TimestampIT . methodWatcher . executeQuery ( sqlText ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
setOverwriteConfigOnShutdown ( ) { configuration . setOverwriteConfigOnShutdown ( false ) ; "<AssertPlaceHolder>" ; } isOverwriteConfigOnShutdown ( ) { return overwriteConfigOnShutdown ; }
org . junit . Assert . assertThat ( configuration . isOverwriteConfigOnShutdown ( ) , org . hamcrest . CoreMatchers . is ( false ) )
testDotFreeEnclosed ( ) { java . lang . String expr = "(this<sp>after<sp>$a)" ; com . github . javaparser . ast . expr . Expression expression = org . drools . constraint . parser . DrlxParser . parseExpression ( parser , expr ) . getExpr ( ) ; "<AssertPlaceHolder>" ; } printConstraint ( com . github . javaparser . ast . Node ) { com . github . javaparser . printer . PrettyPrinterConfiguration prettyPrinterConfiguration = new com . github . javaparser . printer . PrettyPrinterConfiguration ( ) ; org . drools . constraint . parser . printer . ConstraintPrintVisitor constraintPrintVisitor = new org . drools . constraint . parser . printer . ConstraintPrintVisitor ( prettyPrinterConfiguration ) ; node . accept ( constraintPrintVisitor , null ) ; return constraintPrintVisitor . getSource ( ) ; }
org . junit . Assert . assertEquals ( expr , printConstraint ( expression ) )
testLoadMetricConfigResources ( ) { java . net . URL defaultConfig = org . datadog . jmxfetch . Instance . class . getResource ( "sample-metrics.yaml" ) ; java . lang . String configResource = defaultConfig . getPath ( ) . split ( "test-classes/" ) [ 1 ] ; org . datadog . jmxfetch . AppConfig config = mock ( org . datadog . jmxfetch . AppConfig . class ) ; when ( config . getMetricConfigResources ( ) ) . thenReturn ( com . google . common . collect . Lists . newArrayList ( configResource ) ) ; java . util . LinkedList < org . datadog . jmxfetch . Configuration > configurationList = new java . util . LinkedList < org . datadog . jmxfetch . Configuration > ( ) ; org . datadog . jmxfetch . Instance . loadMetricConfigResources ( config , configurationList ) ; "<AssertPlaceHolder>" ; } loadMetricConfigResources ( org . datadog . jmxfetch . AppConfig , java . util . LinkedList ) { java . util . List < java . lang . String > resourceConfigList = config . getMetricConfigResources ( ) ; if ( resourceConfigList != null ) { java . lang . ClassLoader classLoader = java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) ; for ( java . lang . String resourceName : resourceConfigList ) { org . datadog . jmxfetch . Instance . LOGGER . info ( ( "Reading<sp>metric<sp>config<sp>resource<sp>" + resourceName ) ) ; java . io . InputStream inputStream = classLoader . getResourceAsStream ( resourceName ) ; if ( inputStream == null ) { org . datadog . jmxfetch . Instance . LOGGER . warn ( ( "Cannot<sp>find<sp>metric<sp>config<sp>resource" + resourceName ) ) ; } else { try { java . util . LinkedHashMap < java . lang . String , java . util . ArrayList < java . util . LinkedHashMap < java . lang . String , java . lang . Object > > > topYaml = ( ( java . util . LinkedHashMap < java . lang . String , java . util . ArrayList < java . util . LinkedHashMap < java . lang . String , java . lang . Object > > > ) ( org . datadog . jmxfetch . Instance . YAML . get ( ) . load ( inputStream ) ) ) ; java . util . ArrayList < java . util . LinkedHashMap < java . lang . String , java . lang . Object > > jmxConf = topYaml . get ( "jmx_metrics" ) ; if ( jmxConf != null ) { for ( java . util . LinkedHashMap < java . lang . String , java . lang . Object > conf : jmxConf ) { configurationList . add ( new org . datadog . jmxfetch . Configuration ( conf ) ) ; } } else { org . datadog . jmxfetch . Instance . LOGGER . warn ( ( "jmx_metrics<sp>block<sp>not<sp>found<sp>in<sp>resource<sp>" + resourceName ) ) ; } } catch ( java . lang . Exception e ) { org . datadog . jmxfetch . Instance . LOGGER . warn ( ( "Cannot<sp>parse<sp>yaml<sp>resource<sp>" + resourceName ) , e ) ; } finally { try { inputStream . close ( ) ; } catch ( java . io . IOException e ) { } } } } } }
org . junit . Assert . assertEquals ( 2 , configurationList . size ( ) )
testMessage ( ) { java . lang . String message = "Hello<sp>World!<sp>Here<sp>is<sp>demo1." ; app . setMessage ( message ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; }
org . junit . Assert . assertEquals ( message , app . getMessage ( ) )
testJmsConnectionIdFromJmsProducerId ( ) { org . apache . qpid . jms . meta . JmsConnectionId id1 = new org . apache . qpid . jms . meta . JmsConnectionId ( firstId ) ; org . apache . qpid . jms . meta . JmsSessionId sessionId = new org . apache . qpid . jms . meta . JmsSessionId ( id1 , 1 ) ; org . apache . qpid . jms . meta . JmsProducerId consumerId = new org . apache . qpid . jms . meta . JmsProducerId ( sessionId , 1 ) ; org . apache . qpid . jms . meta . JmsConnectionId id2 = new org . apache . qpid . jms . meta . JmsConnectionId ( consumerId ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertSame ( id1 . getValue ( ) , id2 . getValue ( ) )
testCanSetupLimitedValueWhenEditingColIsNotAnInstanceOfLimitedEntryConditionCol52 ( ) { when ( plugin . editingCol ( ) ) . thenReturn ( new org . drools . workbench . models . guided . dtable . shared . model . ConditionCol52 ( ) ) ; "<AssertPlaceHolder>" ; } canSetupLimitedValue ( ) { if ( ! ( isLimitedValueEnabled ( ) ) ) { return false ; } if ( ( tableFormat ( ) ) != ( GuidedDecisionTable52 . TableFormat . LIMITED_ENTRY ) ) { return false ; } if ( doesNotHaveFactTypeOrFactField ( ) ) { return false ; } if ( ! ( org . drools . workbench . screens . guided . dtable . client . wizard . column . pages . ValueOptionsPage . plugin ( ) . doesOperatorNeedValue ( ) ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( page . canSetupLimitedValue ( ) )
testHtml ( ) { java . util . List < com . xti . jenkins . plugin . awslambda . invoke . JsonParameterVariables > jsonParameterVariables = new java . util . ArrayList < com . xti . jenkins . plugin . awslambda . invoke . JsonParameterVariables > ( ) ; jsonParameterVariables . add ( new com . xti . jenkins . plugin . awslambda . invoke . JsonParameterVariables ( "KEY" , "value" ) ) ; com . xti . jenkins . plugin . awslambda . invoke . LambdaInvokeBuildStepVariables variables = new com . xti . jenkins . plugin . awslambda . invoke . LambdaInvokeBuildStepVariables ( false , "accessKeyId" , hudson . util . Secret . fromString ( "secretKey" ) , "eu-west-1" , "function" , "payload" , true , jsonParameterVariables ) ; hudson . model . FreeStyleProject p = j . createFreeStyleProject ( ) ; com . xti . jenkins . plugin . awslambda . invoke . LambdaInvokeBuildStep before = new com . xti . jenkins . plugin . awslambda . invoke . LambdaInvokeBuildStep ( variables ) ; p . getBuildersList ( ) . add ( before ) ; j . submit ( j . createWebClient ( ) . getPage ( p , "configure" ) . getFormByName ( "config" ) ) ; com . xti . jenkins . plugin . awslambda . invoke . LambdaInvokeBuildStep after = p . getBuildersList ( ) . get ( com . xti . jenkins . plugin . awslambda . invoke . LambdaInvokeBuildStep . class ) ; "<AssertPlaceHolder>" ; } fromString ( java . lang . String ) { if ( org . apache . commons . lang . StringUtils . isEmpty ( mode ) ) { return com . xti . jenkins . plugin . awslambda . upload . UpdateModeValue . Full ; } if ( com . xti . jenkins . plugin . awslambda . upload . UpdateModeValue . Code . mode . equals ( mode ) ) { return com . xti . jenkins . plugin . awslambda . upload . UpdateModeValue . Code ; } if ( com . xti . jenkins . plugin . awslambda . upload . UpdateModeValue . Config . mode . equals ( mode ) ) { return com . xti . jenkins . plugin . awslambda . upload . UpdateModeValue . Config ; } return com . xti . jenkins . plugin . awslambda . upload . UpdateModeValue . Full ; }
org . junit . Assert . assertEquals ( before , after )
testProcessImagesUrlClient ( ) { com . ontotext . s4 . model . annotation . AnnotatedDocument doc = com . ontotext . s4 . service . impl . S4AnnotationClientTest . apiUrl . annotateDocument ( com . ontotext . s4 . service . impl . S4AnnotationClientTest . imageURL , SupportedMimeType . HTML , true , true ) ; "<AssertPlaceHolder>" ; } getImages ( ) { return this . images ; }
org . junit . Assert . assertNotNull ( doc . getImages ( ) )
testCoverageWithSmallScaleFactor ( ) { boolean hemisphere = true ; float scaleFactor = 1.0F / 18 ; org . geotools . data . simple . SimpleFeatureCollection collection = org . geotools . process . raster . RasterAsPointCollectionProcessTest . process . execute ( org . geotools . process . raster . RasterAsPointCollectionProcessTest . coverage , null , scaleFactor , null , hemisphere ) ; "<AssertPlaceHolder>" ; checkCollectionPoints ( collection , hemisphere , scaleFactor , null ) ; } size ( ) { createPointFeatures ( org . geotools . data . collection . ListFeatureCollectionTest . WORLD , 42 ) ; org . junit . Assert . assertEquals ( 42 , featureCollection . size ( ) ) ; }
org . junit . Assert . assertEquals ( 1 , collection . size ( ) )
testFilterString8 ( ) { java . lang . String filter = ( org . opennms . features . topology . plugins . topo . asset . layers . NodeParamLabels . ASSET_DISPLAYCATEGORY ) + "=~.*_.*,!asset-displaycategory_5" ; java . lang . String expected = "nodeList:{<sp>[0]<sp>[1]<sp>[2]<sp>[3]<sp>[4]<sp>[6]<sp>[7]<sp>[8]<sp>[9]<sp>}" ; org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . LOG . debug ( ( ( ( "Start<sp>testFilterString8():<sp>filter=" + filter ) + "<sp>expected=" ) + expected ) ) ; java . lang . String s2 = testFilterParser ( filter ) ; "<AssertPlaceHolder>" ; org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . LOG . debug ( "End<sp>testFilterString8()" ) ; } testFilterParser ( java . lang . String ) { java . util . List < org . opennms . netmgt . model . OnmsNode > nodeList = org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . getMockNodeList ( ) ; java . lang . String s1 = org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . nodelistToString ( nodeList ) ; org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . LOG . debug ( ( "<sp>before:" + s1 ) ) ; final org . opennms . features . topology . plugins . topo . asset . GeneratorConfig config = new org . opennms . features . topology . plugins . topo . asset . GeneratorConfigBuilder ( ) . withFilters ( filter ) . build ( ) ; final java . util . Map < java . lang . String , org . opennms . features . topology . plugins . topo . asset . filter . Filter > filterMap = new org . opennms . features . topology . plugins . topo . asset . filter . FilterParser ( ) . parse ( config . getFilters ( ) ) ; java . util . List < org . opennms . netmgt . model . OnmsNode > filteredNodeList = testFilterCode ( nodeList , filterMap ) ; java . lang . String s2 = org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . nodelistToString ( filteredNodeList ) ; org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . LOG . debug ( ( "<sp>after:" + s2 ) ) ; return s2 ; }
org . junit . Assert . assertEquals ( expected , s2 )
testRegisterZookeeperServerPropertyNotPresent ( ) { com . hortonworks . streamline . streams . cluster . catalog . Cluster cluster = getTestCluster ( 1L ) ; com . hortonworks . streamline . streams . cluster . register . impl . ZookeeperServiceRegistrar registrar = initializeServiceRegistrar ( ) ; try { registrar . register ( cluster , new com . hortonworks . streamline . common . Config ( ) , java . util . Collections . emptyList ( ) ) ; org . junit . Assert . fail ( "Should<sp>throw<sp>IllegalArgumentException" ) ; } catch ( java . lang . IllegalArgumentException e ) { com . hortonworks . streamline . streams . cluster . catalog . Service zkService = environmentService . getServiceByName ( cluster . getId ( ) , Constants . Zookeeper . SERVICE_NAME ) ; "<AssertPlaceHolder>" ; } } getId ( ) { return id ; }
org . junit . Assert . assertNull ( zkService )
da06_returnFloatObject ( ) { "<AssertPlaceHolder>" ; } returnFloatObject ( ) { return 1.0F ; }
org . junit . Assert . assertTrue ( ( 1.0F == ( proxy . returnFloatObject ( ) ) ) )
testDateStringNull ( ) { java . lang . Class < com . j256 . ormlite . field . types . DateStringTypeTest . LocalDateString > clazz = com . j256 . ormlite . field . types . DateStringTypeTest . LocalDateString . class ; com . j256 . ormlite . dao . Dao < com . j256 . ormlite . field . types . DateStringTypeTest . LocalDateString , java . lang . Object > dao = createDao ( clazz , true ) ; com . j256 . ormlite . field . types . DateStringTypeTest . LocalDateString foo = new com . j256 . ormlite . field . types . DateStringTypeTest . LocalDateString ( ) ; "<AssertPlaceHolder>" ; testType ( dao , foo , clazz , null , null , null , null , DataType . DATE_STRING , com . j256 . ormlite . field . types . DateStringTypeTest . DATE_COLUMN , false , true , true , false , false , false , true , false ) ; } create ( T ) { checkForInitialized ( ) ; if ( data == null ) { return 0 ; } if ( data instanceof com . j256 . ormlite . misc . BaseDaoEnabled ) { @ com . j256 . ormlite . dao . SuppressWarnings ( "unchecked" ) com . j256 . ormlite . misc . BaseDaoEnabled < T , ID > daoEnabled = ( ( com . j256 . ormlite . misc . BaseDaoEnabled < T , ID > ) ( data ) ) ; daoEnabled . setDao ( this ) ; } com . j256 . ormlite . support . DatabaseConnection connection = connectionSource . getReadWriteConnection ( tableInfo . getTableName ( ) ) ; try { return statementExecutor . create ( connection , data , objectCache ) ; } finally { connectionSource . releaseConnection ( connection ) ; } }
org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) )
testHbaseLocalCluster ( ) { java . lang . String tableName = com . github . sakserv . minicluster . impl . HbaseLocalClusterIntegrationTest . propertyParser . getProperty ( ConfigVars . HBASE_TEST_TABLE_NAME_KEY ) ; java . lang . String colFamName = com . github . sakserv . minicluster . impl . HbaseLocalClusterIntegrationTest . propertyParser . getProperty ( ConfigVars . HBASE_TEST_COL_FAMILY_NAME_KEY ) ; java . lang . String colQualiferName = com . github . sakserv . minicluster . impl . HbaseLocalClusterIntegrationTest . propertyParser . getProperty ( ConfigVars . HBASE_TEST_COL_QUALIFIER_NAME_KEY ) ; java . lang . Integer numRowsToPut = java . lang . Integer . parseInt ( com . github . sakserv . minicluster . impl . HbaseLocalClusterIntegrationTest . propertyParser . getProperty ( ConfigVars . HBASE_TEST_NUM_ROWS_TO_PUT_KEY ) ) ; org . apache . hadoop . conf . Configuration configuration = com . github . sakserv . minicluster . impl . HbaseLocalClusterIntegrationTest . hbaseLocalCluster . getHbaseConfiguration ( ) ; com . github . sakserv . minicluster . impl . HbaseLocalClusterIntegrationTest . LOG . info ( "HBASE:<sp>Deleting<sp>table<sp>{}" , tableName ) ; com . github . sakserv . minicluster . impl . HbaseLocalClusterIntegrationTest . deleteHbaseTable ( tableName , configuration ) ; com . github . sakserv . minicluster . impl . HbaseLocalClusterIntegrationTest . LOG . info ( "HBASE:<sp>Creating<sp>table<sp>{}<sp>with<sp>column<sp>family<sp>{}" , tableName , colFamName ) ; com . github . sakserv . minicluster . impl . HbaseLocalClusterIntegrationTest . createHbaseTable ( tableName , colFamName , configuration ) ; com . github . sakserv . minicluster . impl . HbaseLocalClusterIntegrationTest . LOG . info ( "HBASE:<sp>Populate<sp>the<sp>table<sp>with<sp>{}<sp>rows." , numRowsToPut ) ; for ( int i = 0 ; i < numRowsToPut ; i ++ ) { com . github . sakserv . minicluster . impl . HbaseLocalClusterIntegrationTest . putRow ( tableName , colFamName , java . lang . String . valueOf ( i ) , colQualiferName , ( "row_" + i ) , configuration ) ; } com . github . sakserv . minicluster . impl . HbaseLocalClusterIntegrationTest . LOG . info ( "HBASE:<sp>Fetching<sp>and<sp>comparing<sp>the<sp>results" ) ; for ( int i = 0 ; i < numRowsToPut ; i ++ ) { org . apache . hadoop . hbase . client . Result result = com . github . sakserv . minicluster . impl . HbaseLocalClusterIntegrationTest . getRow ( tableName , colFamName , java . lang . String . valueOf ( i ) , colQualiferName , configuration ) ; "<AssertPlaceHolder>" ; } } getRow ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , org . apache . hadoop . conf . Configuration ) { org . apache . hadoop . hbase . client . Result result ; org . apache . hadoop . hbase . client . HTable table = new org . apache . hadoop . hbase . client . HTable ( configuration , tableName ) ; org . apache . hadoop . hbase . client . Get get = new org . apache . hadoop . hbase . client . Get ( org . apache . hadoop . hbase . util . Bytes . toBytes ( rowKey ) ) ; get . addColumn ( org . apache . hadoop . hbase . util . Bytes . toBytes ( colFamName ) , org . apache . hadoop . hbase . util . Bytes . toBytes ( colQualifier ) ) ; get . setMaxVersions ( 1 ) ; result = table . get ( get ) ; return result ; }
org . junit . Assert . assertEquals ( ( "row_" + i ) , new java . lang . String ( result . value ( ) ) )
testSingleEmptyPartition ( ) { @ de . hub . cs . dbis . aeolus . spouts . SuppressWarnings ( "unchecked" ) java . util . List < java . util . Deque < java . lang . String > > data = new java . util . LinkedList < java . util . Deque < java . lang . String > > ( java . util . Arrays . asList ( new java . util . LinkedList < java . lang . String > ( ) ) ) ; de . hub . cs . dbis . aeolus . spouts . TestOrderedInputSpout spout = new de . hub . cs . dbis . aeolus . spouts . TestOrderedInputSpout ( data , this . r ) ; backtype . storm . Config conf = new backtype . storm . Config ( ) ; conf . put ( TestOrderedInputSpout . NUMBER_OF_PARTITIONS , new java . lang . Integer ( 1 ) ) ; de . hub . cs . dbis . aeolus . testUtils . TestSpoutOutputCollector col = new de . hub . cs . dbis . aeolus . testUtils . TestSpoutOutputCollector ( ) ; spout . open ( conf , mock ( backtype . storm . task . TopologyContext . class ) , new backtype . storm . spout . SpoutOutputCollector ( col ) ) ; spout . nextTuple ( ) ; spout . nextTuple ( ) ; spout . nextTuple ( ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( 0 , col . output . size ( ) )
testPriorityLevel6 ( ) { int n = jannovar . common . VariantType . priorityLevel ( VariantType . NON_FS_DELETION ) ; "<AssertPlaceHolder>" ; } priorityLevel ( jannovar . common . VariantType ) { switch ( vt ) { case FS_DELETION : case FS_INSERTION : case NON_FS_SUBSTITUTION : case FS_SUBSTITUTION : case MISSENSE : case NON_FS_DELETION : case NON_FS_INSERTION : case SPLICING : case STOPGAIN : case STOPLOSS : case FS_DUPLICATION : case NON_FS_DUPLICATION : case START_LOSS : return 1 ; case ncRNA_EXONIC : case ncRNA_SPLICING : return 2 ; case UTR3 : return 3 ; case UTR5 : return 4 ; case SYNONYMOUS : return 5 ; case INTRONIC : return 6 ; case ncRNA_INTRONIC : return 7 ; case UPSTREAM : case DOWNSTREAM : return 8 ; case INTERGENIC : return 9 ; case ERROR : return 10 ; default : return 10 ; } }
org . junit . Assert . assertEquals ( 1 , n )
updateUserAccountFail ( ) { wireMockRule . stubFor ( post ( urlEqualTo ( "/user" ) ) . willReturn ( aResponse ( ) . withStatus ( 400 ) . withBody ( "" ) ) ) ; boolean result = client . updateUser ( getTestUser ( ) ) ; "<AssertPlaceHolder>" ; } getTestUser ( ) { final org . apache . cloudstack . cloudian . client . CloudianUser user = new org . apache . cloudstack . cloudian . client . CloudianUser ( ) ; user . setActive ( true ) ; user . setUserId ( "someUserId" ) ; user . setGroupId ( "someGroupId" ) ; user . setUserType ( CloudianUser . USER ) ; user . setFullName ( "John<sp>Doe" ) ; return user ; }
org . junit . Assert . assertFalse ( result )
testMetaOp1 ( ) { org . nd4j . linalg . api . ndarray . INDArray array1 = org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 1.0F , 1.0F , 1.0F , 1.0F , 1.0F , 1.0F , 1.0F } ) ; org . nd4j . linalg . api . ndarray . INDArray exp = org . nd4j . linalg . factory . Nd4j . create ( new float [ ] { 3.0F , 3.0F , 3.0F , 3.0F , 3.0F , 3.0F , 3.0F } ) ; org . nd4j . linalg . api . ndarray . INDArray res = array1 . dup ( ) . addi ( 2.0F ) ; "<AssertPlaceHolder>" ; } addi ( java . lang . Number ) { return addi ( org . nd4j . linalg . factory . Nd4j . complexScalar ( n ) ) ; }
org . junit . Assert . assertEquals ( exp , res )
timeFieldIsEmptyWhenNoManualTimeSpecifiedInProfile ( ) { javax . swing . JTextField timeField = walker . findComponent ( ExpirationTimeChooser . TIME_FIELD_NAME , javax . swing . JTextField . class ) ; "<AssertPlaceHolder>" ; } getText ( ) { if ( ( editArea ) == null ) { return null ; } return editArea . getText ( ) ; }
org . junit . Assert . assertThat ( timeField . getText ( ) , org . hamcrest . CoreMatchers . is ( "" ) )
whenReadingInstance_itShouldReadCorrectNuOfType2Vehicles ( ) { jsprit . core . problem . VehicleRoutingProblem . Builder vrpBuilder = VehicleRoutingProblem . Builder . newInstance ( ) ; new jsprit . instance . reader . VrphGoldenReader ( vrpBuilder , jsprit . instance . reader . VrphGoldenReader . VrphType . HVRPD ) . read ( getPath ( "cn_13mix.txt" ) ) ; jsprit . core . problem . VehicleRoutingProblem vrp = vrpBuilder . build ( ) ; int nuOfType1Vehicles = 0 ; for ( jsprit . core . problem . vehicle . Vehicle v : vrp . getVehicles ( ) ) { if ( v . getType ( ) . getTypeId ( ) . equals ( "type_2" ) ) { nuOfType1Vehicles ++ ; } } "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 2 , nuOfType1Vehicles )
datumEindeDeelsOnbekend ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Dienstbundel bundel = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Dienstbundel ( new nl . bzk . algemeenbrp . dal . domein . brp . entity . Leveringsautorisatie ( nl . bzk . algemeenbrp . dal . domein . brp . enums . Stelsel . BRP , false ) ) ; bundel . setDatumIngang ( 20160005 ) ; "<AssertPlaceHolder>" ; } errorCount ( nl . bzk . algemeenbrp . dal . domein . brp . entity . ToegangLeveringsAutorisatie ) { final java . util . Map < ? , ? > result = new java . util . HashMap ( ) ; final org . springframework . validation . Errors errors = new org . springframework . validation . MapBindingResult ( result , "toegang" ) ; subject . validate ( toegang , errors ) ; return errors . getErrorCount ( ) ; }
org . junit . Assert . assertEquals ( 1 , errorCount ( bundel ) )
downloadAFile ( ) { java . lang . System . setProperty ( "webdriver.ie.driver" , "D:\\Softwares\\Selenium_Materials\\Selenium_Materials\\IEDriverServer_Win32_2.33.0\\IEDriverServer.exe" ) ; org . openqa . selenium . WebDriver driver ; driver = new org . openqa . selenium . ie . InternetExplorerDriver ( ) ; driver . get ( "http://iscls1apps/INFYDIR/" ) ; driver . findElement ( org . openqa . selenium . By . id ( "_ctl0_ContentPlaceHolder1_txtSearch" ) ) . sendKeys ( "shilpashree_v" ) ; driver . findElement ( org . openqa . selenium . By . id ( "_ctl0_ContentPlaceHolder1_lnkSearch" ) ) . click ( ) ; java . lang . Thread . sleep ( 20000 ) ; org . openqa . selenium . WebElement downloadLink = null ; int count = 0 ; while ( downloadLink == null ) { downloadLink = driver . findElement ( org . openqa . selenium . By . id ( "_ctl0_ContentPlaceHolder1_lnkDownload" ) ) ; count ++ ; if ( count == 50 ) { break ; } } main . java . actions . FileDownloader downloadTestFile = new main . java . actions . FileDownloader ( driver ) ; java . lang . String downloadedFileAbsoluteLocation = downloadTestFile . downloadFile ( downloadLink ) ; System . out . println ( ( "downloadTestFile.downloadFile(downloadLink);" + ( downloadTestFile . downloadFile ( downloadLink ) ) ) ) ; "<AssertPlaceHolder>" ; } downloadFile ( org . openqa . selenium . WebElement ) { return downloader ( element , "href" ) ; }
org . junit . Assert . assertTrue ( new java . io . File ( downloadedFileAbsoluteLocation ) . exists ( ) )
testHasIndexHashKeyEqualCondition_WhenConditionCriteriaIsNonEqualityConditionOnAPropertyWhichIsNeitherAnIndexHashKeyOrAHashKeyOrARangeKey ( ) { org . mockito . Mockito . when ( entityInformation . isGlobalIndexHashKeyProperty ( "displayName" ) ) . thenReturn ( false ) ; criteria . withPropertyBetween ( "displayName" , "some<sp>display<sp>name" , "some<sp>other<sp>display<sp>name" , java . lang . String . class ) ; boolean hasIndexHashKeyEqualCondition = criteria . hasIndexHashKeyEqualCondition ( ) ; "<AssertPlaceHolder>" ; } hasIndexHashKeyEqualCondition ( ) { boolean hasCondition = super . hasIndexHashKeyEqualCondition ( ) ; if ( ! hasCondition ) { if ( ( ( rangeKeyAttributeValue ) != null ) && ( entityInformation . isGlobalIndexHashKeyProperty ( rangeKeyPropertyName ) ) ) { hasCondition = true ; } } return hasCondition ; }
org . junit . Assert . assertFalse ( hasIndexHashKeyEqualCondition )
whenTwoServicesHaveTheSameId_theirReferencesShouldBeUnEqual ( ) { jsprit . core . problem . job . Service one = Service . Builder . newInstance ( "service" ) . addSizeDimension ( 0 , 10 ) . setLocation ( jsprit . core . problem . Location . newInstance ( "foo" ) ) . build ( ) ; jsprit . core . problem . job . Service two = Service . Builder . newInstance ( "service" ) . addSizeDimension ( 0 , 10 ) . setLocation ( jsprit . core . problem . Location . newInstance ( "fo" ) ) . build ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( ( one != two ) )
testUserNames ( ) { java . util . Set < java . lang . String > users = new java . util . HashSet ( java . util . Arrays . asList ( "alpha" , "beta" ) ) ; com . openshift . internal . restclient . model . v1 . RoleBindingTest . binding . setUserNames ( users ) ; com . openshift . internal . restclient . model . v1 . RoleBindingTest . binding . addUserName ( "omega" ) ; users . add ( "omega" ) ; "<AssertPlaceHolder>" ; } getUserNames ( ) { return asSet ( com . openshift . internal . restclient . model . authorization . RoleBinding . USER_NAMES , ModelType . STRING ) ; }
org . junit . Assert . assertArrayEquals ( users . toArray ( ) , com . openshift . internal . restclient . model . v1 . RoleBindingTest . binding . getUserNames ( ) . toArray ( ) )
shouldAddAttributeToLocation ( ) { int before = service . getLocationByUuid ( RestTestConstants1_9 . LOCATION_UUID ) . getAttributes ( ) . size ( ) ; java . lang . String json = "{\"attributeType\":\"9516cc50-6f9f-132r-5433-001e378eb67f\",<sp>\"value\":\"2012-05-05\"}" ; handle ( newPostRequest ( getURI ( ) , json ) ) ; int after = service . getLocationByUuid ( RestTestConstants1_9 . LOCATION_UUID ) . getAttributes ( ) . size ( ) ; "<AssertPlaceHolder>" ; } getURI ( ) { return "orderfrequency" ; }
org . junit . Assert . assertEquals ( ( before + 1 ) , after )
parse_null ( ) { "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { if ( checksumValue == null ) { return null ; } java . util . regex . Matcher matcher = liquibase . change . CheckSum . CHECKSUM_PATTERN . matcher ( checksumValue ) ; if ( matcher . find ( ) ) { return new liquibase . change . CheckSum ( matcher . group ( 2 ) , java . lang . Integer . parseInt ( matcher . group ( 1 ) ) ) ; } else { return new liquibase . change . CheckSum ( checksumValue , 1 ) ; } }
org . junit . Assert . assertNull ( liquibase . change . CheckSum . parse ( null ) )
testGetBoxInfoGetMessageDeleteMessage ( ) { be . e_contract . mycarenet . sts . EHealthSTSClient client = new be . e_contract . mycarenet . sts . EHealthSTSClient ( "https://services-acpt.ehealth.fgov.be/IAM/Saml11TokenService/Legacy/v1" ) ; java . security . Security . addProvider ( new be . fedict . commons . eid . jca . BeIDProvider ( ) ) ; java . security . KeyStore keyStore = java . security . KeyStore . getInstance ( "BeID" ) ; be . fedict . commons . eid . jca . BeIDKeyStoreParameter beIDKeyStoreParameter = new be . fedict . commons . eid . jca . BeIDKeyStoreParameter ( ) ; beIDKeyStoreParameter . addPPDUName ( "digipass<sp>875" 2 ) ; beIDKeyStoreParameter . addPPDUName ( "digipass<sp>875" ) ; beIDKeyStoreParameter . addPPDUName ( "digipass<sp>920" ) ; keyStore . load ( beIDKeyStoreParameter ) ; java . security . PrivateKey authnPrivateKey = ( ( java . security . PrivateKey ) ( keyStore . getKey ( "Authentication" , null ) ) ) ; java . security . cert . X509Certificate authnCertificate = ( ( java . security . cert . X509Certificate ) ( keyStore . getCertificate ( "Authentication" ) ) ) ; java . security . KeyStore eHealthKeyStore = java . security . KeyStore . getInstance ( "digipass<sp>875" 3 ) ; java . io . FileInputStream fileInputStream = new java . io . FileInputStream ( this . config . getEHealthPKCS12Path ( ) ) ; eHealthKeyStore . load ( fileInputStream , this . config . getEHealthPKCS12Password ( ) . toCharArray ( ) ) ; java . util . Enumeration < java . lang . String > aliasesEnum = eHealthKeyStore . aliases ( ) ; java . lang . String alias = aliasesEnum . nextElement ( ) ; java . security . cert . X509Certificate eHealthCertificate = ( ( java . security . cert . X509Certificate ) ( eHealthKeyStore . getCertificate ( alias ) ) ) ; java . security . PrivateKey eHealthPrivateKey = ( ( java . security . PrivateKey ) ( eHealthKeyStore . getKey ( alias , this . config . getEHealthPKCS12Password ( ) . toCharArray ( ) ) ) ) ; java . util . List < be . e_contract . mycarenet . sts . Attribute > attributes = new java . util . LinkedList ( ) ; attributes . add ( new be . e_contract . mycarenet . sts . Attribute ( "digipass<sp>875" 1 , "digipass<sp>875" 0 ) ) ; attributes . add ( new be . e_contract . mycarenet . sts . Attribute ( "digipass<sp>875" 1 , "urn:be:fgov:person:ssin" ) ) ; java . util . List < be . e_contract . mycarenet . sts . AttributeDesignator > attributeDesignators = new java . util . LinkedList ( ) ; attributeDesignators . add ( new be . e_contract . mycarenet . sts . AttributeDesignator ( "digipass<sp>875" 1 , "digipass<sp>875" 0 ) ) ; attributeDesignators . add ( new be . e_contract . mycarenet . sts . AttributeDesignator ( "digipass<sp>875" 1 , "urn:be:fgov:person:ssin" ) ) ; attributeDesignators . add ( new be . e_contract . mycarenet . sts . AttributeDesignator ( "urn:be:fgov:certified-namespace:ehealth" , "urn:be:fgov:person:ssin:nurse:boolean" ) ) ; org . w3c . dom . Element assertion = client . requestAssertion ( authnCertificate , authnPrivateKey , eHealthCertificate , eHealthPrivateKey , attributes , attributeDesignators ) ; "<AssertPlaceHolder>" ; java . lang . String assertionString = client . toString ( assertion ) ; be . e_contract . mycarenet . ehbox . EHealthBoxConsultationClient eHealthBoxClient = new be . e_contract . mycarenet . ehbox . EHealthBoxConsultationClient ( "https://services-acpt.ehealth.fgov.be/ehBoxConsultation/v3" ) ; eHealthBoxClient . setCredentials ( eHealthPrivateKey , assertionString ) ; eHealthBoxClient . getBoxInfo ( ) ; be . e_contract . mycarenet . ehbox . jaxb . consultation . protocol . GetMessageListResponseType messageList = eHealthBoxClient . getMessagesList ( ) ; for ( be . e_contract . mycarenet . ehbox . jaxb . consultation . protocol . GetMessageListResponseType . Message message : messageList . getMessage ( ) ) { java . lang . String messageId = message . getMessageId ( ) ; test . integ . be . e_contract . mycarenet . ehbox . EHealthBoxClientTest . LOG . debug ( ( "message<sp>id:<sp>" + messageId ) ) ; eHealthBoxClient . getMessage ( messageId ) ; eHealthBoxClient . deleteMessage ( messageId ) ; } } requestAssertion ( java . security . cert . X509Certificate , java . security . PrivateKey , java . security . cert . X509Certificate , java . security . PrivateKey , java . util . List , java . util . List ) { this . wsSecuritySOAPHandler . setCertificate ( authnCertificate ) ; this . wsSecuritySOAPHandler . setPrivateKey ( authnPrivateKey ) ; be . e_contract . mycarenet . sts . RequestFactory requestFactory = new be . e_contract . mycarenet . sts . RequestFactory ( ) ; org . w3c . dom . Element requestElement = requestFactory . createRequest ( authnCertificate , hokPrivateKey , hokCertificate , attributes , attributeDesignators ) ; javax . xml . transform . Source responseSource = this . dispatch . invoke ( new javax . xml . transform . dom . DOMSource ( requestElement ) ) ; org . w3c . dom . Element responseElement = toElement ( responseSource ) ; org . w3c . dom . NodeList assertionNodeList = responseElement . getElementsByTagNameNS ( "urn:oasis:names:tc:SAML:1.0:assertion" , "Assertion" ) ; if ( ( assertionNodeList . getLength ( ) ) == 0 ) { be . e_contract . mycarenet . sts . EHealthSTSClient . LOG . error ( "no<sp>assertion<sp>in<sp>response" ) ; org . w3c . dom . NodeList statusNodeList = responseElement . getElementsByTagNameNS ( "urn:oasis:names:tc:SAML:1.0:protocol" , "Status" ) ; if ( ( statusNodeList . getLength ( ) ) == 1 ) { org . w3c . dom . Element statusElement = ( ( org . w3c . dom . Element ) ( statusNodeList . item ( 0 ) ) ) ; throw new be . e_contract . mycarenet . sts . EHealthSTSException ( statusElement ) ; } return null ; } return ( ( org . w3c . dom . Element ) ( assertionNodeList . item ( 0 ) ) ) ; }
org . junit . Assert . assertNotNull ( assertion )
testDailyToString ( ) { quickfix . SessionSettings settings = new quickfix . SessionSettings ( ) ; settings . setString ( Session . SETTING_TIMEZONE , "US/Eastern" ) ; settings . setString ( Session . SETTING_START_TIME , "01:00:00" ) ; settings . setString ( Session . SETTING_END_TIME , "15:00:00" ) ; quickfix . SessionID sessionID = new quickfix . SessionID ( "FIX.4.2" , "SENDER" , "TARGET" ) ; quickfix . SessionSchedule schedule = new quickfix . DefaultSessionSchedule ( settings , sessionID ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . String s = sessionID . toString ( ) ; try { s += ( ( ( "[in:" + ( state . getNextTargetMsgSeqNum ( ) ) ) + ",out:" ) + ( state . getNextSenderMsgSeqNum ( ) ) ) + "]" ; } catch ( final java . io . IOException e ) { quickfix . LogUtil . logThrowable ( sessionID , e . getMessage ( ) , e ) ; } return s ; }
org . junit . Assert . assertNotNull ( schedule . toString ( ) )
isFinite3 ( ) { org . diirt . util . stats . Range range1 = org . diirt . util . stats . Ranges . range ( Double . NaN , 8.0 ) ; "<AssertPlaceHolder>" ; } isFinite ( ) { return ( ( ( ( ( min ) != ( max ) ) && ( ! ( java . lang . Double . isNaN ( min ) ) ) ) && ( ! ( java . lang . Double . isInfinite ( min ) ) ) ) && ( ! ( java . lang . Double . isNaN ( max ) ) ) ) && ( ! ( java . lang . Double . isInfinite ( max ) ) ) ; }
org . junit . Assert . assertThat ( range1 . isFinite ( ) , equalTo ( false ) )
searchUserByEmail ( ) { createClientWithTokenOrPassword ( ) ; java . lang . String requesterEmail = org . zendesk . client . v2 . RealSmokeTest . config . getProperty ( "requester.email" ) ; org . junit . Assume . assumeThat ( "Must<sp>have<sp>a<sp>requester<sp>email" , requesterEmail , org . hamcrest . CoreMatchers . notNullValue ( ) ) ; for ( org . zendesk . client . v2 . model . User user : instance . getSearchResults ( org . zendesk . client . v2 . model . User . class , ( "requester:" + requesterEmail ) ) ) { "<AssertPlaceHolder>" ; } } getEmail ( ) { return email ; }
org . junit . Assert . assertThat ( user . getEmail ( ) , org . hamcrest . CoreMatchers . is ( requesterEmail ) )
testExportImportWithDocumentLibraryField ( ) { java . lang . String documentLibraryFieldName = "Attachment" ; com . liferay . dynamic . data . lists . model . DDLRecordSet recordSet = addRecordSetWithDocumentLibraryField ( documentLibraryFieldName ) ; com . liferay . dynamic . data . lists . helper . DDLRecordTestHelper recordTestHelper = new com . liferay . dynamic . data . lists . helper . DDLRecordTestHelper ( stagingGroup , recordSet ) ; com . liferay . dynamic . data . mapping . storage . DDMFormValues ddmFormValues = recordTestHelper . createEmptyDDMFormValues ( ) ; com . liferay . dynamic . data . mapping . storage . DDMFormFieldValue ddmFormFieldValue = createDocumentLibraryDDMFormFieldValue ( ddmFormValues . getDefaultLocale ( ) , documentLibraryFieldName ) ; ddmFormValues . addDDMFormFieldValue ( ddmFormFieldValue ) ; com . liferay . dynamic . data . lists . model . DDLRecord ddlRecord = recordTestHelper . addRecord ( ddmFormValues , WorkflowConstants . ACTION_PUBLISH ) ; exportImportStagedModel ( ddlRecord ) ; com . liferay . dynamic . data . lists . model . DDLRecord importedDDLRecord = com . liferay . dynamic . data . lists . service . DDLRecordLocalServiceUtil . getDDLRecordByUuidAndGroupId ( ddlRecord . getUuid ( ) , liveGroup . getGroupId ( ) ) ; "<AssertPlaceHolder>" ; } getGroupId ( ) { return _groupId ; }
org . junit . Assert . assertNotNull ( importedDDLRecord )
getRealm ( ) { com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . core . fat . InvalidBaseEntryInRealmTest . c , "getRealm" , "Checking<sp>expected<sp>realm" ) ; "<AssertPlaceHolder>" ; } getRealm ( ) { com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . core . fat . InvalidBaseEntryInRealmTest . c , "getRealm" , "Checking<sp>expected<sp>realm" ) ; org . junit . Assert . assertEquals ( "defaultWIMFileBasedRealm" , com . ibm . ws . security . wim . core . fat . InvalidBaseEntryInRealmTest . servlet . getRealm ( ) ) ; }
org . junit . Assert . assertEquals ( "defaultWIMFileBasedRealm" , com . ibm . ws . security . wim . core . fat . InvalidBaseEntryInRealmTest . servlet . getRealm ( ) )
removeHandlerWhileFire ( ) { final jetbrains . jetpad . base . Value < jetbrains . jetpad . base . Registration > reg = new jetbrains . jetpad . base . Value ( Registration . EMPTY ) ; reg . set ( jetbrains . jetpad . base . ThrowableHandlers . addHandler ( new jetbrains . jetpad . base . function . Consumer < java . lang . Throwable > ( ) { @ jetbrains . jetpad . base . Override public void accept ( java . lang . Throwable event ) { reg . get ( ) . remove ( ) ; } } ) ) ; int handlersSize = jetbrains . jetpad . base . ThrowableHandlers . getHandlersSize ( ) ; jetbrains . jetpad . base . ThrowableHandlers . asInProduction ( new java . lang . Runnable ( ) { @ jetbrains . jetpad . base . Override public void run ( ) { jetbrains . jetpad . base . ThrowableHandlers . handle ( new java . lang . RuntimeException ( ) ) ; } } ) ; "<AssertPlaceHolder>" ; } getHandlersSize ( ) { return jetbrains . jetpad . base . ThrowableHandlers . ourHandlers . get ( ) . size ( ) ; }
org . junit . Assert . assertEquals ( ( handlersSize - 1 ) , jetbrains . jetpad . base . ThrowableHandlers . getHandlersSize ( ) )
testCnnWithSpaceToDepth ( ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; int nOut = 4 ; int minibatchSize = 2 ; int width = 5 ; int height = 5 ; int inputDepth = 1 ; int [ ] kernel = new int [ ] { 2 , 2 } ; int blocks = 2 ; java . lang . String [ ] activations = new java . lang . String [ ] { "sigmoid" } ; org . deeplearning4j . gradientcheck . SubsamplingLayer [ ] poolingTypes = new org . deeplearning4j . gradientcheck . SubsamplingLayer . PoolingType [ ] { SubsamplingLayer . PoolingType . MAX , SubsamplingLayer . PoolingType . AVG , SubsamplingLayer . PoolingType . PNORM } ; for ( java . lang . String afn : activations ) { for ( org . deeplearning4j . gradientcheck . SubsamplingLayer . PoolingType poolingType : poolingTypes ) { org . nd4j . linalg . api . ndarray . INDArray input = org . nd4j . linalg . factory . Nd4j . rand ( minibatchSize , ( ( width * height ) * inputDepth ) ) ; org . nd4j . linalg . api . ndarray . INDArray labels = org . nd4j . linalg . factory . Nd4j . zeros ( minibatchSize , nOut ) ; for ( int i = 0 ; i < minibatchSize ; i ++ ) { labels . putScalar ( new int [ ] { i , i % nOut } , 1.0 ) ; } org . deeplearning4j . nn . conf . MultiLayerConfiguration conf = new org . deeplearning4j . nn . conf . NeuralNetConfiguration . Builder ( ) . updater ( new org . nd4j . linalg . learning . config . NoOp ( ) ) . dist ( new org . deeplearning4j . nn . conf . distribution . NormalDistribution ( 0 , 1 ) ) . list ( ) . layer ( new org . deeplearning4j . gradientcheck . ConvolutionLayer . Builder ( kernel ) . nIn ( inputDepth ) . hasBias ( false ) . cudnnAllowFallback ( false ) . nOut ( 1 ) . build ( ) ) . layer ( new org . deeplearning4j . gradientcheck . SpaceToDepthLayer . Builder ( blocks , SpaceToDepthLayer . DataFormat . NCHW ) . build ( ) ) . layer ( new org . deeplearning4j . gradientcheck . OutputLayer . Builder ( LossFunctions . LossFunction . MCXENT ) . activation ( Activation . SOFTMAX ) . nIn ( ( ( 2 * 2 ) * 4 ) ) . nOut ( nOut ) . build ( ) ) . setInputType ( org . deeplearning4j . nn . conf . inputs . InputType . convolutionalFlat ( height , width , inputDepth ) ) . build ( ) ; org . deeplearning4j . nn . multilayer . MultiLayerNetwork net = new org . deeplearning4j . nn . multilayer . MultiLayerNetwork ( conf ) ; net . init ( ) ; java . lang . String msg = ( ( ( ( "PoolingType=" + poolingType ) + ",<sp>minibatch=" ) + minibatchSize ) + ",<sp>activationFn=" ) + afn ; if ( org . deeplearning4j . gradientcheck . CNNGradientCheckTest . PRINT_RESULTS ) { System . out . println ( msg ) ; for ( int j = 0 ; j < ( net . getnLayers ( ) ) ; j ++ ) System . out . println ( ( ( ( "Layer<sp>" + j ) + "<sp>#<sp>params:<sp>" ) + ( net . getLayer ( j ) . numParams ( ) ) ) ) ; } boolean gradOK = org . deeplearning4j . gradientcheck . GradientCheckUtil . checkGradients ( net , org . deeplearning4j . gradientcheck . CNNGradientCheckTest . DEFAULT_EPS , org . deeplearning4j . gradientcheck . CNNGradientCheckTest . DEFAULT_MAX_REL_ERROR , org . deeplearning4j . gradientcheck . CNNGradientCheckTest . DEFAULT_MIN_ABS_ERROR , org . deeplearning4j . gradientcheck . CNNGradientCheckTest . PRINT_RESULTS , org . deeplearning4j . gradientcheck . CNNGradientCheckTest . RETURN_ON_FIRST_FAILURE , input , labels ) ; "<AssertPlaceHolder>" ; org . deeplearning4j . TestUtils . testModelSerialization ( net ) ; } } } checkGradients ( org . deeplearning4j . nn . multilayer . MultiLayerNetwork , double , double , double , boolean , boolean , org . nd4j . linalg . api . ndarray . INDArray , org . nd4j . linalg . api . ndarray . INDArray ) { return org . deeplearning4j . gradientcheck . GradientCheckUtil . checkGradients ( mln , epsilon , maxRelError , minAbsoluteError , print , exitOnFirstError , input , labels , null , null ) ; }
org . junit . Assert . assertTrue ( msg , gradOK )
testAnd4Expression ( ) { com . hundredwordsgof . interpreter . Context context = new com . hundredwordsgof . interpreter . Context ( ) ; com . hundredwordsgof . interpreter . TerminalExpression firstTerminalExpression = new com . hundredwordsgof . interpreter . TerminalExpression ( true ) ; com . hundredwordsgof . interpreter . TerminalExpression secondTerminalExpression = new com . hundredwordsgof . interpreter . TerminalExpression ( true ) ; com . hundredwordsgof . interpreter . AndExpression andExpression = new com . hundredwordsgof . interpreter . AndExpression ( firstTerminalExpression , secondTerminalExpression ) ; andExpression . interpret ( context ) ; "<AssertPlaceHolder>" ; } isResult ( ) { return result ; }
org . junit . Assert . assertEquals ( true , context . isResult ( ) )
testAdaptorCoversSubclass ( ) { java . lang . String templates = "foo(x)<sp>::=<sp>\"<x.id>:<sp><x.name>\"\n" ; writeFile ( tmpdir , "foo.stg" , templates ) ; org . stringtemplate . v4 . test . STGroup group = new org . stringtemplate . v4 . test . STGroupFile ( ( ( tmpdir ) + "/foo.stg" ) ) ; group . registerModelAdaptor ( org . stringtemplate . v4 . test . User . class , new org . stringtemplate . v4 . test . TestModelAdaptors . UserAdaptor ( ) ) ; org . stringtemplate . v4 . test . ST st = group . getInstanceOf ( "foo" ) ; st . add ( "x" , new org . stringtemplate . v4 . test . TestModelAdaptors . SuperUser ( 100 , "parrt" ) ) ; java . lang . String expecting = "100:<sp>super<sp>parrt" ; java . lang . String result = st . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
org . junit . Assert . assertEquals ( expecting , result )
saveOrderFrequency_shouldNotAllowEditingAnExistingOrderFrequencyThatIsInUse ( ) { org . openmrs . OrderFrequency orderFrequency = orderService . getOrderFrequency ( 1 ) ; "<AssertPlaceHolder>" ; orderFrequency . setFrequencyPerDay ( 4.0 ) ; expectedException . expect ( org . openmrs . api . CannotUpdateObjectInUseException . class ) ; expectedException . expectMessage ( "Order.frequency.cannot.edit" ) ; orderService . saveOrderFrequency ( orderFrequency ) ; } getOrderFrequency ( java . lang . Integer ) { return ( ( org . openmrs . OrderFrequency ) ( sessionFactory . getCurrentSession ( ) . get ( org . openmrs . OrderFrequency . class , orderFrequencyId ) ) ) ; }
org . junit . Assert . assertNotNull ( orderFrequency )
testTextDecoration_Valid ( ) { org . eclipse . rap . rwt . internal . theme . CssIdentifier identifier = org . eclipse . rap . rwt . internal . theme . css . PropertyResolver . readTextDecoration ( org . eclipse . rap . rwt . internal . theme . css . PropertyResolver_Test . parseProperty ( "underline" ) ) ; "<AssertPlaceHolder>" ; } parseProperty ( java . lang . String ) { org . w3c . css . sac . InputSource inputSource = new org . w3c . css . sac . InputSource ( ) ; java . io . InputStream byteStream = new java . io . ByteArrayInputStream ( input . getBytes ( ) ) ; inputSource . setByteStream ( byteStream ) ; return org . eclipse . rap . rwt . internal . theme . css . PropertyResolver_Test . parser . parsePropertyValue ( inputSource ) ; }
org . junit . Assert . assertEquals ( "underline" , identifier . value )
testRequireNonNullElements ( ) { java . util . Collection < java . lang . Integer > col = com . annimon . stream . Objects . requireNonNullElements ( java . util . Arrays . asList ( 1 , 2 , 3 , 4 ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( col , org . hamcrest . Matchers . contains ( 1 , 2 , 3 , 4 ) )
testMarshal_WrappedLongObjectId3 ( ) { com . jmethods . catatumbo . entities . WrappedLongObjectIdEntity entity = com . jmethods . catatumbo . entities . WrappedLongObjectIdEntity . getSample3 ( ) ; com . google . cloud . datastore . FullEntity < ? > nativeEntity = ( ( com . google . cloud . datastore . FullEntity < ? > ) ( com . jmethods . catatumbo . impl . Marshaller . marshal ( com . jmethods . catatumbo . impl . MarshallerTest . em , entity , Intent . INSERT ) ) ) ; com . google . cloud . datastore . IncompleteKey incompleteKey = nativeEntity . getKey ( ) ; "<AssertPlaceHolder>" ; } getKey ( ) { return key ; }
org . junit . Assert . assertNotNull ( incompleteKey )
testNewAxis ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 12 , 12 ) . reshape ( 3 , 2 , 2 ) ; org . nd4j . linalg . api . ndarray . INDArray get = arr . get ( org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , org . nd4j . linalg . indexing . NDArrayIndex . all ( ) , newAxis ( ) , newAxis ( ) ) ; long [ ] shapeAssertion = new long [ ] { 3 , 2 , 1 , 1 , 2 } ; "<AssertPlaceHolder>" ; } shape ( ) { return org . nd4j . linalg . api . shape . Shape . shape ( javaShapeInformation ) ; }
org . junit . Assert . assertArrayEquals ( shapeAssertion , get . shape ( ) )
clearMapViaValueIteratorRemoves ( ) { int noOfElements = 16 * 1024 ; try ( net . openhft . chronicle . map . ChronicleMap < java . lang . Integer , java . lang . CharSequence > map = getViewTestMap ( noOfElements ) ) { int sum = 0 ; for ( net . openhft . chronicle . map . Iterator it = map . values ( ) . iterator ( ) ; it . hasNext ( ) ; ) { it . next ( ) ; it . remove ( ) ; ++ sum ; } "<AssertPlaceHolder>" ; } } remove ( ) { i . remove ( ) ; }
org . junit . Assert . assertEquals ( noOfElements , sum )
testEmptyBodyAttachment ( ) { testWithHandler ( new com . sun . mail . imap . IMAPMessageTest . IMAPTest ( ) { @ com . sun . mail . imap . Override public void init ( java . util . Properties props ) { props . setProperty ( ")<sp>" 1 , ")<sp>" 4 ) ; } @ com . sun . mail . imap . Override public void test ( javax . mail . Folder folder , com . sun . mail . imap . IMAPMessageTest . IMAPHandlerMessage handler ) throws java . io . IOException , javax . mail . MessagingException { javax . mail . Message m = folder . getMessage ( 1 ) ; javax . mail . Multipart mp = ( ( javax . mail . Multipart ) ( m . getContent ( ) ) ) ; javax . mail . BodyPart bp = mp . getBodyPart ( 1 ) ; java . lang . String t = ( ( java . lang . String ) ( bp . getContent ( ) ) ) ; "<AssertPlaceHolder>" ; } } , new com . sun . mail . imap . IMAPMessageTest . IMAPHandlerMessage ( ) { @ com . sun . mail . imap . Override public void fetch ( java . lang . String line ) throws java . io . IOException { if ( ( line . indexOf ( ")<sp>" 2 ) ) >= 0 ) untagged ( ( ")<sp>" 5 + ( ( ( ( "(\"text\"<sp>\"plain\"<sp>(\"charset\"<sp>\"us-ascii\")<sp>" + "NIL<sp>NIL<sp>\"7bit\"<sp>4<sp>0<sp>NIL<sp>NIL<sp>NIL<sp>NIL)" ) + "(\"text\"<sp>\"plain\"<sp>(\"charset\"<sp>\"us-ascii\")<sp>" ) + "NIL<sp>NIL<sp>\"7bit\"<sp>0<sp>0<sp>NIL<sp>NIL<sp>NIL<sp>NIL)" ) + "<sp>\"mixed\"<sp>(\"boundary\"<sp>\"----=_x\")<sp>NIL<sp>NIL))" ) ) ) ; else if ( ( line . indexOf ( ")<sp>" 0 ) ) >= 0 ) untagged ( ( "1<sp>FETCH<sp>(BODY[2]<sp>NIL<sp>" + ")<sp>" 3 ) ) ; ok ( ) ; } } ) ; } getContent ( ) { if ( ( object ) != null ) return object ; else return getDataContentHandler ( ) . getContent ( getDataSource ( ) ) ; }
org . junit . Assert . assertEquals ( "" , t )
treeShouldBeGreaterThanCommit ( ) { org . eclipse . jface . viewers . Viewer viewer = mock ( org . eclipse . jface . viewers . Viewer . class ) ; org . eclipse . egit . ui . internal . synchronize . mapping . GitChangeSetSorter sorter = new org . eclipse . egit . ui . internal . synchronize . mapping . GitChangeSetSorter ( ) ; org . eclipse . egit . ui . internal . synchronize . model . GitModelTree tree = mock ( org . eclipse . egit . ui . internal . synchronize . model . GitModelTree . class ) ; org . eclipse . egit . ui . internal . synchronize . model . GitModelCommit commit = mock ( org . eclipse . egit . ui . internal . synchronize . model . GitModelCommit . class ) ; int actual = sorter . compare ( viewer , tree , commit ) ; "<AssertPlaceHolder>" ; } compare ( org . eclipse . compare . ITypedElement , org . eclipse . compare . ITypedElement , org . eclipse . compare . ITypedElement ) { if ( actLeft . getType ( ) . equals ( ITypedElement . FOLDER_TYPE ) ) { org . eclipse . compare . structuremergeviewer . DiffNode diffNode = new org . eclipse . compare . structuremergeviewer . DiffNode ( null , org . eclipse . compare . structuremergeviewer . Differencer . CHANGE , actAncestor , actLeft , actRight ) ; org . eclipse . compare . ITypedElement [ ] lc = ( ( org . eclipse . compare . ITypedElement [ ] ) ( ( ( org . eclipse . compare . structuremergeviewer . IStructureComparator ) ( actLeft ) ) . getChildren ( ) ) ) ; org . eclipse . compare . ITypedElement [ ] rc = ( ( org . eclipse . compare . ITypedElement [ ] ) ( ( ( org . eclipse . compare . structuremergeviewer . IStructureComparator ) ( actRight ) ) . getChildren ( ) ) ) ; org . eclipse . compare . ITypedElement [ ] ac = null ; if ( actAncestor != null ) ac = ( ( org . eclipse . compare . ITypedElement [ ] ) ( ( ( org . eclipse . compare . structuremergeviewer . IStructureComparator ) ( actAncestor ) ) . getChildren ( ) ) ) ; int li = 0 ; int ri = 0 ; while ( ( li < ( lc . length ) ) && ( ri < ( rc . length ) ) ) { org . eclipse . compare . ITypedElement ln = lc [ li ] ; org . eclipse . compare . ITypedElement rn = rc [ ri ] ; org . eclipse . compare . ITypedElement an = null ; if ( ac != null ) an = ac [ ri ] ; int compareTo = ln . getName ( ) . compareTo ( rn . getName ( ) ) ; if ( compareTo == 0 ) { if ( ! ( ln . equals ( rn ) ) ) diffNode . add ( compare ( ln , rn , an ) ) ; ++ li ; ++ ri ; } else if ( compareTo < 0 ) { org . eclipse . compare . structuremergeviewer . DiffNode childDiffNode = new org . eclipse . compare . structuremergeviewer . DiffNode ( org . eclipse . compare . structuremergeviewer . Differencer . ADDITION , an , ln , null ) ; diffNode . add ( childDiffNode ) ; if ( ln . getType ( ) . equals ( ITypedElement . FOLDER_TYPE ) ) { org . eclipse . compare . ITypedElement [ ] children = ( ( org . eclipse . compare . ITypedElement [ ] ) ( ( ( org . eclipse . compare . structuremergeviewer . IStructureComparator ) ( ln ) ) . getChildren ( ) ) ) ; if ( ( children != null ) && ( ( children . length ) > 0 ) ) { for ( org . eclipse . compare . ITypedElement child : children ) { childDiffNode . add ( addDirectoryFiles ( child , Differencer . ADDITION ) ) ; } } } ++ li ; } else { org . eclipse . compare . structuremergeviewer . DiffNode childDiffNode = new org . eclipse . compare . structuremergeviewer . DiffNode ( org . eclipse . compare . structuremergeviewer . Differencer . DELETION , an , null , rn ) ; diffNode . add ( childDiffNode ) ; if ( rn . getType ( ) . equals ( ITypedElement . FOLDER_TYPE ) ) { org . eclipse . compare . ITypedElement [ ] children = ( ( org . eclipse . compare . ITypedElement [ ] ) ( ( ( org . eclipse . compare . structuremergeviewer . IStructureComparator ) ( rn ) ) . getChildren ( ) ) ) ; if ( ( children != null ) && ( ( children . length ) > 0 ) ) { for ( org . eclipse . compare . ITypedElement child : children ) { childDiffNode . add ( addDirectoryFiles ( child , Differencer . DELETION ) ) ; } } } ++ ri ; } } while ( li < ( lc . length ) ) { org . eclipse . compare . ITypedElement ln = lc [ li ] ; org . eclipse . compare . ITypedElement an = null ; if ( ac != null ) an = ac [ li ] ; org . eclipse . compare . structuremergeviewer . DiffNode childDiffNode = new org . eclipse . compare . structuremergeviewer . DiffNode ( org . eclipse . compare . structuremergeviewer . Differencer . ADDITION , an , ln , null ) ; diffNode . add ( childDiffNode ) ; if ( ln . getType ( ) . equals ( ITypedElement . FOLDER_TYPE ) ) { org . eclipse . compare . ITypedElement
org . junit . Assert . assertTrue ( ( actual > 0 ) )
io_decimals_int32 ( ) { java . util . Map < java . lang . String , com . asakusafw . directio . hive . serde . ValueSerde > edits = new java . util . HashMap ( ) ; edits . put ( "decimalOption" , com . asakusafw . directio . hive . serde . ValueSerdeFactory . getDecimal ( 9 , 2 ) ) ; int count = 100 ; com . asakusafw . directio . hive . parquet . ParquetFileFormat < com . asakusafw . directio . hive . serde . mock . MockTypes > format = format ( com . asakusafw . directio . hive . serde . mock . MockTypes . class , edits ) ; java . util . List < com . asakusafw . directio . hive . serde . mock . MockTypes > inputs = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < count ; i ++ ) { com . asakusafw . directio . hive . serde . mock . MockTypes in = new com . asakusafw . directio . hive . serde . mock . MockTypes ( ) ; in . decimalOption . modify ( new java . math . BigDecimal ( "7.89" ) ) ; inputs . add ( in ) ; } java . util . List < com . asakusafw . directio . hive . serde . mock . MockTypes > outputs = restore ( format , inputs ) ; com . asakusafw . directio . hive . serde . mock . MockTypes sample = inputs . get ( 0 ) ; for ( com . asakusafw . directio . hive . serde . mock . MockTypes out : outputs ) { "<AssertPlaceHolder>" ; } } equalTo ( java . lang . Object ) { return new com . asakusafw . testdriver . rule . ExpectConstant ( value , new com . asakusafw . testdriver . rule . Equals ( ) ) ; }
org . junit . Assert . assertThat ( out . decimalOption , equalTo ( sample . decimalOption ) )
testExpression3 ( ) { java . lang . String expr ; double expected ; expr = "2+4*5" ; expected = 2 + ( 4 * 5 ) ; net . objecthunter . exp4j . Expression e = new net . objecthunter . exp4j . ExpressionBuilder ( expr ) . build ( ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { final net . objecthunter . exp4j . ArrayStack output = new net . objecthunter . exp4j . ArrayStack ( ) ; for ( int i = 0 ; i < ( tokens . length ) ; i ++ ) { net . objecthunter . exp4j . tokenizer . Token t = tokens [ i ] ; else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_VARIABLE ) ) { final java . lang . String name = ( ( net . objecthunter . exp4j . tokenizer . VariableToken ) ( t ) ) . getName ( ) ; final java . lang . Double value = this . variables . get ( name ) ; if ( value == null ) { throw new java . lang . IllegalArgumentException ( ( ( "No<sp>value<sp>has<sp>been<sp>set<sp>for<sp>the<sp>setVariable<sp>'" + name ) + "'." ) ) ; } output . push ( value ) ; } else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_OPERATOR ) ) { net . objecthunter . exp4j . tokenizer . OperatorToken op = ( ( net . objecthunter . exp4j . tokenizer . OperatorToken ) ( t ) ) ; if ( ( output . size ( ) ) < ( op . getOperator ( ) . getNumOperands ( ) ) ) { throw new java . lang . IllegalArgumentException ( ( ( "Invalid<sp>number<sp>of<sp>operands<sp>available<sp>for<sp>'" + ( op . getOperator ( ) . getSymbol ( ) ) ) + "'<sp>operator" ) ) ; } if ( ( op . getOperator ( ) . getNumOperands ( ) ) == 2 ) { double rightArg = output . pop ( ) ; double leftArg = output . pop ( ) ; output . push ( op . getOperator ( ) . apply ( leftArg , rightArg ) ) ; } else if ( ( op . getOperator ( ) . getNumOperands ( ) ) == 1 ) { double arg = output . pop ( ) ; output . push ( op . getOperator ( ) . apply ( arg ) ) ; } } else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_FUNCTION ) ) { net . objecthunter . exp4j . tokenizer . FunctionToken func = ( ( net . objecthunter . exp4j . tokenizer . FunctionToken ) ( t ) ) ; final int numArguments = func . getFunction ( ) . getNumArguments ( ) ; if ( ( output . size ( ) ) < numArguments ) { throw new java . lang . IllegalArgumentException ( ( ( "Invalid<sp>number<sp>of<sp>arguments<sp>available<sp>for<sp>'" + ( func . getFunction ( ) . getName ( ) ) ) + "'<sp>function" ) ) ; } double [ ] args = new double [ numArguments ] ; for ( int j = numArguments - 1 ; j >= 0 ; j -- ) { args [ j ] = output . pop ( ) ; } output . push ( func . getFunction ( ) . apply ( args ) ) ; } } if ( ( output . size ( ) ) > 1 ) { throw new java . lang . IllegalArgumentException ( "Invalid<sp>number<sp>of<sp>items<sp>on<sp>the<sp>output<sp>queue.<sp>Might<sp>be<sp>caused<sp>by<sp>an<sp>invalid<sp>number<sp>of<sp>arguments<sp>for<sp>a<sp>function." ) ; } return output . pop ( ) ; }
org . junit . Assert . assertTrue ( ( expected == ( e . evaluate ( ) ) ) )
testResolveWithNull ( ) { de . lessvoid . nifty . tools . TargetElementResolver resolver = new de . lessvoid . nifty . tools . TargetElementResolver ( null , null ) ; "<AssertPlaceHolder>" ; } resolve ( java . lang . String ) { if ( styleId == null ) { return null ; } int indexOf = styleId . indexOf ( "#" ) ; if ( indexOf == ( - 1 ) ) { return baseStyleResolver . resolve ( styleId ) ; } else if ( indexOf == 0 ) { return baseStyleResolver . resolve ( ( ( baseStyleId ) + styleId ) ) ; } else { return baseStyleResolver . resolve ( styleId ) ; } }
org . junit . Assert . assertNull ( resolver . resolve ( null ) )
clearExpiredClearsNothing ( ) { byte [ ] buffer = readFile ( ) ; subject . put ( org . openhab . binding . darksky . internal . utils . ByteArrayFileCacheTest . MP3_FILE_NAME , buffer ) ; subject . clearExpired ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { for ( org . openhab . binding . irtrans . internal . IRtransBindingConstants . Led c : org . openhab . binding . irtrans . internal . IRtransBindingConstants . Led . values ( ) ) { if ( c . text . equals ( valueSelectorText ) ) { return c ; } } throw new java . lang . IllegalArgumentException ( "Not<sp>valid<sp>value<sp>selector" ) ; }
org . junit . Assert . assertThat ( subject . get ( org . openhab . binding . darksky . internal . utils . ByteArrayFileCacheTest . MP3_FILE_NAME ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( buffer ) ) )
shouldReturnEmptyResultSet ( ) { java . sql . ResultSet rs = conn . createStatement ( ) . executeQuery ( "SELECT<sp>*<sp>FROM<sp>Author<sp>where<sp>false<sp>=<sp>true" ) ; "<AssertPlaceHolder>" ; } next ( ) { return absolute ( ( ++ ( cursor ) ) ) ; }
org . junit . Assert . assertThat ( rs . next ( ) , is ( false ) )
testRemoveFromShortEmptyArray ( ) { short [ ] array = new short [ ] { } ; array = com . liferay . portal . kernel . util . ArrayUtil . remove ( array , ( ( short ) ( 3 ) ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( boolean [ ] ) { return com . liferay . portal . kernel . util . ArrayUtil . isEmpty ( array ) ; }
org . junit . Assert . assertTrue ( com . liferay . portal . kernel . util . ArrayUtil . isEmpty ( array ) )
get3DCoordinateCoverage_None_2D ( ) { org . openscience . cdk . interfaces . IAtomContainer container = new org . openscience . cdk . AtomContainer ( ) ; org . openscience . cdk . interfaces . IAtom atom1 = new org . openscience . cdk . Atom ( "C" ) ; org . openscience . cdk . interfaces . IAtom atom2 = new org . openscience . cdk . Atom ( "C" ) ; org . openscience . cdk . interfaces . IAtom atom3 = new org . openscience . cdk . Atom ( "C" ) ; atom1 . setPoint2d ( new javax . vecmath . Point2d ( 1 , 1 ) ) ; atom2 . setPoint2d ( new javax . vecmath . Point2d ( 2 , 1 ) ) ; atom3 . setPoint2d ( new javax . vecmath . Point2d ( 1 , 2 ) ) ; container . addAtom ( atom1 ) ; container . addAtom ( atom2 ) ; container . addAtom ( atom3 ) ; "<AssertPlaceHolder>" ; } get3DCoordinateCoverage ( org . openscience . cdk . interfaces . IAtomContainer ) { if ( ( container == null ) || ( ( container . getAtomCount ( ) ) == 0 ) ) return org . openscience . cdk . geometry . GeometryUtil . CoordinateCoverage . NONE ; int count = 0 ; for ( org . openscience . cdk . interfaces . IAtom atom : container . atoms ( ) ) { count += ( ( atom != null ) && ( ( atom . getPoint3d ( ) ) != null ) ) ? 1 : 0 ; } return count == 0 ? org . openscience . cdk . geometry . GeometryUtil . CoordinateCoverage . NONE : count == ( container . getAtomCount ( ) ) ? org . openscience . cdk . geometry . GeometryUtil . CoordinateCoverage . FULL : org . openscience . cdk . geometry . GeometryUtil . CoordinateCoverage . PARTIAL ; }
org . junit . Assert . assertEquals ( GeometryUtil . CoordinateCoverage . NONE , org . openscience . cdk . geometry . GeometryUtil . get3DCoordinateCoverage ( container ) )
scanNdkNewestVersion ( ) { java . nio . file . Path expectedPath = createTmpNdkVersions ( com . facebook . buck . android . toolchain . ndk . impl . AndroidNdkResolver . NDK_POST_R11_VERSION_FILENAME , "ndk-dir-r11" , "Pkg.Desc<sp>=<sp>Android<sp>NDK\nPkg.Revision<sp>=<sp>11.2" , "ndk-dir-r12" , "Pkg.Desc<sp>=<sp>Android<sp>NDK\nPkg.Revision<sp>=<sp>12.4" , "ndk-dir-r13" , "Pkg.Desc<sp>=<sp>Android<sp>NDK\nPkg.Revision<sp>=<sp>13.2" ) [ 2 ] ; com . facebook . buck . android . toolchain . ndk . impl . AndroidNdkResolver resolver = new com . facebook . buck . android . toolchain . ndk . impl . AndroidNdkResolver ( tmpDir . getRoot ( ) . getFileSystem ( ) , com . google . common . collect . ImmutableMap . of ( "ANDROID_NDK_REPOSITORY" , tmpDir . getRoot ( ) . toString ( ) ) , AndroidNdkHelper . DEFAULT_CONFIG ) ; "<AssertPlaceHolder>" ; } getNdkOrThrow ( ) { if ( ( ! ( ndk . isPresent ( ) ) ) && ( ndkErrorMessage . isPresent ( ) ) ) { throw new com . facebook . buck . core . exceptions . HumanReadableException ( ndkErrorMessage . get ( ) ) ; } return ndk . get ( ) ; }
org . junit . Assert . assertEquals ( expectedPath , resolver . getNdkOrThrow ( ) )
testConvertAllWhiteSpacesNull ( ) { java . lang . String in = null ; java . lang . String out = org . oscm . converter . WhiteSpaceConverter . replace ( in ) ; "<AssertPlaceHolder>" ; } replace ( java . lang . String ) { java . lang . String result = new java . lang . String ( ) ; if ( value != null ) { for ( int i = 0 ; i < ( value . length ( ) ) ; i ++ ) { char c = value . charAt ( i ) ; if ( java . lang . Character . isWhitespace ( c ) ) { result = result . concat ( "<sp>" ) ; } else { result = result . concat ( java . lang . Character . toString ( c ) ) ; } } } return result ; }
org . junit . Assert . assertEquals ( "" , out )
testCapacity_enabled_tail_closed ( ) { init ( ) ; com . microsoft . azure . sdk . iot . deps . ws . impl . WebSocketHandlerImpl webSocketHandler = new com . microsoft . azure . sdk . iot . deps . ws . impl . WebSocketHandlerImpl ( ) ; com . microsoft . azure . sdk . iot . deps . ws . impl . WebSocketHandlerImpl mockWebSocketHandler = mock ( webSocketHandler . getClass ( ) ) ; com . microsoft . azure . sdk . iot . deps . ws . impl . WebSocketImpl webSocketImpl = new com . microsoft . azure . sdk . iot . deps . ws . impl . WebSocketImpl ( ) ; webSocketImpl . configure ( _hostName , _webSocketPath , _webSocketPort , _webSocketProtocol , _additionalHeaders , mockWebSocketHandler ) ; org . apache . qpid . proton . engine . impl . TransportInput mockTransportInput = mock ( org . apache . qpid . proton . engine . impl . TransportInput . class ) ; org . apache . qpid . proton . engine . impl . TransportOutput mockTransportOutput = mock ( org . apache . qpid . proton . engine . impl . TransportOutput . class ) ; org . apache . qpid . proton . engine . impl . TransportWrapper transportWrapper = webSocketImpl . wrap ( mockTransportInput , mockTransportOutput ) ; java . lang . String message = "Message" ; java . nio . ByteBuffer inputBuffer = webSocketImpl . getInputBuffer ( ) ; inputBuffer . clear ( ) ; inputBuffer . put ( message . getBytes ( ) ) ; inputBuffer . flip ( ) ; webSocketImpl . _isWebSocketEnabled = true ; transportWrapper . close_tail ( ) ; int actual = transportWrapper . capacity ( ) ; "<AssertPlaceHolder>" ; verify ( mockTransportInput , times ( 0 ) ) . capacity ( ) ; } capacity ( ) { if ( _isWebSocketEnabled ) { if ( _tail_closed ) { return org . apache . qpid . proton . engine . Transport . END_OF_STREAM ; } else { return _inputBuffer . remaining ( ) ; } } else { return _underlyingInput . capacity ( ) ; } }
org . junit . Assert . assertTrue ( ( ( org . apache . qpid . proton . engine . Transport . END_OF_STREAM ) == actual ) )
testAuthenticationWithNonAlphanumericSeed ( ) { final java . lang . String algorithm = ALGORITHM_OTP_MD5 ; final javax . security . sasl . SaslClientFactory clientFactory = obtainSaslClientFactory ( org . wildfly . security . sasl . otp . OTPSaslClientFactory . class ) ; "<AssertPlaceHolder>" ; org . wildfly . security . password . PasswordFactory passwordFactory = org . wildfly . security . password . PasswordFactory . getInstance ( algorithm ) ; final org . wildfly . security . password . Password password = passwordFactory . generatePassword ( new org . wildfly . security . password . spec . OneTimePasswordSpec ( org . wildfly . common . iteration . CodePointIterator . ofString ( "505d889f90085847" ) . hexDecode ( ) . drain ( ) , "A<sp>seed!" , 500 ) ) ; final org . wildfly . security . sasl . test . SaslServerBuilder . BuilderReference < org . wildfly . security . auth . server . SecurityDomain > securityDomainReference = new org . wildfly . security . sasl . test . SaslServerBuilder . BuilderReference < > ( ) ; final org . wildfly . security . sasl . test . SaslServerBuilder . BuilderReference < java . io . Closeable > closeableReference = new org . wildfly . security . sasl . test . SaslServerBuilder . BuilderReference < > ( ) ; try { final javax . security . sasl . SaslServer saslServer = createSaslServer ( password , closeableReference , securityDomainReference ) ; final javax . security . auth . callback . CallbackHandler cbh = createClientCallbackHandler ( "userName" , "This<sp>is<sp>a<sp>test." , org . wildfly . security . sasl . otp . OTP . PASS_PHRASE , algorithm , org . wildfly . security . sasl . otp . OTP . HEX_RESPONSE ) ; final javax . security . sasl . SaslClient saslClient = clientFactory . createSaslClient ( new java . lang . String [ ] { SaslMechanismInformation . Names . OTP } , null , "test" , "testserver1.example.com" , java . util . Collections . < java . lang . String , java . lang . Object > emptyMap ( ) , cbh ) ; byte [ ] message = saslClient . evaluateChallenge ( new byte [ 0 ] ) ; try { saslServer . evaluateResponse ( message ) ; org . junit . Assert . fail ( "Expected<sp>SaslException<sp>not<sp>thrown" ) ; } catch ( javax . security . sasl . SaslException expected ) { } saslClient . dispose ( ) ; saslServer . dispose ( ) ; checkPassword ( securityDomainReference , "userName" , ( ( org . wildfly . security . password . interfaces . OneTimePassword ) ( password ) ) , algorithm ) ; } finally { closeableReference . getReference ( ) . close ( ) ; } } obtainSaslClientFactory ( java . lang . Class ) { java . util . Enumeration < javax . security . sasl . SaslClientFactory > clientFactories = javax . security . sasl . Sasl . getSaslClientFactories ( ) ; while ( clientFactories . hasMoreElements ( ) ) { javax . security . sasl . SaslClientFactory current = clientFactories . nextElement ( ) ; if ( current . getClass ( ) . equals ( requiredClientFactory ) ) { return requiredClientFactory . cast ( current ) ; } } return null ; }
org . junit . Assert . assertNotNull ( clientFactory )
detectResultType_should_return_LIST_OF_LIST_OF_OBJECT ( ) { org . springframework . data . simpledb . query . SimpleDbQueryMethod repositoryMethod = prepareQueryMethodToTest ( "selectCoreFields" , org . springframework . data . simpledb . query . SampleEntity . class ) ; org . springframework . data . simpledb . query . executions . MultipleResultExecution multipleResultExecution = new org . springframework . data . simpledb . query . executions . MultipleResultExecution ( null ) ; "<AssertPlaceHolder>" ; } detectResultType ( org . springframework . data . simpledb . query . SimpleDbQueryMethod ) { java . lang . String query = method . getAnnotatedQuery ( ) ; if ( method . returnsCollectionOfDomainClass ( ) ) { return org . springframework . data . simpledb . query . executions . MultipleResultExecution . MultipleResultType . COLLECTION_OF_DOMAIN_ENTITIES ; } else if ( ( org . springframework . data . simpledb . query . QueryUtils . getQueryPartialFieldNames ( query ) . size ( ) ) > 1 ) { return org . springframework . data . simpledb . query . executions . MultipleResultExecution . MultipleResultType . LIST_OF_LIST_OF_OBJECT ; } else { if ( method . returnsListOfListOfObject ( ) ) { return org . springframework . data . simpledb . query . executions . MultipleResultExecution . MultipleResultType . LIST_OF_LIST_OF_OBJECT ; } else if ( method . returnsFieldOfTypeCollection ( ) ) { return org . springframework . data . simpledb . query . executions . MultipleResultExecution . MultipleResultType . FIELD_OF_TYPE_COLLECTION ; } else if ( java . util . List . class . isAssignableFrom ( method . getReturnType ( ) ) ) { return org . springframework . data . simpledb . query . executions . MultipleResultExecution . MultipleResultType . LIST_OF_FIELDS ; } else if ( java . util . Set . class . isAssignableFrom ( method . getReturnType ( ) ) ) { return org . springframework . data . simpledb . query . executions . MultipleResultExecution . MultipleResultType . SET_OF_FIELDS ; } else { throw new java . lang . IllegalArgumentException ( ( "Wrong<sp>return<sp>type<sp>for<sp>query:<sp>" + query ) ) ; } } }
org . junit . Assert . assertEquals ( MultipleResultExecution . MultipleResultType . LIST_OF_LIST_OF_OBJECT , multipleResultExecution . detectResultType ( repositoryMethod ) )
testFree ( ) { java . sql . Statement stmt = _conn . createStatement ( ) ; java . sql . ResultSet rs = stmt . executeQuery ( "SELECT<sp>val<sp>FROM<sp>xmltest" ) ; "<AssertPlaceHolder>" ; java . sql . SQLXML xml = rs . getSQLXML ( 1 ) ; xml . free ( ) ; xml . free ( ) ; try { xml . getString ( ) ; org . junit . Assert . fail ( "Not<sp>freed." ) ; } catch ( java . sql . SQLException sqle ) { } rs . close ( ) ; stmt . close ( ) ; } next ( ) { return relative ( 1 ) ; }
org . junit . Assert . assertTrue ( rs . next ( ) )
testReverse3 ( ) { org . jerlang . type . List list1 = new org . jerlang . type . List ( org . jerlang . type . Atom . of ( "a" ) , new org . jerlang . type . List ( org . jerlang . type . Atom . of ( "b" ) ) ) ; org . jerlang . type . List list2 = new org . jerlang . type . List ( org . jerlang . type . Atom . of ( "b" ) , new org . jerlang . type . List ( org . jerlang . type . Atom . of ( "a" ) ) ) ; "<AssertPlaceHolder>" ; } reverse ( org . jerlang . type . List ) { return org . jerlang . stdlib . lists . ListsReverse . reverse_1 ( list ) ; }
org . junit . Assert . assertEquals ( list2 , org . jerlang . stdlib . Lists . reverse ( list1 ) )
nestedFinishTest ( ) { final int dataLength = ( java . lang . Runtime . getRuntime ( ) . availableProcessors ( ) ) * 2 ; final int [ ] parResult = new int [ 1 ] ; edu . rice . pcdp . PCDP . finish ( ( ) -> { parResult [ 0 ] = sum ( dataLength , 0 , 0 , ARRAY . length ) ; } ) ; System . out . printf ( "Parallel<sp>result<sp>is:<sp>%d\n" , parResult [ 0 ] ) ; int seqResult = 0 ; for ( int i = 0 ; i < ( edu . rice . pcdp . finish . TestFinish9TooMoreFinish . ARRAY . length ) ; i ++ ) { seqResult += edu . rice . pcdp . finish . TestFinish9TooMoreFinish . ARRAY [ i ] ; } System . out . printf ( "Sequencial<sp>result<sp>is:<sp>%d" , seqResult ) ; "<AssertPlaceHolder>" ; } sum ( int , int , int , int ) { if ( depth >= dataLength ) { int result = 0 ; for ( int i = left ; i < right ; i ++ ) { result += edu . rice . pcdp . finish . TestFinish9TooMoreFinish . ARRAY [ i ] ; } return result ; } final int [ ] finishResult = new int [ ] { 0 } ; final int [ ] firstResult = new int [ ] { 0 } ; final int [ ] secondResult = new int [ ] { 0 } ; edu . rice . pcdp . PCDP . finish ( ( ) -> { async ( ( ) -> { firstResult [ 0 ] = sum ( dataLength , ( depth + 1 ) , left , ( ( right + left ) / 2 ) ) ; } ) ; async ( ( ) -> { secondResult [ 0 ] = sum ( dataLength , ( depth + 1 ) , ( ( right + left ) / 2 ) , right ) ; } ) ; } ) ; finishResult [ 0 ] = ( firstResult [ 0 ] ) + ( secondResult [ 0 ] ) ; return finishResult [ 0 ] ; }
org . junit . Assert . assertEquals ( parResult [ 0 ] , seqResult )
testPost3 ( ) { java . lang . String res = com . sample . http . SimpleRequests . performPostOnPage ( "localhost" , new byte [ 100 ] ) ; "<AssertPlaceHolder>" ; } performPostOnPage ( java . lang . String , byte [ ] ) { java . lang . String res = null ; com . sample . http . SimpleRequests . log . debug ( ( "Fetching<sp>page<sp>" + url ) ) ; try { org . javalite . http . Post post = org . javalite . http . Http . post ( url , postContent , com . sample . http . SimpleRequests . connectionTimeout , com . sample . http . SimpleRequests . readTimeout ) ; com . sample . http . SimpleRequests . log . debug ( ( ( ( ( "Got<sp>response<sp>as:<sp>" + ( post . responseMessage ( ) ) ) + "(" ) + ( post . responseCode ( ) ) ) + ")" ) ) ; res = post . text ( ) ; } catch ( java . lang . Exception e ) { com . sample . http . SimpleRequests . log . warn ( e . getMessage ( ) ) ; } return res ; }
org . junit . Assert . assertNull ( res )
getDataStatisticsEventCountTest ( ) { dataStatisticsEventStore . save ( dse1 ) ; dataStatisticsEventStore . save ( dse4 ) ; java . util . Map < org . hisp . dhis . datastatistics . DataStatisticsEventType , java . lang . Double > dsList = dataStatisticsEventStore . getDataStatisticsEventCount ( start , end ) ; "<AssertPlaceHolder>" ; } size ( ) { return messages . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( dsList . size ( ) ) == 3 ) )
compareYagoPreferredMeaningOutput ( ) { java . lang . String actual = new java . lang . String ( java . nio . file . Files . readAllBytes ( java . nio . file . Paths . get ( ( ( test . fromOtherSources . WordnetExtractorTest . RESOURCESPATH ) + "/output/yagoPreferredMeanings.tsv" ) ) ) ) ; java . lang . String expected = new java . lang . String ( java . nio . file . Files . readAllBytes ( java . nio . file . Paths . get ( ( ( test . fromOtherSources . WordnetExtractorTest . RESOURCESPATH ) + "/output/expected_yagoPreferredMeanings.tsv" ) ) ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Integer ) { return graph . get ( key ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testBRAL1512MetIndicatieOpNeeEnAlleenGeslachtsnaamIngevuld ( ) { nl . bzk . brp . model . bericht . kern . PersoonNaamgebruikGroepBericht groep = new nl . bzk . brp . model . bericht . kern . PersoonNaamgebruikGroepBericht ( ) ; groep . setIndicatieNaamgebruikAfgeleid ( JaNeeAttribuut . NEE ) ; groep . setGeslachtsnaamstamNaamgebruik ( new nl . bzk . brp . model . algemeen . attribuuttype . kern . GeslachtsnaamstamAttribuut ( "Gslnaam" ) ) ; nl . bzk . brp . model . basis . AbstractBerichtEntiteitGroep ag = groep ; final javax . validation . Validator validator = javax . validation . Validation . buildDefaultValidatorFactory ( ) . getValidator ( ) ; java . util . Set < javax . validation . ConstraintViolation < nl . bzk . brp . model . basis . AbstractBerichtEntiteitGroep > > overtredingen = validator . validate ( ag , javax . validation . groups . Default . class ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , overtredingen . size ( ) )
testGetIndex ( ) { "<AssertPlaceHolder>" ; } getIndex ( ) { return byteBuf . readerIndex ( ) ; }
org . junit . Assert . assertEquals ( 0 , instance . getIndex ( ) )
testSetZoomEnabled ( ) { view . setZoomEnabled ( true ) ; "<AssertPlaceHolder>" ; } getZoomEnabled ( ) { checkWidget ( ) ; return zoomEnabled ; }
org . junit . Assert . assertTrue ( view . getZoomEnabled ( ) )
testMath798 ( ) { final double tol = 1.0E-14 ; final org . apache . commons . math3 . optimization . SimpleVectorValueChecker checker = new org . apache . commons . math3 . optimization . SimpleVectorValueChecker ( tol , tol ) ; final double [ ] init = new double [ ] { 0 , 0 } ; final int maxEval = 3 ; final double [ ] lm = doMath798 ( new org . apache . commons . math3 . optimization . general . LevenbergMarquardtOptimizer ( checker ) , maxEval , init ) ; final double [ ] gn = doMath798 ( new org . apache . commons . math3 . optimization . general . GaussNewtonOptimizer ( checker ) , maxEval , init ) ; for ( int i = 0 ; i <= 1 ; i ++ ) { "<AssertPlaceHolder>" ; } }
org . junit . Assert . assertEquals ( lm [ i ] , gn [ i ] , tol )
testHash ( ) { java . util . Set s = com . google . common . collect . Sets . newHashSet ( new kong . unirest . JsonPatchItem ( add , "/foo" , "bar" ) , new kong . unirest . JsonPatchItem ( add , "/foo" , "bar" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return headers . stream ( ) . map ( Header :: getName ) . collect ( toSet ( ) ) . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , s . size ( ) )
test08 ( ) { java . lang . String id = "0123456789" ; java . lang . String cookie = "JSESSIONID=" + id ; "<AssertPlaceHolder>" ; } filter ( java . lang . String , java . lang . String ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( cookieHeader . length ( ) ) ; java . util . StringTokenizer st = new java . util . StringTokenizer ( cookieHeader , ";" ) ; boolean first = true ; while ( st . hasMoreTokens ( ) ) { if ( first ) { first = false ; } else { sb . append ( ';' ) ; } sb . append ( util . CookieFilter . filterNameValuePair ( st . nextToken ( ) , sessionId ) ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( cookie , util . CookieFilter . filter ( cookie , id ) )
testRotateFromCustomerEncryptionToKmsKeyWithCustomerEncryption ( ) { java . lang . String sourceBlobName = "test-copy-blob-encryption-key-source" ; com . google . cloud . storage . BlobId source = com . google . cloud . storage . BlobId . of ( com . google . cloud . storage . it . ITStorageTest . BUCKET , sourceBlobName ) ; com . google . common . collect . ImmutableMap < java . lang . String , java . lang . String > metadata = com . google . common . collect . ImmutableMap . of ( "k" , "v" ) ; com . google . cloud . storage . Blob remoteBlob = com . google . cloud . storage . it . ITStorageTest . storage . create ( com . google . cloud . storage . BlobInfo . newBuilder ( source ) . build ( ) , com . google . cloud . storage . it . ITStorageTest . BLOB_BYTE_CONTENT , Storage . BlobTargetOption . encryptionKey ( com . google . cloud . storage . it . ITStorageTest . KEY ) ) ; "<AssertPlaceHolder>" ; java . lang . String targetBlobName = "test-copy-blob-kms-key-target" ; com . google . cloud . storage . BlobInfo target = com . google . cloud . storage . BlobInfo . newBuilder ( com . google . cloud . storage . it . ITStorageTest . BUCKET , targetBlobName ) . setContentType ( com . google . cloud . storage . it . ITStorageTest . CONTENT_TYPE ) . setMetadata ( metadata ) . build ( ) ; try { com . google . cloud . storage . Storage . CopyRequest req = Storage . CopyRequest . newBuilder ( ) . setSource ( source ) . setSourceOptions ( Storage . BlobSourceOption . decryptionKey ( com . google . cloud . storage . it . ITStorageTest . BASE64_KEY ) ) . setTarget ( target , Storage . BlobTargetOption . encryptionKey ( com . google . cloud . storage . it . ITStorageTest . KEY ) , Storage . BlobTargetOption . kmsKeyName ( com . google . cloud . storage . it . ITStorageTest . kmsKeyOneResourcePath ) ) . build ( ) ; com . google . cloud . storage . it . ITStorageTest . storage . copy ( req ) ; org . junit . Assert . fail ( "StorageException<sp>was<sp>expected" ) ; } catch ( com . google . cloud . storage . StorageException ex ) { } } build ( ) { return new com . google . cloud . monitoring . v3 . AlertPolicyServiceSettings ( this ) ; }
org . junit . Assert . assertNotNull ( remoteBlob )
testRetrieveByNameDoesntExist ( ) { org . candlepin . model . activationkeys . ActivationKeyContentOverride found = activationKeyContentOverrideCurator . retrieve ( key , "not-a-repo" , "gpgcheck" ) ; "<AssertPlaceHolder>" ; } retrieve ( Parent extends org . candlepin . model . AbstractHibernateObject , java . lang . String , java . lang . String ) { if ( ( ( parent != null ) && ( contentLabel != null ) ) && ( name != null ) ) { return ( ( T ) ( org . candlepin . model . ContentOverrideCurator . currentSession ( ) . createCriteria ( this . entityType ( ) ) . add ( org . hibernate . criterion . Restrictions . eq ( parentAttr , parent ) ) . add ( org . hibernate . criterion . Restrictions . eq ( "contentLabel" , contentLabel ) ) . add ( org . hibernate . criterion . Restrictions . eq ( "name" , name . toLowerCase ( ) ) ) . setMaxResults ( 1 ) . uniqueResult ( ) ) ) ; } return null ; }
org . junit . Assert . assertNull ( found )
isJMockitMockableType_A$String_StringIsNull ( ) { org . junithelper . core . meta . ClassMeta classMeta = null ; org . junithelper . core . extractor . AvailableTypeDetector target = new org . junithelper . core . extractor . AvailableTypeDetector ( classMeta ) ; java . lang . String typeName = null ; boolean actual = target . isJMockitMockableType ( typeName ) ; boolean expected = false ; "<AssertPlaceHolder>" ; } isJMockitMockableType ( java . lang . String ) { if ( typeName == null ) { return false ; } if ( ( org . junithelper . core . util . PrimitiveTypeUtil . isPrimitive ( typeName ) ) || ( typeName . matches ( ".+?\\[\\]$" ) ) ) { return false ; } try { java . lang . Class < ? > clazz = java . lang . Class . forName ( ( "java.lang." + typeName ) ) ; return java . lang . reflect . Modifier . isFinal ( clazz . getModifiers ( ) ) ? false : true ; } catch ( java . lang . Exception ignore ) { for ( java . lang . String importedPackage : classMeta . importedList ) { importedPackage = importedPackage . replaceAll ( "//" , StringValue . Empty ) ; if ( importedPackage . matches ( ( ( ".+?\\." + typeName ) + "$" ) ) ) { return true ; } } if ( typeName . matches ( ".+?\\..+" ) ) { try { java . lang . Class < ? > clazz = java . lang . Class . forName ( typeName ) ; return ! ( java . lang . reflect . Modifier . isFinal ( clazz . getModifiers ( ) ) ) ; } catch ( java . lang . Exception e ) { return false ; } } } return false ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
testCanCreateEmptySelector ( ) { com . facebook . buck . core . select . Selector < com . facebook . buck . core . model . Flavor > selector = selectorFactory . createSelector ( com . facebook . buck . core . cell . TestCellPathResolver . get ( projectFilesystem ) , projectFilesystem , projectFilesystem . getRootPath ( ) , EmptyTargetConfiguration . INSTANCE , com . google . common . collect . ImmutableMap . of ( ) , new com . facebook . buck . rules . coercer . FlavorTypeCoercer ( ) ) ; "<AssertPlaceHolder>" ; } getConditions ( ) { return conditions ; }
org . junit . Assert . assertTrue ( selector . getConditions ( ) . isEmpty ( ) )
testOverlayList_topHasValue ( ) { java . util . List < java . lang . String > str = sut . overlay ( newArrayList ( "bottom" ) , newArrayList ( "top" ) ) ; "<AssertPlaceHolder>" ; } overlay ( java . util . List , java . util . List ) { return ( top . size ( ) ) > 0 ? top : bottom ; }
org . junit . Assert . assertThat ( str , org . hamcrest . Matchers . contains ( "top" ) )
testNames ( ) { final java . lang . String [ ] expectedNames = new java . lang . String [ ] { "custom-before" , "custom-before-2" , "custom-after" , "custom-after-2" } ; java . lang . Iterable < java . lang . String > result = mimeHeaders . names ( ) ; java . util . List < java . lang . String > list = new java . util . ArrayList ( ) ; for ( java . lang . String s : result ) { list . add ( s ) ; } "<AssertPlaceHolder>" ; } toArray ( T [ ] ) { return filters . toArray ( a ) ; }
org . junit . Assert . assertArrayEquals ( expectedNames , list . toArray ( new java . lang . String [ list . size ( ) ] ) )
testStartContext ( ) { org . apache . tiles . request . Request request = createMock ( org . apache . tiles . request . Request . class ) ; java . util . Map < java . lang . String , java . lang . Object > requestScope = createMock ( java . util . Map . class ) ; java . util . Deque < org . apache . tiles . AttributeContext > deque = createMock ( java . util . Deque . class ) ; org . apache . tiles . AttributeContext attributeContext = createMock ( org . apache . tiles . AttributeContext . class ) ; expect ( request . getContext ( "request" ) ) . andReturn ( requestScope ) ; expect ( requestScope . get ( org . apache . tiles . impl . BasicTilesContainerUnitTest . ATTRIBUTE_CONTEXT_STACK ) ) . andReturn ( deque ) ; expect ( deque . isEmpty ( ) ) . andReturn ( false ) ; expect ( deque . peek ( ) ) . andReturn ( attributeContext ) ; expect ( attributeContext . getCascadedAttributeNames ( ) ) . andReturn ( null ) ; deque . push ( isA ( org . apache . tiles . BasicAttributeContext . class ) ) ; replay ( applicationContext , attributeEvaluatorFactory , definitionsFactory , preparerFactory , rendererFactory , request , requestScope , deque , attributeContext ) ; "<AssertPlaceHolder>" ; verify ( applicationContext , attributeEvaluatorFactory , definitionsFactory , preparerFactory , rendererFactory , request , requestScope , deque , attributeContext ) ; } startContext ( org . apache . tiles . request . Request ) { return container . startContext ( request ) ; }
org . junit . Assert . assertTrue ( ( ( container . startContext ( request ) ) instanceof org . apache . tiles . BasicAttributeContext ) )
firstTest ( ) { com . microsoft . azure . management . redis . v2018_03_01 . RedisTest . rgName = com . microsoft . azure . arm . utils . SdkContext . randomResourceName ( "rg" , 20 ) ; com . microsoft . azure . management . resources . ResourceGroup group = com . microsoft . azure . management . redis . v2018_03_01 . RedisTest . resourceManager . resourceGroups ( ) . define ( com . microsoft . azure . management . redis . v2018_03_01 . RedisTest . rgName ) . withRegion ( Region . US_WEST . toString ( ) ) . create ( ) ; "<AssertPlaceHolder>" ; } create ( ) { return this . create ( null , null , null , null ) ; }
org . junit . Assert . assertNotNull ( group )
iterator_should_iterator_over_both_forward_and_backward_soft_clips ( ) { createInput ( withReadName ( "r1" , Read ( 0 , 1 , "15S15M15S" ) ) ) ; au . edu . wehi . idsv . SAMEvidenceSource source = new au . edu . wehi . idsv . SAMEvidenceSource ( getCommandlineContext ( ) , input , null , 0 ) ; java . util . List < au . edu . wehi . idsv . DirectedEvidence > result = com . google . common . collect . Lists . newArrayList ( source . iterator ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return kmers . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , result . size ( ) )
testEqualAfterReencodingWithValidUuid ( ) { datawave . edge . util . EdgeValue originalEdgeValue = createEdgeValueWithUuid ( "11111111-1111-1111-1111-111111111111" ) ; datawave . edge . util . EdgeValue decodedEdgeValue = datawave . edge . util . EdgeValue . decode ( createEdgeValueWithUuid ( "11111111-1111-1111-1111-111111111111" ) . encode ( ) ) ; "<AssertPlaceHolder>" ; } encode ( ) { datawave . edge . protobuf . EdgeData . EdgeValue . Builder builder = EdgeData . EdgeValue . newBuilder ( ) ; if ( this . hasCount ( ) ) { builder . setCount ( this . getCount ( ) ) ; } else { builder . setCount ( 0L ) ; } if ( this . hasBitmask ( ) ) { builder . setHourBitmask ( this . getBitmask ( ) ) ; } if ( ( this . sourceValue ) != null ) { builder . setSourceValue ( this . sourceValue ) ; } if ( ( this . sinkValue ) != null ) { builder . setSinkValue ( this . sinkValue ) ; } if ( ( this . hours ) != null ) { builder . addAllHours ( this . hours ) ; } if ( ( this . duration ) != null ) { builder . addAllDuration ( this . duration ) ; } if ( ( this . loadDate ) != null ) { builder . setLoadDate ( loadDate ) ; } if ( this . hasOnlyUuidString ) { if ( org . apache . commons . lang . StringUtils . isNotBlank ( this . uuidString ) ) { builder . setUuidString ( this . uuidString ) ; } } else if ( ( this . uuidObj ) != null ) { builder . setUuid ( this . uuidObj ) ; } else if ( org . apache . commons . lang . StringUtils . isNotBlank ( this . uuidString ) ) { try { this . uuidObj = datawave . edge . util . EdgeValue . convertUuidStringToUuidObj ( this . uuidString ) ; builder . setUuid ( this . uuidObj ) ; } catch ( java . lang . Exception e ) { this . hasOnlyUuidString = true ; builder . setUuidString ( this . uuidString ) ; } } if ( ( this . badActivityDate ) != null ) { builder . setBadActivity ( badActivityDate ) ; } return new org . apache . accumulo . core . data . Value ( builder . build ( ) . toByteArray ( ) ) ; }
org . junit . Assert . assertEquals ( ( ( originalEdgeValue + "\n" ) + decodedEdgeValue ) , originalEdgeValue , decodedEdgeValue )
testRuleListLabelRuleRoot ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( ( ( "options<sp>{output=AST;}\n" + "a<sp>:<sp>(<sp>x+=b^<sp>)+<sp>{" ) + "System.out.print(\"x=\"+((CommonTree)$x.get(1)).toStringTree()+\';\');}<sp>;\n" ) + "b<sp>:<sp>ID;\n" ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "a" 0 ) + "a" 1 ) ; java . lang . String found = execParser ( "a" 4 , grammar , "TParser" , "a" 2 , "a" , "a<sp>b" , debug ) ; "<AssertPlaceHolder>" ; } execParser ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , boolean ) { boolean compiled = rawGenerateAndBuildRecognizer ( grammarFileName , grammarStr , parserName , lexerName , debug ) ; org . junit . Assert . assertTrue ( compiled ) ; writeFile ( tmpdir , "input" , input ) ; boolean parserBuildsTrees = ( ( grammarStr . indexOf ( "output=AST" ) ) >= 0 ) || ( ( grammarStr . indexOf ( "output<sp>=<sp>AST" ) ) >= 0 ) ; boolean parserBuildsTemplate = ( ( grammarStr . indexOf ( "output=template" ) ) >= 0 ) || ( ( grammarStr . indexOf ( "output<sp>=<sp>template" ) ) >= 0 ) ; return rawExecRecognizer ( parserName , null , lexerName , startRuleName , null , parserBuildsTrees , parserBuildsTemplate , false , debug ) ; }
org . junit . Assert . assertEquals ( "a" 3 , found )
testCommandLine ( ) { try { org . apache . hadoop . fs . FileUtil . fullyDelete ( OUTPUT_DIR . getAbsoluteFile ( ) ) ; } catch ( java . lang . Exception e ) { } try { createInput ( ) ; boolean mayExit = false ; job = new org . apache . hadoop . streaming . StreamJob ( genArgs ( ) , mayExit ) ; job . go ( ) ; org . apache . hadoop . streaming . File outFile = new org . apache . hadoop . streaming . File ( OUTPUT_DIR , "part-00000" ) . getAbsoluteFile ( ) ; java . lang . String output = org . apache . hadoop . streaming . StreamUtil . slurp ( outFile ) ; outFile . delete ( ) ; System . err . println ( ( "outEx1=" + ( outputExpect ) ) ) ; System . err . println ( ( "<sp>out1=" + output ) ) ; System . err . println ( ( "<sp>equals=" + ( outputExpect . compareTo ( output ) ) ) ) ; "<AssertPlaceHolder>" ; } finally { INPUT_FILE . delete ( ) ; org . apache . hadoop . fs . FileUtil . fullyDelete ( OUTPUT_DIR . getAbsoluteFile ( ) ) ; } } compareTo ( org . apache . hadoop . ozone . client . rest . response . BucketInfo ) { com . google . common . base . Preconditions . checkState ( o . getVolumeName ( ) . equals ( this . getVolumeName ( ) ) ) ; return this . bucketName . compareTo ( o . getBucketName ( ) ) ; }
org . junit . Assert . assertEquals ( outputExpect , output )
testPattern ( ) { com . github . mygreen . supercsv . builder . FieldAccessor field = getFieldAccessor ( com . github . mygreen . supercsv . builder . standard . CharacterProcessorBuilderTest . FormatterTest . TestCsv . class , "col_primitive" , comparator ) ; com . github . mygreen . supercsv . builder . standard . CharacterProcessorBuilder builder = ( ( com . github . mygreen . supercsv . builder . standard . CharacterProcessorBuilder ) ( builderResolver . resolve ( char . class ) ) ) ; com . github . mygreen . supercsv . cellprocessor . format . TextFormatter < java . lang . Character > formatter = builder . getFormatter ( field , config ) ; "<AssertPlaceHolder>" . isEmpty ( ) ; } getPattern ( ) { return dateFormatter . getPattern ( ) ; }
org . junit . Assert . assertThat ( formatter . getPattern ( ) )
one_$this_contains_none_returns_false_when_expression_values_in_array ( ) { com . redhat . lightblue . query . QueryExpression expr = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'array':'field6.$this.nf5',<sp>'contains':'$none',<sp>'values':[5,null,15,25]}" ) ; com . redhat . lightblue . eval . QueryEvaluator eval = com . redhat . lightblue . eval . QueryEvaluator . getInstance ( expr , md ) ; com . redhat . lightblue . eval . QueryEvaluationContext context = eval . evaluate ( jsonDoc ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return result ; }
org . junit . Assert . assertFalse ( context . getResult ( ) )
test_whitelabel_domains__id__ips__ip__delete ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method . DELETE ) ; request . setEndpoint ( "whitelabel/domains/{id}/ips/{ip}" ) ; com . sendgrid . Response response = sg . api ( request ) ; "<AssertPlaceHolder>" ; } api ( com . sendgrid . Request ) { com . sendgrid . Request req = new com . sendgrid . Request ( ) ; req . setMethod ( request . getMethod ( ) ) ; req . setBaseUri ( this . host ) ; req . setEndpoint ( ( ( ( "/" + ( version ) ) + "/" ) + ( request . getEndpoint ( ) ) ) ) ; req . setBody ( request . getBody ( ) ) ; for ( Map . Entry < java . lang . String , java . lang . String > header : this . requestHeaders . entrySet ( ) ) { req . addHeader ( header . getKey ( ) , header . getValue ( ) ) ; } for ( Map . Entry < java . lang . String , java . lang . String > queryParam : request . getQueryParams ( ) . entrySet ( ) ) { req . addQueryParam ( queryParam . getKey ( ) , queryParam . getValue ( ) ) ; } return makeCall ( req ) ; }
org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) )
dummyProcessingTestCorrectNested ( ) { com . itextpdf . styledxmlparser . jsoup . nodes . Element jsoupSVGRoot = new com . itextpdf . styledxmlparser . jsoup . nodes . Element ( com . itextpdf . styledxmlparser . jsoup . parser . Tag . valueOf ( "svg" ) , "" ) ; com . itextpdf . styledxmlparser . jsoup . nodes . Element jsoupSVGCircle = new com . itextpdf . styledxmlparser . jsoup . nodes . Element ( com . itextpdf . styledxmlparser . jsoup . parser . Tag . valueOf ( "circle" ) , "" ) ; com . itextpdf . styledxmlparser . jsoup . nodes . Element jsoupSVGPath = new com . itextpdf . styledxmlparser . jsoup . nodes . Element ( com . itextpdf . styledxmlparser . jsoup . parser . Tag . valueOf ( "path" ) , "" ) ; com . itextpdf . styledxmlparser . node . INode root = new com . itextpdf . styledxmlparser . node . impl . jsoup . node . JsoupElementNode ( jsoupSVGRoot ) ; root . addChild ( new com . itextpdf . styledxmlparser . node . impl . jsoup . node . JsoupElementNode ( jsoupSVGCircle ) ) ; root . addChild ( new com . itextpdf . styledxmlparser . node . impl . jsoup . node . JsoupElementNode ( jsoupSVGPath ) ) ; com . itextpdf . styledxmlparser . node . INode nestedSvg = new com . itextpdf . styledxmlparser . node . impl . jsoup . node . JsoupElementNode ( jsoupSVGRoot ) ; nestedSvg . addChild ( new com . itextpdf . styledxmlparser . node . impl . jsoup . node . JsoupElementNode ( jsoupSVGCircle ) ) ; nestedSvg . addChild ( new com . itextpdf . styledxmlparser . node . impl . jsoup . node . JsoupElementNode ( jsoupSVGCircle ) ) ; root . addChild ( nestedSvg ) ; com . itextpdf . svg . processors . impl . DefaultSvgProcessor processor = new com . itextpdf . svg . processors . impl . DefaultSvgProcessor ( ) ; com . itextpdf . svg . processors . ISvgConverterProperties props = new com . itextpdf . svg . dummy . processors . impl . DummySvgConverterProperties ( ) ; com . itextpdf . svg . renderers . ISvgNodeRenderer rootActual = processor . process ( root , props ) . getRootRenderer ( ) ; com . itextpdf . svg . renderers . IBranchSvgNodeRenderer rootExpected = new com . itextpdf . svg . dummy . renderers . impl . DummyBranchSvgNodeRenderer ( "svg" ) ; rootExpected . addChild ( new com . itextpdf . svg . dummy . renderers . impl . DummySvgNodeRenderer ( "circle" ) ) ; rootExpected . addChild ( new com . itextpdf . svg . dummy . renderers . impl . DummySvgNodeRenderer ( "path" ) ) ; com . itextpdf . svg . renderers . IBranchSvgNodeRenderer nestedSvgRend = new com . itextpdf . svg . dummy . renderers . impl . DummyBranchSvgNodeRenderer ( "svg" ) ; nestedSvgRend . addChild ( new com . itextpdf . svg . dummy . renderers . impl . DummySvgNodeRenderer ( "circle" ) ) ; nestedSvgRend . addChild ( new com . itextpdf . svg . dummy . renderers . impl . DummySvgNodeRenderer ( "circle" ) ) ; rootExpected . addChild ( nestedSvgRend ) ; "<AssertPlaceHolder>" ; } addChild ( com . itextpdf . kernel . xmp . impl . XMPNode ) { assertChildNotExisting ( node . getName ( ) ) ; node . setParent ( this ) ; getChildren ( ) . add ( node ) ; }
org . junit . Assert . assertEquals ( rootActual , rootExpected )
testBuildWithAllParametersWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . benefit . Benefit benefit = new org . lnu . is . domain . benefit . Benefit ( ) ; org . lnu . is . domain . specoffer . SpecOffer specOffer = new org . lnu . is . domain . specoffer . SpecOffer ( ) ; org . lnu . is . domain . specoffer . SpecOfferBenefit context = new org . lnu . is . domain . specoffer . SpecOfferBenefit ( ) ; context . setSpecOffer ( specOffer ) ; context . setBenefit ( benefit ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>SpecOfferBenefit<sp>e<sp>WHERE<sp>(<sp>e.specOffer<sp>=<sp>:specOffer<sp>AND<sp>e.benefit<sp>=<sp>:benefit<sp>)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . specoffer . SpecOfferBenefit > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
testMovieWatched ( ) { com . moviejukebox . model . Movie movie = new com . moviejukebox . model . Movie ( ) ; movie . setMovieType ( Movie . TYPE_MOVIE ) ; movie . setId ( TheMovieDbPlugin . TMDB_PLUGIN_ID , "19995" ) ; com . moviejukebox . model . MovieFile mf = new com . moviejukebox . model . MovieFile ( ) ; mf . setFirstPart ( 1 ) ; mf . setLastPart ( 1 ) ; mf . setFile ( new java . io . File ( "test.mkv" ) ) ; movie . addMovieFile ( mf ) ; com . moviejukebox . scanner . WatchedScanner . checkWatched ( null , movie ) ; "<AssertPlaceHolder>" ; } isWatchedFile ( ) { return watchedFile ; }
org . junit . Assert . assertTrue ( movie . isWatchedFile ( ) )
testFrontendUrlWithSingleUrlIpport ( ) { java . util . Map < java . net . URI , java . net . URI > ipports = new java . util . HashMap ( ) ; ipports . put ( com . vsct . supervision . notification . model . AlarmMapperTest . DEFAULT_GRAPHITE_URL , com . vsct . supervision . notification . model . AlarmMapperTest . DEFAULT_GRAPHITE_IPPORT ) ; when ( graphiteSources . getIpportsByUrl ( ) ) . thenReturn ( ipports ) ; when ( this . graphiteSources . getSources ( ) ) . thenReturn ( java . util . stream . Stream . of ( new com . vsct . supervision . notification . model . GraphiteSources . GraphiteSource ( com . vsct . supervision . notification . model . AlarmMapperTest . DEFAULT_GRAPHITE_URL , com . vsct . supervision . notification . model . AlarmMapperTest . DEFAULT_GRAPHITE_IPPORT ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ) ; com . vsct . supervision . seyren . api . Alarm frontendAlarm = com . vsct . supervision . notification . TestUtils . getDefaultAlarm ( ) ; frontendAlarm . setGraphiteBaseUrl ( com . vsct . supervision . notification . model . AlarmMapperTest . DEFAULT_GRAPHITE_URL ) ; com . vsct . supervision . seyren . api . Alarm backendAlarm = alarmMapper . mapNewAlarmFormToSeyren ( frontendAlarm ) ; "<AssertPlaceHolder>" ; } getGraphiteBaseUrl ( ) { return graphiteBaseUrl ; }
org . junit . Assert . assertEquals ( com . vsct . supervision . notification . model . AlarmMapperTest . DEFAULT_GRAPHITE_IPPORT , backendAlarm . getGraphiteBaseUrl ( ) )
testIsSessionExpiredWithInfiniteSessionTimeout ( ) { org . eclipse . rap . rwt . internal . service . ContextProvider . getUISession ( ) . getHttpSession ( ) . setMaxInactiveInterval ( ( - 1 ) ) ; boolean sessionExpired = org . eclipse . rap . rwt . internal . serverpush . ServerPushManager . isSessionExpired ( 1 , 2 ) ; "<AssertPlaceHolder>" ; } isSessionExpired ( long , long ) { org . eclipse . rap . rwt . service . UISession uiSession = org . eclipse . rap . rwt . internal . service . ContextProvider . getUISession ( ) ; if ( uiSession == null ) { return true ; } javax . servlet . http . HttpSession httpSession = uiSession . getHttpSession ( ) ; int maxInactiveInterval = httpSession . getMaxInactiveInterval ( ) ; if ( maxInactiveInterval > 0 ) { return currentTime > ( requestStartTime + ( maxInactiveInterval * 1000 ) ) ; } return false ; }
org . junit . Assert . assertFalse ( sessionExpired )