input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
drop_A$int_Nil ( ) { com . m3 . scalaflavor4j . Seq < java . lang . Integer > seq = com . m3 . scalaflavor4j . Seq . apply ( ) ; int n = 3 ; com . m3 . scalaflavor4j . Seq < java . lang . Integer > actual = seq . drop ( n ) ; "<AssertPlaceHolder>" ; } size ( ) { return 0 ; }
org . junit . Assert . assertThat ( actual . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 0 ) ) )
respondInterrupt ( ) { java . util . concurrent . atomic . AtomicReference < java . lang . Throwable > intr = new java . util . concurrent . atomic . AtomicReference ( ) ; io . trane . future . Promise < java . lang . Integer > p = io . trane . future . Promise . apply ( intr :: set ) ; io . trane . future . Responder < java . lang . Integer > r = new io . trane . future . Responder < java . lang . Integer > ( ) { @ io . trane . future . Override public void onException ( java . lang . Throwable ex ) { } @ io . trane . future . Override public void onValue ( java . lang . Integer value ) { } } ; io . trane . future . Future < java . lang . Integer > f = p . respond ( r ) ; f . raise ( ex ) ; "<AssertPlaceHolder>" ; } get ( ) { final java . util . Optional < ? > [ ] ctx = io . trane . future . Local . threadLocal . get ( ) ; if ( ( ctx == null ) || ( ( ctx . length ) <= ( position ) ) ) return java . util . Optional . empty ( ) ; final java . util . Optional < ? > v = ctx [ position ] ; if ( v == null ) return java . util . Optional . empty ( ) ; else return ( ( java . util . Optional < T > ) ( v ) ) ; }
org . junit . Assert . assertEquals ( ex , intr . get ( ) )
test_bs_match_string2 ( ) { org . jerlang . type . Binary expected = new org . jerlang . type . Binary ( new int [ ] { 1 , 2 } ) ; org . jerlang . type . List params = org . jerlang . type . List . of ( new org . jerlang . type . Binary ( new int [ ] { 16 , 1 , 2 } ) ) ; org . jerlang . type . Term result = org . jerlang . erts . Erlang . apply ( org . jerlang . type . Atom . of ( "bs_match_string" ) , org . jerlang . type . Atom . of ( "test" ) , params ) ; "<AssertPlaceHolder>" ; } of ( byte [ ] ) { return org . jerlang . type . Atom . of ( new java . lang . String ( bytes , ISO_8859_1 ) ) ; }
org . junit . Assert . assertEquals ( expected , result )
testFilterString10 ( ) { java . lang . String filter = ( org . opennms . features . topology . plugins . topo . asset . layers . NodeParamLabels . ASSET_DISPLAYCATEGORY ) + "=!~.*_5" ; java . lang . String expected = "nodeList:{<sp>[0]<sp>[1]<sp>[2]<sp>[3]<sp>[4]<sp>[6]<sp>[7]<sp>[8]<sp>[9]<sp>[10]<sp>[11]<sp>[12]<sp>[13]<sp>[14]<sp>[15]<sp>[16]<sp>[17]<sp>[18]<sp>[19]<sp>}" ; org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . LOG . debug ( ( ( ( "Start<sp>testFilterString10():<sp>filter=" + filter ) + "<sp>expected=" ) + expected ) ) ; java . lang . String s2 = testFilterParser ( filter ) ; "<AssertPlaceHolder>" ; org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . LOG . debug ( "End<sp>testFilterString10()" ) ; } testFilterParser ( java . lang . String ) { java . util . List < org . opennms . netmgt . model . OnmsNode > nodeList = org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . getMockNodeList ( ) ; java . lang . String s1 = org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . nodelistToString ( nodeList ) ; org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . LOG . debug ( ( "<sp>before:" + s1 ) ) ; final org . opennms . features . topology . plugins . topo . asset . GeneratorConfig config = new org . opennms . features . topology . plugins . topo . asset . GeneratorConfigBuilder ( ) . withFilters ( filter ) . build ( ) ; final java . util . Map < java . lang . String , org . opennms . features . topology . plugins . topo . asset . filter . Filter > filterMap = new org . opennms . features . topology . plugins . topo . asset . filter . FilterParser ( ) . parse ( config . getFilters ( ) ) ; java . util . List < org . opennms . netmgt . model . OnmsNode > filteredNodeList = testFilterCode ( nodeList , filterMap ) ; java . lang . String s2 = org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . nodelistToString ( filteredNodeList ) ; org . opennms . features . topology . plugins . topo . asset . filter . FilterParserTest . LOG . debug ( ( "<sp>after:" + s2 ) ) ; return s2 ; }
org . junit . Assert . assertEquals ( expected , s2 )
givenUsingApacheCommons_whenConcatenatingUsingChainedIterable_thenCorrect ( ) { org . baeldung . java . collections . Collection < java . lang . String > collectionA = asList ( "S" , "T" ) ; org . baeldung . java . collections . Collection < java . lang . String > collectionB = asList ( "U" , "V" ) ; java . lang . Iterable < java . lang . String > combinedIterables = org . apache . commons . collections4 . IterableUtils . chainedIterable ( collectionA , collectionB ) ; org . baeldung . java . collections . Collection < java . lang . String > collectionCombined = com . google . common . collect . Lists . newArrayList ( combinedIterables ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( asList ( "S" , "T" , "U" , "V" ) , collectionCombined )
testHttpProxy ( ) { net . dongliu . requests . RawResponse response = net . dongliu . requests . Requests . get ( "https://www.google.com" ) . proxy ( net . dongliu . requests . Proxies . httpProxy ( "127.0.0.1" , 1081 ) ) . send ( ) ; response . close ( ) ; "<AssertPlaceHolder>" ; } statusCode ( ) { return statusCode ; }
org . junit . Assert . assertEquals ( 200 , response . statusCode ( ) )
testAddServiceNull ( ) { try { broker . addService ( null ) ; org . junit . Assert . fail ( "ConfigurationException<sp>expected" ) ; } catch ( flex . messaging . config . ConfigurationException ce ) { int error = flex . messaging . config . ConfigurationConstants . NULL_COMPONENT ; "<AssertPlaceHolder>" ; } } getNumber ( ) { return number ; }
org . junit . Assert . assertTrue ( ( ( ce . getNumber ( ) ) == error ) )
empty ( ) { try ( org . jooby . internal . ReaderInputStream reader = new org . jooby . internal . ReaderInputStream ( new java . io . StringReader ( "" ) , UTF_8 ) ) { "<AssertPlaceHolder>" ; } } read ( ) { byte [ ] b = new byte [ 1 ] ; return ( read ( b ) ) == ( - 1 ) ? - 1 : ( b [ 0 ] ) & 255 ; }
org . junit . Assert . assertEquals ( ( - 1 ) , reader . read ( ) )
naoDeveApendarNadaSeOtamanhoEhMenorQueAString ( ) { java . lang . String value = "12345" ; java . lang . String result = br . com . caelum . stella . boleto . utils . StellaStringUtils . leftPadWithZeros ( value , 4 ) ; "<AssertPlaceHolder>" ; } leftPadWithZeros ( java . lang . String , int ) { if ( input == null ) { return br . com . caelum . stella . boleto . utils . StellaStringUtils . leftPadWithZeros ( "" , expectedSize ) ; } java . lang . StringBuilder sb = new java . lang . StringBuilder ( expectedSize ) ; for ( int i = expectedSize - ( input . length ( ) ) ; i > 0 ; i -- ) { sb . append ( br . com . caelum . stella . boleto . utils . StellaStringUtils . ZERO ) ; } sb . append ( input ) ; return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( "12345" , result )
testValue ( ) { net . ontopia . topicmaps . rest . model . VariantName variant = get ( "4" , net . ontopia . topicmaps . rest . model . VariantName . class ) ; variant . setValue ( "Another<sp>value" ) ; net . ontopia . topicmaps . rest . model . VariantName changed = post ( "4" , variant , net . ontopia . topicmaps . rest . model . VariantName . class ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return field . stringValue ( ) ; }
org . junit . Assert . assertEquals ( "Another<sp>value" , changed . getValue ( ) )
setErrorCode_chargePointErrorCode_errorCodeIsSet ( ) { eu . chargetime . ocpp . model . core . ChargePointErrorCode chargePointErrorCode = eu . chargetime . ocpp . model . core . ChargePointErrorCode . NoError ; request . setErrorCode ( chargePointErrorCode ) ; "<AssertPlaceHolder>" ; } getErrorCode ( ) { return errorCode ; }
org . junit . Assert . assertThat ( request . getErrorCode ( ) , org . hamcrest . CoreMatchers . equalTo ( chargePointErrorCode ) )
testGetSystemConfigsWithoutData ( ) { new java . io . File ( jenkinsHome , "config-history" ) . renameTo ( new java . io . File ( jenkinsHome , "invalid" ) ) ; final java . io . File [ ] systemConfigs = sutWithoutUserAndDuplicateHistory . getSystemConfigs ( ) ; "<AssertPlaceHolder>" ; } getSystemConfigs ( ) { return returnEmptyFileArrayForNull ( historyRootDir . listFiles ( NonJobsDirectoryFileFilter . INSTANCE ) ) ; }
org . junit . Assert . assertEquals ( 0 , systemConfigs . length )
testStringTypeMismatch ( ) { org . stringtemplate . v4 . test . ErrorBuffer errors = new org . stringtemplate . v4 . test . ErrorBuffer ( ) ; org . stringtemplate . v4 . test . STGroup group = new org . stringtemplate . v4 . test . STGroup ( ) ; group . setListener ( errors ) ; org . stringtemplate . v4 . test . ST e = new org . stringtemplate . v4 . test . ST ( group , "<trim(s)>" ) ; e . add ( "s" , 34 ) ; e . render ( ) ; java . lang . String errorExpecting = "context<sp>[anonymous]<sp>1:1<sp>function<sp>trim<sp>expects<sp>a<sp>string<sp>not<sp>java.lang.Integer" + ( newline ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( getClass ( ) . getSimpleName ( ) ) + "{" ) + "self=" ) + ( scope . st ) ) + ",<sp>start=" ) + ( outputStartChar ) ) + ",<sp>stop=" ) + ( outputStopChar ) ) + '}' ; }
org . junit . Assert . assertEquals ( errorExpecting , errors . toString ( ) )
testJDK5 ( ) { net . sourceforge . cobertura . jdk . JDKTest . setupAndExecuteTest ( "1.5" ) ; int hitCount = net . sourceforge . cobertura . test . util . TestUtils . getTotalHitCount ( net . sourceforge . cobertura . jdk . JDKTest . dom , "mypackage.JDKTEST" , "main" ) ; "<AssertPlaceHolder>" ; } getTotalHitCount ( groovy . util . Node , java . lang . String , java . lang . String ) { int sum = 0 ; for ( net . sourceforge . cobertura . test . util . Iterator < groovy . util . Node > packagesIterator = dom . iterator ( ) ; packagesIterator . hasNext ( ) ; ) { groovy . util . Node packagesNode = packagesIterator . next ( ) ; if ( "packages" . equals ( packagesNode . name ( ) ) ) { for ( net . sourceforge . cobertura . test . util . Iterator < groovy . util . Node > packageIterator = packagesNode . iterator ( ) ; packageIterator . hasNext ( ) ; ) { groovy . util . Node packageNode = packageIterator . next ( ) ; if ( "package" . equals ( packageNode . name ( ) ) ) { for ( net . sourceforge . cobertura . test . util . Iterator < groovy . util . Node > classesIterator = packageNode . iterator ( ) ; classesIterator . hasNext ( ) ; ) { groovy . util . Node classesNode = classesIterator . next ( ) ; if ( "classes" . equals ( classesNode . name ( ) ) ) { for ( net . sourceforge . cobertura . test . util . Iterator < groovy . util . Node > classIterator = classesNode . iterator ( ) ; classIterator . hasNext ( ) ; ) { groovy . util . Node classNode = classIterator . next ( ) ; if ( "class" . equals ( classNode . name ( ) ) ) { if ( className . equals ( classNode . attribute ( "name" ) ) ) { for ( net . sourceforge . cobertura . test . util . Iterator < groovy . util . Node > methodsIterator = classNode . iterator ( ) ; methodsIterator . hasNext ( ) ; ) { groovy . util . Node methodsNode = methodsIterator . next ( ) ; if ( "methods" . equals ( methodsNode . name ( ) ) ) { for ( net . sourceforge . cobertura . test . util . Iterator < groovy . util . Node > methodIterator = methodsNode . iterator ( ) ; methodIterator . hasNext ( ) ; ) { groovy . util . Node methodNode = methodIterator . next ( ) ; if ( "method" . equals ( methodNode . name ( ) ) ) { if ( methodName . equals ( methodNode . attribute ( "name" ) ) ) { for ( net . sourceforge . cobertura . test . util . Iterator < groovy . util . Node > linesIterator = methodNode . iterator ( ) ; linesIterator . hasNext ( ) ; ) { groovy . util . Node linesNode = linesIterator . next ( ) ; if ( "lines" . equals ( linesNode . name ( ) ) ) { for ( net . sourceforge . cobertura . test . util . Iterator < groovy . util . Node > lineIterator = linesNode . iterator ( ) ; lineIterator . hasNext ( ) ; ) { groovy . util . Node lineNode = lineIterator . next ( ) ; if ( "line" . equals ( lineNode . name ( ) ) ) { sum += java . lang . Integer . valueOf ( ( ( java . lang . String ) ( lineNode . attribute ( "hits" ) ) ) ) ; } } } } } } } } } } } } } } } } } } return sum ; }
org . junit . Assert . assertEquals ( 2 , hitCount )
testDecompressReturnsWhenNothingToDecompress ( ) { org . apache . hadoop . io . compress . zstd . ZStandardDecompressor decompressor = new org . apache . hadoop . io . compress . zstd . ZStandardDecompressor ( IO_FILE_BUFFER_SIZE_DEFAULT ) ; int result = decompressor . decompress ( new byte [ 10 ] , 0 , 10 ) ; "<AssertPlaceHolder>" ; } decompress ( byte [ ] , int , int ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( 0 , result )
createDynamicModule ( ) { com . google . inject . Injector injector = com . google . inject . Guice . createInjector ( de . devsurf . injection . guice . scanner . StartupModule . create ( de . devsurf . injection . guice . scanner . reflections . ReflectionsScanner . class , de . devsurf . injection . guice . scanner . PackageFilter . create ( de . devsurf . injection . guice . scanner . reflections . tests . autobind . AutobindTests . class , false ) ) ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Class , boolean ) { return new de . devsurf . injection . guice . scanner . PackageFilter ( clazz . getPackage ( ) . getName ( ) , deeper ) ; }
org . junit . Assert . assertNotNull ( injector )
characteristic_set_reducer_04 ( ) { org . apache . hadoop . mrunit . mapreduce . MapReduceDriver < org . apache . jena . hadoop . rdf . types . CharacteristicSetWritable , org . apache . jena . hadoop . rdf . types . CharacteristicSetWritable , org . apache . jena . hadoop . rdf . types . CharacteristicSetWritable , org . apache . jena . hadoop . rdf . types . CharacteristicSetWritable , org . apache . jena . hadoop . rdf . types . CharacteristicSetWritable , org . apache . hadoop . io . NullWritable > driver = this . getMapReduceDriver ( ) ; this . createSet ( driver , 2 , 1 , "http://predicate" ) ; this . createSet ( driver , 1 , 1 , "http://other" ) ; driver . runTest ( false ) ; driver = getMapReduceDriver ( ) ; createSet ( driver , 2 , 1 , "http://predicate" ) ; createSet ( driver , 1 , 1 , "http://other" ) ; java . util . List < org . apache . hadoop . mrunit . types . Pair < org . apache . jena . hadoop . rdf . types . CharacteristicSetWritable , org . apache . hadoop . io . NullWritable > > results = driver . run ( ) ; for ( org . apache . hadoop . mrunit . types . Pair < org . apache . jena . hadoop . rdf . types . CharacteristicSetWritable , org . apache . hadoop . io . NullWritable > pair : results ) { org . apache . jena . hadoop . rdf . types . CharacteristicSetWritable cw = pair . getFirst ( ) ; boolean expectTwo = cw . getCharacteristics ( ) . next ( ) . getNode ( ) . get ( ) . hasURI ( "http://predicate" ) ; "<AssertPlaceHolder>" ; } } getCount ( ) { return count ; }
org . junit . Assert . assertEquals ( ( expectTwo ? 2 : 1 ) , cw . getCount ( ) . get ( ) )
testNullDefaultValue ( ) { final org . apache . logging . log4j . core . config . plugins . validation . ValidatingPluginWithTypedBuilder validatingPlugin = ( ( org . apache . logging . log4j . core . config . plugins . validation . ValidatingPluginWithTypedBuilder ) ( new org . apache . logging . log4j . core . config . plugins . util . PluginBuilder ( plugin ) . setConfiguration ( new org . apache . logging . log4j . core . config . NullConfiguration ( ) ) . setConfigurationNode ( node ) . build ( ) ) ) ; "<AssertPlaceHolder>" ; } build ( ) { try { return new org . apache . logging . log4j . dbcp2 . appender . PoolingDriverConnectionSource ( org . apache . logging . log4j . dbcp2 . appender . PoolingDriverConnectionSource . Builder . getDriverClassName ( ) , org . apache . logging . log4j . dbcp2 . appender . PoolingDriverConnectionSource . Builder . getConnectionString ( ) , org . apache . logging . log4j . dbcp2 . appender . PoolingDriverConnectionSource . Builder . getUserName ( ) , org . apache . logging . log4j . dbcp2 . appender . PoolingDriverConnectionSource . Builder . getPassword ( ) , org . apache . logging . log4j . dbcp2 . appender . PoolingDriverConnectionSource . Builder . getProperties ( ) , poolName , poolableConnectionFactoryConfig ) ; } catch ( final java . sql . SQLException e ) { org . apache . logging . log4j . dbcp2 . appender . PoolingDriverConnectionSource . Builder . getLogger ( ) . error ( "Exception<sp>constructing<sp>{}<sp>to<sp>'{}'<sp>with<sp>{}" , org . apache . logging . log4j . dbcp2 . appender . PoolingDriverConnectionSource . class , org . apache . logging . log4j . dbcp2 . appender . PoolingDriverConnectionSource . Builder . getConnectionString ( ) , this , e ) ; return null ; } }
org . junit . Assert . assertNull ( validatingPlugin )
testSameLSNHaveSameHash ( ) { org . postgresql . replication . LogSequenceNumber first = org . postgresql . replication . LogSequenceNumber . valueOf ( "0/15D690F8" ) ; org . postgresql . replication . LogSequenceNumber second = org . postgresql . replication . LogSequenceNumber . valueOf ( "0/15D690F8" ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return ( ( int ) ( ( value ) ^ ( ( value ) > > > 32 ) ) ) ; }
org . junit . Assert . assertThat ( first . hashCode ( ) , org . hamcrest . CoreMatchers . equalTo ( second . hashCode ( ) ) )
testList ( ) { java . util . List < net . magja . model . country . Country > countries = service . list ( ) ; for ( net . magja . model . country . Country country : countries ) { net . magja . service . country . CountryRemoteServiceITest . log . info ( "{}" , country . toString ( ) ) ; } "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( "Country<sp>[countryId=" + ( countryId ) ) + ",<sp>iso2Code=" ) + ( iso2Code ) ) + ",<sp>iso3Code=" ) + ( iso3Code ) ) + ",<sp>name=" ) + ( name ) ; }
org . junit . Assert . assertFalse ( countries . isEmpty ( ) )
testMultiWindowCanBeSet ( ) { configuration . setSingleWindow ( false ) ; "<AssertPlaceHolder>" ; } isSingleWindow ( ) { if ( isSet ( com . thoughtworks . selenium . BrowserConfigurationOptions . SINGLE_WINDOW ) ) { return true ; } return false ; }
org . junit . Assert . assertTrue ( ( ! ( configuration . isSingleWindow ( ) ) ) )
test_setContextualizedObject_Provided ( ) { ch . puzzle . itc . mobiliar . business . resourcerelation . entity . ResourceRelationContextEntity e = new ch . puzzle . itc . mobiliar . business . resourcerelation . entity . ResourceRelationContextEntity ( ) ; ch . puzzle . itc . mobiliar . business . resourcerelation . entity . AbstractResourceRelationEntity contextualizedObject = new ch . puzzle . itc . mobiliar . business . resourcerelation . entity . ProvidedResourceRelationEntity ( ) ; contextualizedObject . setId ( java . lang . Integer . valueOf ( 12 ) ) ; e . setContextualizedObject ( contextualizedObject ) ; "<AssertPlaceHolder>" ; } getContextualizedObject ( ) { return contextualizedObject ; }
org . junit . Assert . assertEquals ( contextualizedObject , e . getContextualizedObject ( ) )
testNodeChildrenCreatedUntil ( ) { long start = java . lang . System . currentTimeMillis ( ) ; activity = createActivity ( ( "ActivityDescendantsCreatedUntil-" + start ) ) ; java . util . List < com . ibm . sbt . services . client . connections . activities . ActivityNode > nodes = createActivityDescendants ( activity ) ; com . ibm . sbt . services . client . connections . activities . ActivityNode node = nodes . get ( 2 ) ; java . util . Map < java . lang . String , java . lang . String > params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; params . put ( "until" , ( "" + ( node . getPublished ( ) . getTime ( ) ) ) ) ; params . put ( "rangeId" , "created" ) ; com . ibm . sbt . services . client . base . datahandlers . EntityList < com . ibm . sbt . services . client . connections . activities . ActivityNode > activityNodes = activityService . getActivityNodeChildren ( activity . getActivityUuid ( ) , params ) ; System . out . println ( ( ( ( "Nodes<sp>" + ( activityNodes . size ( ) ) ) + "<sp>created<sp>until:<sp>" ) + ( com . ibm . sbt . services . client . connections . activities . ActivityNodeChildrenSinceTest . dateFormat . format ( node . getPublished ( ) ) ) ) ) ; dumpNodes ( activityNodes ) ; "<AssertPlaceHolder>" ; } size ( ) { return count ; }
org . junit . Assert . assertEquals ( 2 , activityNodes . size ( ) )
handleIllegalArgumentExceptionShouldReturnIt ( ) { java . lang . IllegalArgumentException e = new java . lang . IllegalArgumentException ( ) ; "<AssertPlaceHolder>" ; } handle ( java . lang . Throwable ) { if ( e instanceof org . codegist . crest . CRestException ) { return org . codegist . crest . CRestException . handle ( ( ( org . codegist . crest . CRestException ) ( e ) ) ) ; } else if ( e instanceof org . codegist . crest . io . RequestException ) { return org . codegist . crest . CRestException . handle ( ( ( org . codegist . crest . io . RequestException ) ( e ) ) ) ; } else if ( e instanceof java . lang . IllegalArgumentException ) { return org . codegist . crest . CRestException . handle ( ( ( java . lang . IllegalArgumentException ) ( e ) ) ) ; } else if ( e instanceof java . lang . IllegalStateException ) { return org . codegist . crest . CRestException . handle ( ( ( java . lang . IllegalStateException ) ( e ) ) ) ; } else if ( e instanceof java . lang . reflect . InvocationTargetException ) { return org . codegist . crest . CRestException . handle ( ( ( java . lang . reflect . InvocationTargetException ) ( e ) ) ) ; } else { return new org . codegist . crest . CRestException ( e . getMessage ( ) , e ) ; } }
org . junit . Assert . assertSame ( e , org . codegist . crest . CRestException . handle ( e ) )
testIsUndefined01 ( ) { java . util . List < org . dresdenocl . modelinstancetype . types . IModelInstanceString > elements01 ; elements01 = new java . util . ArrayList < org . dresdenocl . modelinstancetype . types . IModelInstanceString > ( ) ; elements01 . add ( org . dresdenocl . modelinstancetype . types . base . BasisJavaModelInstanceFactory . createModelInstanceString ( "one" ) ) ; elements01 . add ( org . dresdenocl . modelinstancetype . types . base . BasisJavaModelInstanceFactory . createModelInstanceString ( "two" ) ) ; elements01 . add ( org . dresdenocl . modelinstancetype . types . base . BasisJavaModelInstanceFactory . createModelInstanceString ( "three" ) ) ; org . dresdenocl . modelinstancetype . types . IModelInstanceCollection < org . dresdenocl . modelinstancetype . types . IModelInstanceString > modelInstanceCollection01 ; modelInstanceCollection01 = org . dresdenocl . modelinstancetype . types . base . BasisJavaModelInstanceFactory . createModelInstanceCollection ( elements01 , org . dresdenocl . modelbus . test . modelinstance . types . base . JavaModelInstanceCollectionTest . typeBag ) ; "<AssertPlaceHolder>" ; } isUndefined ( ) { return true ; }
org . junit . Assert . assertFalse ( modelInstanceCollection01 . isUndefined ( ) )
test_shrink ( ) { org . eclipse . gef . geometry . planar . Rectangle prect = new org . eclipse . gef . geometry . planar . Rectangle ( new org . eclipse . gef . geometry . planar . Rectangle ( 100 , 100 , 250 , 250 ) ) ; org . eclipse . gef . geometry . planar . Rectangle copy = prect . getCopy ( ) ; prect . translate ( 30 , 30 ) ; prect . scale ( 2.0F ) ; prect . shrink ( 2 , 2 , 2 , 2 ) ; prect . scale ( ( 1 / 2.0F ) ) ; prect . translate ( ( - 30 ) , ( - 30 ) ) ; prect = new org . eclipse . gef . geometry . planar . Rectangle ( new org . eclipse . gef . geometry . planar . Rectangle ( 0 , 0 , 3 , 3 ) ) ; copy = prect . getCopy ( ) ; prect . translate ( 1 , 1 ) ; prect . scale ( 4.0F ) ; prect . shrink ( 1 , 1 , ( - 1 ) , ( - 1 ) ) ; prect . scale ( ( 1 / 4.0F ) ) ; prect . translate ( ( - 1 ) , ( - 1 ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } org . eclipse . gef . mvc . fx . parts . IBendableContentPart . BendPoint other = ( ( org . eclipse . gef . mvc . fx . parts . IBendableContentPart . BendPoint ) ( obj ) ) ; if ( ( contentAnchorage ) == null ) { if ( ( other . contentAnchorage ) != null ) { return false ; } } else if ( ! ( contentAnchorage . equals ( other . contentAnchorage ) ) ) { return false ; } if ( ( position ) == null ) { if ( ( other . position ) != null ) { return false ; } } else if ( ! ( position . equals ( other . position ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( ( ! ( prect . equals ( copy ) ) ) )
testSaveNonce ( ) { org . verisign . joid . db . TestDbStore . dbStore . saveNonce ( org . verisign . joid . db . TestDbStore . nonce ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertNotNull ( org . verisign . joid . db . TestDbStore . nonce . getId ( ) )
normalizedNodesToJsonTest ( ) { final org . opendaylight . yangtools . yang . data . api . schema . DataContainerChild < ? extends org . opendaylight . yangtools . yang . data . api . YangInstanceIdentifier . PathArgument , ? > baz = org . opendaylight . yangtools . yang . data . codec . gson . YangModeledAnyXmlSupportTest . data ; final java . io . Writer writer = new java . io . StringWriter ( ) ; final java . lang . String jsonOutput = org . opendaylight . yangtools . yang . data . codec . gson . YangModeledAnyXmlSupportTest . normalizedNodeToJsonStreamTransformation ( writer , baz ) ; final com . google . gson . JsonParser parser = new com . google . gson . JsonParser ( ) ; final com . google . gson . JsonElement serializedJson = parser . parse ( jsonOutput ) ; final com . google . gson . JsonElement expextedJson = parser . parse ( new java . io . FileReader ( new java . io . File ( getClass ( ) . getResource ( "/yang-modeled-anyxml/json/baz.json" ) . toURI ( ) ) ) ) ; "<AssertPlaceHolder>" ; } parse ( javax . xml . stream . XMLStreamReader ) { if ( reader . hasNext ( ) ) { reader . nextTag ( ) ; final org . opendaylight . yangtools . yang . data . util . AbstractNodeDataWithSchema < ? > nodeDataWithSchema ; if ( ( parentNode ) instanceof org . opendaylight . yangtools . yang . model . api . ContainerSchemaNode ) { nodeDataWithSchema = new org . opendaylight . yangtools . yang . data . util . ContainerNodeDataWithSchema ( ( ( org . opendaylight . yangtools . yang . model . api . ContainerSchemaNode ) ( parentNode ) ) ) ; } else if ( ( parentNode ) instanceof org . opendaylight . yangtools . yang . model . api . ListSchemaNode ) { nodeDataWithSchema = new org . opendaylight . yangtools . yang . data . util . ListNodeDataWithSchema ( ( ( org . opendaylight . yangtools . yang . model . api . ListSchemaNode ) ( parentNode ) ) ) ; } else if ( ( parentNode ) instanceof org . opendaylight . yangtools . odlext . model . api . YangModeledAnyXmlSchemaNode ) { nodeDataWithSchema = new org . opendaylight . yangtools . yang . data . util . YangModeledAnyXmlNodeDataWithSchema ( ( ( org . opendaylight . yangtools . odlext . model . api . YangModeledAnyXmlSchemaNode ) ( parentNode ) ) ) ; } else if ( ( parentNode ) instanceof org . opendaylight . yangtools . yang . model . api . AnyXmlSchemaNode ) { nodeDataWithSchema = new org . opendaylight . yangtools . yang . data . util . AnyXmlNodeDataWithSchema ( ( ( org . opendaylight . yangtools . yang . model . api . AnyXmlSchemaNode ) ( parentNode ) ) ) ; } else if ( ( parentNode ) instanceof org . opendaylight . yangtools . yang . model . api . LeafSchemaNode ) { nodeDataWithSchema = new org . opendaylight . yangtools . yang . data . util . LeafNodeDataWithSchema ( ( ( org . opendaylight . yangtools . yang . model . api . LeafSchemaNode ) ( parentNode ) ) ) ; } else if ( ( parentNode ) instanceof org . opendaylight . yangtools . yang . model . api . LeafListSchemaNode ) { nodeDataWithSchema = new org . opendaylight . yangtools . yang . data . util . LeafListNodeDataWithSchema ( ( ( org . opendaylight . yangtools . yang . model . api . LeafListSchemaNode ) ( parentNode ) ) ) ; } else { throw new java . lang . IllegalStateException ( ( ( "Unsupported<sp>schema<sp>node<sp>type<sp>" + ( parentNode . getClass ( ) ) ) + "." ) ) ; } read ( reader , nodeDataWithSchema , reader . getLocalName ( ) ) ; nodeDataWithSchema . write ( writer ) ; } return this ; }
org . junit . Assert . assertEquals ( expextedJson , serializedJson )
shouldRedefineToString ( ) { com . danidemi . tutorial . tdd . showcase . accounting . Invoice tested = new com . danidemi . tutorial . tdd . showcase . accounting . Invoice ( 12L , 3400 ) ; "<AssertPlaceHolder>" ; } redefineToString ( ) { return new com . danidemi . tutorial . tdd . showcase . hamcrest . RedefineToString ( ) ; }
org . junit . Assert . assertThat ( tested , redefineToString ( ) )
test_attach_detach_reattach_concurrently ( ) { com . noctarius . snowcast . impl . SequencerDefinition definition = new com . noctarius . snowcast . impl . SequencerDefinition ( "empty" , com . noctarius . snowcast . SnowcastEpoch . byTimestamp ( 1 ) , 128 , ( ( short ) ( 1 ) ) ) ; final com . noctarius . snowcast . impl . LogicalNodeTable logicalNodeTable = new com . noctarius . snowcast . impl . LogicalNodeTable ( 1 , definition ) ; class Task implements java . lang . Runnable { private final int index ; private final com . hazelcast . nio . Address address ; private final java . util . concurrent . atomic . AtomicIntegerArray assignments ; private final java . util . concurrent . CountDownLatch start ; private final java . util . concurrent . CountDownLatch end ; Task ( int index , com . hazelcast . nio . Address address , java . util . concurrent . atomic . AtomicIntegerArray assignments , java . util . concurrent . CountDownLatch start , java . util . concurrent . CountDownLatch end ) { this . index = index ; this . address = address ; this . assignments = assignments ; this . start = start ; this . end = end ; } @ com . noctarius . snowcast . impl . Override public void run ( ) { com . noctarius . snowcast . SnowcastSequenceState state = com . noctarius . snowcast . SnowcastSequenceState . Detached ; try { start . await ( ) ; int logicalNodeId = 0 ; for ( int i = 0 ; i < 1000 ; i ++ ) { if ( state == ( com . noctarius . snowcast . SnowcastSequenceState . Detached ) ) { logicalNodeId = logicalNodeTable . attachLogicalNode ( address ) ; assignments . set ( index , logicalNodeId ) ; state = com . noctarius . snowcast . SnowcastSequenceState . Attached ; } else { logicalNodeTable . detachLogicalNode ( address , logicalNodeId ) ; assignments . set ( index , ( - 1 ) ) ; state = com . noctarius . snowcast . SnowcastSequenceState . Detached ; } } if ( state == ( com . noctarius . snowcast . SnowcastSequenceState . Detached ) ) { logicalNodeId = logicalNodeTable . attachLogicalNode ( address ) ; assignments . set ( index , logicalNodeId ) ; } } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; } finally { end . countDown ( ) ; } } } int concurrencyLevel = 100 ; java . util . concurrent . CountDownLatch start = new java . util . concurrent . CountDownLatch ( 1 ) ; java . util . concurrent . CountDownLatch end = new java . util . concurrent . CountDownLatch ( concurrencyLevel ) ; java . util . concurrent . atomic . AtomicIntegerArray assignments = new java . util . concurrent . atomic . AtomicIntegerArray ( concurrencyLevel ) ; for ( int i = 0 ; i < concurrencyLevel ; i ++ ) { com . hazelcast . nio . Address address = new com . hazelcast . nio . Address ( "localhost" , ( 1000 + i ) ) ; new java . lang . Thread ( new Task ( i , address , assignments , start , end ) ) . start ( ) ; } start . countDown ( ) ; end . await ( ) ; java . util . Set < java . lang . Integer > logicalNodeIds = new java . util . HashSet < java . lang . Integer > ( ) ; for ( int i = 0 ; i < concurrencyLevel ; i ++ ) { int logicalNodeId = assignments . get ( i ) ; if ( logicalNodeId == ( - 1 ) ) { org . junit . Assert . fail ( "Unassigned<sp>node<sp>attach<sp>thread!" ) ; } logicalNodeIds . add ( logicalNodeId ) ; } "<AssertPlaceHolder>" ; } attachLogicalNode ( com . hazelcast . nio . Address ) { while ( true ) { java . lang . Object [ ] assignmentTable = this . assignmentTable ; int freeSlot = findFreeSlot ( assignmentTable ) ; if ( freeSlot == ( - 1 ) ) { throw new com . noctarius . snowcast . SnowcastNodeIdsExceededException ( ) ; } long offset = offset ( freeSlot ) ; if ( com . noctarius . snowcast . impl . LogicalNodeTable . UNSAFE . compareAndSwapObject ( assignmentTable , offset , null , address ) ) { return freeSlot ; } } }
org . junit . Assert . assertEquals ( concurrencyLevel , logicalNodeIds . size ( ) )
testFetchByPrimaryKeyExisting ( ) { com . liferay . message . boards . model . MBStatsUser newMBStatsUser = addMBStatsUser ( ) ; com . liferay . message . boards . model . MBStatsUser existingMBStatsUser = _persistence . fetchByPrimaryKey ( newMBStatsUser . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingMBStatsUser , newMBStatsUser )
deleteNonRecursiveOnServiceException ( ) { org . mockito . Mockito . when ( mClient . listFiles ( org . mockito . Matchers . anyString ( ) , org . mockito . Matchers . anyString ( ) , org . mockito . Matchers . anyInt ( ) , org . mockito . Matchers . eq ( null ) ) ) . thenThrow ( alluxio . underfs . kodo . Exception . class ) ; boolean result = mKodoUnderFileSystem . deleteDirectory ( alluxio . underfs . kodo . KodoUnderFileSystemTest . PATH , alluxio . underfs . options . DeleteOptions . defaults ( ) . setRecursive ( false ) ) ; "<AssertPlaceHolder>" ; } setRecursive ( boolean ) { bitField0_ |= 2 ; recursive_ = value ; onChanged ( ) ; return this ; }
org . junit . Assert . assertFalse ( result )
testParseVoidInput ( ) { when ( view . getPattern ( ) ) . thenReturn ( "" ) ; presenter . viewUpdated ( ) ; verify ( view ) . error ( ) ; "<AssertPlaceHolder>" ; } getPattern ( ) { return searchPatternTextBox . getText ( ) ; }
org . junit . Assert . assertNull ( presenter . getPattern ( ) )
testGetPosixViewSetOwner ( ) { java . nio . file . Path rootPath = java . nio . file . Paths . get ( hdfs . jsr203 . TestUserPrincipalLookupService . clusterUri ) ; java . nio . file . attribute . UserPrincipalLookupService lus = rootPath . getFileSystem ( ) . getUserPrincipalLookupService ( ) ; "<AssertPlaceHolder>" ; } getUserPrincipalLookupService ( ) { return userPrincipalLookupService ; }
org . junit . Assert . assertNotNull ( lus )
testConstants_1 ( ) { org . jinstagram . model . Constants result = new org . jinstagram . model . Constants ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( result )
testRemoveAccents ( ) { logger . info ( "removeAccents" ) ; java . lang . String text = "'','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''" ; java . lang . String expResult = "'','','','','','','','','','','','a','a','a','a','a','c','e','e','e','e','i','i','i','i','n','o','o','o','o','o','u','u','u','u','y','y','','','','','','','','','','A','A','A','A','A','C','E','E','E','E','I','I','I','I','N','O','O','O','O','O','U','U','U','U','Y'" ; java . lang . String result = com . datumbox . framework . core . common . text . StringCleaner . removeAccents ( text ) ; "<AssertPlaceHolder>" ; } removeAccents ( java . lang . String ) { text = java . text . Normalizer . normalize ( text , Normalizer . Form . NFD ) ; text = text . replaceAll ( "[\\p{InCombiningDiacriticalMarks}]" , "" ) ; return text ; }
org . junit . Assert . assertEquals ( expResult , result )
isTimedOut_beforeAcceptedDifference_expectFalse ( ) { tested . update ( ) ; java . lang . Thread . sleep ( 1000 ) ; "<AssertPlaceHolder>" ; } isTimedOut ( long ) { return ( TimeUnit . NANOSECONDS . toSeconds ( getLastUpdateDifference ( ) ) ) > acceptedSecondsDifference ; }
org . junit . Assert . assertFalse ( tested . isTimedOut ( 10 ) )
begin_field_eof ( ) { java . lang . String [ ] [ ] result = read ( "" ) ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { com . asakusafw . dmdl . java . util . JavaName jn = com . asakusafw . dmdl . java . util . JavaName . of ( new com . asakusafw . dmdl . model . AstSimpleName ( null , name ) ) ; jn . addFirst ( "is" ) ; java . lang . Object result = invoke ( jn . toMemberName ( ) ) ; return ( ( java . lang . Boolean ) ( result ) ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( new java . lang . String [ 0 ] [ ] ) )
testUploadFile ( ) { test . connect ( ) ; test . uploadFile ( "src/test/resources/upload.txt" , "target/uploaded.txt" ) ; test . disconnect ( ) ; java . io . File uploaded = new java . io . File ( "target/uploaded.txt" ) ; "<AssertPlaceHolder>" ; } disconnect ( ) { if ( ( c ) != null ) { com . infinit . sftp . SftpClient . logger . debug ( "Disconnecting<sp>sftp<sp>channel" ) ; c . disconnect ( ) ; } if ( ( channel ) != null ) { com . infinit . sftp . SftpClient . logger . debug ( "Disconnecting<sp>channel" ) ; channel . disconnect ( ) ; } if ( ( session ) != null ) { com . infinit . sftp . SftpClient . logger . debug ( "Disconnecting<sp>session" ) ; session . disconnect ( ) ; } }
org . junit . Assert . assertTrue ( uploaded . exists ( ) )
testGetRowValue ( ) { org . sagebionetworks . table . model . SparseRow row = changeSet . addEmptyRow ( ) ; java . lang . String columnId = stringColumn . getId ( ) ; row . setCellValue ( columnId , "foo" ) ; java . lang . String value = row . getCellValue ( columnId ) ; "<AssertPlaceHolder>" ; } getCellValue ( java . lang . String ) { if ( ! ( hasCellValue ( columnId ) ) ) { throw new org . sagebionetworks . repo . web . NotFoundException ( ( "Cell<sp>value<sp>does<sp>not<sp>exist<sp>for<sp>column<sp>Id:<sp>" + columnId ) ) ; } return valueMap . get ( columnId ) ; }
org . junit . Assert . assertEquals ( "foo" , value )
testReduceTaskReportsWithNullJob ( ) { org . apache . hadoop . mapred . JobClient client = new org . apache . hadoop . mapred . JobClient ( ) ; org . apache . hadoop . mapreduce . Cluster mockCluster = mock ( org . apache . hadoop . mapreduce . Cluster . class ) ; client . cluster = mockCluster ; org . apache . hadoop . mapred . JobID id = new org . apache . hadoop . mapred . JobID ( "test" , 0 ) ; when ( mockCluster . getJob ( id ) ) . thenReturn ( null ) ; org . apache . hadoop . mapred . TaskReport [ ] result = client . getReduceTaskReports ( id ) ; "<AssertPlaceHolder>" ; verify ( mockCluster ) . getJob ( id ) ; } getReduceTaskReports ( org . apache . hadoop . mapred . JobID ) { org . apache . hadoop . mapred . JobInProgress job = jobs . get ( jobid ) ; if ( ( job == null ) || ( ! ( isJobInited ( job ) ) ) ) { return org . apache . hadoop . mapred . JobTracker . EMPTY_TASK_REPORTS ; } else { java . util . Vector < org . apache . hadoop . mapred . TaskReport > reports = new java . util . Vector < org . apache . hadoop . mapred . TaskReport > ( ) ; java . util . Vector completeReduceTasks = job . reportTasksInProgress ( false , true ) ; for ( java . util . Iterator it = completeReduceTasks . iterator ( ) ; it . hasNext ( ) ; ) { org . apache . hadoop . mapred . TaskInProgress tip = ( ( org . apache . hadoop . mapred . TaskInProgress ) ( it . next ( ) ) ) ; reports . add ( tip . generateSingleReport ( ) ) ; } java . util . Vector incompleteReduceTasks = job . reportTasksInProgress ( false , false ) ; for ( java . util . Iterator it = incompleteReduceTasks . iterator ( ) ; it . hasNext ( ) ; ) { org . apache . hadoop . mapred . TaskInProgress tip = ( ( org . apache . hadoop . mapred . TaskInProgress ) ( it . next ( ) ) ) ; reports . add ( tip . generateSingleReport ( ) ) ; } return reports . toArray ( new org . apache . hadoop . mapred . TaskReport [ reports . size ( ) ] ) ; } }
org . junit . Assert . assertEquals ( 0 , result . length )
testSelectBinary ( ) { database . save ( new com . orientechnologies . orient . core . record . impl . ORecordBytes ( "blabla" . getBytes ( ) ) , "BlobCluster" ) ; java . util . List < com . orientechnologies . orient . core . record . ORecord > res = database . query ( new com . orientechnologies . orient . core . sql . query . OSQLSynchQuery < java . lang . Object > ( "select<sp>from<sp>cluster:BlobCluster" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>yet" ) ; }
org . junit . Assert . assertEquals ( 1 , res . size ( ) )
testTemplate ( ) { freemarker . template . Configuration cfg = org . geoserver . template . TemplateUtils . getSafeConfiguration ( ) ; cfg . setObjectWrapper ( new org . geoserver . template . FeatureWrapper ( ) ) ; cfg . setClassForTemplateLoading ( org . geoserver . wms . featureinfo . FeatureTemplate . class , "" ) ; freemarker . template . Template template = cfg . getTemplate ( "description.ftl" ) ; "<AssertPlaceHolder>" ; org . locationtech . jts . geom . GeometryFactory gf = new org . locationtech . jts . geom . GeometryFactory ( ) ; org . opengis . feature . simple . SimpleFeatureType featureType = org . geotools . data . DataUtilities . createType ( "testType" , "string:String,int:Integer,double:Double,geom:Point" ) ; org . opengis . feature . simple . SimpleFeature f = org . geotools . feature . simple . SimpleFeatureBuilder . build ( featureType , new java . lang . Object [ ] { "three" , java . lang . Integer . valueOf ( 3 ) , new java . lang . Double ( 3.3 ) , gf . createPoint ( new org . locationtech . jts . geom . Coordinate ( 3 , 3 ) ) } , "fid.3" ) ; java . io . ByteArrayOutputStream output = new java . io . ByteArrayOutputStream ( ) ; template . process ( f , new java . io . OutputStreamWriter ( output ) ) ; } getSafeConfiguration ( ) { freemarker . template . Configuration config = new freemarker . template . Configuration ( ) ; config . setNewBuiltinClassResolver ( ( name , env , template ) -> { if ( org . geoserver . template . TemplateUtils . ILLEGAL_FREEMARKER_CLASSES . stream ( ) . anyMatch ( name :: equals ) ) { throw new freemarker . template . TemplateException ( java . lang . String . format ( "Class<sp>%s<sp>is<sp>not<sp>allowed<sp>in<sp>Freemarker<sp>templates" , name ) , env ) ; } if ( org . geoserver . template . TemplateUtils . LEGAL_FREEMARKER_CLASSES . stream ( ) . anyMatch ( name :: equals ) ) { try { freemarker . template . utility . ClassUtil . forName ( name ) ; } catch ( e ) { throw new < org . geoserver . template . e > freemarker . template . TemplateException ( env ) ; } } return TemplateClassResolver . SAFER_RESOLVER . resolve ( name , env , template ) ; } ) ; return config ; }
org . junit . Assert . assertNotNull ( template )
testUpdateList ( ) { java . lang . String message = "lists<sp>should<sp>be<sp>set<sp>appropriately" ; org . eurekastreams . server . domain . TabGroup sut = new org . eurekastreams . server . domain . TabGroup ( ) ; java . util . ArrayList < org . eurekastreams . server . domain . Tab > tabs = new java . util . ArrayList < org . eurekastreams . server . domain . Tab > ( ) ; tabs . add ( new org . eurekastreams . server . domain . Tab ( "name" , org . eurekastreams . server . domain . Layout . ONECOLUMN ) ) ; java . util . HashMap < java . lang . String , java . io . Serializable > map = new java . util . HashMap < java . lang . String , java . io . Serializable > ( ) ; map . put ( "tabs" , tabs ) ; org . eurekastreams . server . service . actions . strategies . ReflectiveUpdater reflector = new org . eurekastreams . server . service . actions . strategies . ReflectiveUpdater ( ) ; reflector . setProperties ( sut , map ) ; "<AssertPlaceHolder>" ; } getTabs ( ) { return tabs ; }
org . junit . Assert . assertEquals ( message , tabs , sut . getTabs ( ) )
testGetSupplierRevenue_invalidDateRange ( ) { roles . add ( addOrgToRole ( organization , OrganizationRoleType . PLATFORM_OPERATOR ) ) ; org . oscm . reportingservice . business . model . supplierrevenue . RDOPlatformRevenue result = reporting . getPlatformRevenueReport ( org . oscm . reportingservice . bean . ReportingServiceBeanTest . VALID_SESSION_ID , new java . util . Date ( ) , new java . util . Date ( 0 ) ) ; "<AssertPlaceHolder>" ; } getSupplierDetails ( ) { return supplierDetails ; }
org . junit . Assert . assertEquals ( 0 , result . getSupplierDetails ( ) . size ( ) )
testBuildEmptyParametersWithDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . specoffer . SpecOffer specOffer = new org . lnu . is . domain . specoffer . SpecOffer ( ) ; org . lnu . is . domain . wave . type . WaveType waveType = new org . lnu . is . domain . wave . type . WaveType ( ) ; java . lang . Integer licCount = 1 ; java . lang . Integer stateCount = 2 ; java . lang . Integer targetCount = 3 ; java . lang . Integer benefitCount = 4 ; java . util . Date date = new java . util . Date ( ) ; org . lnu . is . domain . specoffer . SpecOfferWave context = new org . lnu . is . domain . specoffer . SpecOfferWave ( ) ; context . setSpecOffer ( specOffer ) ; context . setWaveType ( waveType ) ; context . setLicCount ( licCount ) ; context . setStateCount ( stateCount ) ; context . setTargetCount ( targetCount ) ; context . setBenefitCount ( benefitCount ) ; context . setBeginDate ( date ) ; context . setEndDate ( date ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>SpecOfferWave<sp>e<sp>WHERE<sp>(<sp>e.specOffer<sp>=<sp>:specOffer<sp>AND<sp>e.waveType<sp>=<sp>:waveType<sp>AND<sp>e.licCount<sp>=:licCount<sp>AND<sp>e.stateCount<sp>=:stateCount<sp>AND<sp>e.benefitCount<sp>=:benefitCount<sp>AND<sp>e.targetCount<sp>=:targetCount<sp>AND<sp>e.beginDate<sp>>=:beginDate<sp>AND<sp>e.endDate<sp><=:endDate<sp>)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . specoffer . SpecOfferWave > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
testToStringEmptyValueNonEmptyCustomFacts ( ) { org . gedcom4j . model . StringWithCustomFacts swct = new org . gedcom4j . model . StringWithCustomFacts ( ) ; swct . value = "" ; swct . getCustomFacts ( true ) . add ( new org . gedcom4j . model . CustomFact ( "_TEST" ) ) ; "<AssertPlaceHolder>" ; } add ( org . gedcom4j . validate . Validator . Finding ) { allFindings . add ( vf ) ; java . util . List < org . gedcom4j . validate . Validator . Finding > list = findingsByObject . get ( vf . getItemOfConcern ( ) ) ; if ( list == null ) { list = new java . util . ArrayList ( ) ; findingsByObject . put ( vf . getItemOfConcern ( ) , list ) ; } list . add ( vf ) ; }
org . junit . Assert . assertEquals ( "" , ( "" + swct ) )
testInserirPosicaoAlemDoTamanho ( ) { br . com . senacrs . alp . aulas . MinhaLista < java . lang . String > obj = null ; java . lang . String valor = null ; int posicao = 0 ; obj = criarMinhaListaDeStringComPrefixo ( "string-" , 10 ) ; valor = "novo<sp>valor" ; posicao = 11 ; try { obj . inserir ( posicao , valor ) ; org . junit . Assert . fail ( java . lang . String . valueOf ( obj ) ) ; } catch ( java . lang . IndexOutOfBoundsException e ) { "<AssertPlaceHolder>" ; } } inserir ( int , Tipo ) { lista . add ( posicao , valor ) ; }
org . junit . Assert . assertTrue ( true )
testEqualityDifferentPrimitive ( ) { javax . measure . Quantity < javax . measure . quantity . Length > value = tec . units . ri . quantity . Quantities . getQuantity ( 10 , Units . METRE ) ; javax . measure . Quantity < javax . measure . quantity . Length > anotherValue = tec . units . ri . quantity . Quantities . getQuantity ( 10.0 , Units . METRE ) ; "<AssertPlaceHolder>" ; } getQuantity ( java . lang . Number , javax . measure . Unit ) { if ( value == null ) throw new java . lang . NullPointerException ( ) ; if ( unit == null ) throw new java . lang . NullPointerException ( ) ; if ( tec . units . ri . quantity . Double . class . isInstance ( value ) ) { return new tec . units . ri . quantity . DoubleQuantity < Q > ( value . doubleValue ( ) , unit ) ; } else if ( tec . units . ri . quantity . Long . class . isInstance ( value ) ) { return new tec . units . ri . quantity . LongQuantity < Q > ( tec . units . ri . quantity . Long . class . cast ( value ) , unit ) ; } else if ( tec . units . ri . quantity . Short . class . isInstance ( value ) ) { return new tec . units . ri . quantity . ShortQuantity < Q > ( tec . units . ri . quantity . Short . class . cast ( value ) , unit ) ; } else if ( tec . units . ri . quantity . Integer . class . isInstance ( value ) ) { return new tec . units . ri . quantity . IntegerQuantity < Q > ( tec . units . ri . quantity . Integer . class . cast ( value ) , unit ) ; } else if ( tec . units . ri . quantity . Float . class . isInstance ( value ) ) { return new tec . units . ri . quantity . FloatQuantity < Q > ( tec . units . ri . quantity . Float . class . cast ( value ) , unit ) ; } return new tec . units . ri . quantity . NumberQuantity < Q > ( value , unit ) ; }
org . junit . Assert . assertEquals ( value , anotherValue )
pauseSession_sessionIsInactive_stateIsNotChanged ( ) { target . pauseSession ( ) ; target . pauseSession ( ) ; target . pauseSession ( ) ; "<AssertPlaceHolder>" ; } getSessionState ( ) { if ( ( this . session ) != null ) { return this . session . isPaused ( ) ? com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . session . client . DefaultSessionClient . SessionState . PAUSED : com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . session . client . DefaultSessionClient . SessionState . ACTIVE ; } return com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . session . client . DefaultSessionClient . SessionState . INACTIVE ; }
org . junit . Assert . assertEquals ( target . getSessionState ( ) , SessionState . INACTIVE )
testModelNameWithNonEmptyExistingName ( ) { final org . kie . workbench . common . stunner . core . graph . Node < org . kie . workbench . common . stunner . core . graph . content . view . View , org . kie . workbench . common . stunner . core . graph . Edge > existingRoot = ( ( org . kie . workbench . common . stunner . core . graph . Node < org . kie . workbench . common . stunner . core . graph . content . view . View , org . kie . workbench . common . stunner . core . graph . Edge > ) ( graph . nodes ( ) . iterator ( ) . next ( ) ) ) ; final org . kie . workbench . common . dmn . api . definition . v1_1 . DMNDiagram existingDMNDiagram = ( ( org . kie . workbench . common . dmn . api . definition . v1_1 . DMNDiagram ) ( existingRoot . getContent ( ) . getDefinition ( ) ) ) ; final org . kie . workbench . common . dmn . api . definition . v1_1 . Definitions existingDMNDefinitions = existingDMNDiagram . getDefinitions ( ) ; existingDMNDefinitions . getName ( ) . setValue ( org . kie . workbench . common . dmn . api . factory . DMNDiagramFactoryImplTest . EXISTING_NAME ) ; final org . kie . workbench . common . stunner . core . diagram . Diagram < org . kie . workbench . common . stunner . core . graph . Graph , org . kie . workbench . common . stunner . core . diagram . Metadata > newDiagram = factory . build ( org . kie . workbench . common . dmn . api . factory . DMNDiagramFactoryImplTest . NAME , metadata , graph ) ; final org . kie . workbench . common . stunner . core . graph . Node < org . kie . workbench . common . stunner . core . graph . content . view . View , org . kie . workbench . common . stunner . core . graph . Edge > newRoot = ( ( org . kie . workbench . common . stunner . core . graph . Node < org . kie . workbench . common . stunner . core . graph . content . view . View , org . kie . workbench . common . stunner . core . graph . Edge > ) ( newDiagram . getGraph ( ) . nodes ( ) . iterator ( ) . next ( ) ) ) ; final org . kie . workbench . common . dmn . api . definition . v1_1 . DMNDiagram newDMNDiagram = ( ( org . kie . workbench . common . dmn . api . definition . v1_1 . DMNDiagram ) ( newRoot . getContent ( ) . getDefinition ( ) ) ) ; final org . kie . workbench . common . dmn . api . definition . v1_1 . Definitions newDMNDefinitions = newDMNDiagram . getDefinitions ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return org . kie . workbench . common . dmn . backend . editors . types . query . FindAllDmnAssetsQuery . NAME ; }
org . junit . Assert . assertEquals ( org . kie . workbench . common . dmn . api . factory . DMNDiagramFactoryImplTest . EXISTING_NAME , newDMNDefinitions . getName ( ) . getValue ( ) )
toDocument ( ) { final org . apache . rya . api . domain . RyaType ryaType = org . apache . rya . api . resolver . RdfToRyaConversions . convertLiteral ( org . eclipse . rdf4j . model . impl . SimpleValueFactory . getInstance ( ) . createLiteral ( 4.5 ) ) ; final org . bson . Document document = new org . apache . rya . indexing . entity . storage . mongo . RyaTypeDocumentConverter ( ) . toDocument ( ryaType ) ; final org . bson . Document expected = new org . bson . Document ( ) . append ( RyaTypeDocumentConverter . DATA_TYPE , XMLSchema . DOUBLE . toString ( ) ) . append ( RyaTypeDocumentConverter . VALUE , "4.5" ) ; "<AssertPlaceHolder>" ; } append ( java . lang . StringBuilder , org . apache . rya . streams . api . entity . StreamsQuery ) { requireNonNull ( string ) ; requireNonNull ( query ) ; string . append ( "<sp>Streams<sp>Query<sp>{\n" ) . append ( "<sp>Query<sp>ID:<sp>" ) . append ( query . getQueryId ( ) ) . append ( ",\n" ) . append ( "<sp>Is<sp>Active:<sp>" ) . append ( query . isActive ( ) ) . append ( ",\n" ) . append ( "<sp>SPARQL:<sp>" ) . append ( query . getSparql ( ) ) . append ( "\n" ) . append ( "<sp>}" ) ; }
org . junit . Assert . assertEquals ( expected , document )
conventionPropertyTakesPrecedenceOverParentProperty ( ) { org . gradle . internal . extensibility . ExtensibleDynamicObjectTest . Bean parent = new org . gradle . internal . extensibility . ExtensibleDynamicObjectTest . Bean ( ) ; parent . defineProperty ( "conventionProperty" , "parent" ) ; org . gradle . internal . extensibility . ExtensibleDynamicObjectTest . Bean bean = new org . gradle . internal . extensibility . ExtensibleDynamicObjectTest . Bean ( ) ; bean . setParent ( parent . getAsDynamicObject ( ) ) ; org . gradle . api . plugins . Convention convention = bean . extensibleDynamicObject . getConvention ( ) ; org . gradle . internal . extensibility . ExtensibleDynamicObjectTest . ConventionBean conventionBean = new org . gradle . internal . extensibility . ExtensibleDynamicObjectTest . ConventionBean ( ) ; conventionBean . setConventionProperty ( "value" ) ; convention . getPlugins ( ) . put ( "test" , conventionBean ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { return org . codehaus . groovy . runtime . InvokerHelper . getProperty ( clientModule , property ) ; }
org . junit . Assert . assertThat ( bean . getProperty ( "conventionProperty" ) , org . hamcrest . Matchers . equalTo ( ( ( java . lang . Object ) ( "value" ) ) ) )
testCreateValueURL ( ) { java . lang . String urlString = "http://commons.apache.org" ; java . net . URL result = org . apache . commons . cli . TypeHandler . createValue ( urlString , PatternOptionBuilder . URL_VALUE ) ; "<AssertPlaceHolder>" ; } toString ( ) { final java . lang . StringBuilder buf = new java . lang . StringBuilder ( ) ; buf . append ( "[<sp>Options:<sp>[<sp>short<sp>" ) ; buf . append ( shortOpts . toString ( ) ) ; buf . append ( "<sp>]<sp>[<sp>long<sp>" ) ; buf . append ( longOpts ) ; buf . append ( "<sp>]" ) ; return buf . toString ( ) ; }
org . junit . Assert . assertEquals ( urlString , result . toString ( ) )
testBinarySearch ( ) { com . questdb . std . LongMatrix < java . lang . String > m = new com . questdb . std . LongMatrix ( 2 ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { int r = m . addRow ( ) ; m . set ( r , 0 , i ) ; m . set ( r , 1 , i ) ; m . set ( r , ( "s" + i ) ) ; } int r = m . binarySearch ( 631 ) ; "<AssertPlaceHolder>" ; } get ( int , int ) { return com . questdb . std . Unsafe . arrayGet ( data , offset ( r , c ) ) ; }
org . junit . Assert . assertEquals ( 631 , m . get ( r , 0 ) )
shouldGetAsReference ( ) { org . springframework . beans . factory . config . RuntimeBeanReference reference = this . registeredBeanDefinition . asReference ( ) ; "<AssertPlaceHolder>" ; } getBeanName ( ) { return this . beanName ; }
org . junit . Assert . assertThat ( reference . getBeanName ( ) , org . hamcrest . Matchers . is ( this . name ) )
fromClassToClass ( ) { java . lang . Class c = org . raml . utilities . types . Cast . toClass ( org . raml . utilities . types . CastTest . class ) ; "<AssertPlaceHolder>" ; } toClass ( java . lang . reflect . Type ) { if ( type instanceof java . lang . reflect . ParameterizedType ) { java . lang . reflect . ParameterizedType pt = ( ( java . lang . reflect . ParameterizedType ) ( type ) ) ; return ( ( java . lang . Class ) ( pt . getRawType ( ) ) ) ; } if ( type instanceof java . lang . reflect . TypeVariable ) { throw new java . lang . IllegalArgumentException ( ( ( ( "trying<sp>to<sp>get<sp>annotations<sp>from<sp>type<sp>declaration<sp>" + type ) + "<sp>from<sp>declaration<sp>" ) + ( ( ( java . lang . reflect . TypeVariable ) ( type ) ) . getGenericDeclaration ( ) ) ) ) ; } return ( ( java . lang . Class ) ( type ) ) ; }
org . junit . Assert . assertSame ( org . raml . utilities . types . CastTest . class , c )
testGCStability ( ) { final int N = 10000 ; final int M = 5000000 ; System . out . println ( ( ( ( ( "[testGCStability]<sp>testing<sp>GC<sp>stability<sp>with<sp>" + N ) + "<sp>bitmaps<sp>containing<sp>~" ) + ( M / N ) ) + "<sp>values<sp>each<sp>on<sp>average" ) ) ; System . out . println ( ( "Universe<sp>size<sp>=<sp>" + M ) ) ; final org . roaringbitmap . buffer . MutableRoaringBitmap [ ] bitmaps = new org . roaringbitmap . buffer . MutableRoaringBitmap [ N ] ; for ( int i = 0 ; i < N ; i ++ ) { bitmaps [ i ] = new org . roaringbitmap . buffer . MutableRoaringBitmap ( ) ; } final java . util . Random random = new java . util . Random ( ) ; for ( int i = 0 ; i < M ; i ++ ) { final int x = random . nextInt ( N ) ; bitmaps [ x ] . add ( i ) ; } int totalcard = 0 ; for ( int i = 0 ; i < N ; i ++ ) { totalcard += bitmaps [ i ] . getCardinality ( ) ; } "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( totalcard , M )
testDuplicateModel ( ) { final org . kie . api . KieServices ks = KieServices . Factory . get ( ) ; final org . kie . api . builder . KieFileSystem kfs = ks . newKieFileSystem ( ) ; kfs . write ( ks . getResources ( ) . newClassPathResource ( "0001-input-data-string.dmn" , this . getClass ( ) ) ) ; kfs . write ( ks . getResources ( ) . newClassPathResource ( "duplicate.0001-input-data-string.dmn" , this . getClass ( ) ) ) ; final org . kie . api . builder . Results results = ks . newKieBuilder ( kfs ) . buildAll ( ) . getResults ( ) ; org . kie . dmn . core . DMNAssemblerTest . LOG . info ( "buildAll()<sp>completed." ) ; results . getMessages ( Level . ERROR ) . forEach ( ( e ) -> org . kie . dmn . core . DMNAssemblerTest . LOG . error ( "{}" , e ) ) ; "<AssertPlaceHolder>" ; } getMessages ( org . kie . dmn . api . core . DMNMessage [ ] ) { java . util . List < org . kie . dmn . api . core . DMNMessage . Severity > severities = java . util . Arrays . asList ( sevs ) ; return messages . stream ( ) . filter ( ( m ) -> severities . contains ( m . getSeverity ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; }
org . junit . Assert . assertTrue ( ( ( results . getMessages ( Level . ERROR ) . size ( ) ) > 0 ) )
manageDeletionProcess_OtherState ( ) { org . oscm . app . iaas . data . FlowState newState = vSystemProcessor . manageDeletionProcess ( org . oscm . app . iaas . VSystemProcessorBeanTest . CONTROLLER_ID , org . oscm . app . iaas . VSystemProcessorBeanTest . INSTANCE_ID , paramHandler , FlowState . VSYSTEM_SCALE_UP ) ; "<AssertPlaceHolder>" ; } manageDeletionProcess ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState ) { boolean vSysInNormalState = VSystemStatus . NORMAL . equals ( paramHandler . getIaasContext ( ) . getVSystemStatus ( ) ) ; org . oscm . app . iaas . data . FlowState newState = null ; switch ( flowState ) { case VSYSTEM_DELETION_REQUESTED : if ( ( paramHandler . getControllerWaitTime ( ) ) != 0 ) { paramHandler . suspendProcessInstanceFor ( paramHandler . getControllerWaitTime ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . WAITING_BEFORE_STOP ; break ; } case WAITING_BEFORE_STOP : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VNET_DELETING , paramHandler ) ) ) { vsysComm . freePublicIPs ( paramHandler , null ) ; newState = org . oscm . app . iaas . data . FlowState . VNET_DELETING ; } break ; case VNET_DELETING : if ( vSysInNormalState ) { java . lang . String ipState = vsysComm . freePublicIPs ( paramHandler , null ) ; if ( ipState == null ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVERS_STOPPING , paramHandler ) ) { try { vsysComm . stopAllVServers ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVERS_STOPPING ; } catch ( java . lang . Exception e ) { if ( ( ! ( e instanceof org . oscm . app . iaas . exceptions . IaasException ) ) || ( ! ( ( ( org . oscm . app . iaas . exceptions . IaasException ) ( e ) ) . isIllegalState ( ) ) ) ) { throw e ; } } } } } break ; case VSERVERS_STOPPING : if ( vsysComm . getCombinedVServerState ( paramHandler , VSystemStatus . STOPPED ) ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . VSYSTEM_DELETING , paramHandler ) ) { vsysComm . destroyVSystem ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSYSTEM_DELETING ; paramHandler . setVsysId ( "" ) ; } } break ; case VSYSTEM_DELETING : java . lang . String mail = paramHandler . getMailForCompletion ( ) ; if ( mail != null ) { newState = dispatchVSystemManualOperation ( controllerId , instanceId , paramHandler , mail ) ; } else if ( checkNextStatus ( controllerId , instanceId , FlowState . DESTROYED , paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . DESTROYED ; } break ; default : } return newState ; }
org . junit . Assert . assertNull ( newState )
testLL1ErrorInfo ( ) { java . lang . String grammar = "dog<sp>and<sp>software" 8 + ( ( ( ( ( ( ( ( ( ( ( ( "dog<sp>and<sp>software" 3 + "dog<sp>and<sp>software" 2 ) + "dog<sp>and<sp>software" 9 ) + "dog<sp>and<sp>software" 6 ) + "DOG<sp>:<sp>\'dog\';\n" ) + "dog<sp>and<sp>software" 1 ) + "HARDWARE:<sp>\'hardware\';\n" ) + "SOFTWARE:<sp>\'software\';\n" ) + "dog<sp>and<sp>software" 4 ) + "dog<sp>and<sp>software" 7 ) + "@init\n" ) + "{<sp>System.out.println(getExpectedTokens().toString(tokenNames));<sp>}\n" ) + "<sp>:<sp>;\n" ) ; java . lang . String result = execParser ( "dog<sp>and<sp>software" 0 , grammar , "TParser" , "TLexer" , "dog<sp>and<sp>software" 5 , "dog<sp>and<sp>software" , false ) ; java . lang . String expecting = "{\'hardware\',<sp>\'software\'}\n" ; "<AssertPlaceHolder>" ; } execParser ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , boolean ) { return execParser ( grammarFileName , grammarStr , parserName , lexerName , startRuleName , input , debug , false ) ; }
org . junit . Assert . assertEquals ( expecting , result )
testParseDirectory_ok ( ) { java . io . File dir = this . folder . newFolder ( ) ; net . roboconf . core . utils . Utils . writeStringInto ( "id:<sp>tid1\nhandler:<sp>in\nname:<sp>na" , new java . io . File ( dir , "t1.properties" ) ) ; net . roboconf . core . utils . Utils . writeStringInto ( "id:<sp>tid2\nhandler:<sp>in\nname:<sp>na" , new java . io . File ( dir , "t2.properties" ) ) ; java . util . List < net . roboconf . core . model . ModelError > errors = net . roboconf . core . model . TargetValidator . parseDirectory ( dir ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . map . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , errors . size ( ) )
test22 ( ) { java . lang . System . out . println ( "validate" ) ; token . setKey ( "eyJraWQiOiJkZW1vaXNlbGxlLXNlY3VyaXR5LWp3dCIsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJTVE9SRSIsImV4cCI6MTAwMTQ4MjQ5NTI3MCwiYXVkIjoid2ViIiwianRpIjoiTmxvU0NFUnktd2xXdVhtaGZhVi1IUSIsImlhdCI6MTQ4MjQ5NTI3MSwibmJmIjoxNDgyNDk1MjExLCJpZGVudGl0eSI6IjEiLCJuYW1lIjoiVGVzdGUiLCJyb2xlcyI6WyJBRE1JTklTVFJBVE9SIiwiTUFOQUdFUiJdLCJwZXJtaXNzaW9ucyI6eyJDYXRlZ29yaWEiOlsiQ29uc3VsdGFyIiwiQWx0ZXJhciIsIkluY2x1aXIiXSwiUHJvZHV0byI6WyJBbHRlcmFyIiwiRXhjbHVpciJdfSwicGFyYW1zIjp7ImZvbmUiOiI0MTM1OTM4MDAwIiwiZW5kZXJlY28iOiJydWEgY2FybG9zIHBpb2xpLCAxMzMiLCJlbWFpbCI6InVzZXJAZGVtb2lzZWxsZS5vcmcifX0.EV8L1OEFVMsuCgVSz3gyM2mJIEHczhHBvxSjTFGslHGKItlFtM32BUrzbzA9QECzSUkk-ITnUEtmm-ERTH529clymKX1-LGcboPSQlNAHv4SNRD5i8eJxjlCz_cMSTIdSZRSYOSJZHJHYf0kWEvo1vTthLGWcH_D--b9K_WYDR9hrVmljof46Dd4THXv5_VY9RJlYVHJ1bpIl69f0UDtVzDqfxNSTsBCm6tZXS40f9dh_qjEWATZeMJmjd_t2ZRzXDSLHHbJpLnNOGd2yOdp9H4tmGCxViguRa4Jck6C7cpMM6QIFB7ta67XzS4nl0NTqY64rNseKcyQS-TdAbPxAA" ) ; token . setType ( TokenType . JWT ) ; boolean expResult = true ; boolean result = instance . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { return ( getUser ( ) ) != null ; }
org . junit . Assert . assertEquals ( expResult , result )
test50 ( ) { java . lang . String code = "\n" + ( "a<sp>=<sp>msg(1,<sp>2,<sp>3,<sp>[11,<sp>22,<sp>33],<sp>3,<sp>6)<sp>\n" + "b<sp>=<sp>a[0]\n" ) ; java . lang . String expected = "0<sp>31<sp>MSTORE8<sp>224<sp>MSIZE<sp>224<sp>MSIZE<sp>MSTORE<sp>0<sp>192<sp>MSIZE<sp>ADD<sp>MSTORE8<sp>96<sp>MSIZE<sp>32<sp>ADD<sp>MSIZE<sp>DUP<sp>32<sp>ADD<sp>11<sp>SWAP<sp>MSTORE<sp>DUP<sp>64<sp>ADD<sp>22<sp>SWAP<sp>MSTORE<sp>DUP<sp>96<sp>ADD<sp>33<sp>SWAP<sp>MSTORE<sp>128<sp>SWAP<sp>MSTORE<sp>3<sp>2<sp>1<sp>CALL<sp>32<sp>0<sp>MUL<sp>160<sp>ADD<sp>32<sp>ADD<sp>MLOAD<sp>0<sp>MSTORE" ; java . lang . String asmResult = org . ethereum . serpent . SerpentCompiler . compile ( code ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { org . ethereum . serpent . SerpentParser parser = org . ethereum . serpent . ParserUtils . getParser ( org . ethereum . serpent . SerpentLexer . class , org . ethereum . serpent . SerpentParser . class , code ) ; org . antlr . v4 . runtime . tree . ParseTree tree = parser . parse ( ) ; java . lang . String result = new org . ethereum . serpent . SerpentToAssemblyCompiler ( ) . visit ( tree ) ; result = result . replaceAll ( "\\s+" , "<sp>" ) ; result = result . trim ( ) ; return result ; }
org . junit . Assert . assertEquals ( expected , asmResult )
shouldStaySameWithUpdatedSet ( ) { final java . util . Set < java . lang . String > groupBys = com . google . common . collect . Sets . newHashSet ( "one" , "two" ) ; final uk . gov . gchq . gaffer . data . element . comparison . ElementJoinComparator elementJoinComparator = new uk . gov . gchq . gaffer . data . element . comparison . ElementJoinComparator ( groupBys ) ; groupBys . remove ( "two" ) ; "<AssertPlaceHolder>" ; } getGroupByProperties ( ) { return groupByProperties ; }
org . junit . Assert . assertEquals ( com . google . common . collect . Sets . newHashSet ( "one" , "two" ) , elementJoinComparator . getGroupByProperties ( ) )
testLijstControleEenNok ( ) { setup ( java . util . Collections . < nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst > emptyList ( ) , java . util . Collections . < nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst > emptyList ( ) , true , false , true , true , true , true , true ) ; "<AssertPlaceHolder>" ; } setup ( java . util . List , java . util . List , boolean , boolean , boolean , boolean , boolean , boolean , boolean ) { org . mockito . Mockito . when ( plZoekerOpAnummerEnNietFoutiefOpgeschortObvActueelVorigAnummer . zoek ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) ) ) . thenReturn ( resultPlZoekerOpAnummerEnNietFoutiefOpgeschortObvActueelVorigAnummer ) ; org . mockito . Mockito . when ( plZoekerOpAnummerObvActueelAnummer . zoek ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) ) ) . thenReturn ( resultPlZoekerOpAnummerObvActueelAnummer ) ; org . mockito . Mockito . when ( verzoekControleOudAnummerIsGevuld . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . bericht . model . sync . impl . SynchroniseerNaarBrpVerzoekBericht . class ) ) ) . thenReturn ( resultVerzoekControleOudAnummerIsGevuld ) ; org . mockito . Mockito . when ( lijstControleEen . controleer ( org . mockito . Matchers . anyListOf ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultLijstControleEen ) ; org . mockito . Mockito . when ( lijstControleGeen . controleer ( org . mockito . Matchers . anyListOf ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultLijstControleGeen ) ; org . mockito . Mockito . when ( plControleBijhoudingsPartijGelijk . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultPlControleBijhoudingsPartijGelijk ) ; org . mockito . Mockito . when ( plControleDezelfdePersoon . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultPlControleDezelfdePersoon ) ; org . mockito . Mockito . when ( plControleGevondenVersienummerKleiner . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultPlControleGevondenVersienummerKleiner ) ; org . mockito . Mockito . when ( plControleGevondenDatumtijdstempelOuder . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( resultPlControleGevondenDatumtijdstempelOuder ) ; }
org . junit . Assert . assertFalse ( subject . controleer ( new nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext ( null , null , null , null ) ) )
delegateWhichCallsAnotherMockedMethod_injectableMocking ( mockit . DelegateTest$Collaborator ) { new mockit . Expectations ( ) { { mock . getValue ( ) ; result = new mockit . Delegate ( ) { int delegate ( ) { return mock . finalMethod ( ) ; } } ; mock . finalMethod ( ) ; result = 'A' ; } } ; "<AssertPlaceHolder>" ; } getValue ( ) { return - 1 ; }
org . junit . Assert . assertEquals ( 'A' , mock . getValue ( ) )
transactionalHeapCache ( ) { "<AssertPlaceHolder>" ; } transactionalHeapCache ( ) { org . junit . Assert . assertTrue ( ( ( com . cetsoft . imcache . cache . builder . CacheBuilder . transactionalHeapCache ( ) ) instanceof com . cetsoft . imcache . cache . builder . TransactionalHeapCacheBuilder ) ) ; }
org . junit . Assert . assertTrue ( ( ( com . cetsoft . imcache . cache . builder . CacheBuilder . transactionalHeapCache ( ) ) instanceof com . cetsoft . imcache . cache . builder . TransactionalHeapCacheBuilder ) )
testIntersection2 ( ) { tl . lin . data . array . ArrayListOfLongs a = new tl . lin . data . array . ArrayListOfLongs ( ) ; a . add ( 5 ) ; tl . lin . data . array . ArrayListOfLongs b = new tl . lin . data . array . ArrayListOfLongs ( ) ; b . add ( 0 ) . add ( 1 ) . add ( 2 ) . add ( 3 ) ; tl . lin . data . array . ArrayListOfLongs c = a . intersection ( b ) ; "<AssertPlaceHolder>" ; } size ( ) { return n ; }
org . junit . Assert . assertTrue ( ( ( c . size ( ) ) == 0 ) )
testFindWithPattern ( ) { org . powermock . api . mockito . PowerMockito . mockStatic ( org . kie . workbench . common . screens . datasource . management . util . DatabaseMetadataUtil . class ) ; org . powermock . api . mockito . PowerMockito . when ( org . kie . workbench . common . screens . datasource . management . util . DatabaseMetadataUtil . findTables ( conn , org . kie . workbench . common . screens . datasource . management . backend . service . DatabaseMetadataServiceTest . SCHEMA , org . kie . workbench . common . screens . datasource . management . backend . service . DatabaseMetadataServiceTest . PATTERN , types ) ) . thenReturn ( tables ) ; java . util . List < org . kie . workbench . common . screens . datasource . management . metadata . TableMetadata > result = metadataService . findTables ( org . kie . workbench . common . screens . datasource . management . backend . service . DatabaseMetadataServiceTest . DATASOURCE_UUID , org . kie . workbench . common . screens . datasource . management . backend . service . DatabaseMetadataServiceTest . SCHEMA , org . kie . workbench . common . screens . datasource . management . backend . service . DatabaseMetadataServiceTest . PATTERN , types ) ; "<AssertPlaceHolder>" ; } findTables ( java . lang . String , java . lang . String , java . lang . String , org . kie . workbench . common . screens . datasource . management . metadata . DatabaseMetadata [ ] ) { checkNotNull ( "dataSourceUuid" , dataSourceUuid ) ; checkNotNull ( "types" , types ) ; try { org . kie . workbench . common . screens . datasource . management . backend . core . DataSource dataSource = dataSourceRuntimeManager . lookupDataSource ( dataSourceUuid ) ; return org . kie . workbench . common . screens . datasource . management . util . DatabaseMetadataUtil . findTables ( dataSource . getConnection ( ) , schema , tableNamePattern , types ) ; } catch ( java . lang . Exception e ) { org . kie . workbench . common . screens . datasource . management . backend . service . DatabaseMetadataServiceImpl . logger . error ( ( "It<sp>was<sp>not<sp>possible<sp>to<sp>get<sp>database<sp>metadata<sp>for<sp>data<sp>source:<sp>" + dataSourceUuid ) , e ) ; throw new org . guvnor . common . services . shared . exceptions . GenericPortableException ( ( ( ( "It<sp>was<sp>not<sp>possible<sp>to<sp>get<sp>database<sp>metadata<sp>for<sp>data<sp>source:<sp>" + dataSourceUuid ) + ":<sp>" ) + ( e . getMessage ( ) ) ) , e ) ; } }
org . junit . Assert . assertEquals ( tables , result )
serializeTest ( ) { net . corpwar . lib . corpnet . util . TestSerialization testSerialization = new net . corpwar . lib . corpnet . util . TestSerialization ( ) ; byte [ ] testByte = net . corpwar . lib . corpnet . util . SerializationUtils . getInstance ( ) . serialize ( testSerialization ) ; "<AssertPlaceHolder>" ; } serialize ( T ) { net . corpwar . lib . corpnet . util . ObjectOutputStream oos = null ; try { oos = new net . corpwar . lib . corpnet . util . ObjectOutputStream ( net . corpwar . lib . corpnet . util . SerializationUtils . baos ) ; oos . writeObject ( obj ) ; oos . reset ( ) ; } catch ( net . corpwar . lib . corpnet . util . IOException e ) { net . corpwar . lib . corpnet . util . SerializationUtils . LOG . log ( Level . SEVERE , "Error<sp>IOException" , e ) ; } finally { if ( oos != null ) { try { oos . close ( ) ; } catch ( net . corpwar . lib . corpnet . util . IOException e ) { net . corpwar . lib . corpnet . util . SerializationUtils . LOG . log ( Level . SEVERE , "Error<sp>IOException" , e ) ; } } } byte [ ] byteObj = net . corpwar . lib . corpnet . util . SerializationUtils . baos . toByteArray ( ) ; net . corpwar . lib . corpnet . util . SerializationUtils . baos . reset ( ) ; return byteObj ; }
org . junit . Assert . assertTrue ( ( ( testByte . length ) > 0 ) )
testGetGroupMembersEntryFaultyHttpResponse ( ) { super . setResponseResource ( new org . springframework . core . io . ByteArrayResource ( "not-even-valid-json" . getBytes ( ) ) ) ; super . setStatus ( HttpServletResponse . SC_BAD_REQUEST ) ; nl . surfnet . coin . api . client . domain . GroupMembersEntry groupMembersEntry = groupService . getGroupMembersEntry ( provider , "personId" , "whatever" , 0 , 0 ) ; "<AssertPlaceHolder>" ; } getEntry ( ) { return entry ; }
org . junit . Assert . assertTrue ( groupMembersEntry . getEntry ( ) . isEmpty ( ) )
setLabels_WHEN_ExpressionMatchesPattern_AllGood ( ) { final io . prometheus . client . dropwizard . samplebuilder . MapperConfig mapperConfig = new io . prometheus . client . dropwizard . samplebuilder . MapperConfig ( ) ; final java . util . Map < java . lang . String , java . lang . String > labels = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; labels . put ( "valid" , "${0}" ) ; mapperConfig . setLabels ( labels ) ; "<AssertPlaceHolder>" ; } getLabels ( ) { return labels ; }
org . junit . Assert . assertEquals ( labels , mapperConfig . getLabels ( ) )
DateWriter_datetime_local_time ( ) { java . lang . String expected = "20130611T144302" ; java . lang . String actual = biweekly . io . scribe . property . ICalPropertyScribe . date ( datetime ) . tz ( true , null ) . write ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expected , actual )
collapseSimilarPaths_should_merge_dissimilar_nodes ( ) { au . edu . wehi . idsv . debruijn . BasePathGraph pg = PG ( G ( 20 ) . add ( "CATTAATCGCAAGAGCGGGTTGTATTCGACGCCAAGTCAGCTGAAGCACCATTACCCGATCAAAACATATCAGAAATGATTGACGTATC" ) . add ( "CATTAATCGCAAGAGCGGGTTGTATTGGACGCCATGTCAGCTGTAGCACCATTACCCGATCAAAACATATCAGAAATGATTGACGTATC" ) ) ; ^ ^ pg . splitPathToEnsureBreaksAt ( com . google . common . collect . ImmutableList . of ( pg . get ( "GGACGCCATGTCAGCTGTAG" ) ) , com . google . common . collect . ImmutableSortedSet . of ( 1 , 2 , 3 , 5 , 7 ) ) ; pg . splitPathToEnsureBreaksAt ( com . google . common . collect . ImmutableList . of ( pg . get ( "CGACGCCAAGTCAGCTGAAG" ) ) , com . google . common . collect . ImmutableSortedSet . of ( 4 , 6 , 8 ) ) ; pg . collapseSimilarPaths ( 3 , false , Integer . MAX_VALUE ) ; "<AssertPlaceHolder>" ; } getPathCount ( ) { return pathCount ; }
org . junit . Assert . assertEquals ( 1 , pg . getPathCount ( ) )
testGetMethod ( ) { java . lang . reflect . Method m = com . aliyun . odps . mapred . bridge . utils . MapReduceUtils . getOverriddenMethod ( WordCount . TokenizerMapper . class , "map" , long . class , com . aliyun . odps . data . Record . class , Mapper . TaskContext . class ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( m )
testIf ( ) { com . gs . collections . impl . block . function . IfFunction < java . lang . Integer , java . lang . Boolean > function = new com . gs . collections . impl . block . function . IfFunction ( com . gs . collections . impl . block . factory . Predicates . greaterThan ( 5 ) , ( java . lang . Integer ignored ) -> true ) ; "<AssertPlaceHolder>" ; } valueOf ( com . gs . collections . impl . block . function . CaseFunctionTest$Foo ) { return foo . value ; }
org . junit . Assert . assertTrue ( function . valueOf ( 10 ) )
testEmptyFolderCommittedDeletedCommittedIgnoredComparedWithInitialCommit ( ) { org . eclipse . jgit . revwalk . RevCommit commit = createEmptyFolderAndCommit ( ) ; deleteFolderAndCommit ( ) ; recreateEmptyFolderIgnored ( ) ; org . eclipse . jgit . treewalk . TreeWalk treeWalk = createTreeWalk ( commit ) ; "<AssertPlaceHolder>" ; } next ( ) { org . eclipse . jgit . treewalk . CanonicalTreeParser p = this ; for ( ; ; ) { if ( ( p . nextPtr ) == ( p . raw . length ) ) { if ( ( p . parent ) == null ) { p . currPtr = p . nextPtr ; return p ; } p = ( ( org . eclipse . jgit . treewalk . CanonicalTreeParser ) ( p . parent ) ) ; continue ; } p . prevPtr = p . currPtr ; p . currPtr = p . nextPtr ; p . parseEntry ( ) ; return p ; } }
org . junit . Assert . assertFalse ( treeWalk . next ( ) )
testNotEquals ( ) { com . nhnent . haste . common . Version builtVersion1 = new com . nhnent . haste . common . Version . Builder ( ) . major ( com . nhnent . haste . common . VersionTest . MAJOR ) . minor ( com . nhnent . haste . common . VersionTest . MINOR ) . build ( com . nhnent . haste . common . VersionTest . BUILD ) ; com . nhnent . haste . common . Version builtVersion2 = new com . nhnent . haste . common . Version . Builder ( ) . major ( com . nhnent . haste . common . VersionTest . BUILD ) . minor ( com . nhnent . haste . common . VersionTest . MAJOR ) . build ( com . nhnent . haste . common . VersionTest . MINOR ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { com . nhnent . haste . common . Version v = null ; try { v = ( ( com . nhnent . haste . common . Version ) ( obj ) ) ; } catch ( java . lang . ClassCastException e ) { return false ; } if ( ( this ) == obj ) { return false ; } return ! ( ( ( ( major ) != ( v . major ) ) || ( ( minor ) != ( v . minor ) ) ) || ( ( build ) != ( v . build ) ) ) ; }
org . junit . Assert . assertFalse ( builtVersion1 . equals ( builtVersion2 ) )
testVraagOpKandidaatVaderMetHuwelijkNaGeboorteEnVoorgGeboorte ( ) { final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView moeder = bouwMoeder ( 20050505 , 20111111 , NationaliteitcodeAttribuut . NL_NATIONALITEIT_CODE_STRING , 20120505 , 20140611 , NationaliteitcodeAttribuut . NL_NATIONALITEIT_CODE_STRING ) ; final java . util . List < nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView > kandidaten = brby0002 . bepaalKandidatenVader ( moeder , new nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumEvtDeelsOnbekendAttribuut ( 20110505 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , kandidaten . size ( ) )
itShouldRemoveLeadingNonNumericCharacters ( ) { java . lang . String inputValue = "+$42" ; java . lang . String actual = hydrograph . engine . transformation . standardfunctions . NumericFunctions . decimalStrip ( inputValue ) ; java . lang . String expected = "42" ; "<AssertPlaceHolder>" ; } decimalStrip ( T ) { if ( inputValue == null ) return null ; java . lang . String input = hydrograph . engine . transformation . standardfunctions . helper . StandardFunctionHelper . convertComparableObjectToString ( inputValue ) ; java . lang . String filter = input . replaceAll ( "[^0-9-]" , "" ) ; if ( ! ( filter . equals ( "" ) ) ) { java . lang . String regx = "^(-)(0+)(.*)|^(0+)(.*)" ; java . util . regex . Matcher match = java . util . regex . Pattern . compile ( regx ) . matcher ( filter ) ; if ( match . find ( ) ) { if ( ( match . group ( 1 ) ) != null ) return ( ( T ) ( ( match . group ( 1 ) ) + ( match . group ( 3 ) ) ) ) ; else return ( ( T ) ( match . group ( 5 ) ) ) ; } return ( ( T ) ( filter ) ) ; } return ( ( T ) ( "0" ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testEpicIssue ( ) { org . gitlab4j . api . models . EpicIssue epicIssue = org . gitlab4j . api . JsonUtils . unmarshalResource ( org . gitlab4j . api . models . EpicIssue . class , "epic-issue.json" ) ; "<AssertPlaceHolder>" ; } compareJson ( T , java . lang . String ) { java . io . InputStreamReader reader = new java . io . InputStreamReader ( org . gitlab4j . api . TestGitLabApiBeans . class . getResourceAsStream ( filename ) ) ; return org . gitlab4j . api . JsonUtils . compareJson ( apiObject , reader ) ; }
org . junit . Assert . assertTrue ( org . gitlab4j . api . JsonUtils . compareJson ( epicIssue , "epic-issue.json" ) )
testGetSchemaBadTableNotExecuted ( ) { org . talend . components . snowflake . tsnowflakeoutput . TSnowflakeOutputProperties outputProps = ( ( org . talend . components . snowflake . tsnowflakeoutput . TSnowflakeOutputProperties ) ( getComponentService ( ) . getComponentProperties ( TSnowflakeOutputDefinition . COMPONENT_NAME ) ) ) ; setupProps ( outputProps . connection ) ; setupTableWithStaticValues ( outputProps ) ; org . talend . components . snowflake . SnowflakeTableProperties tableProps = outputProps . table ; org . talend . daikon . properties . presentation . Form f = tableProps . getForm ( Form . REFERENCE ) ; tableProps . tableName . setValue ( "BADONE" ) ; tableProps = ( ( org . talend . components . snowflake . SnowflakeTableProperties ) ( org . talend . daikon . properties . test . PropertiesTestUtils . checkAndAfter ( getComponentService ( ) , f , tableProps . tableName . getName ( ) , tableProps ) ) ) ; org . talend . components . snowflake . test . LOGGER . info ( java . lang . String . valueOf ( tableProps . getValidationResult ( ) ) ) ; "<AssertPlaceHolder>" ; } getValidationResult ( ) { if ( ( ( prefix . getValue ( ) ) == null ) || ( prefix . getValue ( ) . isEmpty ( ) ) ) { return new org . talend . daikon . properties . ValidationResult ( org . talend . daikon . properties . ValidationResult . Result . ERROR , org . talend . components . azurestorage . blob . helpers . RemoteBlobsTable . messages . getMessage ( "error.VacantPrefix" ) ) ; } return org . talend . daikon . properties . ValidationResult . OK ; }
org . junit . Assert . assertEquals ( ValidationResult . Result . OK , tableProps . getValidationResult ( ) . getStatus ( ) )
testAddExecution ( ) { il . co . topq . report . business . execution . ExecutionMetadata metaData = il . co . topq . report . business . elastic . ExecutionMetaDataGenerator . generateExecutionMetadata ( 1 , 2 , 10 ) ; il . co . topq . report . events . ExecutionEndedEvent event = new il . co . topq . report . events . ExecutionEndedEvent ( metaData ) ; il . co . topq . report . business . elastic . EsControllerElasticIntegrationIT . escontroller . onExecutionEndedEvent ( event ) ; java . lang . Thread . sleep ( 1000 ) ; java . util . List < il . co . topq . report . business . elastic . ElasticsearchTest > storedTests = il . co . topq . report . business . elastic . EsControllerElasticIntegrationIT . escontroller . client . index ( Common . ELASTIC_INDEX ) . document ( "test" ) . search ( ) . byTerm ( "executionId" , ( ( metaData . getId ( ) ) + "" ) ) . asClass ( il . co . topq . report . business . elastic . ElasticsearchTest . class ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( 20 , storedTests . size ( ) )
testGetRuntimePathNoDuplicates ( ) { final org . oscm . build . ant . PathBuilderTest . ProjectStub projectA = new org . oscm . build . ant . PathBuilderTest . ProjectStub ( "project-a" ) ; projectA . addLibraries ( org . oscm . build . ant . PathBuilderTest . LIB ) ; final org . oscm . build . ant . PathBuilderTest . ProjectStub projectB = new org . oscm . build . ant . PathBuilderTest . ProjectStub ( "project-b" ) ; projectB . addLibraries ( org . oscm . build . ant . PathBuilderTest . LIB ) ; projectA . addJavaPathDependencies ( projectB ) ; org . apache . tools . ant . types . Path path = createBuilder ( projectA ) . getRuntimePath ( ) ; java . util . List < java . lang . String > expected = java . util . Arrays . asList ( absospath ( "resources/result/work/project-a/classes" ) , absospath ( org . oscm . build . ant . PathBuilderTest . LIB ) ) ; "<AssertPlaceHolder>" ; } absospath ( java . lang . String ) { return new java . io . File ( path ) . getAbsolutePath ( ) ; }
org . junit . Assert . assertEquals ( expected , java . util . Arrays . asList ( path . list ( ) ) )
testPartialLongKeyMatch ( ) { int ages = 10 ; int records = 20 ; com . oberasoftware . jasdb . core . collections . OrderedBalancedTree < com . oberasoftware . jasdb . api . index . keys . Key , com . oberasoftware . jasdb . api . index . keys . Key > balancedTree = createTree ( ages , records ) ; for ( int i = 0 ; i < ages ; i ++ ) { com . oberasoftware . jasdb . api . index . keys . Key key = new com . oberasoftware . jasdb . core . index . keys . LongKey ( i ) ; java . util . List < com . oberasoftware . jasdb . api . index . keys . Key > range = balancedTree . range ( key , true , key , true ) ; "<AssertPlaceHolder>" ; } } size ( ) { return size ; }
org . junit . Assert . assertEquals ( records , range . size ( ) )
testMemPipelineWithReflectionRecord ( ) { java . lang . String writeRecord = "John<sp>Doe" ; final org . apache . crunch . PCollection < java . lang . String > writeCollection = org . apache . crunch . impl . mem . MemPipeline . typedCollectionOf ( org . apache . crunch . types . avro . Avros . strings ( ) , writeRecord ) ; writeCollection . write ( org . apache . crunch . io . To . avroFile ( avroFile . getAbsolutePath ( ) ) ) ; org . apache . crunch . PCollection < ? extends java . lang . String > readCollection = org . apache . crunch . impl . mem . MemPipeline . getInstance ( ) . read ( org . apache . crunch . io . At . avroFile ( avroFile . getAbsolutePath ( ) , org . apache . crunch . types . avro . Avros . reflects ( writeRecord . getClass ( ) ) ) ) ; java . lang . Object readRecord = readCollection . materialize ( ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( "Tuple3[" ) ; sb . append ( first ) . append ( "," ) . append ( second ) . append ( "," ) . append ( third ) ; return sb . append ( "]" ) . toString ( ) ; }
org . junit . Assert . assertEquals ( writeRecord , readRecord . toString ( ) )
whenMatchingLetterOrString_ShouldReturnTrueForCorrectString ( ) { java . lang . String inputString = "someString789" ; boolean result = com . google . common . base . CharMatcher . javaLetterOrDigit ( ) . matchesAllOf ( inputString ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( result )
testMatchCertificateAndSelectionAttributes ( ) { com . intel . mtwilson . tag . model . X509AttributeCertificate certificate = createCertificate ( ) ; com . intel . mtwilson . tag . selection . xml . SelectionType sameSelection = createSelectionSame ( ) ; com . intel . mtwilson . tag . rest . v2 . rpc . ProvisionTagCertificate provisioner = new com . intel . mtwilson . tag . rest . v2 . rpc . ProvisionTagCertificate ( ) ; "<AssertPlaceHolder>" ; } certificateAttributesEqual ( com . intel . mtwilson . tag . model . X509AttributeCertificate , com . intel . mtwilson . tag . selection . xml . SelectionType ) { java . util . List < org . bouncycastle . asn1 . x509 . Attribute > certAttributes = certificate . getAttribute ( ) ; boolean [ ] certAttrMatch = new boolean [ certAttributes . size ( ) ] ; for ( com . intel . mtwilson . tag . selection . xml . AttributeType xmlAttribute : selection . getAttribute ( ) ) { com . intel . mtwilson . tag . common . X509AttrBuilder . Attribute oidAndValue = com . intel . mtwilson . tag . Util . toAttributeOidValue ( xmlAttribute ) ; boolean found = false ; for ( int i = 0 ; i < ( certAttrMatch . length ) ; i ++ ) { if ( java . util . Arrays . equals ( certAttributes . get ( i ) . getAttrType ( ) . getDEREncoded ( ) , oidAndValue . oid . getDEREncoded ( ) ) ) { if ( java . util . Arrays . equals ( certAttributes . get ( i ) . getAttributeValues ( ) [ 0 ] . getDEREncoded ( ) , oidAndValue . value . getDEREncoded ( ) ) ) { certAttrMatch [ i ] = true ; found = true ; } } } if ( ! found ) { com . intel . mtwilson . tag . rest . v2 . rpc . ProvisionTagCertificate . log . debug ( "Certificate<sp>does<sp>not<sp>have<sp>attribute<sp>oid<sp>{}<sp>and<sp>value<sp>{}" , org . apache . commons . codec . binary . Hex . encodeHexString ( oidAndValue . oid . getDEREncoded ( ) ) , org . apache . commons . codec . binary . Hex . encodeHexString ( oidAndValue . value . getDEREncoded ( ) ) ) ; return false ; } } for ( int i = 0 ; i < ( certAttrMatch . length ) ; i ++ ) { if ( ! ( certAttrMatch [ i ] ) ) { com . intel . mtwilson . tag . rest . v2 . rpc . ProvisionTagCertificate . log . debug ( "Selection<sp>does<sp>not<sp>have<sp>attribute<sp>oid<sp>{}<sp>and<sp>value<sp>{}" , org . apache . commons . codec . binary . Hex . encodeHexString ( certAttributes . get ( i ) . getAttrType ( ) . getDEREncoded ( ) ) , org . apache . commons . codec . binary . Hex . encodeHexString ( certAttributes . get ( i ) . getAttributeValues ( ) [ 0 ] . getDEREncoded ( ) ) ) ; return false ; } } return true ; }
org . junit . Assert . assertTrue ( provisioner . certificateAttributesEqual ( certificate , sameSelection ) )
testGetInstanceString ( ) { org . joda . time . DateTimeZone instance = org . apache . phoenix . cache . JodaTimezoneCache . getInstance ( "America/St_Vincent" ) ; "<AssertPlaceHolder>" ; } getInstance ( java . nio . ByteBuffer ) { try { return org . apache . phoenix . cache . JodaTimezoneCache . cachedJodaTimeZones . get ( timezoneId ) ; } catch ( java . util . concurrent . ExecutionException ex ) { throw new org . apache . phoenix . schema . IllegalDataException ( ex ) ; } catch ( com . google . common . util . concurrent . UncheckedExecutionException e ) { throw new org . apache . phoenix . schema . IllegalDataException ( ( "Unknown<sp>timezone<sp>" + ( org . apache . hadoop . hbase . util . Bytes . toString ( timezoneId . array ( ) ) ) ) ) ; } }
org . junit . Assert . assertNotNull ( instance )
testCalculateBoundsSpatialFilter ( ) { final java . lang . String typeName = org . geotools . arcsde . data . ArcSDEJavaApiTest . testData . getTempTableName ( ) ; java . lang . String [ ] cols = new java . lang . String [ ] { "SHAPE" } ; final com . esri . sde . sdk . client . SeFilter [ ] spatFilters ; try { com . esri . sde . sdk . client . SeExtent extent = new com . esri . sde . sdk . client . SeExtent ( 179 , ( - 1 ) , 180 , 0 ) ; com . esri . sde . sdk . client . SeLayer layer = session . getLayer ( typeName ) ; com . esri . sde . sdk . client . SeShape filterShape = new com . esri . sde . sdk . client . SeShape ( layer . getCoordRef ( ) ) ; filterShape . generateRectangle ( extent ) ; com . esri . sde . sdk . client . SeShapeFilter bboxFilter = new com . esri . sde . sdk . client . SeShapeFilter ( typeName , layer . getSpatialColumn ( ) , filterShape , com . esri . sde . sdk . client . SeFilter . METHOD_ENVP , true ) ; spatFilters = new com . esri . sde . sdk . client . SeFilter [ ] { bboxFilter } ; } catch ( com . esri . sde . sdk . client . SeException eek ) { throw new org . geotools . arcsde . ArcSdeException ( eek ) ; } com . esri . sde . sdk . client . SeSqlConstruct sqlCons = new com . esri . sde . sdk . client . SeSqlConstruct ( typeName ) ; final com . esri . sde . sdk . client . SeQueryInfo seQueryInfo = new com . esri . sde . sdk . client . SeQueryInfo ( ) ; seQueryInfo . setColumns ( cols ) ; seQueryInfo . setConstruct ( sqlCons ) ; com . esri . sde . sdk . client . SeExtent extent = session . issue ( new org . geotools . arcsde . session . Command < com . esri . sde . sdk . client . SeExtent > ( ) { @ org . geotools . arcsde . data . Override public com . esri . sde . sdk . client . SeExtent execute ( org . geotools . arcsde . session . ISession session , com . esri . sde . sdk . client . SeConnection connection ) throws com . esri . sde . sdk . client . SeException , java . io . IOException { com . esri . sde . sdk . client . SeQuery spatialQuery = new com . esri . sde . sdk . client . SeQuery ( connection ) ; spatialQuery . setSpatialConstraints ( SeQuery . SE_SPATIAL_FIRST , false , spatFilters ) ; com . esri . sde . sdk . client . SeExtent extent = spatialQuery . calculateLayerExtent ( seQueryInfo ) ; return extent ; } } ) ; "<AssertPlaceHolder>" ; } calculateLayerExtent ( com . esri . sde . sdk . client . SeQueryInfo ) { return null ; }
org . junit . Assert . assertNotNull ( extent )
testComponentParametersScript ( ) { java . io . Reader script = new java . io . StringReader ( ( "" + ( ( ( ( ( ( "package<sp>com.picocontainer.script.groovy\n" + "import<sp>com.picocontainer.parameters.ComponentParameter\n" ) + "import<sp>com.picocontainer.script.testmodel.*\n" ) + "scripted<sp>=<sp>builder.container<sp>{\n" ) + "<sp>component(key:\'a\',<sp>class:A)\n" ) + "<sp>component(key:\'b\',<sp>class:B,<sp>parameters:[<sp>new<sp>ComponentParameter(\'a\')<sp>])\n" ) + "}" ) ) ) ; com . picocontainer . PicoContainer pico = buildContainer ( script , null , com . picocontainer . script . groovy . GroovyNodeBuilderTestCase . ASSEMBLY_SCOPE ) ; com . picocontainer . script . testmodel . A a = ( ( com . picocontainer . script . testmodel . A ) ( pico . getComponent ( "a" ) ) ) ; com . picocontainer . script . testmodel . B b = ( ( com . picocontainer . script . testmodel . B ) ( pico . getComponent ( "b" ) ) ) ; "<AssertPlaceHolder>" ; } getComponent ( java . lang . Class ) { checkReadPermission ( ) ; return pico . getComponent ( componentType ) ; }
org . junit . Assert . assertSame ( a , b . a )
testGetLargeScriptStmtCount ( ) { classUnderTest . setLargeScriptStmtCount ( 10 ) ; "<AssertPlaceHolder>" ; } getLargeScriptStmtCount ( ) { return _largeScriptStmtCount ; }
org . junit . Assert . assertEquals ( 10 , classUnderTest . getLargeScriptStmtCount ( ) )
testCombinedSpanInMultipleFieldsQuery ( ) { java . lang . String query = "lin<sp>clooney" ; java . util . ArrayList < java . lang . String > attributeNames = new java . util . ArrayList ( ) ; attributeNames . add ( TestConstants . FIRST_NAME ) ; attributeNames . add ( TestConstants . LAST_NAME ) ; attributeNames . add ( TestConstants . DESCRIPTION ) ; java . util . List < edu . uci . ics . texera . api . span . Span > list = new java . util . ArrayList ( ) ; edu . uci . ics . texera . api . span . Span span1 = new edu . uci . ics . texera . api . span . Span ( "lastName" , 0 , 11 , "lin<sp>clooney" , "lin<sp>clooney" ) ; edu . uci . ics . texera . api . span . Span span2 = new edu . uci . ics . texera . api . span . Span ( "description" , 0 , 11 , "lin<sp>clooney" , "Lin<sp>Clooney" ) ; edu . uci . ics . texera . api . span . Span span3 = new edu . uci . ics . texera . api . span . Span ( "description" , 25 , 36 , "lin<sp>clooney" , "lin<sp>clooney" ) ; list . add ( span1 ) ; list . add ( span2 ) ; list . add ( span3 ) ; edu . uci . ics . texera . api . schema . Attribute [ ] schemaAttributes = new edu . uci . ics . texera . api . schema . Attribute [ ( TestConstants . ATTRIBUTES_PEOPLE . length ) + 1 ] ; for ( int count = 0 ; count < ( ( schemaAttributes . length ) - 1 ) ; count ++ ) { schemaAttributes [ count ] = edu . uci . ics . texera . api . constants . test . TestConstants . ATTRIBUTES_PEOPLE [ count ] ; } schemaAttributes [ ( ( schemaAttributes . length ) - 1 ) ] = new edu . uci . ics . texera . api . schema . Attribute ( edu . uci . ics . texera . dataflow . keywordmatcher . KeywordPhraseTest . RESULTS , edu . uci . ics . texera . api . schema . AttributeType . LIST ) ; edu . uci . ics . texera . api . field . IField [ ] fields1 = new edu . uci . ics . texera . api . field . IField [ ] { new edu . uci . ics . texera . api . field . StringField ( "george<sp>lin<sp>lin" ) , new edu . uci . ics . texera . api . field . StringField ( "lin<sp>clooney" ) , new edu . uci . ics . texera . api . field . IntegerField ( 43 ) , new edu . uci . ics . texera . api . field . DoubleField ( 6.06 ) , new edu . uci . ics . texera . api . field . DateField ( new java . text . SimpleDateFormat ( "MM-dd-yyyy" ) . parse ( "01-13-1973" ) ) , new edu . uci . ics . texera . api . field . TextField ( "Lin<sp>Clooney<sp>is<sp>Short<sp>and<sp>lin<sp>clooney<sp>is<sp>Angry" ) , new edu . uci . ics . texera . api . field . ListField ( list ) } ; edu . uci . ics . texera . api . tuple . Tuple tuple1 = new edu . uci . ics . texera . api . tuple . Tuple ( new edu . uci . ics . texera . api . schema . Schema ( schemaAttributes ) , fields1 ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > expectedResultList = new java . util . ArrayList ( ) ; expectedResultList . add ( tuple1 ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > resultList = edu . uci . ics . texera . dataflow . keywordmatcher . KeywordTestHelper . getQueryResults ( edu . uci . ics . texera . dataflow . keywordmatcher . KeywordPhraseTest . PEOPLE_TABLE , query , attributeNames , edu . uci . ics . texera . dataflow . keywordmatcher . KeywordPhraseTest . phrase ) ; boolean contains = edu . uci . ics . texera . api . utils . TestUtils . equals ( expectedResultList , resultList ) ; "<AssertPlaceHolder>" ; } equals ( java . util . List , java . util . List ) { expectedResults = Tuple . Builder . removeIfExists ( expectedResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; exactResults = Tuple . Builder . removeIfExists ( exactResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; if ( ( expectedResults . size ( ) ) != ( exactResults . size ( ) ) ) return false ; return ( expectedResults . containsAll ( exactResults ) ) && ( exactResults . containsAll ( expectedResults ) ) ; }
org . junit . Assert . assertTrue ( contains )
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . portal . tools . service . builder . test . model . VersionedEntry > versionedEntries = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( versionedEntries . isEmpty ( ) )
testSplitMerge64 ( ) { java . util . Random rnd = new java . util . Random ( ) ; for ( int i = 0 ; i < ( ch . ethz . globis . phtree . bits . TestBitsToolsSplitMergeVarLong . MUL ) ; i ++ ) { long [ ] l = new long [ ] { rnd . nextLong ( ) , rnd . nextLong ( ) } ; long [ ] x = ch . ethz . globis . phtree . util . BitTools . mergeLong ( 64 , l ) ; long [ ] l2 = ch . ethz . globis . phtree . util . BitTools . splitLong ( 2 , 64 , x ) ; "<AssertPlaceHolder>" ; } } splitLong ( int , int , long [ ] ) { long [ ] trg = new long [ dims ] ; long maskTrg = 1L << ( nBitsPerValue - 1 ) ; for ( int k = 0 ; k < nBitsPerValue ; k ++ ) { for ( int j = 0 ; j < ( trg . length ) ; j ++ ) { int posBit = ( k * ( trg . length ) ) + j ; boolean bit = ch . ethz . globis . phtree . util . BitTools . getBit ( toSplit , posBit ) ; if ( bit ) { trg [ j ] |= maskTrg ; } } maskTrg >>>= 1 ; } return trg ; }
org . junit . Assert . assertArrayEquals ( l , l2 )
testFiltersEnableCache ( ) { p . setFilters ( mock ( java . awt . image . BufferedImageOp . class ) ) ; "<AssertPlaceHolder>" ; } shouldUseCache ( ) { return super . shouldUseCache ( ) ; }
org . junit . Assert . assertThat ( p . shouldUseCache ( ) , org . hamcrest . CoreMatchers . is ( true ) )
getInstanceFromClass ( ) { for ( int i = 1 ; i < 5 ; i ++ ) { final org . apache . openejb . server . groovy . BeanManagerHelperTest . Pojo pojo = ( ( org . apache . openejb . server . groovy . BeanManagerHelperTest . Pojo ) ( org . apache . openejb . server . groovy . BeanManagerHelperTest . helper . beanFromClass ( "BeanManagerHelperTest" , org . apache . openejb . server . groovy . BeanManagerHelperTest . Pojo . class . getName ( ) ) ) ) ; "<AssertPlaceHolder>" ; } } getName ( ) { return "activemq" ; }
org . junit . Assert . assertEquals ( ( 5 + i ) , pojo . id )
testValidateUrl_LocalSystem8080 ( ) { boolean result = org . oscm . validator . ADMValidator . isUrl ( "http://localsystem:8080" ) ; "<AssertPlaceHolder>" ; } isUrl ( java . lang . String ) { return org . oscm . validator . ADMValidator . URL_VALIDATOR . isValid ( value ) ; }
org . junit . Assert . assertTrue ( result )
testDoesNotMatchWhenAnnotatedForCommandMessage ( ) { org . axonframework . messaging . annotation . ParameterResolver resolver = testSubject . createInstance ( sourceIdMethod , sourceIdMethod . getParameters ( ) , 0 ) ; org . axonframework . commandhandling . CommandMessage < java . lang . Object > commandMessage = org . axonframework . commandhandling . GenericCommandMessage . asCommandMessage ( "test" ) ; "<AssertPlaceHolder>" ; } matches ( org . axonframework . messaging . Message ) { return true ; }
org . junit . Assert . assertFalse ( resolver . matches ( commandMessage ) )