input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testLoadProperties ( ) { com . github . marabou . properties . PropertiesLoader propertiesLoader = new com . github . marabou . properties . PropertiesLoader ( new com . github . marabou . helper . PathHelper ( ) ) ; java . lang . String propertiesContent = "foo=bar" ; java . util . Properties properties = propertiesLoader . loadProperties ( new java . io . ByteArrayInputStream ( propertiesContent . getBytes ( ) ) ) ; "<AssertPlaceHolder>" ; } loadProperties ( java . io . InputStream ) { try { java . util . Properties properties = new java . util . Properties ( ) ; properties . load ( userPropertiesStream ) ; return properties ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( ( "Couldn't<sp>load<sp>given<sp>input<sp>stream<sp>" + userPropertiesStream ) ) ; } }
org . junit . Assert . assertEquals ( "bar" , properties . getProperty ( "foo" ) )
testMaxWithFilter ( ) { java . math . BigDecimal max = java . math . BigDecimal . ZERO ; org . apache . hadoop . hbase . client . coprocessor . AggregationClient aClient = new org . apache . hadoop . hbase . client . coprocessor . AggregationClient ( org . apache . hadoop . hbase . coprocessor . TestBigDecimalColumnInterpreter . conf ) ; org . apache . hadoop . hbase . client . Scan scan = new org . apache . hadoop . hbase . client . Scan ( ) ; scan . addColumn ( org . apache . hadoop . hbase . coprocessor . TestBigDecimalColumnInterpreter . TEST_FAMILY , org . apache . hadoop . hbase . coprocessor . TestBigDecimalColumnInterpreter . TEST_QUALIFIER ) ; org . apache . hadoop . hbase . filter . Filter f = new org . apache . hadoop . hbase . filter . PrefixFilter ( org . apache . hadoop . hbase . util . Bytes . toBytes ( "foo:bar" ) ) ; scan . setFilter ( f ) ; final org . apache . hadoop . hbase . coprocessor . ColumnInterpreter < java . math . BigDecimal , java . math . BigDecimal > ci = new org . apache . hadoop . hbase . client . coprocessor . BigDecimalColumnInterpreter ( ) ; max = aClient . max ( org . apache . hadoop . hbase . coprocessor . TestBigDecimalColumnInterpreter . TEST_TABLE , ci , scan ) ; "<AssertPlaceHolder>" ; } max ( byte [ ] , org . apache . hadoop . hbase . coprocessor . ColumnInterpreter , org . apache . hadoop . hbase . client . Scan ) { validateParameters ( scan ) ; class MaxCallBack implements org . apache . hadoop . hbase . client . coprocessor . Batch . Callback < R > { R max = null ; R getMax ( ) { return max ; } @ org . apache . hadoop . hbase . client . coprocessor . Override public synchronized void update ( byte [ ] region , byte [ ] row , R result ) { max = ( ( ( max ) == null ) || ( ( result != null ) && ( ( ci . compare ( max , result ) ) < 0 ) ) ) ? result : max ; } } MaxCallBack aMaxCallBack = new MaxCallBack ( ) ; org . apache . hadoop . hbase . client . HTable table = null ; try { table = new org . apache . hadoop . hbase . client . HTable ( conf , tableName ) ; table . coprocessorExec ( org . apache . hadoop . hbase . coprocessor . AggregateProtocol . class , scan . getStartRow ( ) , scan . getStopRow ( ) , new Batch . Call < org . apache . hadoop . hbase . coprocessor . AggregateProtocol , R > ( ) { @ java . lang . Override public org . apache . hadoop . hbase . client . coprocessor . R call ( org . apache . hadoop . hbase . coprocessor . AggregateProtocol instance ) throws java . io . IOException { return instance . getMax ( ci , scan ) ; } } , aMaxCallBack ) ; } finally { if ( table != null ) { table . close ( ) ; } } return aMaxCallBack . getMax ( ) ; }
org . junit . Assert . assertEquals ( null , max )
shouldTestPurgeProgramAttributeType ( ) { org . openmrs . ProgramAttributeType programAttributeType = pws . getProgramAttributeType ( 1 ) ; int totalAttributeTypes = pws . getAllProgramAttributeTypes ( ) . size ( ) ; pws . purgeProgramAttributeType ( programAttributeType ) ; "<AssertPlaceHolder>" ; } getAllProgramAttributeTypes ( ) { return sessionFactory . getCurrentSession ( ) . createCriteria ( org . openmrs . ProgramAttributeType . class ) . list ( ) ; }
org . junit . Assert . assertEquals ( ( totalAttributeTypes - 1 ) , pws . getAllProgramAttributeTypes ( ) . size ( ) )
shouldAllowCauseOfDifferentClassFromRoot ( ) { java . lang . NullPointerException expectedCause = new java . lang . NullPointerException ( "expected" ) ; java . lang . Exception actual = new java . lang . Exception ( expectedCause ) ; "<AssertPlaceHolder>" ; } hasCause ( org . hamcrest . Matcher ) { return new org . junit . internal . matchers . ThrowableCauseMatcher < T > ( matcher ) ; }
org . junit . Assert . assertThat ( actual , org . junit . internal . matchers . ThrowableCauseMatcher . hasCause ( org . hamcrest . CoreMatchers . is ( expectedCause ) ) )
testLSTMBasicMultiLayer ( ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345L ) ; int timeSeriesLength = 4 ; int nIn = 2 ; int layerSize = 2 ; int nOut = 2 ; int miniBatchSize = 5 ; boolean [ ] gravesLSTM = new boolean [ ] { true , false } ; for ( boolean graves : gravesLSTM ) { org . deeplearning4j . gradientcheck . Layer l0 ; org . deeplearning4j . gradientcheck . Layer l1 ; if ( graves ) { l0 = new org . deeplearning4j . gradientcheck . GravesLSTM . Builder ( ) . nIn ( nIn ) . nOut ( layerSize ) . activation ( Activation . SIGMOID ) . dist ( new org . deeplearning4j . nn . conf . distribution . NormalDistribution ( 0 , 1.0 ) ) . updater ( new org . nd4j . linalg . learning . config . NoOp ( ) ) . build ( ) ; l1 = new org . deeplearning4j . gradientcheck . GravesLSTM . Builder ( ) . nIn ( layerSize ) . nOut ( layerSize ) . activation ( Activation . SIGMOID ) . dist ( new org . deeplearning4j . nn . conf . distribution . NormalDistribution ( 0 , 1.0 ) ) . updater ( new org . nd4j . linalg . learning . config . NoOp ( ) ) . build ( ) ; } else { l0 = new org . deeplearning4j . gradientcheck . LSTM . Builder ( ) . nIn ( nIn ) . nOut ( layerSize ) . activation ( Activation . SIGMOID ) . dist ( new org . deeplearning4j . nn . conf . distribution . NormalDistribution ( 0 , 1.0 ) ) . updater ( new org . nd4j . linalg . learning . config . NoOp ( ) ) . build ( ) ; l1 = new org . deeplearning4j . gradientcheck . LSTM . Builder ( ) . nIn ( layerSize ) . nOut ( layerSize ) . activation ( Activation . SIGMOID ) . dist ( new org . deeplearning4j . nn . conf . distribution . NormalDistribution ( 0 , 1.0 ) ) . updater ( new org . nd4j . linalg . learning . config . NoOp ( ) ) . build ( ) ; } org . deeplearning4j . nn . conf . MultiLayerConfiguration conf = new org . deeplearning4j . nn . conf . NeuralNetConfiguration . Builder ( ) . seed ( 12345L ) . list ( ) . layer ( 0 , l0 ) . layer ( 1 , l1 ) . layer ( 2 , new org . deeplearning4j . gradientcheck . RnnOutputLayer . Builder ( org . nd4j . linalg . lossfunctions . LossFunctions . LossFunction . MCXENT ) . activation ( Activation . SOFTMAX ) . nIn ( layerSize ) . nOut ( nOut ) . dist ( new org . deeplearning4j . nn . conf . distribution . NormalDistribution ( 0 , 1.0 ) ) . updater ( new org . nd4j . linalg . learning . config . NoOp ( ) ) . build ( ) ) . build ( ) ; org . deeplearning4j . nn . multilayer . MultiLayerNetwork mln = new org . deeplearning4j . nn . multilayer . MultiLayerNetwork ( conf ) ; mln . init ( ) ; java . util . Random r = new java . util . Random ( 12345L ) ; org . nd4j . linalg . api . ndarray . INDArray input = org . nd4j . linalg . factory . Nd4j . zeros ( miniBatchSize , nIn , timeSeriesLength ) ; for ( int i = 0 ; i < miniBatchSize ; i ++ ) { for ( int j = 0 ; j < nIn ; j ++ ) { for ( int k = 0 ; k < timeSeriesLength ; k ++ ) { input . putScalar ( new int [ ] { i , j , k } , ( ( r . nextDouble ( ) ) - 0.5 ) ) ; } } } org . nd4j . linalg . api . ndarray . INDArray labels = org . nd4j . linalg . factory . Nd4j . zeros ( miniBatchSize , nOut , timeSeriesLength ) ; for ( int i = 0 ; i < miniBatchSize ; i ++ ) { for ( int j = 0 ; j < timeSeriesLength ; j ++ ) { int idx = r . nextInt ( nOut ) ; labels . putScalar ( new int [ ] { i , idx , j } , 1.0 ) ; } } java . lang . String testName = ( "testLSTMBasic(" + ( graves ? "GravesLSTM" : "LSTM" ) ) + ")" ; if ( org . deeplearning4j . gradientcheck . LSTMGradientCheckTests . PRINT_RESULTS ) { System . out . println ( testName ) ; for ( int j = 0 ; j < ( mln . getnLayers ( ) ) ; j ++ ) System . out . println ( ( ( ( "Layer<sp>" + j ) + "<sp>#<sp>params:<sp>" ) + ( mln . getLayer ( j ) . numParams ( ) ) ) ) ; } boolean gradOK = org . deeplearning4j . gradientcheck . GradientCheckUtil . checkGradients ( mln , org . deeplearning4j . gradientcheck . LSTMGradientCheckTests . DEFAULT_EPS , org . deeplearning4j . gradientcheck . LSTMGradientCheckTests . DEFAULT_MAX_REL_ERROR , org . deeplearning4j . gradientcheck . LSTMGradientCheckTests . DEFAULT_MIN_ABS_ERROR , org . deeplearning4j . gradientcheck . LSTMGradientCheckTests . PRINT_RESULTS , org . deeplearning4j . gradientcheck . LSTMGradientCheckTests . RETURN_ON_FIRST_FAILURE , input , labels ) ; "<AssertPlaceHolder>" ; org . deeplearning4j . TestUtils . testModelSerialization ( mln ) ; } } checkGradients ( org . deeplearning4j . nn . multilayer . MultiLayerNetwork , double , double , double , boolean , boolean , org . nd4j . linalg
org . junit . Assert . assertTrue ( testName , gradOK )
testMarmottaStartup ( ) { org . apache . marmotta . platform . core . test . base . EmbeddedMarmotta marmotta = new org . apache . marmotta . platform . core . test . base . EmbeddedMarmotta ( ) ; org . apache . marmotta . platform . core . api . config . ConfigurationService cs = marmotta . getService ( org . apache . marmotta . platform . core . api . config . ConfigurationService . class ) ; "<AssertPlaceHolder>" ; marmotta . shutdown ( ) ; } getService ( java . lang . Class ) { return container . instance ( ) . select ( serviceClass ) . get ( ) ; }
org . junit . Assert . assertNotNull ( cs )
testBuildItemLabelForRuntimeName ( ) { queryResultItem . setRuntimeName ( org . guvnor . ala . ui . backend . service . RuntimeListItemBuilderTest . RUNTIME_ID ) ; org . guvnor . ala . ui . model . RuntimeListItem result = org . guvnor . ala . ui . backend . service . RuntimeListItemBuilder . newInstance ( ) . withItem ( queryResultItem ) . build ( ) ; "<AssertPlaceHolder>" ; } getItemLabel ( ) { return itemLabel ; }
org . junit . Assert . assertEquals ( org . guvnor . ala . ui . backend . service . RuntimeListItemBuilderTest . RUNTIME_ID , result . getItemLabel ( ) )
testRangeType ( ) { alien4cloud . tosca . parser . ParserTestUtil . mockNormativeTypes ( csarRepositorySearchService ) ; alien4cloud . tosca . parser . ParsingResult < alien4cloud . tosca . model . ArchiveRoot > parsingResult = parser . parseFile ( java . nio . file . Paths . get ( getRootDirectory ( ) , "range_type.yml" ) ) ; java . util . List < alien4cloud . tosca . parser . ParsingError > errors = parsingResult . getContext ( ) . getParsingErrors ( ) ; "<AssertPlaceHolder>" ; } getRootDirectory ( ) { return "src/test/resources/tosca/alien_dsl_2_0_0/" ; }
org . junit . Assert . assertEquals ( 0 , errors . size ( ) )
testAssignedDatatypeRuleCall ( ) { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "Rule:<sp>call=Called;" ) ; _builder . newLine ( ) ; _builder . append ( "Called:<sp>\"foo\";" ) ; _builder . newLine ( ) ; final java . lang . String actual = this . toPda ( _builder ) ; org . eclipse . xtend2 . lib . StringConcatenation _builder_1 = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder_1 . append ( "Rule:" ) ; _builder_1 . newLine ( ) ; _builder_1 . append ( "\t" ) ; _builder_1 . append ( "start<sp>-><sp>call=Called" ) ; _builder_1 . newLine ( ) ; _builder_1 . append ( "\t" ) ; _builder_1 . append ( "call=Called<sp>-><sp>stop" ) ; _builder_1 . newLine ( ) ; final java . lang . String expected = _builder_1 . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return com . google . common . base . Joiner . on ( "\n" ) . join ( getList ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testReportWithPartiallyCleanableInstances ( ) { prepareProcessInstances ( org . camunda . bpm . engine . test . history . CleanableHistoricProcessInstanceReportTest . PROCESS_DEFINITION_KEY , ( - 6 ) , 5 , 5 ) ; prepareProcessInstances ( org . camunda . bpm . engine . test . history . CleanableHistoricProcessInstanceReportTest . PROCESS_DEFINITION_KEY , 0 , 5 , 5 ) ; java . util . List < org . camunda . bpm . engine . history . CleanableHistoricProcessInstanceReportResult > reportResults = historyService . createCleanableHistoricProcessInstanceReport ( ) . list ( ) ; "<AssertPlaceHolder>" ; checkResultNumbers ( reportResults . get ( 0 ) , 5 , 10 ) ; } size ( ) { return ( ( ( historicProcessInstanceIds . size ( ) ) + ( historicDecisionInstanceIds . size ( ) ) ) + ( historicCaseInstanceIds . size ( ) ) ) + ( historicBatchIds . size ( ) ) ; }
org . junit . Assert . assertEquals ( 1 , reportResults . size ( ) )
size_napthalene ( ) { int [ ] [ ] napthalene = org . openscience . cdk . graph . InitialCyclesTest . naphthalene ( ) ; org . openscience . cdk . graph . EssentialCycles essential = new org . openscience . cdk . graph . EssentialCycles ( napthalene ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cells . size ( ) ; }
org . junit . Assert . assertThat ( essential . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) )
remove_2arg_Existing_EqualKey_EqualValue ( ) { java . lang . Long key = java . lang . System . currentTimeMillis ( ) ; java . lang . String value = "value" + key ; cache . put ( key , value ) ; "<AssertPlaceHolder>" ; } remove ( K , V ) { return new Semantic . UpdateExisting < K , V , java . lang . Boolean > ( ) { @ java . lang . Override public void update ( Progress < org . cache2k . core . operation . K , org . cache2k . core . operation . V , java . lang . Boolean > c , ExaminationEntry < org . cache2k . core . operation . K , org . cache2k . core . operation . V > e ) { if ( ( c . isPresentOrMiss ( ) ) && ( ( ( value == null ) && ( ( e . getValueOrException ( ) ) == null ) ) || ( value . equals ( e . getValueOrException ( ) ) ) ) ) { c . result ( true ) ; c . remove ( ) ; return ; } c . result ( false ) ; } } ; }
org . junit . Assert . assertTrue ( cache . remove ( new java . lang . Long ( key ) , new java . lang . String ( value ) ) )
testGetSubreportCount ( ) { org . pentaho . reporting . engine . classic . core . DetailsFooter footer = new org . pentaho . reporting . engine . classic . core . DetailsFooter ( ) ; "<AssertPlaceHolder>" ; } getSubReportCount ( ) { return 0 ; }
org . junit . Assert . assertThat ( footer . getSubReportCount ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 0 ) ) )
shouldCreateSuspendedExecutionJobs ( ) { org . camunda . bpm . engine . batch . Batch batch = helper . migrateProcessInstancesAsync ( 1 ) ; managementService . suspendBatchById ( batch . getId ( ) ) ; helper . executeSeedJob ( batch ) ; org . camunda . bpm . engine . runtime . Job migrationJob = helper . getExecutionJobs ( batch ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } isSuspended ( ) { return ( state ) == ( org . camunda . bpm . engine . impl . history . event . SUSPENDED . getStateCode ( ) ) ; }
org . junit . Assert . assertTrue ( migrationJob . isSuspended ( ) )
testMultipleConstraintsTokenizer ( ) { org . apache . hadoop . yarn . util . constraint . PlacementConstraintParser . MultipleConstraintsTokenizer ct ; org . apache . hadoop . yarn . util . constraint . PlacementConstraintParser . SourceTagsTokenizer st ; org . apache . hadoop . yarn . api . resource . TestPlacementConstraintParser . TokenizerTester mp ; ct = new org . apache . hadoop . yarn . util . constraint . PlacementConstraintParser . MultipleConstraintsTokenizer ( "A:AND(B:C):D" 5 ) ; mp = new org . apache . hadoop . yarn . api . resource . TestPlacementConstraintParser . TokenizerTester ( ct , "A:AND(B:C):D" 9 , "Value<sp>of<sp>the<sp>expression<sp>must<sp>be<sp>an<sp>integer" 0 , "moo(3),C1,C2" ) ; mp . verify ( ) ; ct = new org . apache . hadoop . yarn . util . constraint . PlacementConstraintParser . MultipleConstraintsTokenizer ( "foo(1),AND(A2:A3):bar(2),OR(B1:AND(B2:B3)):moo(3),C1,C2" ) ; mp = new org . apache . hadoop . yarn . api . resource . TestPlacementConstraintParser . TokenizerTester ( ct , "foo(1),AND(A2:A3)" , "bar(2),OR(B1:AND(B2:B3))" , "moo(3),C1,C2" ) ; mp . verify ( ) ; ct = new org . apache . hadoop . yarn . util . constraint . PlacementConstraintParser . MultipleConstraintsTokenizer ( "A:B:C" ) ; mp = new org . apache . hadoop . yarn . api . resource . TestPlacementConstraintParser . TokenizerTester ( ct , "A" , "B" , "Value<sp>of<sp>the<sp>expression<sp>must<sp>be<sp>an<sp>integer" 1 ) ; mp . verify ( ) ; ct = new org . apache . hadoop . yarn . util . constraint . PlacementConstraintParser . MultipleConstraintsTokenizer ( "A:AND(B:C):D" ) ; mp = new org . apache . hadoop . yarn . api . resource . TestPlacementConstraintParser . TokenizerTester ( ct , "A" , "A:AND(B:C):D" 2 , "A:AND(B:C):D" 1 ) ; mp . verify ( ) ; ct = new org . apache . hadoop . yarn . util . constraint . PlacementConstraintParser . MultipleConstraintsTokenizer ( "A:AND(B:C):D" 3 ) ; mp = new org . apache . hadoop . yarn . api . resource . TestPlacementConstraintParser . TokenizerTester ( ct , "A" , "A:AND(B:C):D" 8 , "E" ) ; mp . verify ( ) ; ct = new org . apache . hadoop . yarn . util . constraint . PlacementConstraintParser . MultipleConstraintsTokenizer ( "A:AND(B:C):D" 3 ) ; mp = new org . apache . hadoop . yarn . api . resource . TestPlacementConstraintParser . TokenizerTester ( ct , "A" , "A:AND(B:C):D" 8 , "E" ) ; mp . verify ( ) ; st = new org . apache . hadoop . yarn . util . constraint . PlacementConstraintParser . SourceTagsTokenizer ( "A:AND(B:C):D" 6 ) ; mp = new org . apache . hadoop . yarn . api . resource . TestPlacementConstraintParser . TokenizerTester ( st , "A" , "A:AND(B:C):D" 7 ) ; mp . verify ( ) ; try { st = new org . apache . hadoop . yarn . util . constraint . PlacementConstraintParser . SourceTagsTokenizer ( "A:AND(B:C):D" 0 ) ; mp = new org . apache . hadoop . yarn . api . resource . TestPlacementConstraintParser . TokenizerTester ( st , "A" , "B" ) ; mp . verify ( ) ; org . junit . Assert . fail ( "A:AND(B:C):D" 4 ) ; } catch ( org . apache . hadoop . yarn . util . constraint . PlacementConstraintParseException e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( "Value<sp>of<sp>the<sp>expression<sp>must<sp>be<sp>an<sp>integer" ) )
testSubscribeAll ( ) { com . alibaba . otter . canal . meta . PeriodMixedMetaManager metaManager = new com . alibaba . otter . canal . meta . PeriodMixedMetaManager ( ) ; com . alibaba . otter . canal . meta . ZooKeeperMetaManager zooKeeperMetaManager = new com . alibaba . otter . canal . meta . ZooKeeperMetaManager ( ) ; zooKeeperMetaManager . setZkClientx ( zkclientx ) ; metaManager . setZooKeeperMetaManager ( zooKeeperMetaManager ) ; metaManager . start ( ) ; doSubscribeTest ( metaManager ) ; sleep ( 1000L ) ; com . alibaba . otter . canal . meta . PeriodMixedMetaManager metaManager2 = new com . alibaba . otter . canal . meta . PeriodMixedMetaManager ( ) ; metaManager2 . setZooKeeperMetaManager ( zooKeeperMetaManager ) ; metaManager2 . start ( ) ; java . util . List < com . alibaba . otter . canal . protocol . ClientIdentity > clients = metaManager2 . listAllSubscribeInfo ( destination ) ; "<AssertPlaceHolder>" ; metaManager . stop ( ) ; } size ( ) { return this . propertySourceList . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , clients . size ( ) )
testInvalidate ( ) { cache . put ( com . wadpam . guja . cache . MemCacheTest . KEY , com . wadpam . guja . cache . MemCacheTest . VALUE ) ; cache . invalidate ( com . wadpam . guja . cache . MemCacheTest . KEY ) ; "<AssertPlaceHolder>" ; } getIfPresent ( java . lang . Object ) { V returnValue = ( ( V ) ( syncCache . get ( key ) ) ) ; return returnValue ; }
org . junit . Assert . assertTrue ( ( null == ( cache . getIfPresent ( com . wadpam . guja . cache . MemCacheTest . KEY ) ) ) )
testClone ( ) { org . eclipse . collections . api . bimap . MutableBiMap < java . lang . Object , java . lang . Object > biMap = this . newMap ( ) ; org . eclipse . collections . api . bimap . MutableBiMap < java . lang . Object , java . lang . Object > clone = biMap . clone ( ) ; "<AssertPlaceHolder>" ; } clone ( ) { synchronized ( this . getLock ( ) ) { return org . eclipse . collections . impl . bag . sorted . mutable . SynchronizedSortedBag . of ( this . getDelegate ( ) . clone ( ) ) ; } }
org . junit . Assert . assertSame ( biMap , clone )
shouldExecuteAllTestsIfNoExcludedCategories ( ) { runner . setTestConfigurationSource ( withExcludedGroups ( org . infinitest . testrunner . JUnit4RunnerTest . EMPTY ) ) ; org . infinitest . testrunner . TestResults results = runner . runTest ( org . infinitest . testrunner . exampletests . junit4 . Junit4FailingTestsWithCategories . class . getName ( ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return module . getName ( ) ; }
org . junit . Assert . assertThat ( size ( results ) , org . hamcrest . CoreMatchers . is ( 3 ) )
testFormatLessThan1Percent ( ) { hudson . plugins . view . dashboard . test . TestStatisticsPortlet instance = new hudson . plugins . view . dashboard . test . TestStatisticsPortlet ( "test" , false , null , null , null , false ) ; java . text . DecimalFormat df = new java . text . DecimalFormat ( "0%" ) ; double val = 0.003 ; java . lang . String expResult = ">0%" ; java . lang . String result = instance . format ( df , val ) ; "<AssertPlaceHolder>" ; } format ( java . text . DecimalFormat , double ) { if ( ( val < 1.0 ) && ( val > 0.99 ) ) { return useAlternatePercentagesOnLimits ? ">99%" : "<100%" ; } if ( ( val > 0.0 ) && ( val < 0.01 ) ) { return useAlternatePercentagesOnLimits ? "<1%" : ">0%" ; } return df . format ( val ) ; }
org . junit . Assert . assertEquals ( expResult , result )
testTruncDecimalValue2 ( ) { java . lang . String sqlText = "values<sp>truncate(12345.6789,<sp>2)" ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . TruncateFunctionIT . spliceClassWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "1<sp>|\n" + ( "------------\n" + "12345.6700<sp>|" ) ; "<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 ) )
testSignatureX509 ( ) { org . w3c . dom . Document doc = org . apache . wss4j . dom . common . SOAPUtil . toSOAPPart ( SOAPUtil . SAMPLE_SOAP_MSG ) ; org . apache . wss4j . dom . message . WSSecHeader secHeader = new org . apache . wss4j . dom . message . WSSecHeader ( doc ) ; secHeader . insertSecurityHeader ( ) ; org . apache . wss4j . dom . message . WSSecSignature sign = new org . apache . wss4j . dom . message . WSSecSignature ( secHeader ) ; sign . setUserInfo ( "wss40" , "security" ) ; sign . setKeyIdentifierType ( WSConstants . X509_KEY_IDENTIFIER ) ; org . w3c . dom . Document signedDoc = sign . build ( senderCrypto ) ; if ( org . apache . wss4j . dom . components . crypto . CertificateStoreTest . LOG . isDebugEnabled ( ) ) { java . lang . String outputString = org . apache . wss4j . common . util . XMLUtils . prettyDocumentToString ( signedDoc ) ; org . apache . wss4j . dom . components . crypto . CertificateStoreTest . LOG . debug ( outputString ) ; } org . apache . wss4j . dom . engine . WSSecurityEngine newEngine = new org . apache . wss4j . dom . engine . WSSecurityEngine ( ) ; org . apache . wss4j . dom . handler . RequestData data = new org . apache . wss4j . dom . handler . RequestData ( ) ; data . setCallbackHandler ( keystoreCallbackHandler ) ; data . setSigVerCrypto ( receiverCrypto ) ; data . setIgnoredBSPRules ( java . util . Collections . singletonList ( BSPRule . R3063 ) ) ; org . apache . wss4j . dom . handler . WSHandlerResult results = newEngine . processSecurityHeader ( signedDoc , data ) ; java . util . List < org . apache . wss4j . dom . engine . WSSecurityEngineResult > signatureResults = results . getActionResults ( ) . get ( WSConstants . SIGN ) ; org . apache . wss4j . dom . engine . WSSecurityEngineResult result = signatureResults . get ( 0 ) ; java . security . cert . X509Certificate cert = ( ( java . security . cert . X509Certificate ) ( result . get ( WSSecurityEngineResult . TAG_X509_CERTIFICATE ) ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { java . security . Provider p = getProvider ( ) ; if ( p != null ) { return p . get ( key ) ; } else { return null ; } }
org . junit . Assert . assertNotNull ( cert )
findFieldName ( ) { java . lang . String inFileName = ( com . itextpdf . forms . xfa . XFAFormTest . sourceFolder ) + "TextField1.pdf" ; com . itextpdf . kernel . pdf . PdfDocument pdfDocument = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfReader ( inFileName ) ) ; com . itextpdf . forms . PdfAcroForm acroForm = com . itextpdf . forms . PdfAcroForm . getAcroForm ( pdfDocument , true ) ; com . itextpdf . forms . xfa . XfaForm xfaForm = acroForm . getXfaForm ( ) ; xfaForm . findFieldName ( "TextField1" ) ; java . lang . String secondRun = xfaForm . findFieldName ( "TextField1" ) ; "<AssertPlaceHolder>" ; } findFieldName ( java . lang . String ) { if ( ( ( ( acroFieldsSom ) == null ) && ( xfaPresent ) ) && ( ( datasetsSom ) != null ) ) { acroFieldsSom = new com . itextpdf . forms . xfa . AcroFieldsSearch ( datasetsSom . getName2Node ( ) . keySet ( ) ) ; } if ( ( ( acroFieldsSom ) != null ) && ( xfaPresent ) ) { return acroFieldsSom . getAcroShort2LongName ( ) . containsKey ( name ) ? acroFieldsSom . getAcroShort2LongName ( ) . get ( name ) : acroFieldsSom . inverseSearchGlobal ( com . itextpdf . forms . xfa . Xml2Som . splitParts ( name ) ) ; } return null ; }
org . junit . Assert . assertNotNull ( secondRun )
checkConnectionWithDefaultPort ( ) { redis . clients . jedis . ShardedJedisPool pool = new redis . clients . jedis . ShardedJedisPool ( new org . apache . commons . pool2 . impl . GenericObjectPoolConfig ( ) , shards ) ; redis . clients . jedis . ShardedJedis jedis = pool . getResource ( ) ; jedis . set ( "foo" , "bar" ) ; "<AssertPlaceHolder>" ; jedis . close ( ) ; pool . destroy ( ) ; } get ( byte [ ] ) { redis . clients . jedis . Protocol . sendCommand ( Command . GET , key ) ; }
org . junit . Assert . assertEquals ( "bar" , jedis . get ( "foo" ) )
loadReturnsNullWhenPatientDoesNotHaveGeneClass ( ) { doReturn ( null ) . when ( this . doc ) . getXObjects ( any ( org . xwiki . model . reference . EntityReference . class ) ) ; org . phenotips . data . PatientData < org . phenotips . data . Gene > result = this . component . load ( this . patient ) ; "<AssertPlaceHolder>" ; } load ( org . xwiki . bridge . DocumentModelBridge ) { try { return getEntityConstructor ( ) . newInstance ( document ) ; } catch ( java . lang . IllegalArgumentException | java . lang . reflect . InvocationTargetException ex ) { this . logger . info ( "Tried<sp>to<sp>load<sp>invalid<sp>entity<sp>of<sp>type<sp>[{}]<sp>from<sp>document<sp>[{}]" , getEntityXClassReference ( ) , ( document == null ? null : document . getDocumentReference ( ) ) ) ; } catch ( java . lang . InstantiationException | java . lang . IllegalAccessException ex ) { this . logger . error ( "Failed<sp>to<sp>instantiate<sp>primary<sp>entity<sp>of<sp>type<sp>[{}]<sp>from<sp>document<sp>[{}]:<sp>{}" , getEntityXClassReference ( ) , ( document == null ? null : document . getDocumentReference ( ) ) , ex . getMessage ( ) ) ; } return null ; }
org . junit . Assert . assertNull ( result )
testSerialization ( ) { org . jfree . data . xy . DefaultTableXYDataset d1 = new org . jfree . data . xy . DefaultTableXYDataset ( ) ; d1 . addSeries ( createSeries2 ( ) ) ; org . jfree . data . xy . DefaultTableXYDataset d2 = ( ( org . jfree . data . xy . DefaultTableXYDataset ) ( org . jfree . chart . TestUtilities . serialised ( d1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( d1 , d2 )
testGenericPushNull ( ) { com . eclipsesource . v8 . V8Array array = new com . eclipsesource . v8 . V8Array ( v8 ) ; array . push ( ( ( java . lang . Object ) ( null ) ) ) ; "<AssertPlaceHolder>" ; array . close ( ) ; } get ( byte [ ] ) { v8 . checkThread ( ) ; checkReleased ( ) ; byteBuffer . get ( dst ) ; return this ; }
org . junit . Assert . assertNull ( array . get ( 0 ) )
put_request_attribute ( ) { com . amazon . ask . attributes . AttributesManager attributesManager = com . amazon . ask . attributes . AttributesManager . builder ( ) . withRequestEnvelope ( com . amazon . ask . model . RequestEnvelope . builder ( ) . withRequest ( com . amazon . ask . model . IntentRequest . builder ( ) . build ( ) ) . build ( ) ) . build ( ) ; java . util . Map < java . lang . String , java . lang . Object > requestAttributes = attributesManager . getRequestAttributes ( ) ; requestAttributes . put ( "foo" , "bar" ) ; "<AssertPlaceHolder>" ; } getRequestAttributes ( ) { return requestAttributes ; }
org . junit . Assert . assertEquals ( attributesManager . getRequestAttributes ( ) . get ( "foo" ) , "bar" )
testNoNullElementsCollection ( ) { com . twelvemonkeys . lang . List < java . lang . String > collection = com . twelvemonkeys . lang . Arrays . asList ( "foo" , "bar" , "baz" ) ; "<AssertPlaceHolder>" ; } noNullElements ( T [ ] ) { return com . twelvemonkeys . lang . Validate . noNullElements ( pParameter , null ) ; }
org . junit . Assert . assertSame ( collection , com . twelvemonkeys . lang . Validate . noNullElements ( collection ) )
testBuilderResuming ( ) { page = new com . googlecode . jatl . Html ( page , false ) { { end ( ) ; end ( ) ; } } ; java . lang . String result = writer . getBuffer ( ) . toString ( ) ; java . lang . String expected = "\n" + ( ( ( ( ( ( ( "<html>\n" + "\t<head>\n" ) + "\t</head>\n" ) + "\t<body>\n" ) + "\t\t<h1>Hello<sp>World\n" ) + "\t\t</h1>\n" ) + "\t</body>\n" ) + "</html>" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return write ( new java . io . StringWriter ( ) ) . getBuffer ( ) . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , result )
testEmptyGlobalStateCliUtil ( ) { final org . opendaylight . yang . gen . v1 . http . openconfig . net . yang . bgp . rev151009 . bgp . top . bgp . GlobalBuilder builder = org . opendaylight . protocol . bgp . cli . utils . GlobalStateCliUtilsTest . buildGlobal ( false ) ; org . opendaylight . protocol . bgp . cli . utils . GlobalStateCliUtils . displayRibOperationalState ( org . opendaylight . protocol . bgp . cli . utils . BGPOperationalStateUtilsTest . RIB_ID , builder . build ( ) , this . stream ) ; final java . lang . String expected = org . apache . commons . io . IOUtils . toString ( getClass ( ) . getClassLoader ( ) . getResourceAsStream ( "empty-global.txt" ) , org . opendaylight . protocol . bgp . cli . utils . PeerGroupStateCliUtilsTest . UTF8 ) ; "<AssertPlaceHolder>" ; } toString ( ) { return peerId . getValue ( ) . substring ( org . opendaylight . protocol . bgp . rib . spi . RouterId . PEER_ID_PREFIX_LENGTH ) ; }
org . junit . Assert . assertEquals ( expected , this . output . toString ( ) )
testResolveLoginAliasToUserName ( ) { reset ( servletRequestAttributes ) ; org . springframework . web . context . request . RequestContextHolder . setRequestAttributes ( servletRequestAttributes ) ; expect ( servletRequestAttributes . getAttribute ( eq ( "loginAlias1" ) , eq ( RequestAttributes . SCOPE_SESSION ) ) ) . andReturn ( "user1" ) . atLeastOnce ( ) ; replay ( servletRequestAttributes ) ; java . lang . String user = org . apache . ambari . server . security . authorization . AuthorizationHelper . resolveLoginAliasToUserName ( "loginAlias1" ) ; verify ( servletRequestAttributes ) ; "<AssertPlaceHolder>" ; } verify ( java . nio . file . Path ) { java . util . zip . ZipFile zipFile = null ; try { java . io . File file = resolvedPath . toAbsolutePath ( ) . toFile ( ) ; checkArgument ( ( ! ( file . isDirectory ( ) ) ) ) ; checkArgument ( ( ( file . length ( ) ) > 0 ) ) ; zipFile = new java . util . zip . ZipFile ( file ) ; } catch ( java . lang . Exception e ) { org . apache . ambari . server . view . ViewDirectoryWatcher . LOG . info ( "Verification<sp>failed<sp>" , e ) ; return false ; } finally { org . apache . ambari . server . utils . Closeables . closeSilently ( zipFile ) ; } return true ; }
org . junit . Assert . assertEquals ( "user1" , user )
memberOfNested ( ) { indexRevision ( com . b2international . snowowl . snomed . core . ecl . MAIN , concept ( Concepts . SYNONYM ) . parents ( java . lang . Long . parseLong ( Concepts . REFSET_DESCRIPTION_TYPE ) ) . statedParents ( java . lang . Long . parseLong ( Concepts . REFSET_DESCRIPTION_TYPE ) ) . ancestors ( com . b2international . collections . PrimitiveSets . newLongOpenHashSet ( IComponent . ROOT_IDL ) ) . statedAncestors ( com . b2international . collections . PrimitiveSets . newLongOpenHashSet ( IComponent . ROOT_IDL ) ) . build ( ) ) ; final com . b2international . index . query . Expression actual = eval ( ( ( "^(<" + ( com . b2international . snowowl . snomed . common . SnomedConstants . Concepts . REFSET_DESCRIPTION_TYPE ) ) + ")" ) ) ; final com . b2international . index . query . Expression expected = activeMemberOf ( java . util . Collections . singleton ( Concepts . SYNONYM ) ) ; "<AssertPlaceHolder>" ; } activeMemberOf ( java . lang . String ) { return exactMatch ( com . b2international . snowowl . snomed . datastore . index . entry . SnomedComponentDocument . Fields . ACTIVE_MEMBER_OF , referenceSetId ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testAdjustMandatoryCuboidStats ( ) { java . util . Map < java . lang . Long , java . lang . Long > statistics = com . google . common . collect . Maps . newHashMap ( ) ; statistics . put ( 60160L , 1212L ) ; java . util . Map < java . lang . Long , java . lang . Long > cuboidsWithStats = com . google . common . collect . Maps . newHashMap ( ) ; cuboidsWithStats . put ( 65280L , 1423L ) ; cuboidsWithStats . put ( 63232L , 2584421L ) ; cuboidsWithStats . put ( 61184L , 132L ) ; cuboidsWithStats . put ( 57088L , 499L ) ; cuboidsWithStats . put ( 55040L , 708L ) ; cuboidsWithStats . put ( 38656L , 36507L ) ; java . util . Map < java . lang . Long , java . lang . Double > cuboidHitProbabilityMap = com . google . common . collect . Maps . newHashMap ( ) ; cuboidHitProbabilityMap . put ( 65280L , 0.2 ) ; cuboidHitProbabilityMap . put ( 63232L , 0.16 ) ; cuboidHitProbabilityMap . put ( 61184L , 0.16 ) ; cuboidHitProbabilityMap . put ( 57088L , 0.16 ) ; cuboidHitProbabilityMap . put ( 55040L , 0.16 ) ; cuboidHitProbabilityMap . put ( 38656L , 0.16 ) ; java . util . Map < java . lang . Long , java . lang . Long > cuboidsWithStatsExpected = com . google . common . collect . Maps . newHashMap ( cuboidsWithStats ) ; cuboidsWithStatsExpected . put ( 65280L , 2584421L ) ; cuboidsWithStatsExpected . put ( 57088L , 36507L ) ; cuboidsWithStatsExpected . put ( 55040L , 36507L ) ; cuboidsWithStatsExpected . put ( 61184L , 1212L ) ; org . apache . kylin . cube . cuboid . algorithm . CuboidStatsUtil . adjustCuboidStats ( cuboidsWithStats , statistics ) ; "<AssertPlaceHolder>" ; } adjustCuboidStats ( java . util . Map , java . util . Map ) { java . util . List < java . lang . Long > mandatoryCuboids = com . google . common . collect . Lists . newArrayList ( mandatoryCuboidsWithStats . keySet ( ) ) ; java . util . Collections . sort ( mandatoryCuboids ) ; java . util . List < java . lang . Long > selectedCuboids = com . google . common . collect . Lists . newArrayList ( statistics . keySet ( ) ) ; java . util . Collections . sort ( selectedCuboids ) ; for ( int i = 0 ; i < ( mandatoryCuboids . size ( ) ) ; i ++ ) { java . lang . Long mCuboid = mandatoryCuboids . get ( i ) ; if ( ( statistics . get ( mCuboid ) ) != null ) { mandatoryCuboidsWithStats . put ( mCuboid , statistics . get ( mCuboid ) ) ; continue ; } int k = 0 ; for ( ; k < ( selectedCuboids . size ( ) ) ; k ++ ) { java . lang . Long sCuboid = selectedCuboids . get ( k ) ; if ( sCuboid > mCuboid ) { break ; } if ( org . apache . kylin . cube . cuboid . algorithm . CuboidStatsUtil . isDescendant ( sCuboid , mCuboid ) ) { java . lang . Long childRowCount = statistics . get ( sCuboid ) ; if ( childRowCount > ( mandatoryCuboidsWithStats . get ( mCuboid ) ) ) { mandatoryCuboidsWithStats . put ( mCuboid , childRowCount ) ; } } } for ( int j = 0 ; j < i ; j ++ ) { java . lang . Long cCuboid = mandatoryCuboids . get ( j ) ; if ( org . apache . kylin . cube . cuboid . algorithm . CuboidStatsUtil . isDescendant ( cCuboid , mCuboid ) ) { java . lang . Long childRowCount = mandatoryCuboidsWithStats . get ( cCuboid ) ; if ( childRowCount > ( mandatoryCuboidsWithStats . get ( mCuboid ) ) ) { mandatoryCuboidsWithStats . put ( mCuboid , childRowCount ) ; } } } for ( ; k < ( selectedCuboids . size ( ) ) ; k ++ ) { java . lang . Long sCuboid = selectedCuboids . get ( k ) ; if ( org . apache . kylin . cube . cuboid . algorithm . CuboidStatsUtil . isDescendant ( mCuboid , sCuboid ) ) { java . lang . Long parentRowCount = statistics . get ( sCuboid ) ; if ( parentRowCount < ( mandatoryCuboidsWithStats . get ( mCuboid ) ) ) { mandatoryCuboidsWithStats . put ( mCuboid , parentRowCount ) ; } } } } }
org . junit . Assert . assertEquals ( cuboidsWithStatsExpected , cuboidsWithStats )
testMoreIm2Col2 ( ) { int kh = 2 ; int kw = 2 ; int ph = 0 ; int pw = 0 ; int sy = 2 ; int sx = 2 ; org . nd4j . linalg . api . ndarray . INDArray ret = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 } , new int [ ] { 1 , 1 , 8 , 8 } ) ; org . nd4j . linalg . api . ndarray . INDArray assertion = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 1 , 1 , 1 , 3 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 3 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 3 , 3 , 3 , 3 , 1 , 1 , 1 , 1 , 3 , 3 , 3 , 3 , 2 , 2 , 2 , 2 , 4 , 4 , 4 , 4 , 2 , 2 , 2 , 2 , 4 , 4 , 4 , 4 , 2 , 2 , 2 , 2 , 4 , 4 , 4 , 4 , 2 , 2 , 2 , 2 , 4 , 4 , 4 , 4 } , new int [ ] { 1 , 1 , 2 , 2 , 4 , 4 } ) ; org . nd4j . linalg . api . ndarray . INDArray im2colTest = org . nd4j . linalg . convolution . Convolution . im2col ( ret , kh , kw , sy , sx , ph , pw , 0 , false ) ; "<AssertPlaceHolder>" ; } im2col ( org . nd4j . linalg . api . ndarray . INDArray , int , int , int , int , int , int , boolean , org . nd4j . linalg . api . ndarray . INDArray ) { org . nd4j . linalg . api . ops . impl . layers . convolution . Im2col im2col = org . nd4j . linalg . api . ops . impl . layers . convolution . Im2col . builder ( ) . outputs ( new org . nd4j . linalg . api . ndarray . INDArray [ ] { out } ) . inputArrays ( new org . nd4j . linalg . api . ndarray . INDArray [ ] { img } ) . conv2DConfig ( org . nd4j . linalg . api . ops . impl . layers . convolution . config . Conv2DConfig . builder ( ) . kh ( kh ) . pw ( pw ) . ph ( ph ) . sy ( sy ) . sx ( sx ) . kw ( kw ) . kh ( kh ) . dw ( 1 ) . dh ( 1 ) . isSameMode ( isSameMode ) . build ( ) ) . build ( ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( im2col ) ; return im2col . outputArguments ( ) [ 0 ] ; }
org . junit . Assert . assertEquals ( assertion , im2colTest )
shouldNotMapEmptyString ( ) { destination . username = "name" ; mapper . map ( source , destination ) ; "<AssertPlaceHolder>" ; } map ( java . lang . Object , java . lang . Class ) { return map ( srcObj , destClass , null ) ; }
org . junit . Assert . assertThat ( destination . username , org . hamcrest . CoreMatchers . equalTo ( "name" ) )
shouldUseCfgValue_always ( ) { final org . camunda . bpm . engine . impl . db . ListQueryParameterObject query = new org . camunda . bpm . engine . impl . db . ListQueryParameterObject ( ) ; final org . camunda . bpm . engine . impl . db . AuthorizationCheck authCheck = query . getAuthCheck ( ) ; when ( mockedConfiguration . getAuthorizationCheckRevokes ( ) ) . thenReturn ( ProcessEngineConfiguration . AUTHORIZATION_CHECK_REVOKE_ALWAYS ) ; authorizationManager . configureQuery ( query ) ; "<AssertPlaceHolder>" ; verifyNoMoreInteractions ( mockedEntityManager ) ; } isRevokeAuthorizationCheckEnabled ( ) { return isRevokeAuthorizationCheckEnabled ; }
org . junit . Assert . assertEquals ( true , authCheck . isRevokeAuthorizationCheckEnabled ( ) )
emptyTest ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
testFirstPositionIsAtStart ( ) { int start = new java . util . Random ( ) . nextInt ( 1000 ) ; long firstPosition = ( new java . util . Random ( ) . nextInt ( 1000000 ) ) + 1 ; "<AssertPlaceHolder>" ; } positionMap ( int , java . lang . Long [ ] ) { return com . hartwig . hmftools . svvisualise . circos . ScalePosition . positionMap ( start , com . google . common . collect . Lists . newArrayList ( positionArray ) ) ; }
org . junit . Assert . assertEquals ( start , ( ( int ) ( com . hartwig . hmftools . svvisualise . circos . ScalePosition . positionMap ( start , firstPosition ) . get ( firstPosition ) ) ) )
writeJSONPatientWithNoData ( ) { org . json . JSONObject json = new org . json . JSONObject ( ) ; this . parentalAgeController . writeJSON ( this . patient , json , null ) ; "<AssertPlaceHolder>" ; } writeJSON ( org . phenotips . data . Patient , org . json . JSONObject , java . util . Collection ) { if ( ( selectedFieldNames == null ) || ( selectedFieldNames . contains ( org . phenotips . data . internal . controller . SpecificityController . NAME ) ) ) { org . phenotips . data . PatientData < java . lang . Object > specificity = patient . getData ( org . phenotips . data . internal . controller . SpecificityController . NAME ) ; if ( ( specificity != null ) && ( specificity . isNamed ( ) ) ) { org . json . JSONObject result = json . optJSONObject ( org . phenotips . data . internal . controller . SpecificityController . NAME ) ; if ( result == null ) { result = new org . json . JSONObject ( ) ; } java . util . Iterator < java . util . Map . Entry < java . lang . String , java . lang . Object > > data = specificity . dictionaryIterator ( ) ; while ( data . hasNext ( ) ) { java . util . Map . Entry < java . lang . String , java . lang . Object > datum = data . next ( ) ; result . put ( datum . getKey ( ) , datum . getValue ( ) ) ; } json . put ( org . phenotips . data . internal . controller . SpecificityController . NAME , result ) ; } } }
org . junit . Assert . assertEquals ( 0 , json . length ( ) )
testSetOutboundPassthruMode ( ) { gov . hhs . fha . nhinc . configuration . jmx . PassthruMXBeanRegistry registry = gov . hhs . fha . nhinc . configuration . jmx . PassthruMXBeanRegistry . getInstance ( ) ; gov . hhs . fha . nhinc . configuration . IConfiguration . serviceEnum serviceName = gov . hhs . fha . nhinc . configuration . IConfiguration . serviceEnum . DocumentSubmission ; gov . hhs . fha . nhinc . configuration . IConfiguration . directionEnum direction = gov . hhs . fha . nhinc . configuration . IConfiguration . directionEnum . Outbound ; boolean status = true ; gov . hhs . fha . nhinc . docsubmission . configuration . jmx . DocumentSubmission11WebServices docSubmission11 = mock ( gov . hhs . fha . nhinc . docsubmission . configuration . jmx . DocumentSubmission11WebServices . class ) ; when ( docSubmission11 . getServiceName ( ) ) . thenReturn ( serviceEnum . DocumentSubmission ) ; when ( docSubmission11 . isOutboundPassthru ( ) ) . thenReturn ( status ) ; registry . registerWebServiceMXBean ( docSubmission11 ) ; boolean passthru = registry . isPassthru ( serviceName , direction ) ; "<AssertPlaceHolder>" ; } isPassthru ( gov . hhs . fha . nhinc . configuration . IConfiguration . serviceEnum , gov . hhs . fha . nhinc . configuration . IConfiguration . directionEnum ) { boolean passthruMode = false ; for ( gov . hhs . fha . nhinc . configuration . jmx . WebServicesMXBean b : registeredBeans ) { if ( ( ( gov . hhs . fha . nhinc . configuration . jmx . PassthruMXBeanRegistry . isInbound ( direction ) ) && ( b . getServiceName ( ) . equals ( serviceName ) ) ) && ( b . isInboundPassthru ( ) ) ) { passthruMode = true ; } if ( ( ( gov . hhs . fha . nhinc . configuration . jmx . PassthruMXBeanRegistry . isOutbound ( direction ) ) && ( b . getServiceName ( ) . equals ( serviceName ) ) ) && ( b . isOutboundPassthru ( ) ) ) { passthruMode = true ; } } return passthruMode ; }
org . junit . Assert . assertEquals ( true , passthru )
doByteArrayExpression ( ) { javax . el . ExpressionFactory factory = org . kaazing . k3po . lang . internal . el . ExpressionFactoryUtils . newExpressionFactory ( ) ; de . odysseus . el . util . SimpleContext evalContext = new de . odysseus . el . util . SimpleContext ( ) ; javax . el . ValueExpression byteExpr = factory . createValueExpression ( new de . odysseus . el . util . SimpleContext ( ) , "${bytes}" , byte [ ] . class ) ; byte [ ] expected = new byte [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 } ; evalContext . getELResolver ( ) . setValue ( new de . odysseus . el . util . SimpleContext ( ) , null , "bytes" , expected ) ; byte [ ] result = ( ( byte [ ] ) ( byteExpr . getValue ( evalContext ) ) ) ; "<AssertPlaceHolder>" ; } getValue ( java . lang . Class ) { return synchronizedValue ( expression , environment , expectedType ) ; }
org . junit . Assert . assertArrayEquals ( expected , result )
testZFrameEquals ( ) { org . zeromq . ZFrame f = new org . zeromq . ZFrame ( "Hello" . getBytes ( ) ) ; org . zeromq . ZFrame clone = f . duplicate ( ) ; "<AssertPlaceHolder>" ; } duplicate ( ) { int length = size ( ) ; byte [ ] copy = new byte [ length ] ; java . lang . System . arraycopy ( this . data , 0 , copy , 0 , length ) ; org . zeromq . ZFrame frame = new org . zeromq . ZFrame ( ) ; frame . data = copy ; if ( ( this . buffer ) != null ) { frame . buffer = this . buffer . duplicate ( ) ; } frame . more = this . more ; return frame ; }
org . junit . Assert . assertEquals ( f , clone )
deveObterIdentificadorComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . NFProtocoloInfo protocoloInfo = new com . fincatto . documentofiscal . nfe400 . classes . NFProtocoloInfo ( ) ; final java . lang . String identificador = "ID798456123" ; protocoloInfo . setIdentificador ( identificador ) ; "<AssertPlaceHolder>" ; } getIdentificador ( ) { return this . identificador ; }
org . junit . Assert . assertEquals ( identificador , protocoloInfo . getIdentificador ( ) )
testEquals ( ) { com . hortonworks . streamline . streams . sql . Values v = testExpr ( com . google . common . collect . Lists . newArrayList ( "1<sp>=<sp>2" , "1<sp><><sp>2" 0 , "'a'<sp>=<sp>'a'" , "'a'<sp>=<sp>UNKNOWN" , "UNKNOWN<sp>=<sp>'a'" , "'a'<sp>=<sp>'b'" , "1<sp><><sp>2" , "1<sp><><sp>2" 1 , "'a'<sp><><sp>'a'" , "'a'<sp><><sp>UNKNOWN" , "UNKNOWN<sp><><sp>'a'" , "'a'<sp><><sp>'b'" ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( new com . hortonworks . streamline . streams . sql . Values ( false , null , true , null , null , false , true , null , false , null , null , true ) , v )
withTreeNodes_NotBalanced ( ) { treegraph . BinaryTreeNode node = new treegraph . BinaryTreeNode ( 2 ) ; node . left = new treegraph . BinaryTreeNode ( 1 ) ; node . right = new treegraph . BinaryTreeNode ( 1 ) ; "<AssertPlaceHolder>" ; } isBST ( treegraph . BinaryTreeNode ) { return inOrder ( root ) ; }
org . junit . Assert . assertFalse ( s . isBST ( node ) )
testDischargeTypeSets ( ) { java . lang . String code = "" ; try { code = _setupTestDischargeType ( true ) ; _checkDischargeTypeIntoDb ( code ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkDischargeTypeIntoDb ( java . lang . String ) { org . isf . disctype . model . DischargeType foundDischargeType ; foundDischargeType = ( ( org . isf . disctype . model . DischargeType ) ( org . isf . disctype . test . Tests . jpa . find ( org . isf . disctype . model . DischargeType . class , code ) ) ) ; org . isf . disctype . test . Tests . testDischargeType . check ( foundDischargeType ) ; return ; }
org . junit . Assert . assertEquals ( true , false )
testJsonEmptyQuery ( ) { "<AssertPlaceHolder>" ; } download ( java . lang . String , int , int ) { return com . questdb . net . http . handlers . QueryHandlerTest . download ( queryUrl , limitFrom , limitTo , false , false , com . questdb . net . http . handlers . QueryHandlerTest . temp ) ; }
org . junit . Assert . assertNull ( com . questdb . net . http . handlers . QueryHandlerTest . download ( "" , 0 , 0 ) . dataset )
testDecodeType3_1D_FILL ( ) { com . twelvemonkeys . imageio . plugins . tiff . InputStream stream = new com . twelvemonkeys . imageio . plugins . tiff . CCITTFaxDecoderStream ( new com . twelvemonkeys . imageio . plugins . tiff . ByteArrayInputStream ( com . twelvemonkeys . imageio . plugins . tiff . CCITTFaxDecoderStreamTest . DATA_G3_1D_FILL ) , 6 , TIFFExtension . COMPRESSION_CCITT_T4 , 1 , TIFFExtension . GROUP3OPT_FILLBITS ) ; byte [ ] imageData = ( ( java . awt . image . DataBufferByte ) ( image . getData ( ) . getDataBuffer ( ) ) ) . getData ( ) ; byte [ ] bytes = new byte [ imageData . length ] ; new com . twelvemonkeys . imageio . plugins . tiff . DataInputStream ( stream ) . readFully ( bytes ) ; "<AssertPlaceHolder>" ; } readFully ( byte [ ] ) { int rest = bytes . length ; while ( rest > 0 ) { int read = in . read ( bytes , ( ( bytes . length ) - rest ) , rest ) ; if ( read == ( - 1 ) ) { return false ; } rest -= read ; } return true ; }
org . junit . Assert . assertArrayEquals ( imageData , bytes )
willAddValidationMessagesForConversionErrors ( ) { br . com . caelum . vraptor . resource . ResourceMethod setId = simple ; requestParameterIs ( setId , "id" , "asdf" ) ; getParameters ( setId ) ; "<AssertPlaceHolder>" ; } size ( ) { return getFullList ( ) . size ( ) ; }
org . junit . Assert . assertThat ( errors . size ( ) , org . hamcrest . Matchers . is ( 1 ) )
testResource ( ) { java . net . URL url = org . apache . uima . ruta . engine . UimaClassLoaderTest . class . getResource ( "/org/apache/uima/ruta/action/MarkFastTestList.txt" ) ; final java . io . File cpDir = new java . io . File ( url . toURI ( ) ) . getParentFile ( ) ; org . apache . uima . fit . internal . ResourceManagerFactory . setResourceManagerCreator ( new org . apache . uima . fit . internal . ResourceManagerFactory . ResourceManagerCreator ( ) { @ org . apache . uima . ruta . engine . Override public org . apache . uima . resource . ResourceManager newResourceManager ( ) throws org . apache . uima . resource . ResourceInitializationException { org . apache . uima . resource . ResourceManager resourceManager = null ; try { resourceManager = org . apache . uima . UIMAFramework . newDefaultResourceManager ( ) ; resourceManager . setExtensionClassPath ( this . getClass ( ) . getClassLoader ( ) , cpDir . getAbsolutePath ( ) , true ) ; resourceManager . setDataPath ( "datapath" ) ; } catch ( java . net . MalformedURLException e ) { throw new org . apache . uima . resource . ResourceInitializationException ( e ) ; } return resourceManager ; } } ) ; org . apache . uima . analysis_engine . AnalysisEngine ae = org . apache . uima . fit . factory . AnalysisEngineFactory . createEngine ( org . apache . uima . ruta . engine . RutaEngine . class , RutaEngine . PARAM_RULES , "WORDLIST<sp>list1<sp>=<sp>'MarkFastTestList.txt';MARKFAST(FalsePositive,<sp>list1,<sp>false,<sp>0,<sp>true);" ) ; org . apache . uima . jcas . JCas jcas = ae . newJCas ( ) ; jcas . setDocumentText ( "1<sp>0<sp>0" ) ; ae . process ( jcas ) ; java . util . Collection < org . apache . uima . ruta . type . FalsePositive > select = org . apache . uima . fit . util . JCasUtil . select ( jcas , org . apache . uima . ruta . type . FalsePositive . class ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return empty ; }
org . junit . Assert . assertTrue ( ( ! ( select . isEmpty ( ) ) ) )
testEquals ( ) { org . jfree . chart . axis . DateTickUnit t1 = new org . jfree . chart . axis . DateTickUnit ( DateTickUnit . DAY , 1 ) ; org . jfree . chart . axis . DateTickUnit t2 = new org . jfree . chart . axis . DateTickUnit ( DateTickUnit . DAY , 1 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof org . jfree . base . modules . PackageState ) ) { return false ; } final org . jfree . base . modules . PackageState packageState = ( ( org . jfree . base . modules . PackageState ) ( o ) ) ; if ( ! ( this . module . getModuleClass ( ) . equals ( packageState . module . getModuleClass ( ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( t1 . equals ( t2 ) )
testNewCallSid ( ) { java . lang . String sidString = "ID6dcfdfd531e44ae4ac30e8f97e071122-CA6dcfdfd531e44ae4ac30e8f97e071ab2" ; try { org . restcomm . connect . commons . dao . Sid sid = new org . restcomm . connect . commons . dao . Sid ( sidString ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( "invalid<sp>validation" ) ; } }
org . junit . Assert . assertTrue ( ( sid != null ) )
testIsPrimary ( ) { classUnderTest . setPrimary ( true ) ; "<AssertPlaceHolder>" ; } IsPrimary ( ) { return this . isPrimary ; }
org . junit . Assert . assertEquals ( true , classUnderTest . IsPrimary ( ) )
neverAllowRenewal ( ) { org . terracotta . lease . service . monitor . ExpiredLease lease = new org . terracotta . lease . service . monitor . ExpiredLease ( ) ; "<AssertPlaceHolder>" ; } allowRenewal ( ) { throw new java . lang . AssertionError ( "There<sp>should<sp>not<sp>be<sp>an<sp>attempt<sp>to<sp>renew<sp>a<sp>ReconnectionLease" ) ; }
org . junit . Assert . assertFalse ( lease . allowRenewal ( ) )
testNextTag ( ) { java . util . Set < java . lang . Integer > acceptableTags = new java . util . HashSet ( ) ; acceptableTags . add ( XmlResourceParser . START_TAG ) ; acceptableTags . add ( XmlResourceParser . END_TAG ) ; forgeAndOpenDocument ( "<foo><bar/><text>message</text></foo>" ) ; int evt ; do { evt = parser . next ( ) ; "<AssertPlaceHolder>" ; } while ( ( evt == ( android . content . res . XmlResourceParser . END_TAG ) ) && ( "foo" . equals ( parser . getName ( ) ) ) ) ; } next ( ) { try { return next ; } finally { findNext ( ) ; } }
org . junit . Assert . assertTrue ( acceptableTags . contains ( evt ) )
changingValueShouldNotifyObservers ( ) { hasNotifiedListener = false ; target . setSettingChangeListener ( ( ) -> { hasNotifiedListener = true ; } ) ; target . setPort ( "/dev/ttyS0" ) ; "<AssertPlaceHolder>" ; } setPort ( int ) { this . port = port ; }
org . junit . Assert . assertTrue ( hasNotifiedListener )
special4 ( ) { org . apache . jena . tdb2 . store . Dataset ds = dataset ( ) ; org . apache . jena . tdb2 . store . TestDatasetTDB . load1 ( ds . getDefaultModel ( ) ) ; org . apache . jena . tdb2 . store . TestDatasetTDB . load2 ( ds . getNamedModel ( "http://example/graph1" ) ) ; org . apache . jena . tdb2 . store . TestDatasetTDB . load3 ( ds . getNamedModel ( "http://example/graph2" ) ) ; org . apache . jena . rdf . model . Model m = org . apache . jena . rdf . model . ModelFactory . createDefaultModel ( ) ; org . apache . jena . tdb2 . store . TestDatasetTDB . load2 ( m ) ; org . apache . jena . tdb2 . store . TestDatasetTDB . load3 ( m ) ; java . lang . String qs = ( "PREFIX<sp>:<sp><" + ( org . apache . jena . tdb2 . store . TestDatasetTDB . baseNS ) ) + "><sp>SELECT<sp>(COUNT(?x)<sp>as<sp>?c)<sp>WHERE<sp>{<sp>?x<sp>(:p1|:p2)<sp>'x1'<sp>}" ; org . apache . jena . tdb2 . store . Query q = org . apache . jena . tdb2 . store . QueryFactory . create ( qs ) ; long c_m ; try ( org . apache . jena . tdb2 . store . QueryExecution qExec = org . apache . jena . tdb2 . store . QueryExecutionFactory . create ( q , m ) ) { c_m = qExec . execSelect ( ) . next ( ) . getLiteral ( "c" ) . getLong ( ) ; } long c_ds ; try ( org . apache . jena . tdb2 . store . QueryExecution qExec = org . apache . jena . tdb2 . store . QueryExecutionFactory . create ( q , ds ) ) { qExec . getContext ( ) . set ( TDB2 . symUnionDefaultGraph , true ) ; c_ds = qExec . execSelect ( ) . next ( ) . getLiteral ( "c" ) . getLong ( ) ; } "<AssertPlaceHolder>" ; } getLong ( ) { if ( ! ( isNode ( ) ) ) throw new org . apache . jena . sparql . sse . ItemException ( ( "Not<sp>a<sp>node,<sp>can't<sp>be<sp>an<sp>integer:<sp>" + ( this ) ) ) ; if ( ! ( getNode ( ) . isLiteral ( ) ) ) throw new org . apache . jena . sparql . sse . ItemException ( ( "Not<sp>a<sp>literal,<sp>can't<sp>be<sp>a<sp>integer:<sp>" + ( this ) ) ) ; return ( ( java . lang . Number ) ( getNode ( ) . getLiteralValue ( ) ) ) . intValue ( ) ; }
org . junit . Assert . assertEquals ( c_m , c_ds )
testGetFromNestedProperty ( ) { org . apache . cayenne . reflect . TstJavaBean bean = new org . apache . cayenne . reflect . TstJavaBean ( ) ; org . apache . cayenne . reflect . TstJavaBean nestedBean = new org . apache . cayenne . reflect . TstJavaBean ( ) ; nestedBean . setIntField ( 7 ) ; bean . setObjectField ( nestedBean ) ; org . apache . cayenne . exp . property . BaseProperty < java . lang . Integer > OBJECT_FIELD_INT_FIELD = new org . apache . cayenne . exp . property . BaseProperty ( "objectField.intField" , null , org . apache . cayenne . exp . property . Integer . class ) ; "<AssertPlaceHolder>" ; } getFrom ( java . lang . Object ) { return ( ( E ) ( org . apache . cayenne . reflect . PropertyUtils . getProperty ( bean , getName ( ) ) ) ) ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 7 ) , OBJECT_FIELD_INT_FIELD . getFrom ( bean ) )
domainCodeValidation ( ) { boolean error = false ; char c ; for ( final fr . gouv . vitam . common . error . DomainName domain : fr . gouv . vitam . common . error . DomainName . values ( ) ) { if ( ( domain . getCode ( ) . length ( ) ) != 2 ) { error = true ; fr . gouv . vitam . common . error . CodeTest . LOGGER . error ( ( ( fr . gouv . vitam . common . error . CodeTest . ERROR_DOMAIN ) + ( java . lang . String . format ( fr . gouv . vitam . common . error . CodeTest . MESSAGE_CODE_LENGTH , domain . name ( ) , domain . getCode ( ) ) ) ) ) ; } for ( int i = 0 ; i < ( domain . getCode ( ) . length ( ) ) ; i ++ ) { c = domain . getCode ( ) . charAt ( i ) ; if ( ( ( c < 48 ) || ( c > 57 ) ) && ( ( c < 65 ) || ( c > 90 ) ) ) { error = true ; fr . gouv . vitam . common . error . CodeTest . LOGGER . error ( ( ( fr . gouv . vitam . common . error . CodeTest . ERROR_DOMAIN ) + ( java . lang . String . format ( fr . gouv . vitam . common . error . CodeTest . MESSAGE_CODE_RANGE , domain . getCode ( ) , domain . name ( ) ) ) ) ) ; break ; } } } "<AssertPlaceHolder>" ; } name ( ) { return name ; }
org . junit . Assert . assertFalse ( error )
testAgain ( ) { int count = rx . Observable . range ( 51 , 10 ) . lift ( com . github . davidmoten . rx . slf4j . Logging . logger ( ) . showCount ( ) . start ( 2 ) . finish ( 2 ) . showStackTrace ( ) . showMemory ( ) . log ( ) ) . count ( ) . toBlocking ( ) . single ( ) ; "<AssertPlaceHolder>" ; } count ( ) { return rx . Observable . range ( 1 , 10 ) . lift ( com . github . davidmoten . rx . slf4j . Logging . logger ( ) . showValue ( ) . log ( ) ) . count ( ) . toBlocking ( ) . single ( ) ; }
org . junit . Assert . assertEquals ( 10 , count )
try_insert_static_objects_by_many_many ( ) { pojos . init ( ) ; final org . nutz . dao . test . meta . Base b = org . nutz . dao . test . meta . Base . make ( "B" ) ; b . setFighters ( new java . util . ArrayList < org . nutz . dao . test . meta . Fighter > ( ) ) ; org . nutz . dao . TableName . run ( 1 , new org . nutz . trans . Atom ( ) { public void run ( ) { org . nutz . trans . Trans . exec ( new org . nutz . trans . Atom ( ) { public void run ( ) { dao . insert ( org . nutz . dao . test . meta . Country . make ( "A" ) ) ; try { dao . insert ( org . nutz . dao . test . meta . Country . make ( "A" ) ) ; } catch ( org . nutz . dao . DaoException e ) { } dao . insert ( org . nutz . dao . test . meta . Country . make ( "C" ) ) ; dao . insert ( org . nutz . dao . test . meta . Country . make ( "D" ) ) ; } } ) ; "<AssertPlaceHolder>" ; } } ) ; } count ( java . lang . Class ) { org . nutz . dao . entity . Entity < ? > en = holder . getEntity ( classOfT ) ; return _count ( en , en . getViewName ( ) , null ) ; }
org . junit . Assert . assertEquals ( 3 , dao . count ( org . nutz . dao . test . meta . Country . class ) )
mvp ( ) { org . apache . jackrabbit . oak . spi . query . Filter f = createFilter ( "//*[(@prop<sp>=<sp>'aaa'<sp>and<sp>@prop<sp>=<sp>'bbb'<sp>and<sp>@prop<sp>=<sp>'ccc')]" ) ; "<AssertPlaceHolder>" ; } isAlwaysFalse ( ) { return alwaysFalse ; }
org . junit . Assert . assertFalse ( f . isAlwaysFalse ( ) )
testIfEDBObjectsContainCorrectType_shouldWork ( ) { org . openengsb . core . ekb . common . models . TestModel model = new org . openengsb . core . ekb . common . models . TestModel ( ) ; model . setNumber ( 42 ) ; org . openengsb . core . ekb . api . ConnectorInformation id = getTestConnectorInformation ( ) ; java . util . List < org . openengsb . core . edb . api . EDBObject > objects = converter . convertModelToEDBObject ( model , id ) ; org . openengsb . core . edb . api . EDBObject object = objects . get ( 0 ) ; org . openengsb . core . edb . api . EDBObjectEntry entry = object . get ( "number" ) ; "<AssertPlaceHolder>" ; } getType ( ) { return this . type ; }
org . junit . Assert . assertThat ( entry . getType ( ) , org . hamcrest . CoreMatchers . is ( org . openengsb . core . ekb . common . Integer . class . getName ( ) ) )
testParameterizedTemplate ( ) { java . lang . String expected = "There<sp>are<sp>5<sp>cars,<sp>and<sp>they<sp>are<sp>all<sp>green;<sp>green<sp>is<sp>the<sp>best<sp>color." ; org . jboss . seam . international . status . builder . TemplateMessage builder = factory . info ( "There<sp>are<sp>{0}<sp>cars,<sp>and<sp>they<sp>are<sp>all<sp>{1};<sp>{1}<sp>is<sp>the<sp>best<sp>color." , 5 , "green" ) ; "<AssertPlaceHolder>" ; } build ( ) { org . jboss . seam . international . status . MutableMessage message = new org . jboss . seam . international . status . MessageImpl ( ) ; message . setLevel ( level ) ; message . setText ( interpolator . populate ( summary , summaryParams ) ) ; if ( ( ( detail ) != null ) && ( ! ( detail . equals ( "" ) ) ) ) { message . setDetail ( interpolator . populate ( detail , detailParams ) ) ; } message . setTargets ( targets ) ; return message ; }
org . junit . Assert . assertEquals ( expected , builder . build ( ) . getText ( ) )
testProcessActivityFeedAfter ( ) { org . joda . time . DateTime now = new org . joda . time . DateTime ( java . lang . System . currentTimeMillis ( ) ) ; com . google . api . services . youtube . YouTube youtube = buildYouTube ( 0 , 5 , 0 , now , now ) ; java . util . concurrent . BlockingQueue < org . apache . streams . core . StreamsDatum > datumQueue = new org . apache . streams . local . queues . ThroughputQueue ( ) ; org . apache . streams . youtube . provider . YoutubeUserActivityCollector collector = new org . apache . streams . youtube . provider . YoutubeUserActivityCollector ( youtube , datumQueue , new org . apache . streams . util . api . requests . backoff . impl . ExponentialBackOffStrategy ( 2 ) , new org . apache . streams . google . gplus . configuration . UserInfo ( ) . withUserId ( org . apache . streams . youtube . provider . YoutubeUserActivityCollectorTest . USER_ID ) , this . config ) ; com . google . api . services . youtube . model . ActivityListResponse feed = buildActivityListResponse ( 1 ) ; collector . processActivityFeed ( feed , new org . joda . time . DateTime ( ( ( now . getMillis ( ) ) - 100000 ) ) , null ) ; "<AssertPlaceHolder>" ; } getDatumQueue ( ) { return this . datumQueue ; }
org . junit . Assert . assertEquals ( collector . getDatumQueue ( ) . size ( ) , 5 )
testGenerateAndAuthenticateHexStoredPassword ( ) { java . lang . String hexEncryptedPassword = pes . getEncryptedPasswordAsHexString ( ch . rgw . tools . PasswordEncryptionServiceTest . PASSWORD , ch . rgw . tools . PasswordEncryptionServiceTest . SALT ) ; "<AssertPlaceHolder>" ; } authenticate ( java . lang . String , java . lang . String , java . lang . String ) { return authenticate ( attemptedPassword , org . apache . commons . codec . binary . Hex . decodeHex ( encryptedPassword . toCharArray ( ) ) , org . apache . commons . codec . binary . Hex . decodeHex ( salt . toCharArray ( ) ) ) ; }
org . junit . Assert . assertTrue ( pes . authenticate ( ch . rgw . tools . PasswordEncryptionServiceTest . PASSWORD , hexEncryptedPassword , ch . rgw . tools . PasswordEncryptionServiceTest . SALT ) )
testConstructor ( ) { final java . util . List < com . allanbank . mongodb . bson . Element > elements = java . util . Collections . singletonList ( ( ( com . allanbank . mongodb . bson . Element ) ( new com . allanbank . mongodb . bson . element . BooleanElement ( "1" , false ) ) ) ) ; final com . allanbank . mongodb . bson . impl . RootDocument element = new com . allanbank . mongodb . bson . impl . RootDocument ( elements ) ; "<AssertPlaceHolder>" ; } getElements ( ) { return myElements ; }
org . junit . Assert . assertEquals ( elements , element . getElements ( ) )
testBasicEndtoEnd ( ) { com . nextdoor . bender . aws . TestContext ctx = new com . nextdoor . bender . aws . TestContext ( ) ; ctx . setFunctionName ( "unittest" ) ; ctx . setInvokedFunctionArn ( "arn:aws:lambda:us-east-1:123:function:test-function:staging" ) ; java . lang . String expected = org . apache . commons . io . IOUtils . toString ( new java . io . InputStreamReader ( this . getClass ( ) . getResourceAsStream ( getExpectedEvent ( ) ) , "UTF-8" ) ) ; "<AssertPlaceHolder>" ; } getExpectedEvent ( ) { return "basic_output.json" ; }
org . junit . Assert . assertEquals ( expected , actual )
shouldBuildTimestampFromProperty ( ) { final uk . gov . gchq . gaffer . store . schema . Schema schema = new uk . gov . gchq . gaffer . store . schema . Schema . Builder ( ) . json ( uk . gov . gchq . gaffer . commonutil . StreamUtil . schemas ( getClass ( ) ) ) . build ( ) ; serialisation = new uk . gov . gchq . gaffer . hbasestore . serialisation . ElementSerialisation ( new uk . gov . gchq . gaffer . store . schema . Schema . Builder ( schema ) . type ( "timestamp" , uk . gov . gchq . gaffer . hbasestore . serialisation . Long . class ) . edge ( TestGroups . EDGE , new uk . gov . gchq . gaffer . store . schema . SchemaEdgeDefinition . Builder ( ) . property ( HBasePropertyNames . TIMESTAMP , "timestamp" ) . build ( ) ) . config ( HBaseStoreConstants . TIMESTAMP_PROPERTY , TestPropertyNames . TIMESTAMP ) . build ( ) ) ; final long propertyTimestamp = 10L ; final uk . gov . gchq . gaffer . data . element . Properties properties = new uk . gov . gchq . gaffer . data . element . Properties ( ) ; properties . put ( HBasePropertyNames . COLUMN_QUALIFIER , 1 ) ; properties . put ( HBasePropertyNames . PROP_1 , 2 ) ; properties . put ( HBasePropertyNames . TIMESTAMP , propertyTimestamp ) ; final long timestamp = serialisation . getTimestamp ( properties ) ; "<AssertPlaceHolder>" ; } getTimestamp ( uk . gov . gchq . gaffer . data . element . Element ) { return getTimestamp ( element . getProperties ( ) ) ; }
org . junit . Assert . assertEquals ( propertyTimestamp , timestamp )
testCommandLineParameters ( ) { java . io . File basedir = resources . getBasedir ( "filtering-command-line-parameters" ) ; io . takari . maven . testing . executor . MavenExecution verifierBuilder = verifier . forProject ( basedir ) . withCliOption ( "-DcommandLineParameter=value" ) ; java . lang . String commandLineParameter = filter ( verifierBuilder ) . getProperty ( "commandLineParameter" ) ; "<AssertPlaceHolder>" ; } filter ( java . lang . String ) { java . io . File basedir = resources . getBasedir ( project ) ; io . takari . maven . testing . executor . MavenExecution verifierBuilder = verifier . forProject ( basedir ) ; return filter ( verifierBuilder ) ; }
org . junit . Assert . assertEquals ( "value" , commandLineParameter )
mustAddConfigDataToDefaultConfigIfConfigNameIsNull ( ) { defaultNamedConfig . add ( "key1" , "value1" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return data . get ( key ) ; }
org . junit . Assert . assertEquals ( "value1" , defaultNamedConfig . get ( "key1" ) )
testFormat ( ) { int fixture = Libshout . FORMAT_MP3 ; this . libshout . setFormat ( fixture ) ; "<AssertPlaceHolder>" ; } getFormat ( ) { return com . gmail . kunicins . olegs . libshout . Libshout . shout_get_format ( this . instance ) ; }
org . junit . Assert . assertEquals ( fixture , this . libshout . getFormat ( ) )
countingShouldWork ( ) { java . util . List < hudson . plugins . parameterizedtrigger . AbstractBuildParameters > parameters = getParameters ( 1 , 2 , 1 ) ; "<AssertPlaceHolder>" ; } getParameters ( long , long , long ) { return getParameters ( from , to , step , SteppingValidationEnum . FAIL ) ; }
org . junit . Assert . assertEquals ( 2 , parameters . size ( ) )
extractGrams_threeSizesAtOnce ( ) { java . lang . String text = "Foo<sp>bar" ; com . optimaize . langdetect . ngram . List < java . lang . String > expected = com . optimaize . langdetect . ngram . NgramExtractor . gramLengths ( 1 , 2 , 3 ) . extractGrams ( text ) ; com . optimaize . langdetect . ngram . Collections . sort ( expected ) ; com . optimaize . langdetect . ngram . List < java . lang . String > separate = new com . optimaize . langdetect . ngram . ArrayList ( ) ; separate . addAll ( com . optimaize . langdetect . ngram . NgramExtractor . gramLength ( 1 ) . extractGrams ( text ) ) ; separate . addAll ( com . optimaize . langdetect . ngram . NgramExtractor . gramLength ( 2 ) . extractGrams ( text ) ) ; separate . addAll ( com . optimaize . langdetect . ngram . NgramExtractor . gramLength ( 3 ) . extractGrams ( text ) ) ; com . optimaize . langdetect . ngram . Collections . sort ( separate ) ; "<AssertPlaceHolder>" ; } extractGrams ( java . lang . CharSequence ) { text = applyPadding ( text ) ; int len = text . length ( ) ; int totalNumGrams = 0 ; for ( java . lang . Integer gramLength : gramLengths ) { int num = len - ( gramLength - 1 ) ; if ( num >= 1 ) { totalNumGrams += num ; } } if ( totalNumGrams <= 0 ) { return com . optimaize . langdetect . ngram . Collections . emptyList ( ) ; } com . optimaize . langdetect . ngram . List < java . lang . String > grams = new com . optimaize . langdetect . ngram . ArrayList ( totalNumGrams ) ; for ( java . lang . Integer gramLength : gramLengths ) { int numGrams = len - ( gramLength - 1 ) ; if ( numGrams >= 1 ) { for ( int pos = 0 ; pos < numGrams ; pos ++ ) { java . lang . String gram = text . subSequence ( pos , ( pos + gramLength ) ) . toString ( ) ; if ( ( ( filter ) == null ) || ( filter . use ( gram ) ) ) { grams . add ( gram ) ; } } } } return grams ; }
org . junit . Assert . assertEquals ( expected , separate )
testNewEditingContext ( ) { er . quartzscheduler . util . ERQSSchedulerServiceFrameworkPrincipal fp = new er . quartzscheduler . util . ERQSSchedulerFP4Test ( ) ; "<AssertPlaceHolder>" ; } newEditingContext ( ) { return er . extensions . eof . ERXEC . newEditingContext ( ) ; }
org . junit . Assert . assertNotNull ( fp . newEditingContext ( ) )
testSysPurposePoolPriorityUseCaseSLABeatsUsage ( ) { org . candlepin . model . Product product69 = new org . candlepin . model . Product ( ) ; product69 . setId ( "RHEL<sp>Workstation" 2 ) ; consumer . setRole ( "RHEL<sp>Server" ) ; consumer . setServiceLevel ( "Standard" ) ; consumer . setUsage ( "Development" ) ; java . util . Set < java . lang . String > addons = new java . util . HashSet ( ) ; addons . add ( "RHEL<sp>EUS" ) ; consumer . setAddOns ( addons ) ; org . candlepin . model . ConsumerInstalledProduct consumerInstalledProduct = new org . candlepin . model . ConsumerInstalledProduct ( product69 ) ; consumer . addInstalledProduct ( consumerInstalledProduct ) ; org . candlepin . model . Product prodRH0000W = createSysPurposeProduct ( null , "RHEL<sp>Workstation" , null , "Standard" , null ) ; org . candlepin . model . Pool RH0000W = org . candlepin . test . TestUtil . createPool ( owner , prodRH0000W ) ; RH0000W . setId ( "RH0000W" ) ; RH0000W . addProvidedProduct ( product69 ) ; org . candlepin . model . Product prodRH0000D = createSysPurposeProduct ( null , "RHEL<sp>Desktop" , null , null , "Development" ) ; org . candlepin . model . Pool RH0000D = org . candlepin . test . TestUtil . createPool ( owner , prodRH0000D ) ; RH0000D . setId ( "RHEL<sp>Workstation" 1 ) ; RH0000D . addProvidedProduct ( product69 ) ; jsRules . reinitTo ( "RHEL<sp>Workstation" 3 ) ; org . candlepin . policy . js . JsonJsContext args = new org . candlepin . policy . js . JsonJsContext ( mapper ) ; args . put ( "log" , org . candlepin . policy . AutobindRulesTest . log , false ) ; args . put ( "consumer" , consumer ) ; args . put ( "compliance" , compliance ) ; args . put ( "RHEL<sp>Workstation" 0 , RH0000W ) ; java . lang . Double RH0000WPriority = jsRules . invokeMethod ( "RHEL<sp>Workstation" 5 , args ) ; args . put ( "RHEL<sp>Workstation" 0 , RH0000D ) ; java . lang . Double RH0000DPriority = jsRules . invokeMethod ( "RHEL<sp>Workstation" 5 , args ) ; "<AssertPlaceHolder>" ; } invokeMethod ( java . lang . String , org . candlepin . policy . js . JsContext ) { context . applyTo ( scope ) ; return ( ( T ) ( invokeMethod ( method ) ) ) ; }
org . junit . Assert . assertTrue ( "RHEL<sp>Workstation" 4 , ( RH0000WPriority > RH0000DPriority ) )
convertToLocalizedBillingResource ( ) { org . oscm . billing . external . pricemodel . service . PriceModel externalPriceModel = createExternalPriceModel ( ) ; java . util . List < org . oscm . domobjects . LocalizedBillingResource > resultList = externalPriceModelBean . convertToLocalizedBillingResource ( externalPriceModel , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( 4 , resultList . size ( ) )
testGetMissingRequiredPropertiesWithUseDefaultEnabledDefaultAndPresentCustom ( ) { com . google . cloud . tools . eclipse . dataflow . core . launcher . options . PipelineOptionsProperty property = new com . google . cloud . tools . eclipse . dataflow . core . launcher . options . PipelineOptionsProperty ( "foo" , false , true , java . util . Collections . < java . lang . String > emptySet ( ) , null ) ; com . google . cloud . tools . eclipse . dataflow . core . launcher . options . PipelineOptionsHierarchy opts = com . google . cloud . tools . eclipse . dataflow . core . launcher . PipelineLaunchConfigurationTest . options ( property ) ; com . google . cloud . tools . eclipse . dataflow . core . launcher . PipelineLaunchConfiguration pipelineLaunchConfig = new com . google . cloud . tools . eclipse . dataflow . core . launcher . PipelineLaunchConfiguration ( majorVersion ) ; pipelineLaunchConfig . setUseDefaultLaunchOptions ( true ) ; pipelineLaunchConfig . setUserOptionsName ( "myType" ) ; pipelineLaunchConfig . setArgumentValues ( com . google . common . collect . ImmutableMap . of ( "foo" , "bar" ) ) ; com . google . cloud . tools . eclipse . dataflow . core . preferences . DataflowPreferences prefs = com . google . cloud . tools . eclipse . dataflow . core . launcher . PipelineLaunchConfigurationTest . absentPrefs ( ) ; com . google . cloud . tools . eclipse . dataflow . core . launcher . PipelineLaunchConfiguration . MissingRequiredProperties missingProperties = pipelineLaunchConfig . getMissingRequiredProperties ( opts , prefs ) ; "<AssertPlaceHolder>" ; } getMissingProperties ( ) { return missingProperties ; }
org . junit . Assert . assertTrue ( missingProperties . getMissingProperties ( ) . isEmpty ( ) )
testInterfaceDefaultNull ( ) { org . skife . config . TestArrays . EmptyInterfaceDefaultNull ec = cof . build ( org . skife . config . TestArrays . EmptyInterfaceDefaultNull . class ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertNull ( ec . getValue ( ) )
setSwitchId ( ) { org . openkilda . messaging . command . flow . BaseInstallFlowTest . flow . setSwitchId ( org . openkilda . messaging . command . Constants . switchId ) ; "<AssertPlaceHolder>" ; } getSwitchId ( ) { org . junit . Assert . assertEquals ( org . openkilda . messaging . command . Constants . switchId , org . openkilda . messaging . command . flow . BaseInstallFlowTest . flow . getSwitchId ( ) ) ; }
org . junit . Assert . assertEquals ( org . openkilda . messaging . command . Constants . switchId , org . openkilda . messaging . command . flow . BaseInstallFlowTest . flow . getSwitchId ( ) )
testRemoveCache ( ) { final java . util . List < nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Persoon > personen = persoonRepository . zoekPersonenOpActueleGegevens ( 123455789L , null , null , null ) ; "<AssertPlaceHolder>" ; persoonRepository . removeCache ( personen . get ( 0 ) ) ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , personen . size ( ) )
testSerialization ( ) { org . jfree . chart . renderer . xy . GradientXYBarPainter p1 = new org . jfree . chart . renderer . xy . GradientXYBarPainter ( 0.1 , 0.2 , 0.3 ) ; org . jfree . chart . renderer . xy . GradientXYBarPainter p2 = ( ( org . jfree . chart . renderer . xy . GradientXYBarPainter ) ( org . jfree . chart . TestUtilities . serialised ( p1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( p1 , p2 )
when_finding_should_set_proper_id_for_embeddable_id ( ) { net . rrm . ehour . backup . service . restore . TimesheetEntryId timesheetEntryId = new net . rrm . ehour . backup . service . restore . TimesheetEntryId ( new java . util . Date ( ) , net . rrm . ehour . backup . service . restore . ProjectAssignmentObjectMother . createProjectAssignment ( 1 ) ) ; net . rrm . ehour . backup . service . restore . TimesheetEntry entry = subject . find ( timesheetEntryId , net . rrm . ehour . backup . service . restore . TimesheetEntry . class ) ; "<AssertPlaceHolder>" ; } getEntryId ( ) { return this . entryId ; }
org . junit . Assert . assertEquals ( timesheetEntryId , entry . getEntryId ( ) )
roundtripLeaseReconnectData ( ) { org . terracotta . lease . LeaseReconnectData reconnectData = new org . terracotta . lease . LeaseReconnectData ( 7 ) ; byte [ ] bytes = reconnectData . encode ( ) ; org . terracotta . lease . LeaseReconnectData roundtrippedData = org . terracotta . lease . LeaseReconnectData . decode ( bytes ) ; "<AssertPlaceHolder>" ; } getConnectionSequenceNumber ( ) { return connectionSequenceNumber ; }
org . junit . Assert . assertEquals ( 7 , roundtrippedData . getConnectionSequenceNumber ( ) )
buildDouble ( ) { java . lang . Double build = BuilderFactory . DOUBLE . build ( "1.0" . getBytes ( ) ) ; "<AssertPlaceHolder>" ; } build ( java . lang . Object ) { @ redis . clients . jedis . SuppressWarnings ( "unchecked" ) java . util . List < java . lang . Object > list = ( ( java . util . List < java . lang . Object > ) ( data ) ) ; java . util . List < java . lang . Object > values = new java . util . ArrayList < java . lang . Object > ( ) ; if ( ( list . size ( ) ) != ( responses . size ( ) ) ) { throw new redis . clients . jedis . exceptions . JedisDataException ( ( ( ( "Expected<sp>data<sp>size<sp>" + ( responses . size ( ) ) ) + "<sp>but<sp>was<sp>" ) + ( list . size ( ) ) ) ) ; } for ( int i = 0 ; i < ( list . size ( ) ) ; i ++ ) { redis . clients . jedis . Response < ? > response = responses . get ( i ) ; response . set ( list . get ( i ) ) ; java . lang . Object builtResponse ; try { builtResponse = response . get ( ) ; } catch ( redis . clients . jedis . exceptions . JedisDataException e ) { builtResponse = e ; } values . add ( builtResponse ) ; } return values ; }
org . junit . Assert . assertEquals ( new java . lang . Double ( 1.0 ) , build )
testGetMINUS ( ) { java . lang . String actual = table . getMINUS ( ) ; java . lang . String expected = "-" ; "<AssertPlaceHolder>" ; } getMINUS ( ) { return "-" ; }
org . junit . Assert . assertEquals ( expected , actual )
testStrings ( ) { com . comphenix . protocol . utility . StreamSerializer serializer = new com . comphenix . protocol . utility . StreamSerializer ( ) ; java . lang . String initial = "Hello<sp>-<sp>this<sp>is<sp>a<sp>test." ; com . comphenix . protocol . utility . ByteArrayOutputStream buffer = new com . comphenix . protocol . utility . ByteArrayOutputStream ( ) ; serializer . serializeString ( new com . comphenix . protocol . utility . DataOutputStream ( buffer ) , initial ) ; com . comphenix . protocol . utility . DataInputStream input = new com . comphenix . protocol . utility . DataInputStream ( new com . comphenix . protocol . utility . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; java . lang . String deserialized = serializer . deserializeString ( input , 50 ) ; "<AssertPlaceHolder>" ; } deserializeString ( java . io . DataInputStream , int ) { if ( input == null ) throw new java . lang . IllegalArgumentException ( "Input<sp>stream<sp>cannot<sp>be<sp>NULL." ) ; if ( maximumLength > 32767 ) throw new java . lang . IllegalArgumentException ( "Maximum<sp>length<sp>cannot<sp>exceed<sp>32767<sp>characters." ) ; if ( maximumLength < 0 ) throw new java . lang . IllegalArgumentException ( "Maximum<sp>length<sp>cannot<sp>be<sp>negative." ) ; if ( com . comphenix . protocol . utility . MinecraftReflection . isUsingNetty ( ) ) { if ( ( com . comphenix . protocol . utility . StreamSerializer . READ_STRING_METHOD ) == null ) { com . comphenix . protocol . utility . StreamSerializer . READ_STRING_METHOD = com . comphenix . protocol . reflect . accessors . Accessors . getMethodAccessor ( com . comphenix . protocol . reflect . FuzzyReflection . fromClass ( com . comphenix . protocol . utility . MinecraftReflection . getPacketDataSerializerClass ( ) , true ) . getMethodByParameters ( "readString" , java . lang . String . class , new java . lang . Class < ? > [ ] { int . class } ) ) ; } io . netty . buffer . ByteBuf buf = com . comphenix . protocol . injector . netty . NettyByteBufAdapter . packetReader ( input ) ; return ( ( java . lang . String ) ( com . comphenix . protocol . utility . StreamSerializer . READ_STRING_METHOD . invoke ( buf , maximumLength ) ) ) ; } else { if ( ( com . comphenix . protocol . utility . StreamSerializer . READ_STRING_METHOD ) == null ) { com . comphenix . protocol . utility . StreamSerializer . READ_STRING_METHOD = com . comphenix . protocol . reflect . accessors . Accessors . getMethodAccessor ( com . comphenix . protocol . reflect . FuzzyReflection . fromClass ( com . comphenix . protocol . utility . MinecraftReflection . getPacketClass ( ) ) . getMethod ( com . comphenix . protocol . reflect . fuzzy . FuzzyMethodContract . newBuilder ( ) . parameterCount ( 2 ) . parameterDerivedOf ( java . io . DataInput . class , 0 ) . parameterExactType ( int . class , 1 ) . returnTypeExact ( java . lang . String . class ) . build ( ) ) ) ; } return ( ( java . lang . String ) ( com . comphenix . protocol . utility . StreamSerializer . READ_STRING_METHOD . invoke ( null , input , maximumLength ) ) ) ; } }
org . junit . Assert . assertEquals ( initial , deserialized )
formatTest2 ( ) { java . lang . String json = "{\"abc\":{\"def\":\"\\\"[ghi]\"}}" ; java . lang . String result = cn . hutool . json . JSONStrFormater . format ( json ) ; "<AssertPlaceHolder>" ; } format ( java . lang . String ) { final java . lang . StringBuffer result = new java . lang . StringBuffer ( ) ; java . lang . Character wrapChar = null ; boolean isEscapeMode = false ; int length = json . length ( ) ; int number = 0 ; char key = 0 ; for ( int i = 0 ; i < length ; i ++ ) { key = json . charAt ( i ) ; if ( ( '"' == key ) || ( '\'' == key ) ) { if ( null == wrapChar ) { wrapChar = key ; } else if ( isEscapeMode ) { isEscapeMode = false ; } else if ( wrapChar . equals ( key ) ) { wrapChar = null ; } result . append ( key ) ; continue ; } else if ( '\\' == key ) { if ( null != wrapChar ) { isEscapeMode = ! isEscapeMode ; result . append ( key ) ; continue ; } else { result . append ( key ) ; } } if ( null != wrapChar ) { result . append ( key ) ; continue ; } if ( ( key == '[' ) || ( key == '{' ) ) { if ( ( ( i - 1 ) > 0 ) && ( ( json . charAt ( ( i - 1 ) ) ) == ':' ) ) { result . append ( cn . hutool . json . JSONStrFormater . NEW_LINE ) ; result . append ( cn . hutool . json . JSONStrFormater . indent ( number ) ) ; } result . append ( key ) ; result . append ( cn . hutool . json . JSONStrFormater . NEW_LINE ) ; number ++ ; result . append ( cn . hutool . json . JSONStrFormater . indent ( number ) ) ; continue ; } if ( ( key == ']' ) || ( key == '}' ) ) { result . append ( cn . hutool . json . JSONStrFormater . NEW_LINE ) ; number -- ; result . append ( cn . hutool . json . JSONStrFormater . indent ( number ) ) ; result . append ( key ) ; if ( ( ( i + 1 ) < length ) && ( ( json . charAt ( ( i + 1 ) ) ) != ',' ) ) { result . append ( cn . hutool . json . JSONStrFormater . NEW_LINE ) ; } continue ; } if ( key == ',' ) { result . append ( key ) ; result . append ( cn . hutool . json . JSONStrFormater . NEW_LINE ) ; result . append ( cn . hutool . json . JSONStrFormater . indent ( number ) ) ; continue ; } result . append ( key ) ; } return result . toString ( ) ; }
org . junit . Assert . assertNotNull ( result )
testGetInterfacesDefaultsEmptyForInterface ( ) { compile ( java . lang . String . join ( java . lang . System . lineSeparator ( ) , "package<sp>com.facebook.foo;" , "public<sp>interface<sp>Foo<sp>{<sp>}" ) ) ; javax . lang . model . element . TypeElement fooElement = elements . getTypeElement ( "com.facebook.foo.Foo" ) ; "<AssertPlaceHolder>" ; } getInterfaces ( ) { if ( ( interfaces ) == null ) { interfaces = java . util . Collections . unmodifiableList ( getCanonicalizer ( ) . getCanonicalTypes ( underlyingElement . getInterfaces ( ) , getTreePath ( ) , tree . getImplementsClause ( ) ) ) ; } return interfaces ; }
org . junit . Assert . assertThat ( fooElement . getInterfaces ( ) , org . hamcrest . Matchers . empty ( ) )
testGetRegelParametersVoorRegel ( ) { final nl . bzk . brp . model . RegelParameters resultaat = getBedrijfsregelManagerImpl ( ) . getRegelParametersVoorRegel ( Regel . BRLV0001 ) ; "<AssertPlaceHolder>" ; } getRegelCode ( ) { return regelCode ; }
org . junit . Assert . assertEquals ( Regel . BRLV0001 , resultaat . getRegelCode ( ) )
testCreateLogWhenCacheMissed ( ) { java . lang . String logName = "test-create-log-when-cache-missed" ; java . net . URI logUri = org . apache . distributedlog . util . Utils . ioResult ( metadataStore . createLog ( logName ) ) ; "<AssertPlaceHolder>" ; metadataStore . removeLogFromCache ( logName ) ; org . apache . distributedlog . util . Utils . ioResult ( metadataStore . createLog ( logName ) ) ; } createLog ( java . lang . String ) { checkState ( ) ; logName = validateAndNormalizeName ( logName ) ; java . net . URI uri = org . apache . distributedlog . util . Utils . ioResult ( driver . getLogMetadataStore ( ) . createLog ( logName ) ) ; org . apache . distributedlog . util . Utils . ioResult ( driver . getLogStreamMetadataStore ( org . apache . distributedlog . WRITER ) . getLog ( uri , logName , true , true ) ) ; }
org . junit . Assert . assertEquals ( uri , logUri )
order_property ( ) { java . util . List < com . asakusafw . testdriver . loader . MockDataModel > list = com . asakusafw . testdriver . loader . BasicDataLoaderTest . loader ( new com . asakusafw . testdriver . loader . MockDataModel ( 5 , "A" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 2 , "B" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 1 , "C" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 3 , "D" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 4 , "E" ) ) . order ( "key" ) . asList ( ) ; "<AssertPlaceHolder>" ; } asList ( ) { return asStream ( ) . collect ( java . util . stream . Collectors . toList ( ) ) ; }
org . junit . Assert . assertThat ( list , contains ( new com . asakusafw . testdriver . loader . MockDataModel ( 1 , "C" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 2 , "B" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 3 , "D" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 4 , "E" ) , new com . asakusafw . testdriver . loader . MockDataModel ( 5 , "A" ) ) )
testAnyWithAttribute ( ) { com . gistlabs . mechanize . util . css_query . NodeSelector < com . gistlabs . mechanize . document . json . node . JsonNode > selector = build ( "{<sp>\"a\"<sp>:<sp>2,<sp>\"b\"<sp>:<sp>{<sp>\"x\"<sp>:<sp>\"y\"<sp>},<sp>\"results\"<sp>:<sp>[<sp>{<sp>\"x\"<sp>:<sp>1<sp>},<sp>{<sp>\"b\"<sp>:<sp>2,<sp>\"c\"<sp>:<sp>3<sp>}<sp>]<sp>}" ) ; java . util . List < com . gistlabs . mechanize . document . json . node . JsonNode > result = selector . findAll ( "[x]" ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . response . getEntity ( ) . getContentLength ( ) ; }
org . junit . Assert . assertEquals ( 2 , result . size ( ) )
deleteRules ( ) { org . candlepin . model . Rules origRules = rulesCurator . getRules ( ) ; org . candlepin . model . Rules rules = new org . candlepin . model . Rules ( "//<sp>Version:<sp>2.0\n//these<sp>are<sp>the<sp>new<sp>rules" ) ; org . candlepin . model . Rules newRules = rulesCurator . update ( rules ) ; rulesCurator . delete ( newRules ) ; org . candlepin . model . Rules latestRules = rulesCurator . getRules ( ) ; "<AssertPlaceHolder>" ; } getRules ( ) { return rules ; }
org . junit . Assert . assertEquals ( origRules . getRules ( ) , latestRules . getRules ( ) )
deveObterComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . assinatura . NFKeyInfo keyInfo = new com . fincatto . documentofiscal . nfe310 . classes . nota . assinatura . NFKeyInfo ( ) ; final com . fincatto . documentofiscal . nfe310 . classes . nota . assinatura . NFX509Data data = new com . fincatto . documentofiscal . nfe310 . classes . nota . assinatura . NFX509Data ( ) ; keyInfo . setData ( data ) ; "<AssertPlaceHolder>" ; } getData ( ) { return this . data ; }
org . junit . Assert . assertEquals ( data , keyInfo . getData ( ) )
testRemoveAll_disposeInReverseOrder ( ) { final java . util . List < java . lang . String > log = new java . util . ArrayList < java . lang . String > ( ) ; org . eclipse . swt . widgets . Table_Test . createTableItems ( table , 5 ) ; for ( org . eclipse . swt . widgets . TableItem item : table . getItems ( ) ) { item . addDisposeListener ( new org . eclipse . swt . events . DisposeListener ( ) { @ org . eclipse . swt . widgets . Override public void widgetDisposed ( org . eclipse . swt . events . DisposeEvent event ) { org . eclipse . swt . widgets . TableItem item = ( ( org . eclipse . swt . widgets . TableItem ) ( event . getSource ( ) ) ) ; log . add ( item . getText ( ) ) ; } } ) ; } table . removeAll ( ) ; java . lang . String [ ] expected = new java . lang . String [ ] { "item4" , "item3" , "item2" , "item1" , "item0" } ; "<AssertPlaceHolder>" ; } toArray ( java . lang . Object [ ] ) { int size = wrappedSet . size ( ) ; org . eclipse . jface . internal . databinding . viewers . ViewerElementWrapper [ ] wrappedArray = ( ( org . eclipse . jface . internal . databinding . viewers . ViewerElementWrapper [ ] ) ( wrappedSet . toArray ( new org . eclipse . jface . internal . databinding . viewers . ViewerElementWrapper [ size ] ) ) ) ; java . lang . Object [ ] result = a ; if ( ( a . length ) < size ) { result = ( ( java . lang . Object [ ] ) ( java . lang . reflect . Array . newInstance ( a . getClass ( ) . getComponentType ( ) , size ) ) ) ; } for ( int i = 0 ; i < size ; i ++ ) result [ i ] = wrappedArray [ i ] . unwrap ( ) ; return result ; }
org . junit . Assert . assertArrayEquals ( expected , log . toArray ( new java . lang . String [ 0 ] ) )
testSerialization_Sparse ( ) { com . clearspring . analytics . stream . cardinality . HyperLogLogPlus hll = new com . clearspring . analytics . stream . cardinality . HyperLogLogPlus ( 14 , 25 ) ; hll . offer ( "a" ) ; hll . offer ( "b" ) ; hll . offer ( "c" ) ; hll . offer ( "d" ) ; hll . offer ( "e" ) ; com . clearspring . analytics . stream . cardinality . HyperLogLogPlus hll2 = HyperLogLogPlus . Builder . build ( hll . getBytes ( ) ) ; "<AssertPlaceHolder>" ; } cardinality ( ) { double registerSum = 0 ; int count = registerSet . count ; double zeros = 0.0 ; for ( int j = 0 ; j < ( registerSet . count ) ; j ++ ) { int val = registerSet . get ( j ) ; registerSum += 1.0 / ( 1 << val ) ; if ( val == 0 ) { zeros ++ ; } } double estimate = ( alphaMM ) * ( 1 / registerSum ) ; if ( estimate <= ( ( 5.0 / 2.0 ) * count ) ) { return java . lang . Math . round ( com . clearspring . analytics . stream . cardinality . HyperLogLog . linearCounting ( count , zeros ) ) ; } else { return java . lang . Math . round ( estimate ) ; } }
org . junit . Assert . assertEquals ( hll . cardinality ( ) , hll2 . cardinality ( ) )
testParse_sql10 ( ) { com . tongbanjie . baymax . parser . model . ParseResult result = new com . tongbanjie . baymax . parser . model . ParseResult ( ) ; parser . init ( sql10 , null ) ; parser . parse ( result ) ; com . tongbanjie . baymax . test . PrintUtil . printCalculates ( result . getCalculateUnits ( ) ) ; "<AssertPlaceHolder>" ; } getCalculateUnits ( ) { return calculateUnits ; }
org . junit . Assert . assertEquals ( 0 , result . getCalculateUnits ( ) . size ( ) )
testSetInterfaceMacAddress ( ) { defaultIsisInterface . setInterfaceMacAddress ( macAddress ) ; resultMacAddr = defaultIsisInterface . getInterfaceMacAddress ( ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Class ) { return true ; }
org . junit . Assert . assertThat ( resultMacAddr , org . hamcrest . CoreMatchers . is ( macAddress ) )