input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testGetName_1 ( ) { com . impetus . ankush . agent . action . impl . Property fixture = new com . impetus . ankush . agent . action . impl . Property ( ) ; fixture . setDescription ( "" ) ; fixture . setName ( "" ) ; fixture . setValue ( "" ) ; java . lang . String result = fixture . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return this . name ; }
org . junit . Assert . assertEquals ( "" , result )
testInterpolation2 ( ) { final int sz = 21 ; double [ ] xval = new double [ sz ] ; double [ ] yval = new double [ sz ] ; final double delta = 1.0 / ( sz - 1 ) ; for ( int i = 0 ; i < sz ; i ++ ) { xval [ i ] = ( - 1 ) + ( ( 15 * i ) * delta ) ; yval [ i ] = ( - 20 ) + ( ( 30 * i ) * delta ) ; } org . apache . commons . math3 . analysis . BivariateFunction f = new org . apache . commons . math3 . analysis . BivariateFunction ( ) { public double value ( double x , double y ) { return ( ( ( ( 2 * x ) * x ) - ( ( 3 * y ) * y ) ) + ( ( 4 * x ) * y ) ) - 5 ; } } ; double [ ] [ ] zval = new double [ xval . length ] [ yval . length ] ; for ( int i = 0 ; i < ( xval . length ) ; i ++ ) { for ( int j = 0 ; j < ( yval . length ) ; j ++ ) { zval [ i ] [ j ] = f . value ( xval [ i ] , yval [ j ] ) ; } } double [ ] [ ] dZdX = new double [ xval . length ] [ yval . length ] ; org . apache . commons . math3 . analysis . BivariateFunction dfdX = new org . apache . commons . math3 . analysis . BivariateFunction ( ) { public double value ( double x , double y ) { return 4 * ( x + y ) ; } } ; for ( int i = 0 ; i < ( xval . length ) ; i ++ ) { for ( int j = 0 ; j < ( yval . length ) ; j ++ ) { dZdX [ i ] [ j ] = dfdX . value ( xval [ i ] , yval [ j ] ) ; } } double [ ] [ ] dZdY = new double [ xval . length ] [ yval . length ] ; org . apache . commons . math3 . analysis . BivariateFunction dfdY = new org . apache . commons . math3 . analysis . BivariateFunction ( ) { public double value ( double x , double y ) { return ( 4 * x ) - ( 6 * y ) ; } } ; for ( int i = 0 ; i < ( xval . length ) ; i ++ ) { for ( int j = 0 ; j < ( yval . length ) ; j ++ ) { dZdY [ i ] [ j ] = dfdY . value ( xval [ i ] , yval [ j ] ) ; } } double [ ] [ ] dZdXdY = new double [ xval . length ] [ yval . length ] ; for ( int i = 0 ; i < ( xval . length ) ; i ++ ) { for ( int j = 0 ; j < ( yval . length ) ; j ++ ) { dZdXdY [ i ] [ j ] = 4 ; } } org . apache . commons . math3 . analysis . BivariateFunction bcf = new org . apache . commons . math3 . analysis . interpolation . BicubicSplineInterpolatingFunction ( xval , yval , zval , dZdX , dZdY , dZdXdY ) ; double x ; double y ; final org . apache . commons . math3 . random . RandomGenerator rng = new org . apache . commons . math3 . random . Well19937c ( 1234567L ) ; final org . apache . commons . math3 . distribution . UniformRealDistribution distX = new org . apache . commons . math3 . distribution . UniformRealDistribution ( rng , xval [ 0 ] , xval [ ( ( xval . length ) - 1 ) ] ) ; final org . apache . commons . math3 . distribution . UniformRealDistribution distY = new org . apache . commons . math3 . distribution . UniformRealDistribution ( rng , yval [ 0 ] , yval [ ( ( yval . length ) - 1 ) ] ) ; final double tol = 224 ; for ( int i = 0 ; i < sz ; i ++ ) { x = distX . sample ( ) ; for ( int j = 0 ; j < sz ; j ++ ) { y = distY . sample ( ) ; "<AssertPlaceHolder>" ; } } } value ( double , double [ ] ) { validateParameters ( parameters ) ; final double a = parameters [ 0 ] ; final double b = parameters [ 1 ] ; final double c = parameters [ 2 ] ; final double d = parameters [ 3 ] ; final double xMc = x - c ; return a + ( b * ( java . lang . Math . exp ( ( ( ( - xMc ) * xMc ) / ( 2.0 * ( d * d ) ) ) ) ) ) ; }
org . junit . Assert . assertEquals ( f . value ( x , y ) , bcf . value ( x , y ) , tol )
testKeyIteratorOnSplitMap ( ) { com . sun . sgs . test . app . util . TestScalableHashMap . txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) throws com . sun . sgs . test . app . util . Exception { java . util . Map < java . lang . Integer , java . lang . Integer > test = new com . sun . sgs . app . util . ScalableHashMap < java . lang . Integer , java . lang . Integer > ( 16 ) ; java . util . Set < java . lang . Integer > control = new java . util . HashSet < java . lang . Integer > ( ) ; for ( int i = 0 ; i < 33 ; i ++ ) { test . put ( i , i ) ; control . add ( i ) ; } for ( java . lang . Integer i : test . keySet ( ) ) { control . remove ( i ) ; } "<AssertPlaceHolder>" ; } } , com . sun . sgs . test . app . util . TestScalableHashMap . taskOwner ) ; } size ( ) { int size = 0 ; com . sun . sgs . app . util . ScalableDeque . Element < E > n = headElement ( ) ; while ( n != null ) { size ++ ; n = n . next ( ) ; } return size ; }
org . junit . Assert . assertEquals ( 0 , control . size ( ) )
canListAssetsWithOptions ( ) { java . lang . String [ ] assetNames = new java . lang . String [ ] { ( testAssetPrefix ) + "assetListOptionsA" , ( testAssetPrefix ) + "assetListOptionsB" , ( testAssetPrefix ) + "assetListOptionsC" , ( testAssetPrefix ) + "assetListOptionsD" } ; java . util . List < com . microsoft . windowsazure . services . media . models . AssetInfo > expectedAssets = new java . util . ArrayList < com . microsoft . windowsazure . services . media . models . AssetInfo > ( ) ; for ( int i = 0 ; i < ( assetNames . length ) ; i ++ ) { java . lang . String name = assetNames [ i ] ; expectedAssets . add ( service . create ( com . microsoft . windowsazure . services . media . models . Asset . create ( ) . setName ( name ) ) ) ; } java . util . Collection < com . microsoft . windowsazure . services . media . models . AssetInfo > listAssetResult = service . list ( com . microsoft . windowsazure . services . media . models . Asset . list ( ) . setTop ( 2 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . size ; }
org . junit . Assert . assertEquals ( 2 , listAssetResult . size ( ) )
testHashCode ( ) { org . jfree . chart . axis . NumberTickUnit t1 = new org . jfree . chart . axis . NumberTickUnit ( 1.23 , new java . text . DecimalFormat ( "0.00" ) ) ; org . jfree . chart . axis . NumberTickUnit t2 = new org . jfree . chart . axis . NumberTickUnit ( 1.23 , new java . text . DecimalFormat ( "0.00" ) ) ; int h1 = t1 . hashCode ( ) ; int h2 = t2 . hashCode ( ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return getUuid ( ) . hashCode ( ) ; }
org . junit . Assert . assertEquals ( h1 , h2 )
testCopyToWriterWithBuf ( ) { org . eclipse . jgit . lfs . lib . AnyLongObjectId id1 = org . eclipse . jgit . lfs . test . LongObjectIdTestUtils . hash ( "test" ) ; java . io . ByteArrayOutputStream os = new java . io . ByteArrayOutputStream ( 64 ) ; try ( java . io . OutputStreamWriter w = new java . io . OutputStreamWriter ( os , UTF_8 ) ) { char [ ] buf = new char [ 64 ] ; id1 . copyTo ( buf , w ) ; } "<AssertPlaceHolder>" ; } fromString ( byte [ ] , int ) { return org . eclipse . jgit . lfs . lib . LongObjectId . fromHexString ( buf , offset ) ; }
org . junit . Assert . assertEquals ( id1 , org . eclipse . jgit . lfs . lib . LongObjectId . fromString ( os . toByteArray ( ) , 0 ) )
testDepth5 ( ) { java . util . Iterator < java . util . List < java . lang . String > > d5 = new org . kitesdk . data . spi . filesystem . TestMultiLevelIterator . RecursiveMapIterator ( 5 , ( ( java . util . Map ) ( org . kitesdk . data . spi . filesystem . TestMultiLevelIterator . l1 ) ) ) ; java . util . Set < java . util . List < java . lang . String > > expected = com . google . common . collect . Sets . newHashSet ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expected , com . google . common . collect . Sets . newHashSet ( d5 ) )
restoreWithFilterRecordsWarningWhenDirectoryIsNotNormalAndNotMatching ( ) { java . nio . file . Path symlink = ddfHome . resolve ( createSoftLink ( "symlink" , path ) ) ; when ( mockPathUtils . resolveAgainstDDFHome ( any ( java . nio . file . Path . class ) ) ) . thenReturn ( symlink ) ; entry = new org . codice . ddf . configuration . migration . ImportMigrationExternalEntryImpl ( mockContext , org . codice . ddf . configuration . migration . ImportMigrationExternalEntryImplTest . METADATA_DIR_MAP ) ; "<AssertPlaceHolder>" ; verifyReportHasMatchingError ( report , "does<sp>not<sp>match<sp>filter" ) ; } restore ( boolean , java . nio . file . PathMatcher ) { org . apache . commons . lang . Validate . notNull ( filter , "invalid<sp>null<sp>path<sp>filter" ) ; if ( ( restored ) == null ) { this . restored = false ; if ( filter . matches ( path ) ) { this . restored = handleRestore ( required , filter ) ; } else { this . restored = handleRestoreWhenFilterNotMatching ( required ) ; } } return restored ; }
org . junit . Assert . assertThat ( entry . restore ( true , ( p ) -> false ) , org . hamcrest . CoreMatchers . equalTo ( false ) )
testFind ( ) { ch . maxant . generic_jca_adapter . MicroserviceResourceFactory msrFactory = mock ( ch . maxant . generic_jca_adapter . MicroserviceResourceFactory . class ) ; ch . maxant . generic_jca_adapter . MicroserviceXAResource xa = new ch . maxant . generic_jca_adapter . MicroserviceXAResource ( "a" , mock ( ch . maxant . generic_jca_adapter . CommitRollbackCallback . class ) ) ; when ( msrFactory . build ( ) ) . thenReturn ( xa ) ; ch . maxant . generic_jca_adapter . MicroserviceResourceProducer . registerMicroserviceResourceFactory ( "a" , msrFactory ) ; ch . maxant . generic_jca_adapter . MicroserviceResourceProducer producer = ch . maxant . generic_jca_adapter . MicroserviceResourceProducer . getProducers ( ) . values ( ) . iterator ( ) . next ( ) ; bitronix . tm . BitronixTransactionManager tm = bitronix . tm . TransactionManagerServices . getTransactionManager ( ) ; try { tm . begin ( ) ; producer . getTransactionAssistant ( ) ; javax . transaction . xa . XAResource found = producer . findXAResourceHolder ( xa ) . getXAResource ( ) ; "<AssertPlaceHolder>" ; } finally { tm . rollback ( ) ; } } getXAResource ( ) { return xa ; }
org . junit . Assert . assertEquals ( xa , found )
shouldRoundTripXMLLiteral ( ) { java . lang . String literal = "<div<sp>xmlns=\'http://www.w3.org/1999/xhtml\'><h3>[unknown]</h3><p>(describe<sp>NameGroup<sp>\"[unknown]\")</p></div>" ; org . semanticweb . owlapi . model . OWLOntology o = getOWLOntology ( ) ; org . semanticweb . owlapi . model . OWLDataProperty p = df . getOWLDataProperty ( org . semanticweb . owlapi . model . IRI . create ( "urn:test#" , "p" ) ) ; org . semanticweb . owlapi . model . OWLLiteral l = df . getOWLLiteral ( literal , OWL2Datatype . RDF_XML_LITERAL ) ; org . semanticweb . owlapi . model . OWLNamedIndividual i = df . getOWLNamedIndividual ( org . semanticweb . owlapi . model . IRI . create ( "urn:test#" , "i" ) ) ; o . add ( df . getOWLDataPropertyAssertionAxiom ( p , i , l ) ) ; java . lang . String string = saveOntology ( o ) . toString ( ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . Object ) { if ( o == null ) { return false ; } int oHash = o . hashCode ( ) ; return ( ( checkMatch ( o , oHash , element1 ) ) || ( checkMatch ( o , oHash , element2 ) ) ) || ( checkMatch ( o , oHash , element3 ) ) ; }
org . junit . Assert . assertTrue ( string . contains ( literal ) )
testDoNotFlushCacheEntriesOnHead ( ) { final org . apache . hc . core5 . http . HttpHost host = new org . apache . hc . core5 . http . HttpHost ( "foo.example.com" ) ; final org . apache . hc . core5 . http . HttpRequest req = new org . apache . hc . client5 . http . classic . methods . HttpHead ( "/bar" ) ; final java . lang . String key = CacheKeyGenerator . INSTANCE . generateKey ( host , req ) ; final org . apache . hc . client5 . http . cache . HttpCacheEntry entry = org . apache . hc . client5 . http . impl . cache . HttpTestUtils . makeCacheEntry ( ) ; backing . map . put ( key , entry ) ; impl . flushCacheEntriesFor ( host , req ) ; "<AssertPlaceHolder>" ; } get ( int ) { return this . all . get ( index ) ; }
org . junit . Assert . assertEquals ( entry , backing . map . get ( key ) )
testSerialization ( ) { org . jfree . chart . plot . PiePlot p1 = new org . jfree . chart . plot . PiePlot ( null ) ; org . jfree . chart . plot . PiePlot p2 = ( ( org . jfree . chart . plot . PiePlot ) ( org . jfree . chart . TestUtils . serialised ( p1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( T extends java . io . Serializable ) { T 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 = ( ( T ) ( 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 )
bindingSetRowTest ( ) { java . lang . String nodeId = org . apache . rya . indexing . pcj . fluo . app . NodeType . generateNewFluoIdForType ( NodeType . STATEMENT_PATTERN ) ; org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet bs = new org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet ( ) ; bs . addBinding ( "entity" , org . apache . rya . indexing . pcj . fluo . app . util . BindingHashShardingFunctionTest . VF . createIRI ( "urn:entity" ) ) ; bs . addBinding ( "location" , org . apache . rya . indexing . pcj . fluo . app . util . BindingHashShardingFunctionTest . VF . createLiteral ( "location_1" ) ) ; org . apache . rya . api . model . VisibilityBindingSet vBs = new org . apache . rya . api . model . VisibilityBindingSet ( bs ) ; org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder varOrder = new org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ( "entity" , "location" ) ; org . apache . fluo . api . data . Bytes row = org . apache . rya . indexing . pcj . fluo . app . util . RowKeyUtil . makeRowKey ( nodeId , varOrder , vBs ) ; org . apache . fluo . api . data . Bytes shardedRow = org . apache . rya . indexing . pcj . fluo . app . util . BindingHashShardingFunction . addShard ( nodeId , varOrder , vBs ) ; org . apache . rya . indexing . pcj . fluo . app . BindingSetRow expected = org . apache . rya . indexing . pcj . fluo . app . BindingSetRow . make ( row ) ; org . apache . rya . indexing . pcj . fluo . app . BindingSetRow actual = org . apache . rya . indexing . pcj . fluo . app . BindingSetRow . makeFromShardedRow ( org . apache . fluo . api . data . Bytes . of ( org . apache . rya . indexing . pcj . fluo . app . IncrementalUpdateConstants . SP_PREFIX ) , shardedRow ) ; "<AssertPlaceHolder>" ; } makeFromShardedRow ( org . apache . fluo . api . data . Bytes , org . apache . fluo . api . data . Bytes ) { return org . apache . rya . indexing . pcj . fluo . app . BindingSetRow . make ( org . apache . rya . indexing . pcj . fluo . app . util . BindingHashShardingFunction . removeHash ( prefixBytes , row ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testRemove ( ) { com . liferay . social . kernel . model . SocialRequest newSocialRequest = addSocialRequest ( ) ; _persistence . remove ( newSocialRequest ) ; com . liferay . social . kernel . model . SocialRequest existingSocialRequest = _persistence . fetchByPrimaryKey ( newSocialRequest . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertNull ( existingSocialRequest )
ChaCha20Poly1305Keygen ( ) { org . libsodium . jni . Sodium sodium = org . libsodium . jni . NaCl . sodium ( ) ; byte [ ] key = new byte [ org . libsodium . jni . Sodium . crypto_aead_chacha20poly1305_keybytes ( ) ] ; org . libsodium . jni . Sodium . crypto_aead_chacha20poly1305_keygen ( key ) ; "<AssertPlaceHolder>" ; } crypto_aead_chacha20poly1305_keybytes ( ) { return org . libsodium . jni . SodiumJNI . crypto_aead_chacha20poly1305_keybytes ( ) ; }
org . junit . Assert . assertEquals ( key . length , org . libsodium . jni . Sodium . crypto_aead_chacha20poly1305_keybytes ( ) )
testInvalidProbe ( ) { java . lang . IllegalArgumentException e = null ; try { pm . getOrRunHealthCheck ( "invalidProbe" ) ; } catch ( java . lang . IllegalArgumentException e1 ) { e = e1 ; } "<AssertPlaceHolder>" ; } getOrRunHealthCheck ( java . lang . String ) { org . nuxeo . ecm . core . management . api . ProbeManager pm = org . nuxeo . runtime . api . Framework . getService ( org . nuxeo . ecm . core . management . api . ProbeManager . class ) ; if ( org . apache . commons . lang3 . StringUtils . isEmpty ( probe ) ) { return pm . getOrRunHealthChecks ( ) ; } else { return pm . getOrRunHealthCheck ( probe ) ; } }
org . junit . Assert . assertNotNull ( e )
testFeatureCollection ( ) { edu . illinois . cs . cogcomp . edison . features . FeatureCollection f = new edu . illinois . cs . cogcomp . edison . features . FeatureCollection ( "features" ) ; f . addFeatureExtractor ( WordFeatureExtractorFactory . conflatedPOS ) ; f . addFeatureExtractor ( WordFeatureExtractorFactory . gerundMarker ) ; f . addFeatureExtractor ( WordFeatureExtractorFactory . nominalizationMarker ) ; edu . illinois . cs . cogcomp . edison . features . factory . TestWordFeatureFactory . logger . info ( "\tTesting<sp>feature<sp>collection" ) ; java . util . Map < java . lang . Integer , java . lang . String > map = edu . illinois . cs . cogcomp . core . io . IOUtils . readObjectAsResource ( edu . illinois . cs . cogcomp . edison . features . factory . TestWordFeatureFactory . class , "feature.collection.test" ) ; for ( edu . illinois . cs . cogcomp . core . datastructures . textannotation . TextAnnotation ta : edu . illinois . cs . cogcomp . edison . features . factory . TestWordFeatureFactory . tas ) { for ( int tokenId = 0 ; tokenId < ( ta . size ( ) ) ; tokenId ++ ) { edu . illinois . cs . cogcomp . core . datastructures . textannotation . Constituent c = new edu . illinois . cs . cogcomp . core . datastructures . textannotation . Constituent ( "" , "" , ta , tokenId , ( tokenId + 1 ) ) ; java . util . Set < edu . illinois . cs . cogcomp . edison . features . Feature > features = f . getFeatures ( c ) ; if ( ( features . size ( ) ) > 0 ) { java . lang . String id = ( ( ta . getTokenizedText ( ) ) + ":" ) + tokenId ; "<AssertPlaceHolder>" ; } } } } get ( java . lang . String ) { item = item . trim ( ) ; java . lang . String sql = "select<sp>value<sp>from<sp>counts<sp>where<sp>item<sp>=<sp>?" ; try { edu . illinois . cs . cogcomp . nlp . pmi . Connection c = edu . illinois . cs . cogcomp . nlp . pmi . CountsCache . getConnection ( dbFile ) ; edu . illinois . cs . cogcomp . nlp . pmi . PreparedStatement stmt = c . prepareStatement ( sql ) ; stmt . setString ( 1 , item ) ; edu . illinois . cs . cogcomp . nlp . pmi . ResultSet rs = stmt . executeQuery ( ) ; if ( rs . next ( ) ) { return rs . getLong ( 1 ) ; } else { return - 1 ; } } catch ( java . lang . Exception ex ) { throw new java . lang . RuntimeException ( ex ) ; } }
org . junit . Assert . assertEquals ( map . get ( id . hashCode ( ) ) , features . toString ( ) )
shouldUseCRestExceptionHandle ( ) { java . lang . Exception e = new java . lang . Exception ( ) ; java . lang . RuntimeException expected = new java . lang . RuntimeException ( ) ; mockStatic ( org . codegist . crest . CRestException . class ) ; when ( org . codegist . crest . CRestException . handle ( e ) ) . thenReturn ( expected ) ; org . codegist . crest . io . Request request = mock ( org . codegist . crest . io . Request . class ) ; try { toTest . handle ( request , e ) ; } catch ( java . lang . RuntimeException e1 ) { "<AssertPlaceHolder>" ; verifyNoMoreInteractions ( request ) ; } } handle ( org . codegist . crest . io . Request , java . lang . Exception ) { throw org . codegist . crest . CRestException . handle ( e ) ; }
org . junit . Assert . assertSame ( expected , e1 )
exists_A$Function1_Nil ( ) { com . m3 . scalaflavor4j . Seq < java . lang . Integer > seq = com . m3 . scalaflavor4j . Seq . apply ( ) ; boolean actual = seq . exists ( new com . m3 . scalaflavor4j . F1 < java . lang . Integer , java . lang . Boolean > ( ) { public com . m3 . scalaflavor4j . Boolean apply ( java . lang . Integer v1 ) { return v1 < 3 ; } } ) ; boolean expected = false ; "<AssertPlaceHolder>" ; } apply ( ) { com . m3 . scalaflavor4j . MainFunction main = new com . m3 . scalaflavor4j . MainFunction ( ) { public void apply ( java . lang . String [ ] args ) throws com . m3 . scalaflavor4j . Exception { print . apply ( args . length ) ; com . m3 . scalaflavor4j . Seq . apply ( args ) . foreach ( new com . m3 . scalaflavor4j . VoidF1 < java . lang . String > ( ) { public void apply ( java . lang . String arg ) throws com . m3 . scalaflavor4j . Exception { print . apply ( arg ) ; } } ) ; } } ; main . apply ( new java . lang . String [ ] { "a" , "b" } ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
testInvalidateClusteredBy ( ) { hcatDriver . run ( "drop<sp>table<sp>junit_sem_analysis" ) ; query = "create<sp>table<sp>junit_sem_analysis<sp>(a<sp>int)<sp>partitioned<sp>by<sp>(b<sp>string)<sp>clustered<sp>by<sp>(a)<sp>into<sp>10<sp>buckets<sp>stored<sp>as<sp>TEXTFILE" ; org . apache . hadoop . hive . ql . processors . CommandProcessorResponse response = hcatDriver . run ( query ) ; "<AssertPlaceHolder>" ; } getResponseCode ( ) { return responseCode ; }
org . junit . Assert . assertEquals ( 0 , response . getResponseCode ( ) )
testCheckServiceClassWithTheEndpoint ( ) { org . apache . camel . component . cxf . CxfEndpoint endpoint = createEndpoint ( getNoServiceClassURI ( ) ) ; "<AssertPlaceHolder>" ; } getServiceClass ( ) { return serviceClass ; }
org . junit . Assert . assertNull ( endpoint . getServiceClass ( ) )
testGetPaddingLength ( ) { "<AssertPlaceHolder>" ; } calculatePaddingLength ( int ) { return 0 ; }
org . junit . Assert . assertEquals ( record . calculatePaddingLength ( 0 ) , 0 )
testSet_IAtomContainer_IAtomContainer ( ) { org . openscience . cdk . smiles . SmilesParser sp = new org . openscience . cdk . smiles . SmilesParser ( org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAtomContainer target = sp . parseSmiles ( "C\\C=C/Nc1cccc(c1)N(O)\\C=C\\C\\C=C\\C=C/C" ) ; org . openscience . cdk . interfaces . IAtomContainer queryac = sp . parseSmiles ( "Nc1ccccc1" ) ; org . openscience . cdk . smsd . Isomorphism smsd1 = new org . openscience . cdk . smsd . Isomorphism ( org . openscience . cdk . smsd . interfaces . Algorithm . DEFAULT , true ) ; smsd1 . init ( queryac , target , true , true ) ; smsd1 . setChemFilters ( true , true , true ) ; "<AssertPlaceHolder>" ; } getFirstMapping ( ) { return firstSolution . isEmpty ( ) ? null : firstSolution ; }
org . junit . Assert . assertNotNull ( smsd1 . getFirstMapping ( ) )
evaluatesArithmetics ( ) { org . teavm . flavour . expr . test . IntComputation c = parseExpr ( org . teavm . flavour . expr . test . IntComputation . class , "intValue<sp>-<sp>3" ) ; vars . intValue ( 8 ) ; "<AssertPlaceHolder>" ; } parseExpr ( java . lang . Class , java . lang . String ) { org . teavm . flavour . expr . EvaluatorBuilder builder = new org . teavm . flavour . expr . InterpretingEvaluatorBuilder ( ) . importPackage ( "java.lang" ) . importPackage ( "java.util" ) . importClass ( org . teavm . flavour . expr . test . EvaluatorTest . class . getName ( ) ) . importClass ( java . util . stream . Collectors . class . getName ( ) ) ; org . teavm . flavour . expr . Evaluator < T , org . teavm . flavour . expr . test . TestVars > e ; try { e = builder . build ( cls , org . teavm . flavour . expr . test . TestVars . class , str ) ; } catch ( org . teavm . flavour . expr . InvalidExpressionException ex ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "Errors<sp>occurred<sp>compiling<sp>expression:\n" ) ; sb . append ( str ) . append ( "\n" ) ; java . util . List < org . teavm . flavour . expr . Diagnostic > diagnostics = ex . getDiagnostics ( ) . stream ( ) . sorted ( java . util . Comparator . comparingInt ( ( d ) -> d . getStart ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; for ( org . teavm . flavour . expr . Diagnostic diagnostic : diagnostics ) { for ( int i = 0 ; i < ( diagnostic . getStart ( ) ) ; ++ i ) { sb . append ( '<sp>' ) ; } sb . append ( "^\n" ) ; sb . append ( diagnostic . getMessage ( ) ) . append ( "\n\n" ) ; } throw new java . lang . AssertionError ( sb . toString ( ) ) ; } vars = e . getVariables ( ) ; return e . getFunction ( ) ; }
org . junit . Assert . assertThat ( c . compute ( ) , org . hamcrest . Matchers . is ( 5 ) )
testAdditionOfDuplicatePeriod ( ) { org . jfree . data . time . ohlc . OHLCSeries s1 = new org . jfree . data . time . ohlc . OHLCSeries ( "s1" ) ; s1 . add ( new org . jfree . data . time . Year ( 2006 ) , 1.0 , 1.0 , 1.0 , 1.0 ) ; boolean pass = false ; try { s1 . add ( new org . jfree . data . time . Year ( 2006 ) , 1.0 , 1.0 , 1.0 , 1.0 ) ; } catch ( org . jfree . data . general . SeriesException e ) { pass = true ; } "<AssertPlaceHolder>" ; } add ( org . jfree . data . time . RegularTimePeriod , double , double , double , double ) { if ( ( getItemCount ( ) ) > 0 ) { org . jfree . data . time . ohlc . OHLCItem item0 = ( ( org . jfree . data . time . ohlc . OHLCItem ) ( this . getDataItem ( 0 ) ) ) ; if ( ! ( period . getClass ( ) . equals ( item0 . getPeriod ( ) . getClass ( ) ) ) ) { throw new java . lang . IllegalArgumentException ( "Can't<sp>mix<sp>RegularTimePeriod<sp>class<sp>types." ) ; } } super . add ( new org . jfree . data . time . ohlc . OHLCItem ( period , open , high , low , close ) , true ) ; }
org . junit . Assert . assertTrue ( pass )
convertToQueryBuilderParam ( ) { org . apache . sling . testing . mock . sling . servlet . MockSlingHttpServletRequest request = context . request ( ) ; request . setParameterMap ( com . google . common . collect . ImmutableMap . < java . lang . String , java . lang . Object > builder ( ) . put ( "_ctqb" , "true" ) . build ( ) ) ; "<AssertPlaceHolder>" ; } convertToQueryBuilder ( org . apache . sling . api . SlingHttpServletRequest ) { return ( com . adobe . acs . commons . contentfinder . querybuilder . impl . viewhandler . GQLToQueryBuilderConverter . has ( request , ContentFinderConstants . CONVERT_TO_QUERYBUILDER_KEY ) ) && ( ContentFinderConstants . CONVERT_TO_QUERYBUILDER_VALUE . equals ( com . adobe . acs . commons . contentfinder . querybuilder . impl . viewhandler . GQLToQueryBuilderConverter . get ( request , ContentFinderConstants . CONVERT_TO_QUERYBUILDER_KEY ) ) ) ; }
org . junit . Assert . assertTrue ( com . adobe . acs . commons . contentfinder . querybuilder . impl . viewhandler . GQLToQueryBuilderConverter . convertToQueryBuilder ( request ) )
testQueryStringValueExists ( ) { org . ocpsoft . rewrite . servlet . config . Query query = org . ocpsoft . rewrite . servlet . config . Query . valueExists ( "{b}ar" ) ; query . setParameterStore ( store ) ; store . get ( "b" , new org . ocpsoft . rewrite . param . DefaultParameter ( "b" ) ) ; "<AssertPlaceHolder>" ; } evaluate ( org . ocpsoft . rewrite . event . Rewrite , org . ocpsoft . rewrite . context . EvaluationContext ) { if ( ( zone ) != null ) return condition . matches ( new org . joda . time . DateTime ( zone ) ) ; else return condition . matches ( new org . joda . time . DateTime ( ) ) ; }
org . junit . Assert . assertTrue ( query . evaluate ( rewrite , context ) )
gettingAResourceWithAnExpiredSession ( ) { try { getAt ( aResourceURI ( ) , org . silverpeas . web . ResourceGettingTest . withAsApiToken ( java . util . UUID . randomUUID ( ) . toString ( ) ) , org . silverpeas . web . ResourceGettingTest . asMediaType ( MediaType . APPLICATION_JSON_TYPE ) , getWebEntityClass ( ) ) ; org . junit . Assert . fail ( "A<sp>non<sp>authenticated<sp>user<sp>shouldn't<sp>access<sp>the<sp>resource" ) ; } catch ( javax . ws . rs . WebApplicationException ex ) { int receivedStatus = ex . getResponse ( ) . getStatus ( ) ; int unauthorized = Status . UNAUTHORIZED . getStatusCode ( ) ; "<AssertPlaceHolder>" ; } } is ( T ) { return java . util . Objects . equals ( this . value , value ) ; }
org . junit . Assert . assertThat ( receivedStatus , org . hamcrest . Matchers . is ( unauthorized ) )
loadFromFile ( ) { java . lang . String pathToConfig = "src/test/resources/" ; org . neo4j . graphdb . GraphDatabaseService graphDb = new org . neo4j . graphdb . factory . GraphDatabaseFactory ( ) . newEmbeddedDatabaseBuilder ( testDirectory . databaseDir ( ) ) . loadPropertiesFromFile ( ( pathToConfig + "neo4j.conf" ) ) . newGraphDatabase ( ) ; "<AssertPlaceHolder>" ; graphDb . shutdown ( ) ; } databaseDir ( ) { return databaseLayout ( ) . databaseDirectory ( ) ; }
org . junit . Assert . assertNotNull ( graphDb )
testAddIntRdn006 ( ) { javax . naming . ldap . LdapName ln = new javax . naming . ldap . LdapName ( "" ) ; javax . naming . ldap . Rdn toadd = new javax . naming . ldap . Rdn ( "" ) ; ln . add ( 0 , toadd ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . toString ( "" ) ; }
org . junit . Assert . assertEquals ( "" , ln . toString ( ) )
testAssociationObjectParser1 ( ) { final org . opendaylight . protocol . rsvp . parser . impl . te . AssociationObjectParserIPV4 parser = new org . opendaylight . protocol . rsvp . parser . impl . te . AssociationObjectParserIPV4 ( ) ; final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . rsvp . rev150820 . RsvpTeObject obj = parser . parseObject ( io . netty . buffer . Unpooled . copiedBuffer ( org . opendaylight . protocol . util . ByteArray . subByte ( TEObjectUtil . TE_LSP_ASSOCIATION_1 , 4 , ( ( TEObjectUtil . TE_LSP_ASSOCIATION_1 . length ) - 4 ) ) ) ) ; final io . netty . buffer . ByteBuf output = io . netty . buffer . Unpooled . buffer ( ) ; parser . serializeObject ( obj , output ) ; "<AssertPlaceHolder>" ; } getAllBytes ( io . netty . buffer . ByteBuf ) { return org . opendaylight . protocol . util . ByteArray . getBytes ( buffer , buffer . readableBytes ( ) ) ; }
org . junit . Assert . assertArrayEquals ( TEObjectUtil . TE_LSP_ASSOCIATION_1 , org . opendaylight . protocol . util . ByteArray . getAllBytes ( output ) )
testWasEventSent_sent ( ) { org . eclipse . rap . rwt . testfixture . internal . Fixture . fakeNotifyOperation ( "w3" , "widgetSelected" , new org . eclipse . rap . json . JsonObject ( ) ) ; "<AssertPlaceHolder>" ; } wasEventSent ( java . lang . String , java . lang . String ) { org . eclipse . rap . rwt . internal . protocol . ClientMessage message = org . eclipse . rap . rwt . internal . protocol . ProtocolUtil . getClientMessage ( ) ; org . eclipse . rap . rwt . internal . protocol . Operation . NotifyOperation operation = message . getLastNotifyOperationFor ( target , eventName ) ; return operation != null ; }
org . junit . Assert . assertTrue ( org . eclipse . rap . rwt . internal . protocol . ProtocolUtil . wasEventSent ( "w3" , "widgetSelected" ) )
testToString ( ) { com . sumologic . report . config . ReportSheet reportSheet = new com . sumologic . report . config . ReportSheet ( ) ; reportSheet . setSheetName ( "foo" ) ; com . sumologic . report . config . SearchJob searchJob = new com . sumologic . report . config . SearchJob ( ) ; searchJob . setTimezone ( "PST" ) ; searchJob . setTo ( "9/2/2015" ) ; searchJob . setFrom ( "9/1/2015" ) ; searchJob . setQuery ( "error" ) ; reportSheet . setSearchJob ( searchJob ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( "ReportSheet{" + "sheetName='" ) + ( sheetName ) ) + '\'' ) + ",<sp>searchJob=" ) + ( searchJob ) ) + '}' ; }
org . junit . Assert . assertNotNull ( reportSheet . toString ( ) )
testConstructor2 ( ) { try { new ai . labs . persistence . ResultManipulator ( new java . util . LinkedList ( ) , null ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } }
org . junit . Assert . assertEquals ( ai . labs . persistence . IllegalArgumentException . class , e . getClass ( ) )
convert_when_streamMessage_has_JMSPriority ( ) { int jmsPriority = 1 ; javax . jms . StreamMessage message = new org . apache . activemq . command . ActiveMQStreamMessage ( ) ; message . setJMSPriority ( jmsPriority ) ; message . reset ( ) ; javax . jms . StreamMessage result = uut . convert ( message ) ; "<AssertPlaceHolder>" ; } getJMSPriority ( ) { return this . jmsPriority ; }
org . junit . Assert . assertEquals ( jmsPriority , result . getJMSPriority ( ) )
emptyCollectionToString ( ) { final java . lang . String expected = "" ; final java . util . Collection < java . lang . String > collection = new java . util . HashSet < java . lang . String > ( ) ; final java . lang . String result = org . sentilo . web . catalog . utils . CatalogUtils . collectionToString ( collection ) ; "<AssertPlaceHolder>" ; } collectionToString ( java . util . Collection ) { final java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ! ( org . springframework . util . CollectionUtils . isEmpty ( values ) ) ) { for ( final java . lang . Object entry : values ) { if ( ( sb . length ( ) ) > 0 ) { sb . append ( ",<sp>" ) ; } sb . append ( entry ) ; } } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , result )
testGetStrandNames ( ) { org . openscience . cdk . interfaces . IBioPolymer oBioPolymer = ( ( org . openscience . cdk . interfaces . IBioPolymer ) ( newChemObject ( ) ) ) ; org . openscience . cdk . interfaces . IStrand oStrand1 = oBioPolymer . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IStrand . class ) ; org . openscience . cdk . interfaces . IStrand oStrand2 = oBioPolymer . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IStrand . class ) ; oStrand1 . setStrandName ( "A" ) ; oStrand2 . setStrandName ( "B" ) ; org . openscience . cdk . interfaces . IMonomer oMono1 = oBioPolymer . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IMonomer . class ) ; oMono1 . setMonomerName ( new java . lang . String ( "TRP279" ) ) ; org . openscience . cdk . interfaces . IMonomer oMono2 = oBioPolymer . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IMonomer . class ) ; oMono2 . setMonomerName ( new java . lang . String ( "GLY123" ) ) ; org . openscience . cdk . interfaces . IAtom oAtom1 = oBioPolymer . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ; org . openscience . cdk . interfaces . IAtom oAtom2 = oBioPolymer . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ; oBioPolymer . addAtom ( oAtom1 , oMono1 , oStrand1 ) ; oBioPolymer . addAtom ( oAtom2 , oMono2 , oStrand2 ) ; java . util . Map < java . lang . String , org . openscience . cdk . interfaces . IStrand > strands = new java . util . Hashtable < java . lang . String , org . openscience . cdk . interfaces . IStrand > ( ) ; strands . put ( "A" , oStrand1 ) ; strands . put ( "B" , oStrand2 ) ; "<AssertPlaceHolder>" ; } getStrandNames ( ) { return strands . keySet ( ) ; }
org . junit . Assert . assertEquals ( strands . keySet ( ) , oBioPolymer . getStrandNames ( ) )
testGroupByDCAndPodNumber ( ) { com . salesforce . dva . argus . service . metric . transform . GroupByTransform transform = new com . salesforce . dva . argus . service . metric . transform . GroupByTransform ( new com . salesforce . dva . argus . service . metric . transform . TransformFactory ( null ) ) ; java . util . Map < java . lang . Long , java . lang . Double > datapoints = new java . util . HashMap < java . lang . Long , java . lang . Double > ( ) ; datapoints . put ( 1000L , 1.0 ) ; java . util . List < com . salesforce . dva . argus . entity . Metric > metrics = new java . util . ArrayList ( ) ; com . salesforce . dva . argus . entity . Metric metric1 = new com . salesforce . dva . argus . entity . Metric ( "system.DCA.SP1.ab2" 0 , "metric1" ) ; metric1 . setDatapoints ( datapoints ) ; com . salesforce . dva . argus . entity . Metric metric2 = new com . salesforce . dva . argus . entity . Metric ( "system.DCA.SP1.ab2" , "metric1" ) ; metric2 . setDatapoints ( datapoints ) ; com . salesforce . dva . argus . entity . Metric metric3 = new com . salesforce . dva . argus . entity . Metric ( "system.DCA.SP1.xy1" , "system.DCA.SP1.ab2" 1 ) ; metric3 . setDatapoints ( datapoints ) ; com . salesforce . dva . argus . entity . Metric metric4 = new com . salesforce . dva . argus . entity . Metric ( "system.DCA.SP1.xy2" , "system.DCA.SP1.ab2" 1 ) ; metric4 . setDatapoints ( datapoints ) ; com . salesforce . dva . argus . entity . Metric metric5 = new com . salesforce . dva . argus . entity . Metric ( "system.DCB.SP1.ab1" , "metric1" ) ; metric5 . setDatapoints ( datapoints ) ; com . salesforce . dva . argus . entity . Metric metric6 = new com . salesforce . dva . argus . entity . Metric ( "system.DCB.SP1.ab2" , "metric1" ) ; metric6 . setDatapoints ( datapoints ) ; com . salesforce . dva . argus . entity . Metric metric7 = new com . salesforce . dva . argus . entity . Metric ( "system.DCB.SP1.xy1" , "system.DCA.SP1.ab2" 1 ) ; metric7 . setDatapoints ( datapoints ) ; com . salesforce . dva . argus . entity . Metric metric8 = new com . salesforce . dva . argus . entity . Metric ( "system.DCB.SP1.xy2" , "system.DCA.SP1.ab2" 1 ) ; metric8 . setDatapoints ( datapoints ) ; metrics . add ( metric1 ) ; metrics . add ( metric2 ) ; metrics . add ( metric3 ) ; metrics . add ( metric4 ) ; metrics . add ( metric5 ) ; metrics . add ( metric6 ) ; metrics . add ( metric7 ) ; metrics . add ( metric8 ) ; java . util . List < java . lang . String > constants = new java . util . ArrayList ( ) ; constants . add ( "system\\.([A-Z]+)\\.SP.\\.[a-z][a-z]([0-9])" ) ; constants . add ( "SUM" ) ; java . util . List < com . salesforce . dva . argus . entity . Metric > result = transform . transform ( null , metrics , constants ) ; "<AssertPlaceHolder>" ; } transform ( com . salesforce . dva . argus . util . QueryContext , java . util . List , java . util . List ) { com . salesforce . dva . argus . system . SystemAssert . requireArgument ( ( metrics != null ) , "Cannot<sp>transform<sp>empty<sp>metric/metrics" ) ; if ( metrics . isEmpty ( ) ) { return metrics ; } if ( ( constants == null ) || ( constants . isEmpty ( ) ) ) { return transform ( null , metrics ) ; } else { com . salesforce . dva . argus . system . SystemAssert . requireArgument ( ( ( constants . size ( ) ) == 1 ) , "Normalize<sp>Transform<sp>must<sp>provide<sp>only<sp>one<sp>constants<sp>if<sp>any." ) ; com . salesforce . dva . argus . system . SystemAssert . requireArgument ( ( ( java . lang . Double . parseDouble ( constants . get ( 0 ) ) ) != 0.0 ) , "Normalize<sp>unit<sp>can't<sp>be<sp>ZERO." ) ; } com . salesforce . dva . argus . service . metric . transform . Transform divideByConstantTransform = new com . salesforce . dva . argus . service . metric . transform . MetricMappingTransform ( new com . salesforce . dva . argus . service . metric . transform . NormalizeTransformWrap . DivideByConstantValueMapping ( ) ) ; return divideByConstantTransform . transform ( null , metrics , constants ) ; }
org . junit . Assert . assertTrue ( ( ( result . size ( ) ) == 4 ) )
test1processError ( ) { org . apache . ranger . rest . ServiceTagsProcessor sTagProcessor = new org . apache . ranger . rest . ServiceTagsProcessor ( null ) ; sTagProcessor . process ( serviceTags ) ; "<AssertPlaceHolder>" ; } process ( T ) { if ( value != null ) { if ( ( writer ) == null ) { org . apache . ranger . plugin . geo . ValuePrinter . LOG . error ( ( "ValuePrinter.process()<sp>-" + value ) ) ; } else { try { writer . write ( value . toString ( ) ) ; writer . write ( '\n' ) ; } catch ( org . apache . ranger . plugin . geo . IOException exception ) { org . apache . ranger . plugin . geo . ValuePrinter . LOG . error ( ( ( ( "ValuePrinter.process()<sp>-<sp>Cannot<sp>write<sp>'" + value ) + "'<sp>to<sp>" ) + ( fileName ) ) ) ; } } } return value ; }
org . junit . Assert . assertNull ( serviceTags )
testApp ( ) { boolean cleanExit = com . ociweb . iot . maker . FogRuntime . testConcurrentUntilShutdownRequested ( new com . ociweb . oe . foglight . api . TransducerDemo ( ) , 1000 ) ; "<AssertPlaceHolder>" ; } testConcurrentUntilShutdownRequested ( com . ociweb . iot . maker . FogApp , long ) { return com . ociweb . iot . maker . FogRuntime . testConcurrentUntilShutdownRequested ( app , new java . lang . String [ 0 ] , timeoutMS ) ; }
org . junit . Assert . assertTrue ( cleanExit )
testMergeWhenConfigurationsIsEmpty ( ) { java . nio . file . Path schemaUrl = java . nio . file . Paths . get ( java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) . getResource ( "override/schema.json" ) . toURI ( ) ) ; org . kaaproject . kaa . server . common . core . schema . DataSchema configuraionSchema = new org . kaaproject . kaa . server . common . core . schema . DataSchema ( new java . lang . String ( java . nio . file . Files . readAllBytes ( schemaUrl ) ) ) ; org . kaaproject . kaa . server . common . core . algorithms . schema . SchemaGenerationAlgorithmFactory factory = new org . kaaproject . kaa . server . common . core . algorithms . schema . SchemaGenerationAlgorithmFactoryImpl ( ) ; org . kaaproject . kaa . server . common . core . algorithms . schema . SchemaGenerationAlgorithm generator = factory . createSchemaGenerator ( configuraionSchema ) ; java . util . List < org . kaaproject . kaa . server . common . core . configuration . OverrideData > configurations = new java . util . ArrayList ( ) ; org . kaaproject . kaa . server . common . core . algorithms . override . OverrideAlgorithm merger = new org . kaaproject . kaa . server . common . core . algorithms . override . DefaultOverrideAlgorithm ( ) ; org . kaaproject . kaa . server . common . core . configuration . BaseData mergeResult = merger . override ( null , configurations ) ; "<AssertPlaceHolder>" ; } override ( org . kaaproject . kaa . server . common . core . configuration . BaseData , java . util . List ) { org . kaaproject . kaa . server . common . core . algorithms . override . DefaultOverrideAlgorithm . LOG . debug ( "Merging:base<sp>configuration<sp>=<sp>{};<sp>override<sp>=<sp>{}" , baseConfiguration , overrideConfigurations ) ; if ( baseConfiguration == null ) { org . kaaproject . kaa . server . common . core . algorithms . override . DefaultOverrideAlgorithm . LOG . debug ( "empty<sp>endpoint<sp>groups<sp>or<sp>configurations<sp>-<sp>returning<sp>empty<sp>result" ) ; return null ; } if ( ( overrideConfigurations == null ) || ( overrideConfigurations . isEmpty ( ) ) ) { return baseConfiguration ; } try { confGenerator = new org . kaaproject . kaa . server . common . core . algorithms . generation . DefaultRecordGenerationAlgorithmImpl ( baseConfiguration . getSchema ( ) , new org . kaaproject . kaa . server . common . core . configuration . BaseDataFactory ( ) ) ; } catch ( org . kaaproject . kaa . server . common . core . algorithms . generation . ConfigurationGenerationException ex ) { throw new org . kaaproject . kaa . server . common . core . algorithms . override . OverrideException ( ex ) ; } baseSchemaParser = new org . apache . avro . Schema . Parser ( ) ; org . apache . avro . Schema baseAvroSchema = baseSchemaParser . parse ( baseConfiguration . getSchema ( ) . getRawSchema ( ) ) ; org . apache . avro . Schema . Parser overrideSchemaParser = new org . apache . avro . Schema . Parser ( ) ; org . apache . avro . Schema overrideAvroSchema = overrideSchemaParser . parse ( overrideConfigurations . get ( 0 ) . getSchema ( ) . getRawSchema ( ) ) ; org . kaaproject . kaa . server . common . core . algorithms . override . DefaultOverrideAlgorithm . LOG . info ( "converter:<sp>{}" , baseAvroSchema . toString ( ) ) ; org . kaaproject . kaa . common . avro . GenericAvroConverter < org . apache . avro . generic . GenericRecord > baseConverter = new org . kaaproject . kaa . common . avro . GenericAvroConverter ( baseAvroSchema ) ; org . kaaproject . kaa . common . avro . GenericAvroConverter < org . apache . avro . generic . GenericRecord > overrideConverter = new org . kaaproject . kaa . common . avro . GenericAvroConverter ( overrideAvroSchema ) ; org . apache . avro . generic . GenericRecord mergedConfiguration = baseConverter . decodeJson ( baseConfiguration . getRawData ( ) ) ; try { org . kaaproject . kaa . server . common . core . algorithms . override . ArrayOverrideStrategyResolver arrayMergeStrategyResolver = new org . kaaproject . kaa . server . common . core . algorithms . override . ArrayOverrideStrategyResolver ( baseSchemaParser . getTypes ( ) ) ; for ( org . kaaproject . kaa . server . common . core . configuration . OverrideData entry : overrideConfigurations ) { java . lang . String configurationToApply = entry . getRawData ( ) ; org . kaaproject . kaa . server . common . core . algorithms . override . DefaultOverrideAlgorithm . LOG . debug ( "Override<sp>schema<sp>{}" , entry . getSchema ( ) ) ; org . apache . avro . generic . GenericRecord nodeToApply = overrideConverter . decodeJson ( configurationToApply ) ; org . kaaproject . kaa . server . common . core . algorithms . override . DefaultOverrideAlgorithm . LOG . info ( "configurationToApply:<sp>{}" , nodeToApply ) ; applyNode ( mergedConfiguration , nodeToApply , arrayMergeStrategyResolver ) ; } return new org . kaaproject . kaa . server . common . core . configuration . BaseData ( baseConfiguration . getSchema ( ) , baseConverter . encodeToJson ( mergedConfiguration ) ) ; } catch ( java . io . IOException | org . kaaproject . kaa . server . common . core . algorithms . generation . ConfigurationGenerationException ex ) { throw new org . kaaproject . kaa . server . common . core . algorithms . override . OverrideException ( ex ) ; } }
org . junit . Assert . assertNull ( mergeResult )
testBuildEnvironment ( ) { when ( rvmRubyLocator . buildEnv ( rubyRuntime . getRubyRuntimeName ( ) , rubyExecutablePath , com . google . common . collect . Maps . < java . lang . String , java . lang . String > newHashMap ( ) ) ) . thenReturn ( com . google . common . collect . Maps . < java . lang . String , java . lang . String > newHashMap ( ) ) ; java . util . Map < java . lang . String , java . lang . String > envVars = bundlerTask . buildEnvironment ( rubyLabel , configurationMap ) ; "<AssertPlaceHolder>" ; } getRubyRuntimeName ( ) { return ( ( rubyName ) + ( au . id . wolfe . bamboo . ruby . rvm . RvmUtils . DEFAULT_GEMSET_SEPARATOR ) ) + ( gemSetName ) ; }
org . junit . Assert . assertThat ( envVars . size ( ) , org . hamcrest . core . Is . is ( 0 ) )
testNonTokenQop01 ( ) { java . lang . String header = "Digest<sp>qop=au{th" ; java . io . StringReader input = new java . io . StringReader ( header ) ; java . util . Map < java . lang . String , java . lang . String > result = org . apache . tomcat . util . http . parser . Authorization . parseAuthorizationDigest ( input ) ; "<AssertPlaceHolder>" ; } parseAuthorizationDigest ( java . io . StringReader ) { java . util . Map < java . lang . String , java . lang . String > result = new java . util . HashMap ( ) ; if ( ( org . apache . tomcat . util . http . parser . HttpParser . skipConstant ( input , "Digest" ) ) != ( SkipResult . FOUND ) ) { return null ; } java . lang . String field = org . apache . tomcat . util . http . parser . HttpParser . readToken ( input ) ; if ( field == null ) { return null ; } while ( ! ( field . equals ( "" ) ) ) { if ( ( org . apache . tomcat . util . http . parser . HttpParser . skipConstant ( input , "=" ) ) != ( SkipResult . FOUND ) ) { return null ; } java . lang . String value ; java . lang . Integer type = org . apache . tomcat . util . http . parser . Authorization . fieldTypes . get ( field . toLowerCase ( Locale . ENGLISH ) ) ; if ( type == null ) { type = org . apache . tomcat . util . http . parser . Authorization . FIELD_TYPE_TOKEN_OR_QUOTED_STRING ; } switch ( type . intValue ( ) ) { case 0 : value = org . apache . tomcat . util . http . parser . HttpParser . readToken ( input ) ; break ; case 1 : value = org . apache . tomcat . util . http . parser . HttpParser . readQuotedString ( input , false ) ; break ; case 2 : value = org . apache . tomcat . util . http . parser . HttpParser . readTokenOrQuotedString ( input , false ) ; break ; case 3 : value = org . apache . tomcat . util . http . parser . HttpParser . readLhex ( input ) ; break ; case 4 : value = org . apache . tomcat . util . http . parser . HttpParser . readQuotedToken ( input ) ; break ; default : throw new java . lang . IllegalArgumentException ( "TODO<sp>i18n:<sp>Unsupported<sp>type" ) ; } if ( value == null ) { return null ; } result . put ( field , value ) ; if ( ( org . apache . tomcat . util . http . parser . HttpParser . skipConstant ( input , "," ) ) == ( SkipResult . NOT_FOUND ) ) { return null ; } field = org . apache . tomcat . util . http . parser . HttpParser . readToken ( input ) ; if ( field == null ) { return null ; } } return result ; }
org . junit . Assert . assertNull ( result )
testConstructor ( ) { de . metanome . algorithm_integration . ColumnIdentifier expectedColumn = new de . metanome . algorithm_integration . ColumnIdentifier ( "table42" , "column23" ) ; de . metanome . algorithm_integration . ColumnCombination expectedColumnCombination = new de . metanome . algorithm_integration . ColumnCombination ( expectedColumn ) ; de . metanome . algorithm_integration . results . BasicStatistic statistic = new de . metanome . algorithm_integration . results . BasicStatistic ( expectedColumn ) ; "<AssertPlaceHolder>" ; } getColumnCombination ( ) { return this . columnCombination ; }
org . junit . Assert . assertEquals ( expectedColumnCombination , statistic . getColumnCombination ( ) )
testDivideAndRegexInHeredocInterpolation ( ) { getContentType ( ( "test.execute<sp><<END\n" + ( "#{/[0-9]+/<sp>/<sp>5}\n" + "END" ) ) , 0 ) ; "<AssertPlaceHolder>" ; } getContentType ( java . lang . String , int ) { if ( ( partitioner ) == null ) { org . eclipse . jface . text . IDocument document = new org . eclipse . jface . text . Document ( content ) ; com . aptana . editor . common . text . rules . CompositePartitionScanner partitionScanner = new com . aptana . editor . common . text . rules . CompositePartitionScanner ( com . aptana . editor . html . HTMLSourceConfiguration . getDefault ( ) . createSubPartitionScanner ( ) , com . aptana . editor . ruby . RubySourceConfiguration . getDefault ( ) . createSubPartitionScanner ( ) , com . aptana . editor . erb . ERBPartitionerSwitchStrategy . getDefault ( ) ) ; partitioner = new com . aptana . editor . common . ExtendedFastPartitioner ( partitionScanner , com . aptana . editor . common . TextUtils . combine ( new java . lang . String [ ] [ ] { com . aptana . editor . common . text . rules . CompositePartitionScanner . SWITCHING_CONTENT_TYPES , com . aptana . editor . html . HTMLSourceConfiguration . getDefault ( ) . getContentTypes ( ) , com . aptana . editor . ruby . RubySourceConfiguration . getDefault ( ) . getContentTypes ( ) } ) ) ; partitionScanner . setPartitioner ( partitioner ) ; partitioner . connect ( document ) ; document . setDocumentPartitioner ( partitioner ) ; } return partitioner . getContentType ( offset ) ; }
org . junit . Assert . assertTrue ( true )
queryFindsAllLoadedStatements_fromSet ( ) { final org . apache . rya . api . client . accumulo . AccumuloConnectionDetails connectionDetails = new org . apache . rya . api . client . accumulo . AccumuloConnectionDetails ( getUsername ( ) , getPassword ( ) . toCharArray ( ) , getInstanceName ( ) , getZookeepers ( ) ) ; final org . apache . rya . api . client . RyaClient client = org . apache . rya . api . client . accumulo . AccumuloRyaClientFactory . build ( connectionDetails , super . getConnector ( ) ) ; final java . lang . String ryaInstance = java . util . UUID . randomUUID ( ) . toString ( ) . replace ( '-' , '_' ) ; client . getInstall ( ) . install ( ryaInstance , org . apache . rya . api . client . Install . InstallConfiguration . builder ( ) . build ( ) ) ; final org . eclipse . rdf4j . model . ValueFactory vf = org . eclipse . rdf4j . model . impl . SimpleValueFactory . getInstance ( ) ; final java . util . Set < org . eclipse . rdf4j . model . Statement > statements = com . google . common . collect . Sets . newHashSet ( vf . createStatement ( vf . createIRI ( "urn:Alice" ) , vf . createIRI ( "urn:talksTo" ) , vf . createIRI ( "urn:Bob" ) ) , vf . createStatement ( vf . createIRI ( "urn:Bob" ) , vf . createIRI ( "urn:talksTo" ) , vf . createIRI ( "urn:Alice" ) ) , vf . createStatement ( vf . createIRI ( "urn:Bob" ) , vf . createIRI ( "urn:talksTo" ) , vf . createIRI ( "urn:Charlie" ) ) , vf . createStatement ( vf . createIRI ( "urn:Charlie" ) , vf . createIRI ( "urn:talksTo" ) , vf . createIRI ( "urn:Alice" ) ) , vf . createStatement ( vf . createIRI ( "p" 0 ) , vf . createIRI ( "urn:talksTo" ) , vf . createIRI ( "urn:Eve" ) ) , vf . createStatement ( vf . createIRI ( "urn:Eve" ) , vf . createIRI ( "urn:listensTo" ) , vf . createIRI ( "urn:Bob" ) ) ) ; client . getLoadStatements ( ) . loadStatements ( ryaInstance , statements ) ; final java . util . Set < org . eclipse . rdf4j . model . Statement > fetched = new java . util . HashSet ( ) ; try ( final org . eclipse . rdf4j . query . TupleQueryResult result = client . getExecuteSparqlQuery ( ) . executeSparqlQuery ( ryaInstance , "SELECT<sp>*<sp>WHERE<sp>{<sp>?s<sp>?p<sp>?o<sp>}" ) ) { while ( result . hasNext ( ) ) { final org . eclipse . rdf4j . query . BindingSet bs = result . next ( ) ; if ( RdfCloudTripleStoreConstants . RTS_VERSION_PREDICATE . equals ( bs . getBinding ( "p" ) . getValue ( ) ) ) { continue ; } fetched . add ( vf . createStatement ( ( ( org . eclipse . rdf4j . model . Resource ) ( bs . getBinding ( "s" ) . getValue ( ) ) ) , ( ( org . eclipse . rdf4j . model . IRI ) ( bs . getBinding ( "p" ) . getValue ( ) ) ) , bs . getBinding ( "o" ) . getValue ( ) ) ) ; } } "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( statements , fetched )
testWriteEntryWithBuilders ( ) { org . apache . cxf . jaxrs . provider . atom . AtomPojoProvider provider = ( ( org . apache . cxf . jaxrs . provider . atom . AtomPojoProvider ) ( ctx . getBean ( "atom2" ) ) ) ; "<AssertPlaceHolder>" ; provider . setFormattedOutput ( true ) ; java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; provider . writeTo ( new org . apache . cxf . jaxrs . provider . atom . AtomPojoProviderTest . Book ( "a" ) , org . apache . cxf . jaxrs . provider . atom . AtomPojoProviderTest . Book . class , org . apache . cxf . jaxrs . provider . atom . AtomPojoProviderTest . Book . class , new java . lang . annotation . Annotation [ ] { } , javax . ws . rs . core . MediaType . valueOf ( "application/atom+xml;type=entry" ) , null , bos ) ; java . io . ByteArrayInputStream bis = new java . io . ByteArrayInputStream ( bos . toByteArray ( ) ) ; org . apache . abdera . model . Entry entry = new org . apache . cxf . jaxrs . provider . atom . AtomEntryProvider ( ) . readFrom ( org . apache . abdera . model . Entry . class , null , null , null , null , bis ) ; verifyEntry ( entry , "a" ) ; } getBean ( java . lang . String ) { if ( "b" . equalsIgnoreCase ( id ) ) { return getBeanB ( ) ; } else if ( "c" . equalsIgnoreCase ( id ) ) { return getBeanC ( ) ; } else if ( "a" . equalsIgnoreCase ( id ) ) { return getBeanA ( ) ; } else { return null ; } }
org . junit . Assert . assertNotNull ( provider )
testPOJORepoReadWithUTF8 ( ) { com . marklogic . client . pojo . PojoRepository < com . marklogic . client . functionaltest . TestPOJOSpecialCharRead . SpecialArtifact , java . lang . String > pojoReposProductsString = client . newPojoRepository ( com . marklogic . client . functionaltest . TestPOJOSpecialCharRead . SpecialArtifact . class , java . lang . String . class ) ; long longId = getOneNegativeLongId ( ) ; java . lang . String artifactName = new java . lang . String ( "mult-title:" ) ; pojoReposProductsString . write ( this . setSpecialArtifactWithSpecialCharacter ( longId , artifactName ) , "odd" , "numbers" ) ; "<AssertPlaceHolder>" ; com . marklogic . client . functionaltest . TestPOJOSpecialCharRead . SpecialArtifact artifact1 = pojoReposProductsString . read ( artifactName ) ; validateSpecialArtifactWithSpecialCharacter ( artifact1 , artifactName , longId ) ; } exists ( java . lang . String ) { return services . exists ( ( ( ( com . marklogic . client . impl . RuleManagerImpl . RULES_BASE ) + "/" ) + ruleName ) ) ; }
org . junit . Assert . assertTrue ( pojoReposProductsString . exists ( artifactName ) )
projectContributorCanDeleteProjectTest ( ) { final org . guvnor . common . services . project . model . WorkspaceProject project = getProject ( ) ; final java . util . Collection < org . guvnor . structure . contributors . Contributor > projectContributors = project . getRepository ( ) . getContributors ( ) ; doReturn ( true ) . when ( libraryPermissions ) . userIsAtLeast ( eq ( ContributorType . OWNER ) , same ( projectContributors ) ) ; "<AssertPlaceHolder>" ; } userCanDeleteProject ( org . guvnor . common . services . project . model . WorkspaceProject ) { return ( ( userIsAtLeast ( ContributorType . OWNER , project . getRepository ( ) . getContributors ( ) ) ) || ( userIsAtLeast ( ContributorType . ADMIN , project . getOrganizationalUnit ( ) . getContributors ( ) ) ) ) || ( projectController . canDeleteProject ( project ) ) ; }
org . junit . Assert . assertTrue ( libraryPermissions . userCanDeleteProject ( project ) )
getLast ( ) { com . gs . collections . api . set . ImmutableSet < java . lang . Integer > integers = this . classUnderTest ( ) ; "<AssertPlaceHolder>" ; } getLast ( ) { return null ; }
org . junit . Assert . assertNull ( integers . getLast ( ) )
testIgnoreHeaderConfigure ( ) { org . apache . flink . api . java . io . CsvReader reader = org . apache . flink . api . java . io . CSVReaderTest . getCsvReader ( ) ; reader . ignoreFirstLine ( ) ; "<AssertPlaceHolder>" ; } ignoreFirstLine ( ) { skipFirstLineAsHeader = true ; return this ; }
org . junit . Assert . assertTrue ( reader . skipFirstLineAsHeader )
test0 ( ) { com . dianping . puma . alarm . core . model . state . PullTimeDelayAlarmState state = new com . dianping . puma . alarm . core . model . state . PullTimeDelayAlarmState ( ) ; com . dianping . puma . alarm . core . model . AlarmResult result ; com . dianping . puma . alarm . core . model . AlarmContext context = new com . dianping . puma . alarm . core . model . AlarmContext ( ) ; context . setNamespace ( "client" ) ; context . setName ( "test" ) ; state . setAlarm ( true ) ; com . dianping . puma . alarm . core . model . strategy . NoAlarmStrategy strategy = new com . dianping . puma . alarm . core . model . strategy . NoAlarmStrategy ( ) ; result = filter . filter ( context , state , strategy ) ; "<AssertPlaceHolder>" ; } isAlarm ( ) { return alarm ; }
org . junit . Assert . assertFalse ( result . isAlarm ( ) )
testEmptyProtocolTopics ( ) { com . ebay . jetstream . messaging . transport . zookeeper . ZooKeeperTransportConfig config1 = getZkTransportConfig ( ) ; com . ebay . jetstream . messaging . transport . zookeeper . ZooKeeperTransportConfig config2 = getZkTransportConfig ( ) ; config1 . setNettyDiscoveryProtocolTopics ( new java . util . ArrayList < java . lang . String > ( ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return ( obj instanceof com . ebay . jetstream . event . support . ManagedExceptionEntry ) && ( ( ( com . ebay . jetstream . event . support . ManagedExceptionEntry ) ( obj ) ) . m_strStackTrace . equals ( m_strStackTrace ) ) ; }
org . junit . Assert . assertTrue ( config1 . equals ( config2 ) )
propagatesJavaArgs ( ) { final java . lang . String result = forkingExecutor . javaArgs ( "-Dfoo=bar" ) . execute ( ( ) -> { try ( com . spotify . flo . context . ForkingExecutor inner = new com . spotify . flo . context . ForkingExecutor ( ) ) { return inner . execute ( ( ) -> java . lang . System . getProperty ( "foo" ) ) ; } catch ( e ) { throw new < com . spotify . flo . context . e > java . lang . RuntimeException ( ) ; } } ) ; "<AssertPlaceHolder>" ; } execute ( java . lang . Runnable ) { command . run ( ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( "bar" ) )
test_captureVideo ( ) { doNothing ( ) . when ( videocapture ) . init ( any ( com . android . ddmlib . IDevice . class ) , any ( java . lang . String . class ) ) ; @ com . att . aro . datacollector . rootedandroidcollector . impl . SuppressWarnings ( "unchecked" ) java . util . List < com . att . aro . core . datacollector . IVideoImageSubscriber > videoImageSubscribers = mock ( java . util . List . class ) ; when ( videoImageSubscribers . isEmpty ( ) ) . thenReturn ( false ) ; doNothing ( ) . when ( threadexecutor ) . execute ( any ( com . att . aro . datacollector . rootedandroidcollector . impl . Runnable . class ) ) ; rootedAndroidCollectorImpl . startVideoCapture ( ) ; "<AssertPlaceHolder>" ; } startVideoCapture ( ) { java . lang . String videopath = ( ( this . localTraceFolder ) + ( com . att . aro . core . util . Util . FILE_SEPARATOR ) ) + "video.mov" ; if ( captureVideoUsingScreenRecorder ( ) ) { try { screenRecorder . init ( aroDevice , this . localTraceFolder , videoOption ) ; threadexecutor . execute ( screenRecorder ) ; usingScreenRecorder = true ; } catch ( java . lang . NumberFormatException e ) { com . att . aro . datacollector . norootedandroidcollector . impl . NorootedAndroidCollectorImpl . LOG . error ( e . getMessage ( ) ) ; } } try { videoCapture . init ( this . device , videopath ) ; com . att . aro . datacollector . norootedandroidcollector . impl . NorootedAndroidCollectorImpl . LOG . debug ( "execute<sp>videocapture<sp>Thread" ) ; threadexecutor . execute ( videoCapture ) ; } catch ( java . io . IOException e ) { com . att . aro . datacollector . norootedandroidcollector . impl . NorootedAndroidCollectorImpl . LOG . error ( e . getMessage ( ) ) ; } }
org . junit . Assert . assertTrue ( true )
getHandlerForUsesNamespace ( ) { org . w3c . dom . Element el = org . apache . shindig . common . xml . XmlUtil . parseSilent ( "<Tag<sp>xmlns='#nottest'/>" ) ; "<AssertPlaceHolder>" ; } getHandlerFor ( org . apache . shindig . gadgets . templates . tags . NSName ) { org . apache . shindig . gadgets . templates . tags . TagHandler handler = null ; for ( org . apache . shindig . gadgets . templates . TagRegistry registry : registries ) { handler = registry . getHandlerFor ( name ) ; if ( handler != null ) { return handler ; } } return null ; }
org . junit . Assert . assertNull ( registry . getHandlerFor ( el ) )
testSimpleNestedColumn ( ) { org . tests . model . basic . ResetBasicData . reset ( ) ; java . lang . String rs = "select<sp>c.id,<sp>c.name,<sp>c.billing_address_id,<sp>ba.line_1,<sp>ba.city,<sp>c.updtime<sp>" + ( ( "from<sp>o_customer<sp>c<sp>" + "<sp>left<sp>join<sp>o_address<sp>ba<sp>on<sp>ba.id<sp>=<sp>c.billing_address_id<sp>" ) + "order<sp>by<sp>c.id" ) ; io . ebean . RawSql rawSql = io . ebean . RawSqlBuilder . parse ( rs ) . tableAliasMapping ( "ba" , "billingAddress" ) . create ( ) ; java . util . List < org . tests . model . basic . Customer > customers = io . ebean . Ebean . find ( org . tests . model . basic . Customer . class ) . setRawSql ( rawSql ) . findList ( ) ; "<AssertPlaceHolder>" . isNotEmpty ( ) ; } findList ( ) { org . tests . model . basic . ResetBasicData . reset ( ) ; io . ebean . EbeanServer server = io . ebean . Ebean . getDefaultServer ( ) ; io . ebean . Query < org . tests . model . basic . Customer > query = server . find ( org . tests . model . basic . Customer . class ) . where ( ) . startsWith ( "name" , "Rob" ) . query ( ) ; try ( io . ebean . Transaction transaction = server . beginTransaction ( ) ) { java . util . List < org . tests . model . basic . Customer > customers = server . extended ( ) . findList ( query , transaction ) ; assertThat ( customers ) . isNotEmpty ( ) ; transaction . commit ( ) ; } }
org . junit . Assert . assertThat ( customers )
shouldNotMatchNotVisibleElements ( ) { com . redhat . darcy . ui . matchers . VisibleText < com . redhat . darcy . ui . api . elements . Text > matcher = new com . redhat . darcy . ui . matchers . VisibleText ( org . hamcrest . Matchers . anything ( ) ) ; com . redhat . darcy . ui . api . elements . Text mockText = mock ( com . redhat . darcy . ui . api . elements . Text . class ) ; when ( mockText . isDisplayed ( ) ) . thenReturn ( false ) ; "<AssertPlaceHolder>" ; } matches ( java . lang . Object ) { return doesItemMatchAppropriateCondition ( item ) ; }
org . junit . Assert . assertFalse ( matcher . matches ( mockText ) )
ensureConsistentRepresentation ( ) { org . openscience . cdk . interfaces . IAtomContainer a = org . openscience . cdk . aromaticity . AromaticityTest . smiles ( "C1=CC2=CC3=CC4=C(C=CC=C4)C=C3C=C2C=C1" ) ; org . openscience . cdk . interfaces . IAtomContainer b = org . openscience . cdk . aromaticity . AromaticityTest . smiles ( "c1cc2cc3cc4c(cccc4)cc3cc2cc1" ) ; org . openscience . cdk . aromaticity . Aromaticity arom = new org . openscience . cdk . aromaticity . Aromaticity ( org . openscience . cdk . aromaticity . ElectronDonation . daylight ( ) , org . openscience . cdk . graph . Cycles . all ( ) ) ; arom . apply ( a ) ; arom . apply ( b ) ; "<AssertPlaceHolder>" ; } diff ( org . openscience . cdk . interfaces . IChemObject , org . openscience . cdk . interfaces . IChemObject ) { org . openscience . cdk . tools . diff . tree . IDifference diff = org . openscience . cdk . tools . diff . AtomContainerDiff . difference ( first , second ) ; if ( diff == null ) { return "" ; } else { return diff . toString ( ) ; } }
org . junit . Assert . assertTrue ( org . openscience . cdk . tools . diff . AtomContainerDiff . diff ( a , b ) . isEmpty ( ) )
testBlankExpression ( ) { org . eclipse . birt . data . engine . api . querydefn . QueryDefinition queryDefn = newReportQuery ( ) ; java . lang . String [ ] name = new java . lang . String [ ] { "testColumn1" } ; org . eclipse . birt . data . engine . api . querydefn . ScriptExpression [ ] se = new org . eclipse . birt . data . engine . api . querydefn . ScriptExpression [ name . length ] ; se [ 0 ] = new org . eclipse . birt . data . engine . api . querydefn . ScriptExpression ( null ) ; for ( int i = 0 ; i < ( name . length ) ; i ++ ) queryDefn . addBinding ( new org . eclipse . birt . data . engine . api . querydefn . Binding ( name [ i ] , se [ i ] ) ) ; org . eclipse . birt . data . engine . core . DataException error = null ; try { executeQuery ( queryDefn ) ; org . junit . Assert . fail ( "Should<sp>not<sp>arrive<sp>here" ) ; } catch ( org . eclipse . birt . data . engine . core . DataException e ) { error = e ; } "<AssertPlaceHolder>" ; } executeQuery ( org . eclipse . birt . report . item . crosstab . core . de . AbstractCrosstabItemHandle ) { org . eclipse . birt . report . model . api . DesignElementHandle elementHandle = crosstabItem . getModelHandle ( ) ; org . eclipse . birt . data . engine . api . IDataQueryDefinition query = context . getQueries ( elementHandle ) [ 0 ] ; org . eclipse . birt . report . engine . extension . IBaseResultSet rset = context . executeQuery ( getParentResultSet ( ) , query , elementHandle ) ; if ( rset instanceof org . eclipse . birt . report . engine . extension . ICubeResultSet ) { cubeRset = ( ( org . eclipse . birt . report . engine . extension . ICubeResultSet ) ( rset ) ) ; cubeCursor = cubeRset . getCubeCursor ( ) ; } }
org . junit . Assert . assertNotNull ( error )
testHideNonWorkspaceElementsProjectExist ( ) { org . springsource . ide . eclipse . commons . livexp . util . Filter < org . springframework . ide . eclipse . boot . dash . model . BootDashElement > f = getFilter ( org . springframework . ide . eclipse . boot . dash . test . ToggleFiltersModelTest . HIDE_NON_WORKSPACE_ELEMENTS ) ; org . springframework . ide . eclipse . boot . dash . model . BootDashElement e = mock ( org . springframework . ide . eclipse . boot . dash . model . BootDashElement . class ) ; org . eclipse . core . resources . IProject p = mock ( org . eclipse . core . resources . IProject . class ) ; when ( e . getProject ( ) ) . thenReturn ( p ) ; when ( p . exists ( ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; } accept ( org . springframework . ide . eclipse . boot . dash . model . BootDashElement ) { return ( ( baseAccepts ( e ) ) || ( baseAcceptsChild ( e ) ) ) || ( baseAcceptsParent ( e ) ) ; }
org . junit . Assert . assertEquals ( true , f . accept ( e ) )
shouldEndpointBeRemovedFromDiscoveryPlanAfterFailures ( ) { org . openkilda . messaging . model . NetworkEndpoint source = new org . openkilda . messaging . model . NetworkEndpoint ( new org . openkilda . model . SwitchId ( "ff:01" ) , 1 ) ; dm . handlePortUp ( source . getDatapath ( ) , source . getPortNumber ( ) ) ; dm . makeDiscoveryPlan ( ) ; dm . handleSentDiscoPacket ( source ) ; dm . makeDiscoveryPlan ( ) ; dm . handleSentDiscoPacket ( source ) ; dm . makeDiscoveryPlan ( ) ; dm . handleSentDiscoPacket ( source ) ; dm . makeDiscoveryPlan ( ) ; dm . makeDiscoveryPlan ( ) ; "<AssertPlaceHolder>" ; } isInDiscoveryPlan ( org . openkilda . model . SwitchId , int ) { java . util . Optional < org . openkilda . messaging . model . DiscoveryLink > link = findBySourceEndpoint ( new org . openkilda . messaging . model . NetworkEndpoint ( switchId , portId ) ) ; return ( link . isPresent ( ) ) && ( link . get ( ) . isNewAttemptAllowed ( ) ) ; }
org . junit . Assert . assertFalse ( dm . isInDiscoveryPlan ( source . getDatapath ( ) , source . getPortNumber ( ) ) )
testMasterBackground ( ) { org . apache . poi . xslf . usermodel . XMLSlideShow ppt = new org . apache . poi . xslf . usermodel . XMLSlideShow ( ) ; org . apache . poi . xslf . usermodel . XSLFBackground b = ppt . getSlideMasters ( ) . get ( 0 ) . getBackground ( ) ; b . setFillColor ( Color . RED ) ; org . apache . poi . xslf . usermodel . XSLFSlide sl = ppt . createSlide ( ) ; org . apache . poi . xslf . usermodel . XSLFAutoShape as = sl . createAutoShape ( ) ; as . setAnchor ( new java . awt . geom . Rectangle2D . Double ( 100 , 100 , 100 , 100 ) ) ; as . setShapeType ( ShapeType . CLOUD ) ; org . apache . poi . xslf . usermodel . XMLSlideShow ppt2 = org . apache . poi . xslf . XSLFTestDataSamples . writeOutAndReadBack ( ppt ) ; ppt . close ( ) ; org . apache . poi . xslf . usermodel . XSLFBackground b2 = ppt2 . getSlideMasters ( ) . get ( 0 ) . getBackground ( ) ; "<AssertPlaceHolder>" ; ppt2 . close ( ) ; } getFillColor ( ) { org . apache . poi . sl . usermodel . PaintStyle ps = getFillPaint ( ) ; if ( ps instanceof org . apache . poi . sl . usermodel . PaintStyle . SolidPaint ) { return org . apache . poi . sl . draw . DrawPaint . applyColorTransform ( ( ( org . apache . poi . sl . usermodel . PaintStyle . SolidPaint ) ( ps ) ) . getSolidColor ( ) ) ; } return null ; }
org . junit . Assert . assertEquals ( Color . RED , b2 . getFillColor ( ) )
newObject ( ) { java . lang . Object obj = cmd . newObject ( "java.lang.String" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( "" , ( ( java . lang . String ) ( obj ) ) )
testGetRestrictionTreeMissing ( ) { org . apache . jackrabbit . oak . api . Tree aceTree = when ( mock ( org . apache . jackrabbit . oak . api . Tree . class ) . getChild ( org . apache . jackrabbit . oak . spi . security . authorization . restriction . REP_RESTRICTIONS ) ) . thenReturn ( mock ( org . apache . jackrabbit . oak . api . Tree . class ) ) . getMock ( ) ; org . apache . jackrabbit . oak . api . Tree restrictionTree = restrictionProvider . getRestrictionsTree ( aceTree ) ; "<AssertPlaceHolder>" ; } getRestrictionsTree ( org . apache . jackrabbit . oak . api . Tree ) { org . apache . jackrabbit . oak . api . Tree restrictions = aceTree . getChild ( org . apache . jackrabbit . oak . spi . security . authorization . restriction . REP_RESTRICTIONS ) ; if ( ! ( restrictions . exists ( ) ) ) { restrictions = aceTree ; } return restrictions ; }
org . junit . Assert . assertEquals ( aceTree , restrictionTree )
testProviderFilter ( ) { com . weibo . api . motan . rpc . Response res = OTFilter . filter ( provider , request ) ; "<AssertPlaceHolder>" ; checkMockTracer ( ) ; } filter ( com . weibo . api . motan . rpc . Caller , com . weibo . api . motan . rpc . Request ) { assert request instanceof com . weibo . api . motan . protocol . restful . support . RestfulContainerRequest ; com . weibo . api . motan . protocol . restful . support . RestfulContainerRequest req = ( ( com . weibo . api . motan . protocol . restful . support . RestfulContainerRequest ) ( request ) ) ; if ( ! ( "testName" . equals ( req . getAttachments ( ) . get ( "testName" ) ) ) ) { com . weibo . api . motan . rpc . DefaultResponse resp = new com . weibo . api . motan . rpc . DefaultResponse ( request . getRequestId ( ) ) ; resp . setException ( new java . lang . IllegalStateException ( "must<sp>contain<sp>testName<sp>attachment" ) ) ; return resp ; } assert ( request . getInterfaceName ( ) ) != null ; assert ( request . getMethodName ( ) ) != null ; assert ( request . getParamtersDesc ( ) ) != null ; req . getHttpRequest ( ) ; return caller . call ( request ) ; }
org . junit . Assert . assertEquals ( response , res )
testReferencesToSelectExpression1 ( ) { java . lang . String query = "SELECT<sp>n.age<sp>*<sp>2<sp>AS<sp>doubleAge<sp>" + ( ( ( ( "<sp>FROM<sp>g<sp>EXPERIMENTAL_MATCH<sp>(<sp>(n)<sp>)<sp>" + "<sp>WHERE<sp>doubleAge<sp>=<sp>n.age<sp>+<sp>n.age<sp>" ) + "GROUP<sp>BY<sp>doubleAge<sp>" ) + "<sp>HAVING<sp>doubleAge<sp>=<sp>n.age<sp>*<sp>2<sp>" ) + "ORDER<sp>BY<sp>2<sp>*<sp>doubleAge<sp>ASC,<sp>2<sp>*<sp>(n.age<sp>*<sp>2)<sp>DESC" ) ; oracle . pgql . lang . PgqlResult result = pgql . parse ( query ) ; "<AssertPlaceHolder>" ; } isQueryValid ( ) { return queryValid ; }
org . junit . Assert . assertTrue ( result . isQueryValid ( ) )
login ( ) { api . loggedIn = false ; client . login ( "user" , "pass" , "matrix.org" ) ; "<AssertPlaceHolder>" ; } login ( java . lang . String , java . lang . String , java . lang . String ) { try { sdkClient . login ( username , password , homeserver ) ; loggedIn = true ; eventBus . post ( ToggleEvent . LOGIN ) ; eventBus . post ( ToggleEvent . SHOW_LOADING ) ; startNewUpdater ( ) ; } catch ( com . github . cypher . sdk . api . RestfulHTTPException | java . io . IOException ex ) { throw new com . github . cypher . model . SdkException ( ex ) ; } }
org . junit . Assert . assertTrue ( api . loggedIn )
whenUpdateItemThatItemChangeInMassive ( ) { ru . java_edu . start . Tracker track = new ru . java_edu . start . Tracker ( ) ; ru . java_edu . start . Task task1 = new ru . java_edu . start . Task ( "pervaja<sp>zajavka" , "eto<sp>pervaja<sp>zajavka" ) ; ru . java_edu . start . Task task2 = new ru . java_edu . start . Task ( "vtoraja<sp>zajavka" , "eto<sp>vtoraja<sp>zajavka" ) ; track . addItem ( task1 ) ; task2 . setId ( task1 . getId ( ) ) ; track . updateItem ( task2 ) ; ru . java_edu . start . Task item = track . findById ( task1 . getId ( ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return this . name ; }
org . junit . Assert . assertEquals ( task2 . getName ( ) , item . getName ( ) )
testTakeWaitingOfferedDelayed ( ) { final java . util . concurrent . atomic . AtomicReference < com . taobao . metamorphosis . client . consumer . FetchRequest > offered = new java . util . concurrent . atomic . AtomicReference < com . taobao . metamorphosis . client . consumer . FetchRequest > ( ) ; final java . util . concurrent . atomic . AtomicBoolean done = new java . util . concurrent . atomic . AtomicBoolean ( ) ; new java . lang . Thread ( ) { @ com . taobao . metamorphosis . client . consumer . Override public void run ( ) { try { offered . set ( com . taobao . metamorphosis . client . consumer . FetchRequestQueueUnitTest . this . fetchRequestQueue . take ( ) ) ; done . set ( true ) ; } catch ( final java . lang . InterruptedException e ) { } } } . start ( ) ; java . lang . Thread . sleep ( 1000 ) ; final com . taobao . metamorphosis . client . consumer . FetchRequest request = new com . taobao . metamorphosis . client . consumer . FetchRequest ( 1000 ) ; this . fetchRequestQueue . offer ( request ) ; while ( ! ( done . get ( ) ) ) { java . lang . Thread . sleep ( 500 ) ; } "<AssertPlaceHolder>" ; } offer ( com . taobao . metamorphosis . client . consumer . FetchRequest ) { final java . util . concurrent . locks . Lock lock = this . lock ; lock . lock ( ) ; try { if ( ( ( e . getRefQueue ( ) ) != null ) && ( ( e . getRefQueue ( ) ) != ( this ) ) ) { return ; } e . setRefQueue ( this ) ; this . queue . offer ( e ) ; java . util . Collections . sort ( this . queue ) ; if ( ( this . queue . peek ( ) ) == e ) { this . leader = null ; this . available . signal ( ) ; } } finally { lock . unlock ( ) ; } }
org . junit . Assert . assertSame ( offered . get ( ) , request )
testBuildDeleteDocumentUrl ( ) { java . lang . String expected = "http://localhost:9200/test/any_type/1" ; java . lang . String actual = com . github . aureliano . evtbridge . output . elasticsearch . ESUrlHelper . buildDeleteDocumentUrl ( this . configuration , "any_type" , "1" ) ; "<AssertPlaceHolder>" ; } buildDeleteDocumentUrl ( com . github . aureliano . evtbridge . output . elasticsearch . IElasticSearchConfiguration , java . lang . String , java . lang . String ) { return com . github . aureliano . evtbridge . output . elasticsearch . ESUrlHelper . buildDocumentUrl ( configuration , mappingType , documentId ) ; }
org . junit . Assert . assertEquals ( expected , actual )
refinementDecimalNotEquals ( ) { generateDrugHierarchy ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:<sp>%s<sp>!=<sp>#5.5" , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . PREFERRED_STRENGTH ) ) ; final com . b2international . index . query . Expression expected = com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . and ( descendantsOf ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT ) , ids ( com . google . common . collect . ImmutableSet . of ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . ABACAVIR_TABLET ) ) ) ; "<AssertPlaceHolder>" ; } of ( com . b2international . commons . exceptions . ApiError ) { return new com . b2international . snowowl . snomed . api . rest . domain . RestApiError . Builder ( error ) ; }
org . junit . Assert . assertEquals ( expected , actual )
shouldReturnEmptyStringForNullStackTrace ( ) { "<AssertPlaceHolder>" ; } stackTraceToString ( java . lang . StackTraceElement [ ] ) { if ( stackTrace == null ) { return "" ; } return listToMultilineString ( org . infinitest . intellij . plugin . swingui . Arrays . asList ( stackTrace ) ) ; }
org . junit . Assert . assertEquals ( "" , stackTraceToString ( null ) )
doesNotMatchEmptyValueInExpectation ( ) { matcher . withEntry ( "foo" , "" ) ; org . mockserver . matchers . MultiValueMapMatcher mapMatcher = new org . mockserver . matchers . MultiValueMapMatcher ( new org . mockserver . logging . MockServerLogger ( ) , matcher ) ; matched . withEntry ( "foo" , "bar" , "bob" ) ; "<AssertPlaceHolder>" ; } matches ( org . mockserver . model . HttpRequest , java . lang . String ) { boolean result = false ; if ( ( xpathExpression ) == null ) { mockServerLogger . trace ( context , ( ( ( "Attempting<sp>match<sp>against<sp>null<sp>XPath<sp>Expression<sp>for<sp>[" + matched ) + "]" ) + ( new java . lang . RuntimeException ( ( ( "Attempting<sp>match<sp>against<sp>null<sp>XPath<sp>Expression<sp>for<sp>[" + matched ) + "]" ) ) ) ) ) ; } else if ( matcher . equals ( matched ) ) { result = true ; } else if ( matched != null ) { try { result = ( ( java . lang . Boolean ) ( xpathExpression . evaluate ( stringToXmlDocumentParser . buildDocument ( matched , new org . mockserver . matchers . StringToXmlDocumentParser . ErrorLogger ( ) { @ org . mockserver . matchers . Override public void logError ( final java . lang . String matched , final java . lang . Exception exception ) { mockServerLogger . warn ( context , ( ( ( ( "SAXParseException<sp>while<sp>performing<sp>match<sp>between<sp>[" + ( matcher ) ) + "]<sp>and<sp>[" ) + matched ) + "]" ) , exception ) ; } } ) , XPathConstants . BOOLEAN ) ) ) ; } catch ( java . lang . Exception e ) { mockServerLogger . trace ( context , ( ( ( ( ( "Error<sp>while<sp>matching<sp>xpath<sp>[" + ( matcher ) ) + "]<sp>against<sp>string<sp>[" ) + matched ) + "]<sp>assuming<sp>no<sp>match<sp>-<sp>" ) + ( e . getMessage ( ) ) ) ) ; } } if ( ! result ) { mockServerLogger . trace ( "Failed<sp>to<sp>match<sp>[{}]<sp>with<sp>[{}]" , matched , matcher ) ; } return ( not ) != result ; }
org . junit . Assert . assertTrue ( mapMatcher . matches ( null , matched ) )
testgeefSynchronisatiePersoon ( ) { initMocks ( nl . bzk . brp . model . synchronisatie . GeefSynchronisatiePersoonBericht . class , SoortBericht . LVG_SYN_GEEF_SYNCHRONISATIE_PERSOON ) ; initBerichtVerwerker ( new java . util . ArrayList < nl . bzk . brp . model . validatie . Melding > ( ) , nl . bzk . brp . levering . synchronisatie . dto . synchronisatie . SynchronisatieResultaat . class , true ) ; final nl . bzk . brp . model . synchronisatie . GeefSynchronisatiePersoonAntwoordBericht testBericht = org . mockito . Mockito . mock ( nl . bzk . brp . model . synchronisatie . GeefSynchronisatiePersoonAntwoordBericht . class ) ; org . mockito . Mockito . when ( getAntwoordBerichtFactory ( ) . bouwAntwoordBericht ( org . mockito . Mockito . any ( nl . bzk . brp . model . logisch . ber . Bericht . class ) , org . mockito . Mockito . any ( nl . bzk . brp . levering . synchronisatie . dto . synchronisatie . SynchronisatieResultaat . class ) ) ) . thenReturn ( testBericht ) ; final nl . bzk . brp . model . synchronisatie . GeefSynchronisatiePersoonAntwoordBericht resultaat = ( ( nl . bzk . brp . levering . synchronisatie . webservice . SynchronisatieService ) ( getWebService ( ) ) ) . geefSynchronisatiePersoon ( ( ( nl . bzk . brp . model . synchronisatie . GeefSynchronisatiePersoonBericht ) ( getBericht ( ) ) ) ) ; "<AssertPlaceHolder>" ; } getBericht ( ) { return bericht ; }
org . junit . Assert . assertEquals ( testBericht , resultaat )
testSelectDivideBaseTable ( ) { org . verdictdb . core . sqlobject . BaseTable base = new org . verdictdb . core . sqlobject . BaseTable ( "myschema" , "mytable" , "t" ) ; java . util . List < org . verdictdb . core . sqlobject . UnnamedColumn > operands = java . util . Arrays . < org . verdictdb . core . sqlobject . UnnamedColumn > asList ( new org . verdictdb . core . sqlobject . BaseColumn ( "t" , "mycolumn1" ) , new org . verdictdb . core . sqlobject . BaseColumn ( "t" , "mycolumn2" ) ) ; org . verdictdb . core . sqlobject . SelectQuery relation = org . verdictdb . core . sqlobject . SelectQuery . create ( java . util . Arrays . < org . verdictdb . core . sqlobject . SelectItem > asList ( new org . verdictdb . core . sqlobject . ColumnOp ( "divide" , operands ) ) , base ) ; java . lang . String expected = "select<sp>t.`mycolumn1`<sp>/<sp>t.`mycolumn2`<sp>from<sp>`myschema`.`mytable`<sp>as<sp>t" ; org . verdictdb . sqlwriter . SelectQueryToSql relToSql = new org . verdictdb . sqlwriter . SelectQueryToSql ( new org . verdictdb . sqlsyntax . HiveSyntax ( ) ) ; java . lang . String actual = relToSql . toSql ( relation ) ; "<AssertPlaceHolder>" ; } toSql ( org . verdictdb . core . sqlobject . InsertValuesQuery ) { java . lang . StringBuilder sql = new java . lang . StringBuilder ( ) ; java . lang . String schemaName = query . getSchemaName ( ) ; java . lang . String tableName = query . getTableName ( ) ; java . util . List < java . lang . Object > values = query . getValues ( ) ; sql . append ( "insert<sp>into<sp>" ) ; sql . append ( quoteName ( schemaName ) ) ; sql . append ( "." ) ; sql . append ( quoteName ( tableName ) ) ; sql . append ( "<sp>values<sp>(" ) ; boolean isFirst = true ; for ( java . lang . Object v : values ) { if ( isFirst == false ) { sql . append ( ",<sp>" ) ; } if ( v instanceof org . verdictdb . commons . VerdictTimestamp ) { if ( ( syntax ) instanceof org . verdictdb . sqlsyntax . PrestoSyntax ) { sql . append ( ( ( "timestamp<sp>'" + ( v . toString ( ) ) ) + "'" ) ) ; } else { sql . append ( ( ( "'" + ( v . toString ( ) ) ) + "'" ) ) ; } } else if ( v instanceof java . lang . String ) { sql . append ( ( ( "'" + v ) + "'" ) ) ; } else { sql . append ( v . toString ( ) ) ; } isFirst = false ; } sql . append ( ")" ) ; return sql . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
shouldGetDefaultDbFromURIIfNoDbWasSpecified ( ) { java . net . URI uri = new java . net . URI ( "redis://host:9000" ) ; "<AssertPlaceHolder>" ; } getDBIndex ( java . net . URI ) { java . lang . String [ ] pathSplit = uri . getPath ( ) . split ( "/" , 2 ) ; if ( ( pathSplit . length ) > 1 ) { java . lang . String dbIndexStr = pathSplit [ 1 ] ; if ( dbIndexStr . isEmpty ( ) ) { return redis . clients . util . JedisURIHelper . DEFAULT_DB ; } return java . lang . Integer . parseInt ( dbIndexStr ) ; } else { return redis . clients . util . JedisURIHelper . DEFAULT_DB ; } }
org . junit . Assert . assertEquals ( 0 , redis . clients . util . JedisURIHelper . getDBIndex ( uri ) )
testMultiRowRangeWithFilterListAndOperator ( ) { tableName = org . apache . hadoop . hbase . TableName . valueOf ( name . getMethodName ( ) ) ; org . apache . hadoop . hbase . client . Table ht = org . apache . hadoop . hbase . filter . TestMultiRowRangeFilter . TEST_UTIL . createTable ( tableName , family , Integer . MAX_VALUE ) ; generateRows ( numRows , ht , family , qf , value ) ; org . apache . hadoop . hbase . client . Scan scan = new org . apache . hadoop . hbase . client . Scan ( ) ; scan . setMaxVersions ( ) ; java . util . List < org . apache . hadoop . hbase . filter . MultiRowRangeFilter . RowRange > ranges1 = new java . util . ArrayList ( ) ; ranges1 . add ( new org . apache . hadoop . hbase . filter . MultiRowRangeFilter . RowRange ( org . apache . hadoop . hbase . util . Bytes . toBytes ( 10 ) , true , org . apache . hadoop . hbase . util . Bytes . toBytes ( 20 ) , false ) ) ; ranges1 . add ( new org . apache . hadoop . hbase . filter . MultiRowRangeFilter . RowRange ( org . apache . hadoop . hbase . util . Bytes . toBytes ( 30 ) , true , org . apache . hadoop . hbase . util . Bytes . toBytes ( 40 ) , false ) ) ; ranges1 . add ( new org . apache . hadoop . hbase . filter . MultiRowRangeFilter . RowRange ( org . apache . hadoop . hbase . util . Bytes . toBytes ( 60 ) , true , org . apache . hadoop . hbase . util . Bytes . toBytes ( 70 ) , false ) ) ; org . apache . hadoop . hbase . filter . MultiRowRangeFilter filter1 = new org . apache . hadoop . hbase . filter . MultiRowRangeFilter ( ranges1 ) ; java . util . List < org . apache . hadoop . hbase . filter . MultiRowRangeFilter . RowRange > ranges2 = new java . util . ArrayList ( ) ; ranges2 . add ( new org . apache . hadoop . hbase . filter . MultiRowRangeFilter . RowRange ( org . apache . hadoop . hbase . util . Bytes . toBytes ( 20 ) , true , org . apache . hadoop . hbase . util . Bytes . toBytes ( 40 ) , false ) ) ; ranges2 . add ( new org . apache . hadoop . hbase . filter . MultiRowRangeFilter . RowRange ( org . apache . hadoop . hbase . util . Bytes . toBytes ( 80 ) , true , org . apache . hadoop . hbase . util . Bytes . toBytes ( 90 ) , false ) ) ; org . apache . hadoop . hbase . filter . MultiRowRangeFilter filter2 = new org . apache . hadoop . hbase . filter . MultiRowRangeFilter ( ranges2 ) ; org . apache . hadoop . hbase . filter . FilterList filterList = new org . apache . hadoop . hbase . filter . FilterList ( FilterList . Operator . MUST_PASS_ALL ) ; filterList . addFilter ( filter1 ) ; filterList . addFilter ( filter2 ) ; scan . setFilter ( filterList ) ; int resultsSize = getResultsSize ( ht , scan ) ; org . apache . hadoop . hbase . filter . TestMultiRowRangeFilter . LOG . info ( ( ( "found<sp>" + resultsSize ) + "<sp>results" ) ) ; java . util . List < org . apache . hadoop . hbase . Cell > results1 = getScanResult ( org . apache . hadoop . hbase . util . Bytes . toBytes ( 30 ) , org . apache . hadoop . hbase . util . Bytes . toBytes ( 40 ) , ht ) ; "<AssertPlaceHolder>" ; ht . close ( ) ; } size ( ) { return 0 ; }
org . junit . Assert . assertEquals ( results1 . size ( ) , resultsSize )
testMemPipelineWithSpecificRecord ( ) { org . apache . crunch . test . Person writeRecord = createSpecificRecord ( ) ; final org . apache . crunch . PCollection < org . apache . crunch . test . Person > writeCollection = org . apache . crunch . impl . mem . MemPipeline . getInstance ( ) . create ( com . google . common . collect . ImmutableList . of ( writeRecord ) , org . apache . crunch . types . avro . Avros . specifics ( org . apache . crunch . test . Person . class ) ) ; writeCollection . write ( org . apache . crunch . io . To . avroFile ( avroFile . getAbsolutePath ( ) ) ) ; org . apache . crunch . PCollection < org . apache . crunch . test . Person > readCollection = org . apache . crunch . impl . mem . MemPipeline . getInstance ( ) . read ( org . apache . crunch . io . At . avroFile ( avroFile . getAbsolutePath ( ) , org . apache . crunch . types . avro . Avros . records ( org . apache . crunch . test . Person . class ) ) ) ; org . apache . crunch . test . Person readRecord = readCollection . materialize ( ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } next ( ) { org . apache . crunch . impl . spark . ByteArray nextKey = null ; java . util . List < byte [ ] > next = null ; while ( iter . hasNext ( ) ) { scala . Tuple2 < org . apache . crunch . impl . spark . ByteArray , java . util . List < byte [ ] > > t = iter . next ( ) ; if ( ( key ) == null ) { key = t . _1 ( ) ; bytes . addAll ( t . _2 ( ) ) ; } else if ( ( cmp . compare ( key . value , 0 , key . value . length , t . _1 ( ) . value , 0 , t . _1 ( ) . value . length ) ) == 0 ) { bytes . addAll ( t . _2 ( ) ) ; } else { nextKey = t . _1 ( ) ; next = com . google . common . collect . Lists . newArrayList ( t . _2 ( ) ) ; break ; } } scala . Tuple2 < org . apache . crunch . impl . spark . ByteArray , java . util . List < byte [ ] > > ret = new scala . Tuple2 < org . apache . crunch . impl . spark . ByteArray , java . util . List < byte [ ] > > ( key , bytes ) ; key = nextKey ; bytes = next ; return ret ; }
org . junit . Assert . assertEquals ( writeRecord , readRecord )
testCreateMeasureForExternalSuccess ( ) { java . lang . String measureName = "view_item_hourly" ; org . apache . griffin . core . measure . entity . ExternalMeasure externalMeasure = createExternalMeasure ( measureName ) ; given ( measureRepo . findByNameAndDeleted ( measureName , false ) ) . willReturn ( new java . util . ArrayList ( ) ) ; given ( externalOp . create ( externalMeasure ) ) . willReturn ( externalMeasure ) ; org . apache . griffin . core . measure . entity . Measure measure = service . createMeasure ( externalMeasure ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( measure . getName ( ) , externalMeasure . getName ( ) )
testVar ( ) { org . nd4j . linalg . api . ndarray . INDArray data = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 4.0 , 4.0 , 4.0 , 4.0 , 8.0 , 8.0 , 8.0 , 8.0 , 4.0 , 4.0 , 4.0 , 4.0 , 8.0 , 8.0 , 8.0 , 8.0 , 4.0 , 4.0 , 4.0 , 4.0 , 8.0 , 8.0 , 8.0 , 8.0 , 4.0 , 4.0 , 4.0 , 4.0 , 8.0 , 8.0 , 8.0 , 8 , 2.0 , 2.0 , 2.0 , 2.0 , 4.0 , 4.0 , 4.0 , 4.0 , 2.0 , 2.0 , 2.0 , 2.0 , 4.0 , 4.0 , 4.0 , 4.0 , 2.0 , 2.0 , 2.0 , 2.0 , 4.0 , 4.0 , 4.0 , 4.0 , 2.0 , 2.0 , 2.0 , 2.0 , 4.0 , 4.0 , 4.0 , 4.0 } , new int [ ] { 2 , 2 , 4 , 4 } ) ; org . nd4j . linalg . api . ndarray . INDArray actualResult = data . var ( false , 0 ) ; org . nd4j . linalg . api . ndarray . INDArray expectedResult = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1.0 , 1.0 , 1.0 , 1.0 , 4.0 , 4.0 , 4.0 , 4.0 , 1.0 , 1.0 , 1.0 , 1.0 , 4.0 , 4.0 , 4.0 , 4.0 , 1.0 , 1.0 , 1.0 , 1.0 , 4.0 , 4.0 , 4.0 , 4.0 , 1.0 , 1.0 , 1.0 , 1.0 , 4.0 , 4.0 , 4.0 , 4.0 } , new int [ ] { 2 , 4 , 4 } ) ; "<AssertPlaceHolder>" ; } getFailureMessage ( ) { return ( ( "Failed<sp>with<sp>backend<sp>" + ( backend . getClass ( ) . getName ( ) ) ) + "<sp>and<sp>ordering<sp>" ) + ( ordering ( ) ) ; }
org . junit . Assert . assertEquals ( getFailureMessage ( ) , expectedResult , actualResult )
testFetchByPrimaryKeyExisting ( ) { com . liferay . portal . tools . service . builder . test . model . VersionedEntryVersion newVersionedEntryVersion = addVersionedEntryVersion ( ) ; com . liferay . portal . tools . service . builder . test . model . VersionedEntryVersion existingVersionedEntryVersion = _persistence . fetchByPrimaryKey ( newVersionedEntryVersion . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingVersionedEntryVersion , newVersionedEntryVersion )
shouldRejectId ( ) { lb . setId ( 32 ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( lb , org . openstack . atlas . api . validation . validators . PUT ) ; "<AssertPlaceHolder>" ; } passedValidation ( ) { return expectationResultList . isEmpty ( ) ; }
org . junit . Assert . assertFalse ( result . passedValidation ( ) )
testCheckpointStatsTrackerPendingCheckpointCallback ( ) { final long timestamp = java . lang . System . currentTimeMillis ( ) ; org . apache . flink . runtime . executiongraph . ExecutionVertex vertex1 = org . apache . flink . runtime . checkpoint . CheckpointCoordinatorTest . mockExecutionVertex ( new org . apache . flink . runtime . executiongraph . ExecutionAttemptID ( ) ) ; org . apache . flink . runtime . checkpoint . CheckpointCoordinator coord = new org . apache . flink . runtime . checkpoint . CheckpointCoordinator ( new org . apache . flink . api . common . JobID ( ) , 600000 , 600000 , 0 , Integer . MAX_VALUE , CheckpointRetentionPolicy . NEVER_RETAIN_AFTER_TERMINATION , new org . apache . flink . runtime . executiongraph . ExecutionVertex [ ] { vertex1 } , new org . apache . flink . runtime . executiongraph . ExecutionVertex [ ] { vertex1 } , new org . apache . flink . runtime . executiongraph . ExecutionVertex [ ] { vertex1 } , new org . apache . flink . runtime . checkpoint . StandaloneCheckpointIDCounter ( ) , new org . apache . flink . runtime . checkpoint . StandaloneCompletedCheckpointStore ( 1 ) , new org . apache . flink . runtime . state . memory . MemoryStateBackend ( ) , org . apache . flink . runtime . concurrent . Executors . directExecutor ( ) , org . apache . flink . runtime . state . SharedStateRegistry . DEFAULT_FACTORY ) ; org . apache . flink . runtime . checkpoint . CheckpointStatsTracker tracker = mock ( org . apache . flink . runtime . checkpoint . CheckpointStatsTracker . class ) ; coord . setCheckpointStatsTracker ( tracker ) ; when ( tracker . reportPendingCheckpoint ( anyLong ( ) , anyLong ( ) , any ( org . apache . flink . runtime . checkpoint . CheckpointProperties . class ) ) ) . thenReturn ( mock ( org . apache . flink . runtime . checkpoint . PendingCheckpointStats . class ) ) ; "<AssertPlaceHolder>" ; verify ( tracker , times ( 1 ) ) . reportPendingCheckpoint ( eq ( 1L ) , eq ( timestamp ) , eq ( org . apache . flink . runtime . checkpoint . CheckpointProperties . forCheckpoint ( CheckpointRetentionPolicy . NEVER_RETAIN_AFTER_TERMINATION ) ) ) ; } triggerCheckpoint ( long , boolean ) { return triggerCheckpoint ( timestamp , checkpointProperties , null , isPeriodic , false ) . isSuccess ( ) ; }
org . junit . Assert . assertTrue ( coord . triggerCheckpoint ( timestamp , false ) )
shouldReturnLocatorFromToStringMethod ( ) { final org . openqa . selenium . StubElement stubElement = new org . openqa . selenium . StubElement ( ) { @ org . openqa . selenium . support . events . Override public java . lang . String toString ( ) { return "cheese" ; } } ; org . openqa . selenium . StubDriver driver = new org . openqa . selenium . StubDriver ( ) { @ org . openqa . selenium . support . events . Override public org . openqa . selenium . WebElement findElement ( org . openqa . selenium . By by ) { return stubElement ; } } ; org . openqa . selenium . support . events . EventFiringWebDriver firingDriver = new org . openqa . selenium . support . events . EventFiringWebDriver ( driver ) ; org . openqa . selenium . WebElement firingElement = firingDriver . findElement ( org . openqa . selenium . By . id ( "ignored" ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return serialize ( ) ; }
org . junit . Assert . assertEquals ( stubElement . toString ( ) , firingElement . toString ( ) )
testGetAccessTokenNull ( ) { javax . servlet . http . HttpServletRequest request = createStrictMock ( javax . servlet . http . HttpServletRequest . class ) ; expect ( request . getHeader ( OAuth . HeaderType . AUTHORIZATION ) ) . andStubReturn ( null ) ; replay ( request ) ; org . apache . oltu . oauth2 . rs . extractor . BearerHeaderTokenExtractor hte = new org . apache . oltu . oauth2 . rs . extractor . BearerHeaderTokenExtractor ( ) ; "<AssertPlaceHolder>" ; verify ( request ) ; } getAccessToken ( javax . servlet . http . HttpServletRequest ) { java . lang . String authzHeader = request . getHeader ( OAuth . HeaderType . AUTHORIZATION ) ; return org . apache . oltu . oauth2 . common . utils . OAuthUtils . getAuthHeaderField ( authzHeader ) ; }
org . junit . Assert . assertNull ( hte . getAccessToken ( request ) )
testBasicDomainParse ( ) { org . apache . ogt . http . impl . cookie . BasicClientCookie cookie = new org . apache . ogt . http . impl . cookie . BasicClientCookie ( "name" , "value" ) ; org . apache . ogt . http . cookie . CookieAttributeHandler h = new org . apache . ogt . http . impl . cookie . BasicDomainHandler ( ) ; h . parse ( cookie , "www.somedomain.com" ) ; "<AssertPlaceHolder>" ; } getDomain ( ) { return cookieDomain ; }
org . junit . Assert . assertEquals ( "www.somedomain.com" , cookie . getDomain ( ) )
testOverrideOutputWriter ( ) { final java . util . List < java . lang . Object > l = new java . util . ArrayList ( ) ; spoon . Launcher spoon = new spoon . Launcher ( ) { @ spoon . test . api . Override public spoon . support . JavaOutputProcessor createOutputWriter ( ) { return new spoon . support . JavaOutputProcessor ( ) { @ spoon . test . api . Override public void process ( spoon . reflect . declaration . CtNamedElement e ) { l . add ( e ) ; } @ spoon . test . api . Override public void init ( ) { } } ; } } ; spoon . run ( new java . lang . String [ ] { "-i" , "src/test/resources/spoon/test/api/" , "-o" , "fancy/fake/apitest" } ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( 3 , l . size ( ) )
testFindBraket ( ) { java . lang . String patternString = "SYN<sp>flood!<sp>From<sp><src-ip>:<src-port><sp>to<sp><dst-ip>:<dst-port>,<sp>proto<sp>TCP<sp>(zone<sp><zone-name>,<sp>int<sp><interface-name>).<sp>Occurred<sp><none><sp>times." ; int [ ] expected = new int [ ] { "SYN<sp>flood!<sp>From<sp>" . length ( ) , "SYN<sp>flood!<sp>From<sp><src-ip>" . length ( ) } ; int [ ] actual = org . araqne . logparser . syslog . juniper . attack . JuniperAttackLogPattern . findBraket ( patternString , 0 ) ; "<AssertPlaceHolder>" ; } findBraket ( java . lang . String , int ) { int start = - 1 ; int end = - 1 ; int braket = - 1 ; for ( int i = offset ; ( i < ( patternString . length ( ) ) ) && ( end == ( - 1 ) ) ; i ++ ) { int ch = patternString . charAt ( i ) ; if ( braket == ( - 1 ) ) { switch ( ch ) { case '{' : case '<' : start = i ; braket = ch ; } } else if ( ch == braket ) { start = i ; } else if ( ch == ( braket + 2 ) ) { end = i + 1 ; } } int [ ] result = new int [ ] { start , end } ; return result ; }
org . junit . Assert . assertArrayEquals ( expected , actual )
testBind ( ) { final javax . naming . Name name = new javax . naming . CompositeName ( "test" ) ; final java . lang . Object value = new java . lang . Object ( ) ; org . jboss . as . naming . WritableServiceBasedNamingStore . pushOwner ( org . jboss . as . naming . WritableServiceBasedNamingStoreTestCase . OWNER_FOO ) ; try { store . bind ( name , value ) ; } finally { org . jboss . as . naming . WritableServiceBasedNamingStore . popOwner ( ) ; } "<AssertPlaceHolder>" ; } lookup ( java . lang . String ) { final org . jboss . as . naming . deployment . ContextNames . BindInfo bindInfo = org . jboss . as . naming . deployment . ContextNames . bindInfoFor ( name ) ; org . jboss . msc . service . ServiceController < ? > bindingService = container . getService ( bindInfo . getBinderServiceName ( ) ) ; if ( bindingService == null ) { return null ; } org . jboss . as . naming . ManagedReferenceFactory managedReferenceFactory = org . jboss . as . naming . ManagedReferenceFactory . class . cast ( bindingService . getValue ( ) ) ; return managedReferenceFactory . getReference ( ) . getInstance ( ) ; }
org . junit . Assert . assertEquals ( value , store . lookup ( name ) )
testAuthenticate_unknownUser_assertAssertException ( ) { org . nhindirect . common . rest . auth . BasicAuthValidator validator = buildValidator ( ) ; boolean exceptionOccured = false ; try { validator . authenticate ( "test" , "password" ) ; } catch ( org . nhindirect . common . rest . auth . exceptions . NoSuchUserException e ) { exceptionOccured = true ; } "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( exceptionOccured )
testFindByPrimaryKeyExisting ( ) { com . liferay . exportimport . kernel . model . ExportImportConfiguration newExportImportConfiguration = addExportImportConfiguration ( ) ; com . liferay . exportimport . kernel . model . ExportImportConfiguration existingExportImportConfiguration = _persistence . findByPrimaryKey ( newExportImportConfiguration . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingExportImportConfiguration , newExportImportConfiguration )
isServiceRevenueValid_serviceRevenueIsZero ( ) { org . oscm . reportingservice . business . PartnerRevenueBuilder builder = new org . oscm . reportingservice . business . PartnerRevenueBuilder ( java . util . Locale . ENGLISH , null ) ; boolean revenueValid = builder . isServiceRevenueValid ( "0.00" ) ; "<AssertPlaceHolder>" ; } isServiceRevenueValid ( java . lang . String ) { java . text . NumberFormat nf = java . text . NumberFormat . getInstance ( ) ; java . math . BigDecimal nServiceRevenue = new java . math . BigDecimal ( nf . parse ( serviceRevenue ) . toString ( ) ) ; return ( nServiceRevenue . doubleValue ( ) ) > 0 ; }
org . junit . Assert . assertFalse ( revenueValid )
testReadUntilEof ( ) { java . lang . String str = "test<sp>1\n" + ( ( "test<sp>2\n" + "test<sp>3\n" ) + "exit\n" ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . InputStream in = new java . io . ByteArrayInputStream ( str . getBytes ( StandardCharsets . UTF_8 ) ) ; org . jline . terminal . Terminal term = org . jline . terminal . TerminalBuilder . builder ( ) . system ( false ) . streams ( in , baos ) . build ( ) ; java . lang . Thread . sleep ( 100 ) ; java . io . ByteArrayOutputStream baos2 = new java . io . ByteArrayOutputStream ( ) ; byte [ ] buffer = new byte [ 1014 ] ; int l ; for ( ; ; ) { l = term . input ( ) . read ( buffer ) ; if ( l >= 0 ) { baos2 . write ( buffer , 0 , l ) ; } else { break ; } } java . lang . String str2 = new java . lang . String ( baos2 . toByteArray ( ) , java . nio . charset . StandardCharsets . UTF_8 ) ; "<AssertPlaceHolder>" ; } write ( byte [ ] , int , int ) { buffer . write ( b , off , len ) ; }
org . junit . Assert . assertEquals ( str , str2 )
shouldFailWithInvalidCommunity ( ) { client . setCommunity ( "expensivePradaBag" ) ; try { client . getBulkOidBindingList ( OIDConstants . VS_CURRENT_CONNECTIONS ) ; } catch ( java . lang . Exception ex ) { "<AssertPlaceHolder>" ; return ; } org . junit . Assert . fail ( ) ; } getBulkOidBindingList ( java . lang . String ) { org . openstack . atlas . util . snmp . StingraySnmpClient . vlog . printf ( "in<sp>call<sp>getBulkOidBindingList(%s)<sp>for<sp>%s" , oid , getConnectionName ( ) ) ; java . util . List < org . snmp4j . smi . VariableBinding > bindings = new java . util . ArrayList < org . snmp4j . smi . VariableBinding > ( ) ; java . lang . String startOID = oid ; java . lang . String currOID = startOID ; int totalItems = 0 ; int matchedItems = 0 ; double currMaxReps = maxRepetitions ; boolean finished = false ; while ( ! finished ) { org . openstack . atlas . util . snmp . StingraySnmpClient . vlog . printf ( "total<sp>items<sp>=<sp>%d<sp>matched<sp>items=<sp>%d<sp>from<sp>CONTINUING" , totalItems , matchedItems , getConnectionName ( oid ) ) ; org . snmp4j . PDU req = new org . snmp4j . PDU ( ) ; req . add ( new org . snmp4j . smi . VariableBinding ( new org . snmp4j . smi . OID ( currOID ) ) ) ; req . setType ( PDU . GETBULK ) ; req . setNonRepeaters ( nonRepeaters ) ; req . setMaxRepetitions ( ( ( int ) ( currMaxReps ) ) ) ; req . setRequestID ( new org . snmp4j . smi . Integer32 ( org . openstack . atlas . util . snmp . StingraySnmpClient . incRequestId ( ) ) ) ; org . snmp4j . smi . UdpAddress udpAddr ; try { udpAddr = new org . snmp4j . smi . UdpAddress ( ( ( ( address ) + "/" ) + ( port ) ) ) ; } catch ( java . lang . Exception ex ) { java . lang . String msg = java . lang . String . format ( "Invalid<sp>udpAddress<sp>specification<sp>%s/%s" , address , port ) ; org . openstack . atlas . util . snmp . StingraySnmpClient . LOG . error ( msg , ex ) ; throw new org . openstack . atlas . util . snmp . exceptions . StingraySnmpSetupException ( msg , ex ) ; } org . snmp4j . CommunityTarget target = new org . snmp4j . CommunityTarget ( ) ; target . setCommunity ( new org . snmp4j . smi . OctetString ( community ) ) ; target . setVersion ( version ) ; target . setTimeout ( org . openstack . atlas . util . snmp . StingraySnmpClient . timeout ) ; target . setAddress ( udpAddr ) ; org . snmp4j . TransportMapping transport ; try { transport = new org . snmp4j . transport . DefaultUdpTransportMapping ( ) ; } catch ( java . io . IOException ex ) { java . lang . String msg = java . lang . String . format ( "Error<sp>setting<sp>up<sp>snmp<sp>connection<sp>to<sp>%s" , getConnectionName ( ) ) ; org . openstack . atlas . util . snmp . StingraySnmpClient . LOG . error ( msg , ex ) ; throw new org . openstack . atlas . util . snmp . exceptions . StingraySnmpSetupException ( msg , ex ) ; } org . snmp4j . Snmp snmp = new org . snmp4j . Snmp ( transport ) ; try { transport . listen ( ) ; } catch ( java . io . IOException ex ) { java . lang . String msg = java . lang . String . format ( "Error<sp>listening<sp>on<sp>local<sp>udp<sp>port<sp>for<sp>snmp<sp>connection<sp>%s/%s" , address , port ) ; org . openstack . atlas . util . snmp . StingraySnmpClient . LOG . error ( msg , ex ) ; closeConnection ( snmp , transport ) ; throw new org . openstack . atlas . util . snmp . exceptions . StingraySnmpSetupException ( msg , ex ) ; } org . snmp4j . smi . VariableBinding vb = null ; org . snmp4j . event . ResponseEvent respEvent = null ; try { respEvent = snmp . getBulk ( req , target ) ; } catch ( java . io . IOException ex ) { java . lang . String msg = java . lang . String . format ( "Error<sp>getting<sp>bulk<sp>request<sp>from<sp>snmp<sp>server<sp>%s" , getConnectionName ( oid ) ) ; org . openstack . atlas . util . snmp . StingraySnmpClient . LOG . error ( msg , ex ) ; closeConnection ( snmp , transport ) ; throw new org . openstack . atlas . util . snmp . exceptions . StingraySnmpGeneralException ( msg , ex ) ; } org . snmp4j . PDU respPdu = respEvent . getResponse ( ) ; if ( respPdu == null ) { java . lang . String msg = java . lang . String . format ( "Error<sp>fetching<sp>bulk<sp>response<sp>reducing<sp>maxRepetitions<sp>from<sp>%d<sp>to<sp>%d<sp>for<sp>%s" , ( ( int ) ( currMaxReps ) ) , ( ( int ) ( currMaxReps * 0.75 ) ) , getConnectionName ( oid ) ) ; currMaxReps *= 0.75 ; org . openstack . atlas . util . snmp . StingraySnmpClient . LOG . warn ( msg ) ; if ( currMaxReps <= 1.0 ) { java . lang . String exMsg = java . lang . String . format ( "Error<sp>maxRepetitions<sp>was<sp>shrunk<sp>to<sp>1<sp>to<sp>snmp<sp>server<sp>%s" , getConnectionName ( oid ) ) ; org . openstack . atlas . util . snmp . StingraySnmpClient . LOG . error ( exMsg ) ; closeConnection ( snmp , transport ) ; throw new org . openstack . atlas . util . snmp . exceptions . StingraySnmpRetryExceededException ( exMsg ) ; } closeConnection ( snmp , transport ) ; continue ; } int respSize = respPdu . size ( ) ; for ( int i = 0 ; i < respSize ; i ++ ) { totalItems ++ ; vb = respPdu .
org . junit . Assert . assertTrue ( ( ex instanceof org . openstack . atlas . util . snmp . exceptions . StingraySnmpGeneralException ) )
testPlusTimestampValues ( ) { java . lang . String sqlText = "values<sp>timestamp('2011-12-26',<sp>'17:13:30')<sp>+<sp>1" ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . SimpleDateArithmeticIT . spliceClassWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "1<sp>|\n" + ( "-----------------------\n" + "2011-12-27<sp>17:13:30.0<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 ) )
testBug51686 ( ) { java . io . InputStream is = org . apache . poi . hwpf . extractor . TestWordExtractor . docTests . openResourceAsStream ( "Bug51686.doc" ) ; org . apache . poi . poifs . filesystem . POIFSFileSystem fs = new org . apache . poi . poifs . filesystem . POIFSFileSystem ( is ) ; is . close ( ) ; java . lang . String text = null ; for ( org . apache . poi . poifs . filesystem . Entry entry : fs . getRoot ( ) ) { if ( "WordDocument" . equals ( entry . getName ( ) ) ) { try ( org . apache . poi . hwpf . extractor . WordExtractor ex = new org . apache . poi . hwpf . extractor . WordExtractor ( fs ) ) { text = ex . getText ( ) ; } } } "<AssertPlaceHolder>" ; fs . close ( ) ; } getText ( ) { java . io . StringWriter stringWriter = new java . io . StringWriter ( ) ; javax . xml . transform . dom . DOMSource domSource = new javax . xml . transform . dom . DOMSource ( getDocument ( ) ) ; javax . xml . transform . stream . StreamResult streamResult = new javax . xml . transform . stream . StreamResult ( stringWriter ) ; javax . xml . transform . TransformerFactory tf = javax . xml . transform . TransformerFactory . newInstance ( ) ; javax . xml . transform . Transformer serializer = tf . newTransformer ( ) ; serializer . setOutputProperty ( OutputKeys . ENCODING , "UTF-8" ) ; serializer . setOutputProperty ( OutputKeys . INDENT , "no" ) ; serializer . setOutputProperty ( OutputKeys . METHOD , "text" ) ; serializer . transform ( domSource , streamResult ) ; return stringWriter . toString ( ) ; }
org . junit . Assert . assertNotNull ( text )
getHoursReturnTheSumOfAllHours ( ) { org . libreplan . business . orders . entities . HoursGroup h1 = createHoursGroupWithCriterions ( criterion1 , criterion2 ) ; h1 . setWorkingHours ( 10 ) ; org . libreplan . business . orders . entities . HoursGroup h2 = createHoursGroupWithCriterions ( criterion1 , criterion2 ) ; h2 . setWorkingHours ( 5 ) ; org . libreplan . business . orders . entities . AggregatedHoursGroup aggregate = org . libreplan . business . orders . entities . AggregatedHoursGroup . aggregate ( h1 , h2 ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getHours ( ) { if ( ( getBeingEditedElement ( ) ) == null ) { return 0 ; } return getBeingEditedElement ( ) . getIntentedTotalHours ( ) ; }
org . junit . Assert . assertThat ( aggregate . getHours ( ) , org . hamcrest . CoreMatchers . equalTo ( 15 ) )
shouldParseConnectScriptWithComments ( ) { java . lang . String script = "#<sp>tcp.client.connect-then-close\n" + ( ( ( ( "connect<sp>\'tcp://localhost:7788\'<sp>#<sp>Comment<sp>1\n" + "\t\t<sp>#<sp>Comment<sp>2\n" ) + "connected\n" ) + "close\n" ) + "closed\n" ) ; org . kaazing . k3po . lang . internal . parser . ScriptParserImpl parser = new org . kaazing . k3po . lang . internal . parser . ScriptParserImpl ( ) ; org . kaazing . k3po . lang . internal . ast . AstScriptNode actual = parser . parseWithStrategy ( script , org . kaazing . k3po . lang . internal . parser . ScriptParseStrategy . SCRIPT ) ; org . kaazing . k3po . lang . internal . ast . value . AstValue < java . net . URI > location = new org . kaazing . k3po . lang . internal . ast . value . AstLiteralURIValue ( java . net . URI . create ( "tcp://localhost:7788" ) ) ; org . kaazing . k3po . lang . internal . ast . AstScriptNode expected = new org . kaazing . k3po . lang . internal . ast . builder . AstScriptNodeBuilder ( ) . addConnectStream ( ) . setLocation ( location ) . addConnectedEvent ( ) . done ( ) . addCloseCommand ( ) . done ( ) . addClosedEvent ( ) . done ( ) . done ( ) . done ( ) ; "<AssertPlaceHolder>" ; } done ( ) { return node ; }
org . junit . Assert . assertEquals ( expected , actual )
testGetTextCharSequence ( ) { org . eclipse . xtext . ui . label . DefaultEObjectLabelProvider defaultLabelProvider = new org . eclipse . xtext . ui . label . DefaultEObjectLabelProvider ( ) { @ org . eclipse . xtext . ui . tests . label . SuppressWarnings ( "unused" ) public java . lang . Object text ( org . eclipse . xtext . ParserRule parserRule ) { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( parserRule . getName ( ) ) ; return _builder ; } } ; org . eclipse . xtext . ParserRule parserRule = XtextFactory . eINSTANCE . createParserRule ( ) ; parserRule . setName ( "testCreateStyledString" ) ; java . lang . String styledText = defaultLabelProvider . getText ( parserRule ) ; "<AssertPlaceHolder>" ; } getText ( java . lang . Object ) { java . lang . String label = ( ( org . eclipse . xtext . common . types . JvmConstructor ) ( object ) ) . getSimpleName ( ) ; return ( label == null ) || ( ( label . length ( ) ) == 0 ) ? getString ( "_UI_JvmConstructor_type" ) : ( ( getString ( "_UI_JvmConstructor_type" ) ) + "<sp>" ) + label ; }
org . junit . Assert . assertEquals ( "testCreateStyledString" , styledText )