input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testConvertToAvro ( ) { java . lang . String expected = "s" ; org . talend . daikon . avro . converter . AvroConverter < java . lang . Character , java . lang . String > converter = new org . talend . codegen . converter . CharStringConverter ( ) ; java . lang . String actual = converter . convertToAvro ( 's' ) ; "<AssertPlaceHolder>" ; } convertToAvro ( java . math . BigDecimal ) { return value . toString ( ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
test_shouldNotChangeJavaVersionBecauseJdkValueDoesNotExist ( ) { createApplication ( ) ; try { org . springframework . shell . core . CommandResult result = changeJavaVersion ( "jdk1.XXX" ) ; "<AssertPlaceHolder>" ; } finally { removeApplication ( ) ; } } isFailedCommand ( ) { return new fr . treeptik . cloudunit . cli . integration . ShellMatchers . CommandStatusMatcher ( false ) ; } | org . junit . Assert . assertThat ( result , isFailedCommand ( ) ) |
testSparseInterpolation_random1 ( ) { int nIterations = its ( 1000 , 2000 ) ; org . apache . commons . math3 . random . RandomGenerator rnd = getRandom ( ) ; cc . redberry . rings . poly . multivar . MultivariateGCDTest . lGCDSampleDataZp sampleData = new cc . redberry . rings . poly . multivar . MultivariateGCDTest . lGCDSampleDataZp ( 3 , 5 , 5 , 15 , 5 , 15 , rnd ) ; for ( int n = 0 ; n < nIterations ; n ++ ) { cc . redberry . rings . poly . multivar . MultivariateGCDTest . GCDSample < cc . redberry . rings . poly . multivar . MonomialZp64 , cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 > gcdTriplet = sampleData . nextSample ( false , false ) ; cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 contentGCD = cc . redberry . rings . poly . multivar . MultivariateGCD . MultivariateGCD . contentGCD ( gcdTriplet . a , gcdTriplet . b , 0 , cc . redberry . rings . poly . multivar . MultivariateGCD . MultivariateGCD :: PolynomialGCD ) ; cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 gcd = null ; cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 actual = null ; try { cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 la = cc . redberry . rings . poly . multivar . MultivariateDivision . divideExact ( gcdTriplet . a , contentGCD ) ; cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 lb = cc . redberry . rings . poly . multivar . MultivariateDivision . divideExact ( gcdTriplet . b , contentGCD ) ; gcd = ZippelGCD ( la , lb ) ; if ( ( ( la . isConstant ( ) ) || ( lb . isConstant ( ) ) ) || ( ( gcd . degree ( 0 ) ) == 0 ) ) { -- n ; continue ; } actual = interpolateGCD ( la , lb , gcd , rnd ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Throwable thr ) { System . out . println ( gcdTriplet . domain ) ; System . out . println ( gcdTriplet . a ) ; System . out . println ( gcdTriplet . b ) ; System . out . println ( gcd ) ; System . out . println ( actual ) ; throw thr ; } } } monic ( ) { if ( isMonic ( ) ) return this ; if ( isZero ( ) ) return this ; if ( ( degree ) == 0 ) { data [ 0 ] = 1 ; return this ; } return multiply ( ring . reciprocal ( lc ( ) ) ) ; } | org . junit . Assert . assertEquals ( gcd . monic ( ) , actual . monic ( ) ) |
testListJobsNotLaunchable ( ) { when ( jobLocator . getJobNames ( ) ) . thenReturn ( java . util . Arrays . asList ( "job1" , "job2" ) ) ; when ( jobInstanceDao . getJobNames ( ) ) . thenReturn ( java . util . Arrays . asList ( "job3" , "job2" ) ) ; "<AssertPlaceHolder>" ; } listJobs ( int , int ) { java . util . Collection < java . lang . String > jobNames = new java . util . LinkedHashSet < java . lang . String > ( jobLocator . getJobNames ( ) ) ; jobNames . addAll ( getJsrJobNames ( ) ) ; if ( ( start + count ) > ( jobNames . size ( ) ) ) { jobNames . addAll ( jobInstanceDao . getJobNames ( ) ) ; } if ( start >= ( jobNames . size ( ) ) ) { start = jobNames . size ( ) ; } if ( ( start + count ) >= ( jobNames . size ( ) ) ) { count = ( jobNames . size ( ) ) - start ; } return new java . util . ArrayList < java . lang . String > ( jobNames ) . subList ( start , ( start + count ) ) ; } | org . junit . Assert . assertEquals ( 4 , service . listJobs ( 0 , 5 ) . size ( ) ) |
testSizeIsFiveIfTreeHasFiveEntries ( ) { "<AssertPlaceHolder>" ; } create ( int , int ) { com . github . davidmoten . rtree . RTree < java . lang . Object , com . github . davidmoten . rtree . geometry . Rectangle > tree = com . github . davidmoten . rtree . RTree . maxChildren ( maxChildren ) . create ( ) ; for ( int i = 1 ; i <= n ; i ++ ) tree = tree . add ( com . github . davidmoten . rtree . RTreeTest . e ( i ) ) ; return tree ; } | org . junit . Assert . assertEquals ( 5 , com . github . davidmoten . rtree . RTreeTest . create ( 3 , 5 ) . size ( ) ) |
testSetForeground ( ) { org . eclipse . swt . graphics . Color color = new org . eclipse . swt . graphics . Color ( display , 100 , 100 , 100 ) ; org . eclipse . rap . rwt . template . Cell cell = new org . eclipse . rap . rwt . template . TestCell ( template , "foo" ) ; cell . setForeground ( color ) ; "<AssertPlaceHolder>" ; } getForeground ( ) { checkWidget ( ) ; handleVirtual ( ) ; org . eclipse . swt . graphics . Color defaultForeground = getItemData ( ) . defaultForeground ; return defaultForeground == null ? parent . getForeground ( ) : defaultForeground ; } | org . junit . Assert . assertSame ( color , cell . getForeground ( ) ) |
testGetValueIncludeBoth ( ) { when ( view . getIncludeStartValue ( ) ) . thenReturn ( true ) ; when ( view . getStartValue ( ) ) . thenReturn ( "1" ) ; when ( view . getEndValue ( ) ) . thenReturn ( "6" ) ; when ( view . getIncludeEndValue ( ) ) . thenReturn ( true ) ; final java . lang . String expected = "[1..6]" ; final java . lang . String actual = constraintRange . getValue ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return rootPath ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testSave ( ) { com . ewcms . common . dao . model . Model model = new com . ewcms . common . dao . model . Model ( 1 , "test" ) ; dao . persist ( model ) ; model = dao . get ( 1 ) ; "<AssertPlaceHolder>" ; } get ( K ) { return entityManager . find ( entityClass , pk ) ; } | org . junit . Assert . assertNotNull ( model ) |
testConvert ( ) { java . lang . String name = "first<sp>blood" ; java . lang . String abbrName = "fb" ; java . lang . Long paperUsageId = 2L ; org . lnu . is . domain . paper . usage . PaperUsage paperUsage = new org . lnu . is . domain . paper . usage . PaperUsage ( ) ; paperUsage . setId ( paperUsageId ) ; org . lnu . is . domain . paper . type . PaperType expected = new org . lnu . is . domain . paper . type . PaperType ( ) ; expected . setName ( name ) ; expected . setAbbrName ( abbrName ) ; expected . setPaperUsage ( paperUsage ) ; org . lnu . is . resource . paper . type . PaperTypeResource source = new org . lnu . is . resource . paper . type . PaperTypeResource ( ) ; source . setName ( name ) ; source . setAbbrName ( abbrName ) ; source . setPaperUsageId ( paperUsageId ) ; org . lnu . is . domain . paper . type . PaperType actual = unit . convert ( source ) ; "<AssertPlaceHolder>" ; } convert ( org . lnu . is . domain . admin . unit . AdminUnit ) { return convert ( source , new org . lnu . is . resource . adminunit . AdminUnitResource ( ) ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testSetThreadFactory ( ) { final java . util . concurrent . ThreadFactory tf = java . util . concurrent . Executors . defaultThreadFactory ( ) ; final com . allanbank . mongodb . MongoClientConfiguration config = new com . allanbank . mongodb . MongoClientConfiguration ( ) ; config . setThreadFactory ( tf ) ; "<AssertPlaceHolder>" ; } getThreadFactory ( ) { return myThreadFactory ; } | org . junit . Assert . assertSame ( tf , config . getThreadFactory ( ) ) |
testGetNamespace ( ) { con . begin ( ) ; con . setNamespace ( "rdf" , RDF . NAMESPACE ) ; con . commit ( ) ; "<AssertPlaceHolder>" ; } getNamespace ( int ) { if ( i < 1 ) throw new java . lang . IllegalArgumentException ( ) ; return ( ( namespace ) + "_" ) + i ; } | org . junit . Assert . assertEquals ( RDF . NAMESPACE , con . getNamespace ( "rdf" ) ) |
testNoPlanWithPropertyRestrictionsEnabledButPropertyIgnored ( ) { org . apache . jackrabbit . oak . spi . state . NodeBuilder builder = nodeState . builder ( ) ; builder . child ( "oak:index" ) . child ( "solr" ) . setProperty ( "ignoredProperties" , java . util . Collections . singleton ( "name" ) , Type . STRINGS ) . setProperty ( "propertyRestrictions" , true ) ; nodeState = builder . getNodeState ( ) ; org . apache . jackrabbit . oak . query . ast . SelectorImpl selector = org . apache . jackrabbit . oak . plugins . index . solr . query . SolrQueryIndexTest . newSelector ( nodeState , "a" ) ; org . apache . jackrabbit . oak . plugins . index . solr . query . SolrQueryIndex solrQueryIndex = new org . apache . jackrabbit . oak . plugins . index . solr . query . SolrQueryIndex ( null , null , null ) ; org . apache . jackrabbit . oak . query . index . FilterImpl filter = new org . apache . jackrabbit . oak . query . index . FilterImpl ( selector , "select<sp>*<sp>from<sp>[nt:base]<sp>as<sp>a<sp>where<sp>name<sp>=<sp>'hello')" , new org . apache . jackrabbit . oak . query . QueryEngineSettings ( ) ) ; filter . restrictProperty ( "name" , Operator . EQUAL , org . apache . jackrabbit . oak . plugins . memory . PropertyValues . newString ( "hello" ) ) ; java . util . List < org . apache . jackrabbit . oak . spi . query . QueryIndex . OrderEntry > sortOrder = new java . util . LinkedList < org . apache . jackrabbit . oak . spi . query . QueryIndex . OrderEntry > ( ) ; java . util . List < org . apache . jackrabbit . oak . spi . query . QueryIndex . IndexPlan > plans = solrQueryIndex . getPlans ( filter , sortOrder , nodeState ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; } | org . junit . Assert . assertEquals ( 0 , plans . size ( ) ) |
testOneLevel ( ) { me . hao0 . wechat . utils . XmlWriters xmlWriters = me . hao0 . wechat . utils . XmlWriters . create ( ) ; xmlWriters . element ( "ToUserName" , "123456" ) . element ( "FromUserName" , "me" ) . element ( "CreateTime" , java . lang . System . currentTimeMillis ( ) ) . element ( "MsgType" , "transfer_customer_service" ) ; "<AssertPlaceHolder>" ; } build ( ) { return buildElements ( ) ; } | org . junit . Assert . assertNotNull ( xmlWriters . build ( ) ) |
testPredicatedAlts ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( ( ( "options<sp>{output=template;}\n" + "a<sp>:<sp>ID<sp>INT<sp>-><sp>{false}?<sp>foo(x={$ID.text},y={$INT.text})\n" ) + "<sp>-><sp>foo(x={\"hi\"},<sp>y={$ID.text})\n" ) + "<sp>;\n" ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "INT<sp>:<sp>\'0\'..\'9\'+;\n" ) + "a" 0 ) ; java . lang . String found = execParser ( "a" 4 , grammar , "TParser" , "a" 1 , "a" , "a" 3 , debug ) ; "<AssertPlaceHolder>" ; } execParser ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , boolean ) { boolean compiled = rawGenerateAndBuildRecognizer ( grammarFileName , grammarStr , parserName , lexerName , debug ) ; org . junit . Assert . assertTrue ( compiled ) ; writeFile ( tmpdir , "input" , input ) ; boolean parserBuildsTrees = ( ( grammarStr . indexOf ( "output=AST" ) ) >= 0 ) || ( ( grammarStr . indexOf ( "output<sp>=<sp>AST" ) ) >= 0 ) ; boolean parserBuildsTemplate = ( ( grammarStr . indexOf ( "output=template" ) ) >= 0 ) || ( ( grammarStr . indexOf ( "output<sp>=<sp>template" ) ) >= 0 ) ; return rawExecRecognizer ( parserName , null , lexerName , startRuleName , null , parserBuildsTrees , parserBuildsTemplate , false , debug ) ; } | org . junit . Assert . assertEquals ( "a" 2 , found ) |
testCountryCode ( ) { final net . violet . platform . api . actions . Action theAction = new net . violet . platform . api . actions . stores . GetStores ( ) ; final net . violet . platform . api . callers . APICaller caller = getPublicApplicationAPICaller ( ) ; final java . util . Map < java . lang . String , java . lang . Object > theParams = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; theParams . put ( ActionParam . MAIN_PARAM_KEY , "cc" ) ; final net . violet . platform . api . actions . ActionParam theActionParam = new net . violet . platform . api . actions . ActionParam ( caller , theParams ) ; final java . lang . Object theResult = theAction . processRequest ( theActionParam ) ; "<AssertPlaceHolder>" ; } put ( K , T ) { this . mMap . put ( theRef , new net . violet . db . cache . CacheReference < K , T > ( theRef , theRecord , this . mReferenceQueue ) ) ; this . mLinkedMap . put ( theRef , theRecord ) ; } | org . junit . Assert . assertNotNull ( theResult ) |
testIsPOMFileWithPOMFile ( ) { final javax . enterprise . inject . spi . Bean moduleServiceBean = ( ( javax . enterprise . inject . spi . Bean ) ( beanManager . getBeans ( org . kie . workbench . common . services . shared . project . KieModuleService . class ) . iterator ( ) . next ( ) ) ) ; final javax . enterprise . context . spi . CreationalContext cc = beanManager . createCreationalContext ( moduleServiceBean ) ; final org . kie . workbench . common . services . shared . project . KieModuleService moduleService = ( ( org . kie . workbench . common . services . shared . project . KieModuleService ) ( beanManager . getReference ( moduleServiceBean , org . kie . workbench . common . services . shared . project . KieModuleService . class , cc ) ) ) ; final java . net . URL testUrl = this . getClass ( ) . getResource ( "/ModuleBackendTestModuleStructureValid/pom.xml" ) ; final org . uberfire . java . nio . file . Path nioTestPath = fs . getPath ( testUrl . toURI ( ) ) ; final org . uberfire . backend . vfs . Path testPath = paths . convert ( nioTestPath ) ; final boolean result = moduleService . isPom ( testPath ) ; "<AssertPlaceHolder>" ; } isPom ( org . uberfire . backend . vfs . Path ) { return resourceResolver . isPom ( resource ) ; } | org . junit . Assert . assertTrue ( result ) |
awaitWithTimeoutMustReturnTrueIfCompletesWithinTimeout ( ) { createPool ( ) ; stormpot . Poolable obj = pool . claim ( stormpot . PoolTest . longTimeout ) ; java . util . concurrent . atomic . AtomicBoolean result = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; stormpot . Completion completion = pool . shutdown ( ) ; java . lang . Thread thread = fork ( $await ( completion , stormpot . PoolTest . longTimeout , result ) ) ; waitForThreadState ( thread , Thread . State . TIMED_WAITING ) ; obj . release ( ) ; join ( thread ) ; "<AssertPlaceHolder>" ; } get ( ) { return state ; } | org . junit . Assert . assertTrue ( result . get ( ) ) |
getIndex ( ) { int count = 10 ; byte [ ] bytes1 = new byte [ count ] ; byte [ ] bytes2 = new byte [ count ] ; for ( int i = 0 ; i < count ; i ++ ) { if ( i < ( count / 2 ) ) { bytes1 [ i ] = ( ( byte ) ( i ) ) ; bytes2 [ i ] = - 1 ; } else { bytes1 [ i ] = - 1 ; bytes2 [ i ] = ( ( byte ) ( i ) ) ; } } java . nio . ByteBuffer bb1 = java . nio . ByteBuffer . wrap ( bytes1 ) ; bb1 . limit ( ( count / 2 ) ) ; java . nio . ByteBuffer bb2 = java . nio . ByteBuffer . wrap ( bytes2 ) ; bb2 . position ( ( count / 2 ) ) ; org . threadly . litesockets . buffers . ReuseableMergedByteBuffers mbb = new org . threadly . litesockets . buffers . ReuseableMergedByteBuffers ( false , bb1 , bb2 ) ; for ( int i = 0 ; i < count ; i ++ ) { "<AssertPlaceHolder>" ; } } get ( byte [ ] ) { if ( lock . isLocked ( ) ) { if ( lock . isHeldByCurrentThread ( ) ) { int consumed = super . get ( destBytes ) ; consumedSinceBegin += consumed ; return consumed ; } else { throw new java . lang . IllegalStateException ( org . threadly . litesockets . buffers . TransactionalByteBuffers . ACCESS_ERROR ) ; } } else { return super . get ( destBytes ) ; } } | org . junit . Assert . assertEquals ( ( ( byte ) ( i ) ) , mbb . get ( i ) ) |
shouldBeVerified ( ) { final org . apache . tinkerpop . gremlin . process . traversal . Traversal copy = org . apache . tinkerpop . gremlin . process . traversal . strategy . verification . StandardVerificationStrategyTest . copyAndConfigureTraversal ( traversal ) ; if ( legalTraversal ) { copy . asAdmin ( ) . applyStrategies ( ) ; final org . apache . tinkerpop . gremlin . process . traversal . Traversal forIteration = org . apache . tinkerpop . gremlin . process . traversal . strategy . verification . StandardVerificationStrategyTest . copyAndConfigureTraversal ( traversal ) ; forIteration . iterate ( ) ; } else { try { copy . asAdmin ( ) . applyStrategies ( ) ; org . junit . Assert . fail ( ( "The<sp>strategy<sp>should<sp>not<sp>allow<sp>traversal:<sp>" + ( this . traversal ) ) ) ; } catch ( java . lang . IllegalStateException ise ) { "<AssertPlaceHolder>" ; } } } applyStrategies ( ) { } | org . junit . Assert . assertTrue ( true ) |
testLocalizeMacStringsWithSpecialCharacters ( ) { com . box . l10n . mojito . service . tm . Repository repo = repositoryService . createRepository ( testIdWatcher . getEntityName ( "repository" ) ) ; com . box . l10n . mojito . service . tm . RepositoryLocale repoLocale ; try { repoLocale = repositoryService . addRepositoryLocale ( repo , "en-GB" ) ; } catch ( com . box . l10n . mojito . service . repository . RepositoryLocaleCreationException e ) { throw new java . lang . RuntimeException ( e ) ; } java . lang . String assetContent = "\"100_character_description\"<sp>=<sp>\"\\\"100\\\"<sp>character<sp>description:\";\n" + "\"two_lines\"<sp>=<sp>\"first\\nsecond\";" ; asset = assetService . createAssetWithContent ( repo . getId ( ) , "en.lproj/Localizable.strings" , assetContent ) ; asset = assetRepository . findOne ( asset . getId ( ) ) ; assetId = asset . getId ( ) ; tmId = repo . getTm ( ) . getId ( ) ; com . box . l10n . mojito . service . pollableTask . PollableFuture < com . box . l10n . mojito . service . tm . Asset > assetResult = assetService . addOrUpdateAssetAndProcessIfNeeded ( repo . getId ( ) , assetContent , asset . getPath ( ) , null , null , null , null ) ; try { pollableTaskService . waitForPollableTask ( assetResult . getPollableTask ( ) . getId ( ) ) ; } catch ( com . box . l10n . mojito . service . pollableTask . PollableTaskException | java . lang . InterruptedException e ) { throw new java . lang . RuntimeException ( e ) ; } assetResult . get ( ) ; com . box . l10n . mojito . service . tm . search . TextUnitSearcherParameters textUnitSearcherParameters = new com . box . l10n . mojito . service . tm . search . TextUnitSearcherParameters ( ) ; textUnitSearcherParameters . setRepositoryIds ( repo . getId ( ) ) ; textUnitSearcherParameters . setStatusFilter ( StatusFilter . FOR_TRANSLATION ) ; java . util . List < com . box . l10n . mojito . service . tm . search . TextUnitDTO > textUnitDTOs = textUnitSearcher . search ( textUnitSearcherParameters ) ; for ( com . box . l10n . mojito . service . tm . search . TextUnitDTO textUnitDTO : textUnitDTOs ) { com . box . l10n . mojito . service . tm . TMServiceTest . logger . debug ( "source=[{}]" , textUnitDTO . getSource ( ) ) ; } java . lang . String localizedAsset = tmService . generateLocalized ( asset , assetContent , repoLocale , "en-GB" , null , null , Status . ALL , InheritanceMode . USE_PARENT ) ; com . box . l10n . mojito . service . tm . TMServiceTest . logger . debug ( "localized=\n{}" , localizedAsset ) ; "<AssertPlaceHolder>" ; } generateLocalized ( com . box . l10n . mojito . service . tm . Asset , java . lang . String , com . box . l10n . mojito . service . tm . RepositoryLocale , java . lang . String , com . box . l10n . mojito . rest . asset . FilterConfigIdOverride , java . util . List , com . box . l10n . mojito . service . tm . Status , com . box . l10n . mojito . service . tm . InheritanceMode ) { java . lang . String bcp47Tag ; if ( outputBcp47tag == null ) { bcp47Tag = repositoryLocale . getLocale ( ) . getBcp47Tag ( ) ; } else { com . box . l10n . mojito . service . tm . TMService . logger . debug ( "An<sp>output<sp>bcp47<sp>tag:<sp>{}<sp>is<sp>specified<sp>(won't<sp>use<sp>the<sp>default<sp>tag<sp>(from<sp>the<sp>repository<sp>locale)" , outputBcp47tag ) ; bcp47Tag = outputBcp47tag ; } com . box . l10n . mojito . service . tm . TMService . logger . debug ( "Configuring<sp>pipeline<sp>for<sp>localized<sp>XLIFF<sp>generation" ) ; net . sf . okapi . common . pipeline . BasePipelineStep translateStep = ( ( net . sf . okapi . common . pipeline . BasePipelineStep ) ( new com . box . l10n . mojito . service . tm . TranslateStep ( asset , repositoryLocale , inheritanceMode , status ) ) ) ; return generateLocalizedBase ( asset , content , filterConfigIdOverride , filterOptions , translateStep , bcp47Tag ) ; } | org . junit . Assert . assertEquals ( assetContent , localizedAsset ) |
givenResourceDoesNotExist_whenResourceIsRetrieved_thenNoResourceIsReceived ( ) { final com . baeldung . domain . Foo createdResource = getApi ( ) . findOne ( com . baeldung . util . IDUtil . randomPositiveLong ( ) ) ; "<AssertPlaceHolder>" ; } randomPositiveLong ( ) { long id = ( new java . util . Random ( ) . nextLong ( ) ) * 10000 ; id = ( id < 0 ) ? ( - 1 ) * id : id ; return id ; } | org . junit . Assert . assertNull ( createdResource ) |
testGetConfigAsync ( ) { when ( androidAppService . getAndroidConfigAsync ( com . google . firebase . projectmanagement . AndroidAppTest . APP_ID ) ) . thenReturn ( createApiFuture ( com . google . firebase . projectmanagement . AndroidAppTest . ANDROID_CONFIG ) ) ; java . lang . String config = androidApp . getConfigAsync ( ) . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( semaphore . tryAcquire ( TestUtils . TEST_TIMEOUT_MILLIS , TimeUnit . MILLISECONDS ) ) { return result . get ( ) ; } org . junit . Assert . fail ( "Timed<sp>out<sp>while<sp>waiting<sp>for<sp>GetTokenCompletionListener" ) ; return null ; } | org . junit . Assert . assertEquals ( config , com . google . firebase . projectmanagement . AndroidAppTest . ANDROID_CONFIG ) |
closeFlatMap ( ) { int [ ] closed = new int [ 3 ] ; java . util . stream . LongStream . of ( 0 , 1 ) . flatMap ( ( n ) -> java . util . stream . LongStream . of ( n , ( n + 1 ) ) . onClose ( ( ) -> ( closed [ ( ( int ) ( n ) ) ] ) ++ ) ) . onClose ( ( ) -> ( closed [ 2 ] ) ++ ) . skip ( 10 ) . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { org . teavm . model . util . TransitionExtractor transitionExtractor = new org . teavm . model . util . TransitionExtractor ( ) ; org . teavm . model . BasicBlock block = org . teavm . metaprogramming . impl . MetaprogrammingImpl . generator . currentBlock ( ) ; org . teavm . model . Instruction lastInstruction = block . getLastInstruction ( ) ; if ( lastInstruction != null ) { lastInstruction . acceptVisitor ( transitionExtractor ) ; } if ( ( transitionExtractor . getTargets ( ) ) != null ) { return ; } org . teavm . model . Variable var ; if ( ( org . teavm . metaprogramming . impl . MetaprogrammingImpl . returnType ) instanceof org . teavm . model . ValueType . Void ) { var = null ; } else if ( ( org . teavm . metaprogramming . impl . MetaprogrammingImpl . returnType ) instanceof org . teavm . model . ValueType . Primitive ) { var = org . teavm . metaprogramming . impl . MetaprogrammingImpl . generator . program . createVariable ( ) ; switch ( ( ( org . teavm . model . ValueType . Primitive ) ( org . teavm . metaprogramming . impl . MetaprogrammingImpl . returnType ) ) . getKind ( ) ) { case BOOLEAN : case BYTE : case SHORT : case CHARACTER : case INTEGER : { org . teavm . model . instructions . IntegerConstantInstruction constantInsn = new org . teavm . model . instructions . IntegerConstantInstruction ( ) ; constantInsn . setReceiver ( var ) ; org . teavm . metaprogramming . impl . MetaprogrammingImpl . generator . add ( constantInsn ) ; break ; } case LONG : { org . teavm . model . instructions . LongConstantInstruction constantInsn = new org . teavm . model . instructions . LongConstantInstruction ( ) ; constantInsn . setReceiver ( var ) ; org . teavm . metaprogramming . impl . MetaprogrammingImpl . generator . add ( constantInsn ) ; break ; } case FLOAT : { org . teavm . model . instructions . FloatConstantInstruction constantInsn = new org . teavm . model . instructions . FloatConstantInstruction ( ) ; constantInsn . setReceiver ( var ) ; org . teavm . metaprogramming . impl . MetaprogrammingImpl . generator . add ( constantInsn ) ; break ; } case DOUBLE : { org . teavm . model . instructions . DoubleConstantInstruction constantInsn = new org . teavm . model . instructions . DoubleConstantInstruction ( ) ; constantInsn . setReceiver ( var ) ; org . teavm . metaprogramming . impl . MetaprogrammingImpl . generator . add ( constantInsn ) ; break ; } } } else { org . teavm . model . instructions . NullConstantInstruction constantInsn = new org . teavm . model . instructions . NullConstantInstruction ( ) ; var = org . teavm . metaprogramming . impl . MetaprogrammingImpl . generator . program . createVariable ( ) ; constantInsn . setReceiver ( var ) ; org . teavm . metaprogramming . impl . MetaprogrammingImpl . generator . add ( constantInsn ) ; } org . teavm . metaprogramming . impl . MetaprogrammingImpl . returnValue ( var ) ; } | org . junit . Assert . assertArrayEquals ( new int [ ] { 0 , 0 , 1 } , closed ) |
testEmptyJsonMap ( ) { java . lang . String emptyMap = "{}" ; java . util . Map < java . lang . String , java . lang . String > data = beanJsonConverter . convertToObject ( emptyMap , new com . google . inject . TypeLiteral < java . util . Map < java . lang . String , java . lang . String > > ( ) { } . getType ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( state . isEmpty ( ) ) || ( ( ( state . size ( ) ) == 1 ) && ( state . containsKey ( "t" ) ) ) ; } | org . junit . Assert . assertTrue ( data . isEmpty ( ) ) |
testIdenticalOutput ( ) { com . spinn3r . artemis . json . PrototypeFooEncoder prototypeFooEncoder = new com . spinn3r . artemis . json . PrototypeFooEncoder ( 50000 , 50000 ) ; java . nio . ByteBuffer byteBuffer0 = prototypeFooEncoder . encode ( foo ) ; com . spinn3r . artemis . util . io . FastByteArrayOutputStream fastByteArrayOutputStream = new com . spinn3r . artemis . util . io . FastByteArrayOutputStream ( 50000 ) ; com . spinn3r . artemis . json . JacksonFooEncoder jacksonFooEncoder = new com . spinn3r . artemis . json . JacksonFooEncoder ( fastByteArrayOutputStream ) ; java . nio . ByteBuffer byteBuffer1 = jacksonFooEncoder . encode ( foo ) ; "<AssertPlaceHolder>" ; } toString ( com . spinn3r . log5j . LogEvent ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . PrintWriter writer = new java . io . PrintWriter ( new java . io . OutputStreamWriter ( baos , com . spinn3r . log5j . LogUtils . UTF8 ) ) ; writer . append ( logEvent . level ( ) . name ( ) ) ; writer . append ( "<sp>[" ) ; writer . append ( new java . util . Date ( logEvent . time ( ) ) . toString ( ) ) ; writer . append ( "]:<sp>" ) ; writer . append ( logEvent . threadName ( ) ) ; writer . append ( "<sp>><sp>" ) ; writer . append ( logEvent . logName ( ) ) ; writer . append ( "<sp>-<sp>" ) ; writer . append ( logEvent . message ( ) ) ; if ( ( logEvent . throwable ( ) ) != null ) { writer . append ( '\n' ) ; com . spinn3r . tracepoint . Tracepoint tp = new com . spinn3r . tracepoint . Tracepoint ( logEvent . throwable ( ) ) ; writer . append ( tp . toString ( ) ) ; } writer . close ( ) ; return baos . toString ( ) ; } | org . junit . Assert . assertEquals ( toString ( byteBuffer0 ) , toString ( byteBuffer1 ) ) |
getUniqueId_whenIdExist_recallStoredId ( ) { java . lang . String expectedUniqueIdKey = "UniqueId" ; java . lang . String expectedUniqueId = "98765" ; when ( mockPreferences . getString ( eq ( expectedUniqueIdKey ) , anyString ( ) ) ) . thenReturn ( expectedUniqueId ) ; java . lang . String uniqueId = serviceToTest . getUniqueId ( mockPinpointContext ) ; "<AssertPlaceHolder>" ; } getUniqueId ( com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . core . AnalyticsContext ) { if ( ( ( context == null ) || ( ( context . getSystem ( ) ) == null ) ) || ( ( context . getSystem ( ) . getPreferences ( ) ) == null ) ) { android . util . Log . d ( com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . core . idresolver . SharedPrefsUniqueIdService . TAG , "Unable<sp>to<sp>generate<sp>unique<sp>id,<sp>context<sp>has<sp>not<sp>been<sp>fully<sp>initialized" ) ; return com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . core . idresolver . Id . getEmptyId ( ) ; } com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . core . idresolver . Id uniqueId = getIdFromPreferences ( context . getSystem ( ) . getPreferences ( ) ) ; if ( uniqueId == ( com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . core . idresolver . Id . getEmptyId ( ) ) ) { uniqueId = new com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . core . idresolver . Id ( java . util . UUID . randomUUID ( ) . toString ( ) ) ; storeUniqueId ( context . getSystem ( ) . getPreferences ( ) , uniqueId ) ; } return uniqueId ; } | org . junit . Assert . assertThat ( uniqueId , org . hamcrest . Matchers . is ( expectedUniqueId ) ) |
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; primaryKeys . add ( pk1 ) ; primaryKeys . add ( pk2 ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . Address > addresses = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; } | org . junit . Assert . assertTrue ( addresses . isEmpty ( ) ) |
multipleNamedExportTypes ( ) { org . milyn . Smooks smooks = new org . milyn . Smooks ( "/org/milyn/payload/exports-named.xml" ) ; smooks . createExecutionContext ( ) ; org . milyn . payload . Exports exports = org . milyn . payload . Exports . getExports ( smooks . getApplicationContext ( ) ) ; java . util . Collection < org . milyn . payload . Export > exportTypes = exports . getExports ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return daoRegisterMap . size ( ) ; } | org . junit . Assert . assertEquals ( 2 , exportTypes . size ( ) ) |
testContainingCategoriesCompatibleNonRegisteredType ( ) { com . twelvemonkeys . util . service . Iterator < java . lang . Class < ? > > categories = registry . containingCategories ( new com . twelvemonkeys . util . service . DummySPI ( ) { } ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return indexIter . hasNext ( ) ; } | org . junit . Assert . assertFalse ( categories . hasNext ( ) ) |
testVisitTotalProbeCount ( ) { counter . visitTotalProbeCount ( 42 ) ; "<AssertPlaceHolder>" ; } getCount ( ) { return count ; } | org . junit . Assert . assertEquals ( 42 , counter . getCount ( ) ) |
sublist_2 ( ) { final com . ericsson . otp . erlang . OtpErlangList r = ( ( com . ericsson . otp . erlang . OtpErlangList ) ( termParser . parse ( "[1,2,3|4]" ) ) ) ; final com . ericsson . otp . erlang . OtpErlangList s = ( ( com . ericsson . otp . erlang . OtpErlangList ) ( termParser . parse ( "[2,3|4]" ) ) ) ; final com . ericsson . otp . erlang . OtpErlangObject ss = r . getTail ( ) ; "<AssertPlaceHolder>" ; } getTail ( ) { return getNthTail ( 1 ) ; } | org . junit . Assert . assertEquals ( s , ss ) |
testGetAllProxies ( ) { java . util . List < com . ctrip . xpipe . redis . console . model . ProxyTbl > proxies = proxyDao . getAllProxyTbls ( ) ; java . util . Collections . sort ( proxies , new java . util . Comparator < com . ctrip . xpipe . redis . console . model . ProxyTbl > ( ) { @ com . ctrip . xpipe . redis . console . dao . Override public int compare ( com . ctrip . xpipe . redis . console . model . ProxyTbl o1 , com . ctrip . xpipe . redis . console . model . ProxyTbl o2 ) { return ( ( int ) ( ( o1 . getId ( ) ) - ( o2 . getId ( ) ) ) ) ; } } ) ; "<AssertPlaceHolder>" ; } size ( ) { try { return getFileChannel ( ) . size ( ) ; } catch ( java . io . FileNotFoundException e ) { throw new com . ctrip . xpipe . exception . XpipeRuntimeException ( java . lang . String . format ( "file<sp>not<sp>found:%s" , file ) , e ) ; } catch ( java . io . IOException e ) { logger . warn ( ( "error<sp>get<sp>file<sp>size,<sp>use<sp>file.length:" + ( file ) ) , e ) ; } if ( ! ( file . exists ( ) ) ) { throw new com . ctrip . xpipe . exception . XpipeRuntimeException ( java . lang . String . format ( "file<sp>not<sp>found:%s" , file ) ) ; } return file . length ( ) ; } | org . junit . Assert . assertEquals ( 2 , proxies . size ( ) ) |
shouldReturnDefaultTemplatePathPrefixIfNotConfiguredInSettings ( ) { when ( mockPippoSettings . getString ( anyString ( ) , anyString ( ) ) ) . then ( ( args ) -> args . getArgument ( 1 ) ) ; templateEngine . init ( mockApplication ) ; java . lang . String templatePathPrefix = templateEngine . getTemplatePathPrefix ( ) ; "<AssertPlaceHolder>" ; verify ( mockPippoSettings , times ( 1 ) ) . getString ( eq ( PippoConstants . SETTING_TEMPLATE_PATH_PREFIX ) , eq ( TemplateEngine . DEFAULT_PATH_PREFIX ) ) ; } init ( ro . pippo . core . Application ) { application . registerTemplateEngine ( ro . pippo . pebble . PebbleTemplateEngine . class ) ; } | org . junit . Assert . assertThat ( templatePathPrefix , org . hamcrest . core . Is . is ( TemplateEngine . DEFAULT_PATH_PREFIX ) ) |
testViewArticleDetail ( ) { com . ewcms . publication . service . ChannelPublishServiceable channelService = mock ( com . ewcms . publication . service . ChannelPublishServiceable . class ) ; com . ewcms . core . site . model . Channel channel = new com . ewcms . core . site . model . Channel ( ) ; com . ewcms . core . site . model . Site site = new com . ewcms . core . site . model . Site ( ) ; channel . setSite ( site ) ; when ( channelService . getChannel ( any ( com . ewcms . publication . freemarker . preview . Integer . class ) ) ) . thenReturn ( channel ) ; com . ewcms . publication . service . TemplatePublishServiceable templateService = mock ( com . ewcms . publication . service . TemplatePublishServiceable . class ) ; java . util . List < com . ewcms . core . site . model . Template > templates = new java . util . ArrayList < com . ewcms . core . site . model . Template > ( ) ; com . ewcms . core . site . model . Template template = initTemplate ( "index.html" ) ; template . setType ( TemplateType . DETAIL ) ; templates . add ( template ) ; when ( templateService . getTemplatesInChannel ( any ( com . ewcms . publication . freemarker . preview . Integer . class ) ) ) . thenReturn ( templates ) ; com . ewcms . publication . service . ArticlePublishServiceable articleService = mock ( com . ewcms . publication . service . ArticlePublishServiceable . class ) ; when ( articleService . getArticle ( any ( com . ewcms . publication . freemarker . preview . Long . class ) ) ) . thenReturn ( new com . ewcms . content . document . model . Article ( ) ) ; com . ewcms . publication . freemarker . preview . PreviewService service = new com . ewcms . publication . freemarker . preview . PreviewService ( cfg , articleService , channelService , templateService ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; service . viewArticle ( out , Integer . MAX_VALUE , Long . MAX_VALUE , 1 ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . size ; } | org . junit . Assert . assertTrue ( ( ( out . size ( ) ) > 0 ) ) |
upgradeEducationsToVrc3Test ( ) { javax . xml . bind . JAXBContext jaxbContext1 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . record . summary_rc3 . Educations . class ) ; javax . xml . bind . JAXBContext jaxbContext2 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . record . summary_rc3 . Educations . class ) ; javax . xml . bind . Unmarshaller jaxbUnmarshaller = jaxbContext1 . createUnmarshaller ( ) ; java . io . InputStream rc3Stream = org . orcid . record_2_0 . ConvertVrc3ToVrc4Test . class . getClassLoader ( ) . getResourceAsStream ( "test-educations-2.0_rc3.xml" ) ; java . io . InputStream rc4Stream = org . orcid . record_2_0 . ConvertVrc3ToVrc4Test . class . getClassLoader ( ) . getResourceAsStream ( "test-educations-2.0_rc4.xml" ) ; org . orcid . jaxb . model . record . summary_rc3 . Educations rc4Educations = ( ( org . orcid . jaxb . model . record . summary_rc3 . Educations ) ( jaxbUnmarshaller . unmarshal ( rc3Stream ) ) ) ; jaxbUnmarshaller = jaxbContext2 . createUnmarshaller ( ) ; org . orcid . jaxb . model . record . summary_rc4 . Educations rc4Educations1 = ( ( org . orcid . jaxb . model . record . summary_rc4 . Educations ) ( jaxbUnmarshaller . unmarshal ( rc4Stream ) ) ) ; org . orcid . core . version . V2Convertible result = versionConverterV2_0_rc3ToV2_0_rc4 . upgrade ( new org . orcid . core . version . V2Convertible ( rc4Educations , "v2_rc3" ) ) ; org . orcid . jaxb . model . record . summary_rc4 . Educations rc4Educations2 = ( ( org . orcid . jaxb . model . record . summary_rc4 . Educations ) ( result . getObjectToConvert ( ) ) ) ; "<AssertPlaceHolder>" ; } getObjectToConvert ( ) { return objectToConvert ; } | org . junit . Assert . assertEquals ( rc4Educations1 , rc4Educations2 ) |
header_unmappable_report ( ) { com . asakusafw . runtime . io . text . driver . RecordDefinition < java . lang . String [ ] > def = com . asakusafw . runtime . io . text . driver . RecordDefinition . builder ( java . lang . String [ ] . class ) . withHeaderType ( HeaderType . FORCE ) . withOnUnmappableOutput ( ErrorAction . REPORT ) . withField ( self ( ) , field ( "a" , 0 ) . build ( ) ) . withField ( self ( ) , field ( ErrorCode . CONFLICT_SEQUENCE . name ( ) , 1 ) . build ( ) ) . build ( ) ; java . lang . String [ ] [ ] results = emit ( def , new java . lang . String [ ] [ ] { new java . lang . String [ ] { "A" , "B" } } ) ; "<AssertPlaceHolder>" ; } name ( ) { start ( new com . asakusafw . utils . java . jsr269 . bridge . Callback ( ) { @ com . asakusafw . utils . java . jsr269 . bridge . Override protected void test ( ) { org . junit . Assert . assertThat ( target . convert ( elements . getName ( "something" ) ) , is ( com . asakusafw . utils . java . model . util . Models . toName ( f , "something" ) ) ) ; org . junit . Assert . assertThat ( target . convert ( elements . getName ( "com.example.jsr269" ) ) , is ( com . asakusafw . utils . java . model . util . Models . toName ( f , "com.example.jsr269" ) ) ) ; } } ) ; } | org . junit . Assert . assertThat ( results , is ( new java . lang . String [ ] [ ] { new java . lang . String [ ] { "a" , ErrorCode . CONFLICT_SEQUENCE . name ( ) } , new java . lang . String [ ] { "A" , "B" } } ) ) |
testGetRecordWriter ( ) { com . mongodb . DBCollection mockCollection = org . mockito . Mockito . mock ( com . mongodb . DBCollection . class ) ; org . apache . hadoop . security . UserGroupInformation ugi = org . mockito . Mockito . mock ( org . apache . hadoop . security . UserGroupInformation . class ) ; org . powermock . api . mockito . PowerMockito . mockStatic ( org . apache . hadoop . security . UserGroupInformation . class ) ; org . mockito . Mockito . when ( org . apache . hadoop . security . UserGroupInformation . getCurrentUser ( ) ) . thenReturn ( ugi ) ; org . apache . hadoop . mapreduce . TaskAttemptContext c = new org . slc . sli . aggregation . mapreduce . io . MockTaskAttemptContext ( ) ; org . apache . hadoop . conf . Configuration config = c . getConfiguration ( ) ; org . powermock . api . mockito . PowerMockito . mockStatic ( com . mongodb . hadoop . util . MongoConfigUtil . class ) ; org . mockito . Mockito . when ( com . mongodb . hadoop . util . MongoConfigUtil . getOutputCollection ( config ) ) . thenReturn ( mockCollection ) ; org . slc . sli . aggregation . mapreduce . io . MongoAggFormatter f = new org . slc . sli . aggregation . mapreduce . io . MongoAggFormatter ( ) ; "<AssertPlaceHolder>" ; } getRecordWriter ( org . apache . hadoop . mapreduce . TaskAttemptContext ) { org . apache . hadoop . conf . Configuration config = context . getConfiguration ( ) ; return new org . slc . sli . aggregation . mapreduce . io . MongoAggWriter ( com . mongodb . hadoop . util . MongoConfigUtil . getOutputCollection ( config ) , context ) ; } | org . junit . Assert . assertTrue ( ( ( f . getRecordWriter ( new org . slc . sli . aggregation . mapreduce . io . MockTaskAttemptContext ( ) ) ) instanceof org . slc . sli . aggregation . mapreduce . io . MongoAggWriter ) ) |
testThrowCheckedException ( ) { java . io . IOException expected = new java . io . IOException ( "EXPECTED<sp>ERROR" ) ; java . io . IOException actual = null ; try { org . slieb . throwables . DoubleBinaryOperatorWithThrowable . aDoubleBinaryOperatorThatUnsafelyThrowsUnchecked ( ( v1 , v2 ) -> { throw expected ; } ) . applyAsDouble ( 0 , 0 ) ; org . junit . Assert . fail ( "Exception<sp>should<sp>have<sp>been<sp>thrown" ) ; } catch ( java . io . IOException e ) { actual = e ; } "<AssertPlaceHolder>" ; } applyAsDouble ( T , U ) { try { return applyAsDoubleWithThrowable ( v1 , v2 ) ; } catch ( java . lang . RuntimeException | java . lang . Error exception ) { throw exception ; } catch ( final java . lang . Throwable throwable ) { throw new org . slieb . throwables . SuppressedException ( throwable ) ; } } | org . junit . Assert . assertEquals ( expected , actual ) |
overlapsEmpty1 ( ) { net . time4j . PlainDate startA = net . time4j . PlainDate . of ( 2014 , 5 , 13 ) ; net . time4j . PlainDate endA = net . time4j . PlainDate . of ( 2014 , 6 , 15 ) ; net . time4j . PlainDate startB = net . time4j . PlainDate . of ( 2014 , 6 , 15 ) ; net . time4j . range . DateInterval a = net . time4j . range . DateInterval . between ( startA , endA ) ; net . time4j . range . DateInterval b = net . time4j . range . DateInterval . since ( startB ) . collapse ( ) ; "<AssertPlaceHolder>" ; } overlaps ( I extends net . time4j . range . IsoInterval ) { if ( ( other . getStart ( ) . isInfinite ( ) ) || ( this . end . isInfinite ( ) ) ) { return false ; } T startA = this . getClosedFiniteStart ( ) ; T startB = other . getClosedFiniteStart ( ) ; if ( ( startA != null ) && ( ! ( startA . isBefore ( startB ) ) ) ) { return false ; } T endA = this . end . getTemporal ( ) ; T endB = other . getEnd ( ) . getTemporal ( ) ; if ( this . getFactory ( ) . isCalendrical ( ) ) { if ( this . end . isOpen ( ) ) { endA = this . getTimeLine ( ) . stepBackwards ( endA ) ; } if ( ( endA == null ) || ( endA . isBefore ( startB ) ) ) { return false ; } else if ( endB == null ) { return true ; } if ( other . getEnd ( ) . isOpen ( ) ) { endB = this . getTimeLine ( ) . stepBackwards ( endB ) ; } } else { if ( this . end . isClosed ( ) ) { endA = this . getTimeLine ( ) . stepForward ( endA ) ; if ( endA == null ) { return endB == null ; } } if ( ! ( endA . isAfter ( startB ) ) ) { return false ; } if ( other . getEnd ( ) . isClosed ( ) ) { endB = this . getTimeLine ( ) . stepForward ( endB ) ; } } return ( endB == null ) || ( endA . isBefore ( endB ) ) ; } | org . junit . Assert . assertThat ( a . overlaps ( b ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testGetSingleValue__no_result ( ) { org . sagebionetworks . repo . model . Annotations anno = new org . sagebionetworks . repo . model . Annotations ( ) ; java . lang . String result = ( ( java . lang . String ) ( anno . getSingleValue ( "key1" ) ) ) ; "<AssertPlaceHolder>" ; } getSingleValue ( java . lang . String ) { if ( ( this . stringAnnotations ) != null ) { java . util . List < java . lang . String > result = this . stringAnnotations . get ( key ) ; if ( ( result != null ) && ( ! ( result . isEmpty ( ) ) ) ) { return result . get ( 0 ) ; } } if ( ( this . dateAnnotations ) != null ) { java . util . List < java . util . Date > result = this . dateAnnotations . get ( key ) ; if ( ( result != null ) && ( ! ( result . isEmpty ( ) ) ) ) { return result . get ( 0 ) ; } } if ( ( this . longAnnotations ) != null ) { java . util . List < java . lang . Long > result = this . longAnnotations . get ( key ) ; if ( ( result != null ) && ( ! ( result . isEmpty ( ) ) ) ) { return result . get ( 0 ) ; } } if ( ( this . doubleAnnotations ) != null ) { java . util . List < java . lang . Double > result = this . doubleAnnotations . get ( key ) ; if ( ( result != null ) && ( ! ( result . isEmpty ( ) ) ) ) { return result . get ( 0 ) ; } } if ( ( this . blobAnnotations ) != null ) { java . util . List < byte [ ] > result = this . blobAnnotations . get ( key ) ; if ( ( result != null ) && ( ! ( result . isEmpty ( ) ) ) ) { return result . get ( 0 ) ; } } return null ; } | org . junit . Assert . assertNull ( result ) |
testTest ( ) { java . lang . String filename_cml = "data/mdl/9554-with-exp-hyd.mol" ; java . lang . String filename_mol = "data/mdl/9553-with-exp-hyd.mol" ; java . io . InputStream ins1 = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( filename_cml ) ; java . io . InputStream ins2 = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( filename_mol ) ; org . openscience . cdk . io . MDLV2000Reader reader1 = new org . openscience . cdk . io . MDLV2000Reader ( ins1 , org . openscience . cdk . io . IChemObjectReader . Mode . STRICT ) ; org . openscience . cdk . interfaces . IAtomContainer mol1 = reader1 . read ( new org . openscience . cdk . AtomContainer ( ) ) ; org . openscience . cdk . io . MDLV2000Reader reader2 = new org . openscience . cdk . io . MDLV2000Reader ( ins2 , org . openscience . cdk . io . IChemObjectReader . Mode . STRICT ) ; org . openscience . cdk . interfaces . IAtomContainer mol2 = reader2 . read ( new org . openscience . cdk . AtomContainer ( ) ) ; org . openscience . cdk . smiles . SmilesGenerator sg = org . openscience . cdk . smiles . SmilesGenerator . isomeric ( ) ; org . openscience . cdk . smiles . SmilesGeneratorTest . define ( mol1 , org . openscience . cdk . smiles . SmilesGeneratorTest . clockwise ( mol1 , 0 , 1 , 5 , 12 , 13 ) , org . openscience . cdk . smiles . SmilesGeneratorTest . clockwise ( mol1 , 1 , 0 , 2 , 6 , 12 ) , org . openscience . cdk . smiles . SmilesGeneratorTest . clockwise ( mol1 , 2 , 1 , 3 , 9 , 10 ) , org . openscience . cdk . smiles . SmilesGeneratorTest . clockwise ( mol1 , 5 , 0 , 4 , 11 , 18 ) ) ; org . openscience . cdk . smiles . SmilesGeneratorTest . define ( mol2 , org . openscience . cdk . smiles . SmilesGeneratorTest . clockwise ( mol2 , 0 , 1 , 5 , 12 , 13 ) , org . openscience . cdk . smiles . SmilesGeneratorTest . clockwise ( mol2 , 1 , 0 , 2 , 6 , 12 ) , org . openscience . cdk . smiles . SmilesGeneratorTest . anticlockwise ( mol2 , 2 , 1 , 3 , 9 , 10 ) , org . openscience . cdk . smiles . SmilesGeneratorTest . clockwise ( mol2 , 5 , 0 , 4 , 11 , 18 ) ) ; java . lang . String moleculeSmile1 = sg . create ( mol1 ) ; java . lang . String moleculeSmile2 = sg . create ( mol2 ) ; "<AssertPlaceHolder>" ; } not ( org . openscience . cdk . isomorphism . matchers . IQueryAtom ) { return new org . openscience . cdk . isomorphism . matchers . smarts . LogicalOperatorAtom . Negation ( expr . getBuilder ( ) , expr ) ; } | org . junit . Assert . assertThat ( moleculeSmile1 , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . not ( moleculeSmile2 ) ) ) |
testIconRelativePathService ( ) { if ( shouldSkipBundleTests ( ) ) return ; com . liferay . ide . project . core . model . NewLiferayPluginProjectOp newProjectOp = NewLiferayPluginProjectOp . TYPE . instantiate ( ) ; newProjectOp . setProjectName ( "test-path" ) ; newProjectOp . setPluginType ( PluginType . portlet ) ; newProjectOp . setIncludeSampleCode ( true ) ; newProjectOp . setPortletFramework ( "mvc" ) ; newProjectOp . setPortletName ( "testPortlet" ) ; final org . eclipse . core . resources . IProject testProject = createAntProject ( newProjectOp ) ; com . liferay . ide . portlet . core . lfportlet . model . LiferayPortletXml liferayPortletApp = op ( testProject ) ; for ( com . liferay . ide . portlet . core . lfportlet . model . LiferayPortlet liferayPortlet : liferayPortletApp . getPortlets ( ) ) { final org . eclipse . sapphire . services . RelativePathService pathService = liferayPortlet . getIcon ( ) . service ( org . eclipse . sapphire . services . RelativePathService . class ) ; java . util . List < org . eclipse . sapphire . modeling . Path > iconPaths = pathService . roots ( ) ; "<AssertPlaceHolder>" ; } } size ( ) { return getWidget ( ) . rowCount ( ) ; } | org . junit . Assert . assertEquals ( true , ( ( iconPaths . size ( ) ) > 0 ) ) |
testCanCacheAResponseWithoutABody ( ) { final org . apache . hc . core5 . http . ClassicHttpResponse response = new org . apache . hc . core5 . http . message . BasicClassicHttpResponse ( org . apache . hc . core5 . http . HttpStatus . SC_NO_CONTENT , "No<sp>Content" ) ; response . setHeader ( "Date" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( new java . util . Date ( ) ) ) ; response . setHeader ( "Cache-Control" , "max-age=300" ) ; final org . apache . hc . client5 . http . impl . cache . DummyBackend backend = new org . apache . hc . client5 . http . impl . cache . DummyBackend ( ) ; backend . setResponse ( response ) ; impl = createCachingExecChain ( new org . apache . hc . client5 . http . impl . cache . BasicHttpCache ( ) , CacheConfig . DEFAULT ) ; impl . execute ( request , new org . apache . hc . client5 . http . classic . ExecChain . Scope ( "test" , route , request , mockEndpoint , context ) , backend ) ; impl . execute ( request , new org . apache . hc . client5 . http . classic . ExecChain . Scope ( "test" , route , request , mockEndpoint , context ) , backend ) ; "<AssertPlaceHolder>" ; } getExecutions ( ) { return executions ; } | org . junit . Assert . assertEquals ( 1 , backend . getExecutions ( ) ) |
testAllColumnsWithBloomFilter ( ) { byte [ ] TABLE = org . apache . hadoop . hbase . util . Bytes . toBytes ( name . getMethodName ( ) ) ; byte [ ] FAMILY = org . apache . hadoop . hbase . util . Bytes . toBytes ( "family" ) ; org . apache . hadoop . hbase . HColumnDescriptor hcd = new org . apache . hadoop . hbase . HColumnDescriptor ( FAMILY ) . setMaxVersions ( Integer . MAX_VALUE ) . setBloomFilterType ( BloomType . ROWCOL ) ; org . apache . hadoop . hbase . HTableDescriptor htd = new org . apache . hadoop . hbase . HTableDescriptor ( org . apache . hadoop . hbase . TableName . valueOf ( TABLE ) ) ; htd . addFamily ( hcd ) ; org . apache . hadoop . hbase . HRegionInfo info = new org . apache . hadoop . hbase . HRegionInfo ( htd . getTableName ( ) , null , null , false ) ; this . region = org . apache . hadoop . hbase . regionserver . TestHRegion . TEST_UTIL . createLocalHRegion ( info , htd ) ; byte [ ] row = org . apache . hadoop . hbase . util . Bytes . toBytes ( ( "row:" + 0 ) ) ; byte [ ] column = org . apache . hadoop . hbase . util . Bytes . toBytes ( ( "column:" + 0 ) ) ; org . apache . hadoop . hbase . client . Put put = new org . apache . hadoop . hbase . client . Put ( row ) ; put . setDurability ( Durability . SKIP_WAL ) ; for ( long idx = 1 ; idx <= 4 ; idx ++ ) { put . addColumn ( FAMILY , column , idx , org . apache . hadoop . hbase . util . Bytes . toBytes ( ( "value-version-" + idx ) ) ) ; } region . put ( put ) ; region . flush ( true ) ; org . apache . hadoop . hbase . client . Get get = new org . apache . hadoop . hbase . client . Get ( row ) ; get . setMaxVersions ( ) ; org . apache . hadoop . hbase . Cell [ ] kvs = region . get ( get ) . rawCells ( ) ; "<AssertPlaceHolder>" ; checkOneCell ( kvs [ 0 ] , FAMILY , 0 , 0 , 4 ) ; checkOneCell ( kvs [ 1 ] , FAMILY , 0 , 0 , 3 ) ; checkOneCell ( kvs [ 2 ] , FAMILY , 0 , 0 , 2 ) ; checkOneCell ( kvs [ 3 ] , FAMILY , 0 , 0 , 1 ) ; } rawCells ( ) { return cells ; } | org . junit . Assert . assertEquals ( 4 , kvs . length ) |
testGetConnectionProperties ( ) { org . talend . components . marklogic . tmarklogicconnection . MarkLogicConnectionProperties connectionProperties = new org . talend . components . marklogic . tmarklogicconnection . MarkLogicConnectionProperties ( "connectionProperties" ) ; connectionProperties . init ( ) ; testInputProperties . init ( ) ; testInputProperties . connection . referencedComponent . setReference ( connectionProperties ) ; "<AssertPlaceHolder>" ; } getConnectionProperties ( ) { return connection . getEffectiveConnectionProperties ( ) ; } | org . junit . Assert . assertEquals ( connectionProperties , testInputProperties . getConnectionProperties ( ) ) |
testRemoveGenericResourceAllocation ( ) { org . libreplan . business . planner . entities . GenericResourceAllocation resourceAllocation = createValidGenericResourceAllocation ( ) ; resourceAllocationDAO . save ( resourceAllocation ) ; resourceAllocationDAO . remove ( resourceAllocation . getId ( ) ) ; "<AssertPlaceHolder>" ; } exists ( PK extends java . io . Serializable ) { return ( getSession ( ) . createCriteria ( entityClass ) . add ( org . hibernate . criterion . Restrictions . idEq ( id ) ) . setProjection ( org . hibernate . criterion . Projections . id ( ) ) . uniqueResult ( ) ) != null ; } | org . junit . Assert . assertFalse ( resourceAllocationDAO . exists ( resourceAllocation . getId ( ) ) ) |
verifyEmptyMatch ( ) { dakara . eclipse . plugin . stringscore . StringScore stringScore = new dakara . eclipse . plugin . stringscore . StringScore ( dakara . eclipse . plugin . stringscore . StringScoreRanking . standardContiguousSequenceRanking ( ) , dakara . eclipse . plugin . stringscore . StringScoreRanking . standardAcronymRanking ( ) , dakara . eclipse . plugin . stringscore . StringScoreRanking . standardNonContiguousSequenceRanking ( ) ) ; dakara . eclipse . plugin . stringscore . StringScore . Score score = stringScore . scoreAsContiguousSequence ( "" , "abc" ) ; "<AssertPlaceHolder>" ; } scoreAsContiguousSequence ( dakara . eclipse . plugin . stringscore . StringCursorPrimitive , dakara . eclipse . plugin . stringscore . StringCursorPrimitive ) { if ( ( match == null ) || ( ( match . length ( ) ) == 0 ) ) return dakara . eclipse . plugin . stringscore . StringScore . EMPTY_SCORE ; dakara . eclipse . plugin . stringscore . StringCursor targetCursor = new dakara . eclipse . plugin . stringscore . StringCursor ( target ) ; int rank = 0 ; while ( ! ( targetCursor . moveCursorForwardIndexOf ( match . asString ( ) ) . cursorPositionTerminal ( ) ) ) { rank = contiguousSequenceRankingProvider . apply ( match . asString ( ) , targetCursor ) ; if ( rank > 0 ) break ; targetCursor . moveCursorForward ( ) ; } if ( rank > 0 ) return new dakara . eclipse . plugin . stringscore . StringScore . Score ( rank , targetCursor . markFillRangeForward ( match . length ( ) ) . markers ( ) ) ; return dakara . eclipse . plugin . stringscore . StringScore . EMPTY_SCORE ; } | org . junit . Assert . assertEquals ( 0 , score . rank ) |
acceptTwoSuccess ( ) { java . lang . String script = "#<sp>Accept<sp>script\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "\taccept<sp>\'tcp://localhost:8080\'<sp>#commentagain\n" + "\t#comment<sp>#1\n" ) + "accepted\n" ) + "#comment<sp>#2\n" ) + "#comment<sp>#5\n" 0 ) + "#comment<sp>#3\n" ) + "close\n" ) + "#comment<sp>#4\n" ) + "closed\n" ) + "#comment<sp>#5\n" ) + "accepted\n" ) + "#comment<sp>#2\n" ) + "#comment<sp>#5\n" 0 ) + "#comment<sp>#3\n" ) + "close\n" ) + "#comment<sp>#4\n" ) + "closed\n" ) + "#comment<sp>#5\n" ) ; org . kaazing . k3po . lang . internal . parser . ScriptParser parser = new org . kaazing . k3po . lang . internal . parser . ScriptParserImpl ( ) ; org . kaazing . k3po . lang . internal . ast . AstScriptNode scriptAST = parser . parse ( new java . io . ByteArrayInputStream ( script . getBytes ( org . kaazing . k3po . driver . internal . behavior . UTF_8 ) ) ) ; org . kaazing . k3po . lang . internal . RegionInfo scriptInfo = scriptAST . getRegionInfo ( ) ; org . kaazing . k3po . driver . internal . behavior . ScriptProgress progress = new org . kaazing . k3po . driver . internal . behavior . ScriptProgress ( scriptInfo , script ) ; java . lang . String observedScript = progress . getObservedScript ( ) ; "<AssertPlaceHolder>" ; } getObservedScript ( ) { return ( progress ) != null ? progress . getObservedScript ( ) : null ; } | org . junit . Assert . assertEquals ( script , observedScript ) |
testGetTriggerStagesOk ( ) { "<AssertPlaceHolder>" ; } getTriggerStages ( ) { final java . lang . String value = this . properties . get ( org . sump . device . logicsniffer . profile . DeviceProfile . DEVICE_TRIGGER_STAGES ) ; return java . lang . Integer . parseInt ( value ) ; } | org . junit . Assert . assertEquals ( 0 , this . profile . getTriggerStages ( ) ) |
testSSLConnectionInvalidPassword ( ) { System . out . println ( "Running<sp>testSSLConnectionInvalidPassword" ) ; java . lang . String filename = "facebook-10443244874876159931" ; javax . net . ssl . TrustManager naiveTrustMgr = new javax . net . ssl . X509TrustManager ( ) { @ com . marklogic . client . functionaltest . Override public void checkClientTrusted ( java . security . cert . X509Certificate [ ] chain , java . lang . String authType ) { } @ com . marklogic . client . functionaltest . Override public void checkServerTrusted ( java . security . cert . X509Certificate [ ] chain , java . lang . String authType ) { } @ com . marklogic . client . functionaltest . Override public java . security . cert . X509Certificate [ ] getAcceptedIssuers ( ) { return new java . security . cert . X509Certificate [ 0 ] ; } } ; javax . net . ssl . SSLContext sslContext = javax . net . ssl . SSLContext . getInstance ( "SSLv3" ) ; sslContext . init ( null , new javax . net . ssl . TrustManager [ ] { naiveTrustMgr } , null ) ; com . marklogic . client . DatabaseClientFactory . SecurityContext secContext = new com . marklogic . client . DatabaseClientFactory . DigestAuthContext ( "rest-admin" , "foo" ) . withSSLContext ( sslContext , new javax . net . ssl . X509TrustManager ( ) { @ com . marklogic . client . functionaltest . Override public void checkClientTrusted ( java . security . cert . X509Certificate [ ] chain , java . lang . String authType ) throws java . security . cert . CertificateException { } @ com . marklogic . client . functionaltest . Override public void checkServerTrusted ( java . security . cert . X509Certificate [ ] chain , java . lang . String authType ) throws java . security . cert . CertificateException { } @ com . marklogic . client . functionaltest . Override public java . security . cert . X509Certificate [ ] getAcceptedIssuers ( ) { return null ; } } ) . withSSLHostnameVerifier ( SSLHostnameVerifier . ANY ) ; com . marklogic . client . DatabaseClient client = com . marklogic . client . DatabaseClientFactory . newClient ( com . marklogic . client . functionaltest . TestSSLConnection . appServerHostname , 8012 , secContext , getConnType ( ) ) ; java . lang . String expectedException = "FailedRequestException:<sp>Local<sp>message:<sp>write<sp>failed:<sp>Unauthorized" ; java . lang . String exception = "" ; try { writeDocumentUsingStringHandle ( client , filename , "/write-text-doc/" , "Text" ) ; } catch ( java . lang . Exception e ) { exception = e . toString ( ) ; } System . out . println ( ( "Actual<sp>exception:<sp>" + exception ) ) ; boolean isExceptionThrown = exception . contains ( expectedException ) ; "<AssertPlaceHolder>" ; client . release ( ) ; } toString ( ) { return "object<sp>value" ; } | org . junit . Assert . assertTrue ( "/write-text-doc/" 0 , isExceptionThrown ) |
shouldReturnTrueWhenTT1DoseIsGiven ( ) { boolean didRuleSucceed = rule . apply ( new org . ei . drishti . util . SafeMap ( ) . put ( "ttDose" , "tt1" ) ) ; "<AssertPlaceHolder>" ; } put ( java . lang . String , java . lang . String ) { data . put ( key , value ) ; return this ; } | org . junit . Assert . assertTrue ( didRuleSucceed ) |
testPromoteDoubleAndBigIntegerResultsInBigDecimalType ( ) { "<AssertPlaceHolder>" ; } promote ( com . redhat . lightblue . metadata . Type , com . redhat . lightblue . metadata . Type ) { if ( ( ( operand1 instanceof com . redhat . lightblue . metadata . types . BigIntegerType ) && ( operand2 instanceof com . redhat . lightblue . metadata . types . DoubleType ) ) || ( ( operand1 instanceof com . redhat . lightblue . metadata . types . DoubleType ) && ( operand2 instanceof com . redhat . lightblue . metadata . types . BigIntegerType ) ) ) { return BigDecimalType . TYPE ; } else { int o1 = com . redhat . lightblue . metadata . types . Arith . arithType ( operand1 ) ; int o2 = com . redhat . lightblue . metadata . types . Arith . arithType ( operand2 ) ; return com . redhat . lightblue . metadata . types . Arith . arithType ( java . lang . Math . max ( o1 , o2 ) ) ; } } | org . junit . Assert . assertEquals ( BigDecimalType . TYPE , com . redhat . lightblue . metadata . types . Arith . promote ( DoubleType . TYPE , BigIntegerType . TYPE ) ) |
check_if_file_is_hidden_nio ( ) { boolean isHidden = java . nio . file . Files . isHidden ( source ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertFalse ( isHidden ) |
testStepDuplicateInputLowerCase ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/duplicate/duplicate_step_input_lowercase.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . SlangSource . fromFile ( resource ) ) ; "<AssertPlaceHolder>" ; exception . expect ( io . cloudslang . lang . compiler . RuntimeException . class ) ; exception . expectMessage ( "For<sp>step<sp>'step1'<sp>syntax<sp>is<sp>illegal." ) ; exception . expectMessage ( "Duplicate<sp>step<sp>input<sp>found:<sp>city" ) ; throw result . getErrors ( ) . get ( 0 ) ; } getErrors ( ) { return errors ; } | org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) ) |
testExtractDataUris ( ) { initializeExpectedTable ( 2 ) ; expect ( bigquery . getOptions ( ) ) . andReturn ( mockOptions ) ; com . google . cloud . bigquery . Job expectedJob = new com . google . cloud . bigquery . Job ( serviceMockReturnsOptions , new com . google . cloud . bigquery . JobInfo . BuilderImpl ( com . google . cloud . bigquery . TableTest . EXTRACT_JOB_INFO ) ) ; expect ( bigquery . create ( com . google . cloud . bigquery . TableTest . EXTRACT_JOB_INFO ) ) . andReturn ( expectedJob ) ; replay ( bigquery ) ; initializeTable ( ) ; com . google . cloud . bigquery . Job job = table . extract ( "CSV" , com . google . common . collect . ImmutableList . of ( "URI" ) ) ; "<AssertPlaceHolder>" ; } of ( java . lang . String ) { return com . google . cloud . oslogin . common . UserName . newBuilder ( ) . setUser ( user ) . build ( ) ; } | org . junit . Assert . assertSame ( expectedJob , job ) |
updateKnownLengthDoesNothing ( ) { mInfo . updateLength ( ( 2 * ( alluxio . Constants . KB ) ) ) ; "<AssertPlaceHolder>" ; } getLength ( ) { return 0 ; } | org . junit . Assert . assertEquals ( Constants . KB , mInfo . getLength ( ) ) |
getCurrentSiteTitle ( ) { "<AssertPlaceHolder>" ; } getCurrentSiteTitle ( ) { org . junit . Assert . assertEquals ( org . sakaiproject . mailsender . logic . impl . ExternalLogicImplTest . LOCATION_TITLE , impl . getCurrentSiteTitle ( ) ) ; } | org . junit . Assert . assertEquals ( org . sakaiproject . mailsender . logic . impl . ExternalLogicImplTest . LOCATION_TITLE , impl . getCurrentSiteTitle ( ) ) |
testOutputPrefix_Default ( ) { org . sejda . model . parameter . DecryptParameters parameters = defaultCommandLine ( ) . invokeSejdaConsole ( ) ; "<AssertPlaceHolder>" ; } getOutputPrefix ( ) { return outputPrefix ; } | org . junit . Assert . assertEquals ( "" , parameters . getOutputPrefix ( ) ) |
testScript_UnVard_Scoped ( ) { final java . lang . String cfcSrc = "<cfcomponent>\r\n" + ( ( ( ( ( "<cffunction<sp>name=\"test\">\r\n" + "\t<cfscript>\r\n" ) + "<sp>cfevent.yy<sp>=<sp>123;\r\n" ) + "\t</cfscript>\r\n" ) + "</cffunction>\r\n" ) + "</cfcomponent>" ) ; com . cflint . api . CFLintResult lintresult = cfBugs . scan ( cfcSrc , "test" ) ; "<AssertPlaceHolder>" ; } getIssues ( ) { return cflint . getBugs ( ) . getBugList ( ) ; } | org . junit . Assert . assertEquals ( 1 , lintresult . getIssues ( ) . size ( ) ) |
testNonTokenDirective ( ) { java . lang . String header = "Digest<sp>user{name=\"test\"" ; java . io . StringReader input = new java . io . StringReader ( header ) ; java . util . Map < java . lang . String , java . lang . String > result = org . apache . tomcat . util . http . parser . HttpParser . parseAuthorizationDigest ( input ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNull ( result ) |
testCall ( ) { java . net . URLClassLoader customerClassLoader = new java . net . URLClassLoader ( new java . net . URL [ ] { } ) ; java . lang . ClassLoader saveCcl = java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) ; java . lang . Thread . currentThread ( ) . setContextClassLoader ( customerClassLoader ) ; try { org . apache . phoenix . util . PhoenixContextExecutor . callWithoutPropagation ( new java . util . concurrent . Callable < java . lang . Object > ( ) { @ org . apache . phoenix . util . Override public java . lang . Object call ( ) { "<AssertPlaceHolder>" ; return null ; } } ) ; } finally { java . lang . Thread . currentThread ( ) . setContextClassLoader ( saveCcl ) ; } } call ( ) { org . junit . Assert . assertEquals ( org . apache . phoenix . util . PhoenixContextExecutor . class . getClassLoader ( ) , java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) ) ; return null ; } | org . junit . Assert . assertEquals ( org . apache . phoenix . util . PhoenixContextExecutor . class . getClassLoader ( ) , java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) ) |
test_createPomCreator_nullAssemblyFile ( ) { java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; parameters . put ( IBuildPomCreatorParameters . PROCESSOR , new org . talend . designer . core . build . TestProcessor ( ) ) ; org . talend . core . runtime . process . ITalendProcessJavaProject talendProcessJavaProject = org . talend . repository . RepositoryPlugin . getDefault ( ) . getRunProcessService ( ) . getTempJavaProject ( ) ; parameters . put ( IBuildPomCreatorParameters . FILE_POM , talendProcessJavaProject . getProject ( ) . getFile ( "pom_abc.xml" ) ) ; parameters . put ( IBuildParametes . ITEM , PropertiesFactory . eINSTANCE . createProcessItem ( ) ) ; org . talend . core . runtime . repository . build . RepositoryObjectTypeBuildProvider provider = createTestBuildProvider ( ) ; "<AssertPlaceHolder>" ; } createPomCreator ( java . util . Map ) { if ( ( parameters == null ) || ( parameters . isEmpty ( ) ) ) { return null ; } final java . lang . Object processor = parameters . get ( org . talend . designer . core . build . PROCESSOR ) ; if ( ( processor == null ) || ( ! ( processor instanceof org . talend . designer . runprocess . IProcessor ) ) ) { return null ; } final java . lang . Object pomFile = parameters . get ( org . talend . designer . core . build . FILE_POM ) ; if ( ( pomFile == null ) || ( ! ( pomFile instanceof org . eclipse . core . resources . IFile ) ) ) { return null ; } final java . lang . Object item = parameters . get ( org . talend . designer . core . build . ITEM ) ; if ( ( item == null ) || ( ! ( item instanceof org . talend . core . model . properties . Item ) ) ) { return null ; } java . lang . Object argumentsMap = parameters . get ( org . talend . designer . core . build . ARGUMENTS_MAP ) ; if ( argumentsMap == null ) { argumentsMap = java . util . Collections . emptyMap ( ) ; } if ( ! ( argumentsMap instanceof java . util . Map ) ) { return null ; } java . lang . Object overwrite = parameters . get ( org . talend . designer . core . build . OVERWRITE_POM ) ; if ( overwrite == null ) { overwrite = Boolean . FALSE ; } java . lang . Object assemblyFile = parameters . get ( org . talend . designer . core . build . FILE_ASSEMBLY ) ; org . talend . designer . maven . tools . creator . CreateMavenStandardJobOSGiPom osgiPomCreator = new org . talend . designer . maven . tools . creator . CreateMavenStandardJobOSGiPom ( ( ( org . talend . designer . runprocess . IProcessor ) ( processor ) ) , ( ( org . eclipse . core . resources . IFile ) ( pomFile ) ) ) ; osgiPomCreator . setArgumentsMap ( ( ( java . util . Map < java . lang . String , java . lang . Object > ) ( argumentsMap ) ) ) ; osgiPomCreator . setOverwrite ( java . lang . Boolean . parseBoolean ( overwrite . toString ( ) ) ) ; osgiPomCreator . setAssemblyFile ( ( ( org . eclipse . core . resources . IFile ) ( assemblyFile ) ) ) ; final org . talend . core . model . properties . Property itemProperty = ( ( org . talend . core . model . properties . Item ) ( item ) ) . getProperty ( ) ; org . eclipse . core . runtime . IPath itemLocationPath = org . talend . core . repository . utils . ItemResourceUtil . getItemLocationPath ( itemProperty ) ; org . eclipse . core . resources . IFolder objectTypeFolder = org . talend . core . repository . utils . ItemResourceUtil . getObjectTypeFolder ( itemProperty ) ; if ( ( itemLocationPath != null ) && ( objectTypeFolder != null ) ) { org . eclipse . core . runtime . IPath itemRelativePath = itemLocationPath . removeLastSegments ( 1 ) . makeRelativeTo ( objectTypeFolder . getLocation ( ) ) ; osgiPomCreator . setObjectTypeFolder ( objectTypeFolder ) ; osgiPomCreator . setItemRelativePath ( itemRelativePath ) ; } return osgiPomCreator ; } | org . junit . Assert . assertNull ( provider . createPomCreator ( parameters ) ) |
findByName ( ) { permissionService . createRole ( new io . lavagna . service . Role ( "TEST-DERP-DERP" ) ) ; "<AssertPlaceHolder>" ; } findRoleByName ( java . lang . String ) { return queries . findRoleByName ( name ) ; } | org . junit . Assert . assertNotNull ( permissionService . findRoleByName ( "TEST-DERP-DERP" ) ) |
replaceEmptyDocumentTest ( ) { org . apache . cxf . ws . transfer . manager . ResourceManager resourceManager = new org . apache . cxf . ws . transfer . manager . MemoryResourceManager ( ) ; org . apache . cxf . ws . addressing . ReferenceParametersType refParams = resourceManager . create ( new org . apache . cxf . ws . transfer . Representation ( ) ) ; org . apache . cxf . endpoint . Server resource = createLocalResource ( resourceManager ) ; org . apache . cxf . ws . transfer . resource . Resource client = createClient ( refParams ) ; org . apache . cxf . ws . transfer . Put request = new org . apache . cxf . ws . transfer . Put ( ) ; request . setDialect ( FragmentDialectConstants . FRAGMENT_2011_03_IRI ) ; org . apache . cxf . ws . transfer . dialect . fragment . Fragment fragment = new org . apache . cxf . ws . transfer . dialect . fragment . Fragment ( ) ; org . apache . cxf . ws . transfer . dialect . fragment . ExpressionType expression = new org . apache . cxf . ws . transfer . dialect . fragment . ExpressionType ( ) ; expression . setLanguage ( FragmentDialectConstants . XPATH10_LANGUAGE_IRI ) ; expression . getContent ( ) . add ( "/" ) ; org . w3c . dom . Element replacedElement = org . apache . cxf . helpers . DOMUtils . getEmptyDocument ( ) . createElement ( "a" ) ; org . apache . cxf . ws . transfer . dialect . fragment . ValueType value = new org . apache . cxf . ws . transfer . dialect . fragment . ValueType ( ) ; value . getContent ( ) . add ( replacedElement ) ; fragment . setExpression ( expression ) ; fragment . setValue ( value ) ; request . getAny ( ) . add ( fragment ) ; org . apache . cxf . ws . transfer . PutResponse response = client . put ( request ) ; org . w3c . dom . Element rootEl = ( ( org . w3c . dom . Element ) ( response . getRepresentation ( ) . getAny ( ) ) ) ; "<AssertPlaceHolder>" ; resource . destroy ( ) ; } getNodeName ( ) { return null ; } | org . junit . Assert . assertEquals ( "a" , rootEl . getNodeName ( ) ) |
testFindAll ( ) { java . util . List < com . github . emailtohl . building . site . entities . user . Customer > ls = customerRepository . findAll ( ) ; "<AssertPlaceHolder>" ; } findAll ( ) { return customRepository . findAll ( ) ; } | org . junit . Assert . assertFalse ( ls . isEmpty ( ) ) |
testSetAndGetLastObjects ( ) { java . lang . Object [ ] record = new java . lang . Object [ ] { "String" , 1 , 10L , 1.1 } ; listener . recordProvided ( Operation . INSERT , record ) ; "<AssertPlaceHolder>" ; } getLastRecord ( ) { return lastRecord ; } | org . junit . Assert . assertArrayEquals ( record , listener . getLastRecord ( ) ) |
shouldUpdateSegmentFileNameFromOldColonFormatToNewFormat ( ) { final java . lang . String storeDirectoryPath = ( ( stateDirectory . getAbsolutePath ( ) ) + ( java . io . File . separator ) ) + ( storeName ) ; final java . io . File storeDirectory = new java . io . File ( storeDirectoryPath ) ; storeDirectory . mkdirs ( ) ; for ( int segmentId = 0 ; segmentId < ( org . apache . kafka . streams . state . internals . TimetampedSegmentsTest . NUM_SEGMENTS ) ; ++ segmentId ) { final java . io . File oldSegment = new java . io . File ( ( ( ( ( storeDirectoryPath + ( java . io . File . separator ) ) + ( storeName ) ) + ":" ) + ( segmentId * ( ( org . apache . kafka . streams . state . internals . TimetampedSegmentsTest . RETENTION_PERIOD ) / ( ( org . apache . kafka . streams . state . internals . TimetampedSegmentsTest . NUM_SEGMENTS ) - 1 ) ) ) ) ) ; oldSegment . createNewFile ( ) ; } segments . openExisting ( context , ( - 1L ) ) ; for ( int segmentId = 0 ; segmentId < ( org . apache . kafka . streams . state . internals . TimetampedSegmentsTest . NUM_SEGMENTS ) ; ++ segmentId ) { final java . io . File newSegment = new java . io . File ( ( ( ( ( storeDirectoryPath + ( java . io . File . separator ) ) + ( storeName ) ) + "." ) + ( segmentId * ( ( org . apache . kafka . streams . state . internals . TimetampedSegmentsTest . RETENTION_PERIOD ) / ( ( org . apache . kafka . streams . state . internals . TimetampedSegmentsTest . NUM_SEGMENTS ) - 1 ) ) ) ) ) ; "<AssertPlaceHolder>" ; } } openExisting ( org . apache . kafka . streams . processor . internals . InternalProcessorContext , long ) { try { final java . io . File dir = new java . io . File ( context . stateDir ( ) , name ) ; if ( dir . exists ( ) ) { final java . lang . String [ ] list = dir . list ( ) ; if ( list != null ) { final long [ ] segmentIds = new long [ list . length ] ; for ( int i = 0 ; i < ( list . length ) ; i ++ ) { segmentIds [ i ] = segmentIdFromSegmentName ( list [ i ] , dir ) ; } java . util . Arrays . sort ( segmentIds ) ; for ( final long segmentId : segmentIds ) { if ( segmentId >= 0 ) { getOrCreateSegment ( segmentId , context ) ; } } } } else { if ( ! ( dir . mkdir ( ) ) ) { throw new org . apache . kafka . streams . errors . ProcessorStateException ( java . lang . String . format ( "dir<sp>%s<sp>doesn't<sp>exist<sp>and<sp>cannot<sp>be<sp>created<sp>for<sp>segments<sp>%s" , dir , name ) ) ; } } } catch ( final java . lang . Exception ex ) { } final long minLiveSegment = segmentId ( ( streamTime - ( retentionPeriod ) ) ) ; cleanupEarlierThan ( minLiveSegment ) ; } | org . junit . Assert . assertTrue ( newSegment . exists ( ) ) |
stateMachineTraits0117Test ( ) { cruise . umple . compiler . UmpleModel model = getModelByFilename ( "trait_test_data_0074.ump" ) ; boolean result = false ; try { model . run ( ) ; } catch ( java . lang . Exception e ) { result = e . getMessage ( ) . contains ( "67" ) ; } finally { "<AssertPlaceHolder>" ; cruise . umple . util . SampleFileWriter . destroy ( "traitTest.ump" ) ; } } contains ( java . lang . Object ) { if ( ( parent ) != null ) { return ( super . contains ( obj ) ) || ( parent . contains ( obj ) ) ; } else { return super . contains ( obj ) ; } } | org . junit . Assert . assertFalse ( result ) |
testOpDuplicateOutputIgnoreCase ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/duplicate/duplicate_op_output_ignore_case.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . SlangSource . fromFile ( resource ) ) ; "<AssertPlaceHolder>" ; exception . expect ( io . cloudslang . lang . compiler . RuntimeException . class ) ; exception . expectMessage ( "For<sp>operation<sp>'duplicate_op_output_ignore_case'<sp>syntax<sp>is<sp>illegal." ) ; exception . expectMessage ( "Duplicate<sp>output<sp>/<sp>publish<sp>value<sp>found:<sp>City" ) ; throw result . getErrors ( ) . get ( 0 ) ; } getErrors ( ) { return errors ; } | org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) ) |
profile ( ) { org . jboss . hal . dmr . ResourceAddress input = new org . jboss . hal . dmr . ResourceAddress ( ) . add ( "profile" , "full" ) ; org . jboss . hal . dmr . ResourceAddress expected = new org . jboss . hal . dmr . ResourceAddress ( ) . add ( "profile" , "*" ) ; org . jboss . hal . dmr . ResourceAddress result = processor . apply ( input ) ; "<AssertPlaceHolder>" ; } apply ( org . jboss . hal . meta . AddressTemplate ) { org . jboss . hal . meta . AddressTemplate modified = org . jboss . hal . meta . AddressTemplate . ROOT ; if ( ( template != null ) && ( ! ( AddressTemplate . ROOT . equals ( template ) ) ) ) { java . util . List < java . lang . String [ ] > segments = stream ( template . spliterator ( ) , false ) . map ( ( segment ) -> { if ( segment . contains ( "=" ) ) { return com . google . common . base . Splitter . on ( '=' ) . omitEmptyStrings ( ) . trimResults ( ) . limit ( 2 ) . splitToList ( segment ) . toArray ( new java . lang . String [ 2 ] ) ; } return new java . lang . String [ ] { segment , null } ; } ) . collect ( toList ( ) ) ; java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; org . jboss . hal . meta . description . SegmentProcessor . process ( segments , ( segment ) -> { builder . append ( "/" ) . append ( segment [ 0 ] ) ; if ( ( segment [ 1 ] ) != null ) { builder . append ( "=" ) . append ( segment [ 1 ] ) ; } } ) ; modified = org . jboss . hal . meta . AddressTemplate . of ( builder . toString ( ) ) ; } org . jboss . hal . meta . description . ResourceDescriptionTemplateProcessor . logger . debug ( "{}<sp>-><sp>{}" , template , modified ) ; return modified ; } | org . junit . Assert . assertEquals ( expected , result ) |
testAcceptInvalidType ( ) { com . thinkbiganalytics . policy . standardization . UppercaseStandardizer standardizer = com . thinkbiganalytics . policy . standardization . UppercaseStandardizer . instance ( ) ; java . lang . Double doubleValue = 1000.05 ; "<AssertPlaceHolder>" ; } accepts ( com . thinkbiganalytics . cluster . ClusterMessage ) { boolean accept = false ; try { QuartzClusterMessage . QUARTZ_CLUSTER_MESSAGE_TYPE . valueOf ( msg . getType ( ) ) ; accept = true ; } catch ( java . lang . IllegalArgumentException e ) { } return accept ; } | org . junit . Assert . assertFalse ( standardizer . accepts ( doubleValue ) ) |
testGetIndicesForColumn ( ) { com . bah . culvert . mock . MockIndex ix1 = new com . bah . culvert . mock . MockIndex ( "foo" , 0 , true , "a" . getBytes ( ) , "b" . getBytes ( ) , "c" , "d" ) ; com . bah . culvert . mock . MockIndex ix2 = new com . bah . culvert . mock . MockIndex ( "bar" , 0 , true , "e" . getBytes ( ) , "f" . getBytes ( ) , "g" , "h" ) ; org . apache . hadoop . conf . Configuration conf = com . bah . culvert . configuration . CConfiguration . getDefault ( ) ; com . bah . culvert . Client client = new com . bah . culvert . Client ( conf ) ; client . addIndex ( ix1 ) ; client . addIndex ( ix2 ) ; "<AssertPlaceHolder>" ; } getIndicesForColumn ( java . lang . String , byte [ ] , byte [ ] ) { com . bah . culvert . data . index . Index [ ] indices = getIndices ( ) ; java . util . List < com . bah . culvert . data . index . Index > indicesForColumn = new java . util . ArrayList < com . bah . culvert . data . index . Index > ( ) ; for ( com . bah . culvert . data . index . Index index : indices ) { if ( table . equals ( index . getPrimaryTableName ( ) ) ) { if ( ( LexicographicBytesComparator . INSTANCE . compare ( family , index . getColumnFamily ( ) ) ) == 0 ) { if ( ( LexicographicBytesComparator . INSTANCE . compare ( qualifier , index . getColumnQualifier ( ) ) ) == 0 ) { indicesForColumn . add ( index ) ; } } } } return indicesForColumn . toArray ( new com . bah . culvert . data . index . Index [ indicesForColumn . size ( ) ] ) ; } | org . junit . Assert . assertNotNull ( client . getIndicesForColumn ( "c" , "a" . getBytes ( ) , "b" . getBytes ( ) ) ) |
testSave ( ) { java . util . List < com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . NumberAttributeClass > objs = new java . util . ArrayList < com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . NumberAttributeClass > ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . NumberAttributeClass obj = getUniqueObject ( ) ; objs . add ( obj ) ; } com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapper util = new com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . DynamoDBMapper ( dynamo ) ; for ( com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . NumberAttributeClass obj : objs ) { util . save ( obj ) ; } for ( com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . NumberAttributeClass obj : objs ) { com . amazonaws . mobileconnectors . dynamodbv2 . dynamodbmapper . NumberAttributeClass loaded = util . load ( obj ) ; loaded . setIgnored ( obj . getIgnored ( ) ) ; "<AssertPlaceHolder>" ; } } load ( T ) { return load ( keyObject , this . config ) ; } | org . junit . Assert . assertEquals ( obj , loaded ) |
testSave ( ) { net . runelite . cache . script . Instructions instructions = new net . runelite . cache . script . Instructions ( ) ; instructions . init ( ) ; net . runelite . cache . definitions . ScriptDefinition script = new net . runelite . cache . script . assembler . Assembler ( instructions ) . assemble ( getClass ( ) . getResourceAsStream ( net . runelite . cache . definitions . savers . ScriptSaverTest . SCRIPT_RESOURCE ) ) ; byte [ ] saved = new net . runelite . cache . definitions . savers . ScriptSaver ( ) . save ( script ) ; net . runelite . cache . definitions . ScriptDefinition loadedScripot = new net . runelite . cache . definitions . loaders . ScriptLoader ( ) . load ( 91 , saved ) ; "<AssertPlaceHolder>" ; } load ( int , byte [ ] ) { net . runelite . cache . definitions . ItemDefinition def = new net . runelite . cache . definitions . ItemDefinition ( id ) ; net . runelite . cache . io . InputStream is = new net . runelite . cache . io . InputStream ( b ) ; while ( true ) { int opcode = is . readUnsignedByte ( ) ; if ( opcode == 0 ) { break ; } this . decodeValues ( opcode , def , is ) ; } return def ; } | org . junit . Assert . assertEquals ( script , loadedScripot ) |
shouldAddPropertiesBuilder ( ) { java . util . Properties expected = new java . util . Properties ( ) ; expected . setProperty ( "Key-1" , "Value-1" ) ; expected . setProperty ( "Key-2" , "Value-2" ) ; com . oracle . bedrock . runtime . PropertiesBuilder parent = new com . oracle . bedrock . runtime . PropertiesBuilder ( expected ) ; com . oracle . bedrock . runtime . PropertiesBuilder builder = new com . oracle . bedrock . runtime . PropertiesBuilder ( ) ; builder . addProperties ( parent ) ; java . util . Properties properties = builder . realize ( ) ; "<AssertPlaceHolder>" ; } is ( T ) { return new com . oracle . bedrock . predicate . Is < T > ( new com . oracle . bedrock . predicate . EqualTo < T > ( value ) ) ; } | org . junit . Assert . assertThat ( properties , org . hamcrest . CoreMatchers . is ( expected ) ) |
testRetryCancel ( ) { com . ctrip . xpipe . command . TestCommand command = new com . ctrip . xpipe . command . TestCommand ( new java . lang . Exception ( "just<sp>throw" ) ) ; com . ctrip . xpipe . command . CommandRetryWrapper < java . lang . String > wrapper = ( ( com . ctrip . xpipe . command . CommandRetryWrapper < java . lang . String > ) ( com . ctrip . xpipe . command . CommandRetryWrapper . buildCountRetry ( retryCount , new com . ctrip . xpipe . retry . RetryDelay ( sleepBase ) , command , scheduled ) ) ) ; final com . ctrip . xpipe . api . command . CommandFuture < java . lang . String > future = wrapper . execute ( ) ; new java . lang . Thread ( new java . lang . Runnable ( ) { @ com . ctrip . xpipe . command . Override public void run ( ) { sleep ( sleepBase ) ; future . cancel ( true ) ; } } ) . start ( ) ; try { future . get ( ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { } "<AssertPlaceHolder>" ; } getExecuteCount ( ) { return executeCount . get ( ) ; } | org . junit . Assert . assertTrue ( ( ( wrapper . getExecuteCount ( ) ) < ( ( retryCount ) + 1 ) ) ) |
testFindAccessContract ( ) { fr . gouv . vitam . common . thread . VitamThreadUtils . getVitamSession ( ) . setTenantId ( fr . gouv . vitam . functional . administration . common . server . MongoDbAccessAdminImplTest . TENANT_ID ) ; final fr . gouv . vitam . functional . administration . common . server . FunctionalAdminCollections contractCollection = FunctionalAdminCollections . ACCESS_CONTRACT ; final java . lang . String id = fr . gouv . vitam . common . guid . GUIDFactory . newIngestContractGUID ( fr . gouv . vitam . functional . administration . common . server . MongoDbAccessAdminImplTest . TENANT_ID ) . getId ( ) ; fr . gouv . vitam . functional . administration . common . server . MongoDbAccessAdminImplTest . accessContract . setId ( id ) ; final com . fasterxml . jackson . databind . JsonNode jsonContract = fr . gouv . vitam . common . json . JsonHandler . toJsonNode ( fr . gouv . vitam . functional . administration . common . server . MongoDbAccessAdminImplTest . accessContract ) ; final com . fasterxml . jackson . databind . node . ArrayNode arrayNode = fr . gouv . vitam . common . json . JsonHandler . createArrayNode ( ) ; com . fasterxml . jackson . databind . node . ObjectNode contractToPersist = fr . gouv . vitam . common . json . JsonHandler . getFromJsonNode ( jsonContract , com . fasterxml . jackson . databind . node . ObjectNode . class ) ; contractToPersist . put ( "Identifier" , ( "Identifier" + ( fr . gouv . vitam . common . guid . GUIDFactory . newGUID ( ) . toString ( ) ) ) ) ; contractToPersist . put ( "AccessLog" , ActivationStatus . INACTIVE . toString ( ) ) ; contractToPersist . put ( "EveryOriginatingAgency" , false ) ; contractToPersist . put ( "WritingPermission" , false ) ; contractToPersist . put ( "EveryDataObjectVersion" , false ) ; arrayNode . add ( fr . gouv . vitam . common . json . JsonHandler . toJsonNode ( contractToPersist ) ) ; fr . gouv . vitam . functional . administration . common . server . MongoDbAccessAdminImplTest . mongoAccess . insertDocuments ( arrayNode , contractCollection ) . close ( ) ; final fr . gouv . vitam . common . database . builder . request . single . Select select = new fr . gouv . vitam . common . database . builder . request . single . Select ( ) ; select . setQuery ( and ( ) . add ( eq ( AccessContract . NAME , "aName" ) ) . add ( or ( ) . add ( eq ( AccessContract . CREATIONDATE , fr . gouv . vitam . functional . administration . common . server . MongoDbAccessAdminImplTest . DEFAULT_DATE ) ) ) ) ; final fr . gouv . vitam . common . database . server . DbRequestResult contracts = fr . gouv . vitam . functional . administration . common . server . MongoDbAccessAdminImplTest . mongoAccess . findDocuments ( select . getFinalSelect ( ) , contractCollection ) ; final fr . gouv . vitam . functional . administration . common . AccessContract foundContract = ( ( fr . gouv . vitam . functional . administration . common . AccessContract ) ( contracts . getDocuments ( fr . gouv . vitam . functional . administration . common . AccessContract . class ) . get ( 0 ) ) ) ; contracts . close ( ) ; "<AssertPlaceHolder>" ; fr . gouv . vitam . functional . administration . common . server . MongoDbAccessAdminImplTest . mongoAccess . deleteCollection ( contractCollection ) . close ( ) ; } getString ( java . lang . String ) { return fr . gouv . vitam . common . i18n . PluginPropertiesLoader . resourceMap . get ( message ) ; } | org . junit . Assert . assertEquals ( "aName" , foundContract . getString ( AccessContract . NAME ) ) |
lifecycleMethodsNotCalledIfInputsFail ( ) { final com . spotify . flo . Task < java . lang . String > failingInput = com . spotify . flo . Task . named ( "foo" ) . ofType ( java . lang . String . class ) . process ( ( ) -> { throw new java . lang . RuntimeException ( "Fail" ) ; } ) ; final com . spotify . flo . Task < java . lang . String > task = com . spotify . flo . Task . named ( "inject" ) . ofType ( java . lang . String . class ) . context ( com . spotify . flo . ForwardingTaskContextGeneric . forwardingContext ( ( ) -> com . spotify . flo . TaskContextTest . context1 ) ) . input ( ( ) -> failingInput ) . process ( ( i1 , t1 ) -> { com . spotify . flo . TaskContextTest . context1 . mark ( ) ; return t1 + i1 ; } ) ; final java . lang . Throwable throwable = com . spotify . flo . TestUtils . evalAndGetException ( task ) ; "<AssertPlaceHolder>" ; verify ( com . spotify . flo . TaskContextTest . context1 ) . provide ( any ( ) ) ; verifyNoMoreInteractions ( com . spotify . flo . TaskContextTest . context1 ) ; } evalAndGetException ( com . spotify . flo . Task ) { com . spotify . flo . context . AwaitingConsumer < java . lang . Throwable > val = new com . spotify . flo . context . AwaitingConsumer ( ) ; com . spotify . flo . EvalContext . sync ( ) . evaluate ( task ) . onFail ( val ) ; return val . awaitAndGet ( ) ; } | org . junit . Assert . assertThat ( throwable . getMessage ( ) , org . hamcrest . Matchers . is ( "Fail" ) ) |
testSignalProcessInstanceAbortedProcess ( ) { long processInstanceId = processService . startProcess ( deploymentUnit . getIdentifier ( ) , org . jbpm . kie . services . test . ProcessServiceImplPerProcessInstanceTest . PROCESS_ID_SIGNAL ) ; "<AssertPlaceHolder>" ; processService . abortProcessInstance ( processInstanceId ) ; try { processService . signalProcessInstance ( processInstanceId , "MySignal" , null ) ; org . junit . Assert . fail ( "Signalling<sp>of<sp>already<sp>aborted<sp>process<sp>instance<sp>should<sp>throw<sp>ProcessInstanceNotFoundException." ) ; } catch ( org . jbpm . services . api . ProcessInstanceNotFoundException e ) { } } getIdentifier ( ) { return org . jbpm . services . task . test . TestStatefulKnowledgeSession . testSessionId ; } | org . junit . Assert . assertNotNull ( processInstanceId ) |
testTwiceWriter ( ) { java . io . PrintWriter writer1 = responseWrapper . getWriter ( ) ; java . io . PrintWriter writer2 = responseWrapper . getWriter ( ) ; "<AssertPlaceHolder>" ; } getWriter ( ) { if ( ( outputStream ) != null ) { throw new java . lang . IllegalStateException ( "Only<sp>one<sp>of<sp>getWriter()/getOutputStream()<sp>can<sp>be<sp>called,<sp>and<sp>output<sp>stream<sp>is<sp>already<sp>used." ) ; } if ( ( writer ) == null ) { writer = wrapPrintWriter ( ) ; } return writer ; } | org . junit . Assert . assertSame ( writer1 , writer2 ) |
testEquivalence ( ) { org . teiid . query . sql . lang . Create c1 = sample1 ( ) ; org . teiid . query . sql . lang . Create c2 = sample1 ( ) ; "<AssertPlaceHolder>" ; } sample1 ( ) { org . teiid . query . sql . lang . Create create = getFactory ( ) . newCreate ( ) ; create . setTable ( getFactory ( ) . newGroupSymbol ( "temp_table" ) ) ; java . util . List elements = new java . util . ArrayList ( ) ; elements . add ( getFactory ( ) . newElementSymbol ( "a" ) ) ; elements . add ( getFactory ( ) . newElementSymbol ( "b" ) ) ; create . setElementSymbolsAsColumns ( elements ) ; return create ; } | org . junit . Assert . assertEquals ( c1 , c2 ) |
testCase79 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase79 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , branch_conditions . size ( ) ) |
simpleInsertAndLRURemoveTest ( ) { org . apache . apex . malhar . lib . state . spillable . TimeBasedPriorityQueue < java . lang . String > queue = new org . apache . apex . malhar . lib . state . spillable . TimeBasedPriorityQueue < java . lang . String > ( ) ; queue . upSert ( "a" ) ; java . util . Set < java . lang . String > set = queue . removeLRU ( 1 ) ; "<AssertPlaceHolder>" ; } removeLRU ( int ) { com . google . common . base . Preconditions . checkArgument ( ( ( count > 0 ) && ( count <= ( timeWrappperMap . size ( ) ) ) ) ) ; java . util . Iterator < org . apache . apex . malhar . lib . state . spillable . TimeBasedPriorityQueue . TimeWrapper < T > > iterator = sortedTimestamp . iterator ( ) ; java . util . Set < T > valueSet = com . google . common . collect . Sets . newHashSet ( ) ; for ( int counter = 0 ; counter < count ; counter ++ ) { T value = iterator . next ( ) . getKey ( ) ; valueSet . add ( value ) ; timeWrappperMap . remove ( value ) ; iterator . remove ( ) ; } return valueSet ; } | org . junit . Assert . assertEquals ( com . google . common . collect . Sets . newHashSet ( "a" ) , set ) |
singletonTest ( ) { final org . apache . reef . tang . Configuration c = new org . apache . reef . tang . formats . MyConfigurationModule ( ) . bindImplementation ( org . apache . reef . tang . formats . TestConfigurationModule . Foo . class , org . apache . reef . tang . formats . MyConfigurationModule . THE_FOO ) . bindNamedParameter ( org . apache . reef . tang . formats . TestConfigurationModule . Fooness . class , org . apache . reef . tang . formats . MyConfigurationModule . FOO_NESS ) . bindNamedParameter ( org . apache . reef . tang . formats . TestConfigurationModule . FooStringness . class , org . apache . reef . tang . formats . MyConfigurationModule . FOO_STRING_NESS ) . build ( ) . set ( org . apache . reef . tang . formats . MyConfigurationModule . FOO_STRING_NESS , "abc" ) . set ( org . apache . reef . tang . formats . MyConfigurationModule . THE_FOO , org . apache . reef . tang . formats . TestConfigurationModule . FooImpl . class ) . build ( ) ; final org . apache . reef . tang . Injector i = Tang . Factory . getTang ( ) . newInjector ( c ) ; "<AssertPlaceHolder>" ; } getInstance ( org . apache . reef . tang . implementation . java . Node ) { assertNotConcurrent ( ) ; @ org . apache . reef . tang . implementation . java . SuppressWarnings ( "unchecked" ) final org . apache . reef . tang . implementation . java . InjectionPlan < U > plan = ( ( org . apache . reef . tang . implementation . java . InjectionPlan < U > ) ( getInjectionPlan ( n ) ) ) ; final U u = ( ( U ) ( injectFromPlan ( plan ) ) ) ; while ( ! ( pendingFutures . isEmpty ( ) ) ) { final org . apache . reef . tang . implementation . java . Iterator < org . apache . reef . tang . implementation . java . InjectionFuture < ? > > i = pendingFutures . iterator ( ) ; final org . apache . reef . tang . implementation . java . InjectionFuture < ? > f = i . next ( ) ; pendingFutures . remove ( f ) ; f . get ( ) ; } return u ; } | org . junit . Assert . assertTrue ( ( ( i . getInstance ( org . apache . reef . tang . formats . TestConfigurationModule . Foo . class ) ) == ( i . getInstance ( org . apache . reef . tang . formats . TestConfigurationModule . Foo . class ) ) ) ) |
testQuote ( ) { java . lang . String expected = "<div<sp>class=\"quote-title\">citer:</div><div<sp>class=\"quote\">" + "<div<sp>class=\"quote-content\">text</div></div>" ; java . lang . String actual = _htmlBBCodeTranslator . parse ( "[quote=citer]text[/quote]" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { if ( com . liferay . portal . kernel . util . Validator . isNull ( s ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String [ ] fields = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _fieldSeparatorPattern . split ( s ) ; if ( ( ( fields . length ) != 4 ) && ( ( fields . length ) != 5 ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String name = fields [ 0 ] ; name = _http . decodeURL ( name ) ; java . lang . String description = fields [ 1 ] ; description = _http . decodeURL ( description ) ; java . lang . String uuid = fields [ 2 ] ; if ( ( com . liferay . portal . kernel . util . Validator . isNull ( name ) ) || ( com . liferay . portal . kernel . util . Validator . isNull ( uuid ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String [ ] attributes = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _attributeSeparatorPattern . split ( fields [ 3 ] ) ; java . util . Map < java . lang . String , java . lang . String > properties = new java . util . HashMap ( ) ; for ( java . lang . String attribute : attributes ) { java . lang . String [ ] keyValuePair = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _keyValueSeparatorPattern . split ( attribute ) ; properties . put ( keyValuePair [ 0 ] , keyValuePair [ 1 ] ) ; } boolean enabled = true ; if ( ( fields . length ) == 5 ) { java . lang . String disabledAttribute = fields [ 4 ] ; java . util . regex . Matcher matcher = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _disabledSeparatorPattern . matcher ( disabledAttribute ) ; if ( ! ( matcher . matches ( ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } enabled = com . liferay . portal . kernel . util . GetterUtil . getBoolean ( matcher . group ( 1 ) ) ; } return new com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryImpl ( name , description , uuid , properties , enabled ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testDoScheduledTask0WithFailure ( ) { info = "#<sp>Server\n" + ( ( ( ( ( ( ( "redis_version:2.8.19\n" + "xredis_version:1.0.1\n" ) + "redis_git_sha1:cd114f7e\n" ) + "redis_git_dirty:0\n" ) + "redis_build_id:c8fc0834f9ecab75\n" ) + "redis_mode:standalone\n" ) + "os:Darwin<sp>17.5.0<sp>x86_64\n" ) + "arch_bits:64\n" ) ; action . setInfo ( info ) . setConfigReady ( true ) . setDiskLess ( true ) ; action . doTask ( ) ; "<AssertPlaceHolder>" ; verify ( alertManager , times ( 1 ) ) . alert ( any ( ) , any ( ) , any ( ) ) ; } isCheckPassed ( ) { return pass . get ( ) ; } | org . junit . Assert . assertFalse ( action . isCheckPassed ( ) ) |
test_intByURL ( ) { java . lang . String response = sendGetRequest ( "/call/test/test_int?p=5" , 200 ) ; com . eclipsesource . json . JsonValue result = getValueFromResponse ( response ) ; int value = result . asInt ( ) ; "<AssertPlaceHolder>" ; } getValueFromResponse ( java . lang . String ) { com . eclipsesource . json . JsonValue value = com . eclipsesource . json . Json . parse ( response ) ; com . eclipsesource . json . JsonObject valueObject = value . asObject ( ) ; com . eclipsesource . json . JsonValue result = valueObject . get ( "result" ) ; return result ; } | org . junit . Assert . assertEquals ( 5 , value ) |
testFlowWithOnFailureStepsAsList ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/on_failure_with_step_map.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . SlangSource . fromFile ( resource ) ) ; "<AssertPlaceHolder>" ; exception . expect ( io . cloudslang . lang . compiler . RuntimeException . class ) ; exception . expectMessage ( ( "Flow:<sp>\'on_failure_with_step_map\'<sp>syntax<sp>is<sp>illegal.\n" + "Below<sp>'on_failure'<sp>property<sp>there<sp>should<sp>be<sp>a<sp>list<sp>of<sp>steps<sp>and<sp>not<sp>a<sp>map" ) ) ; throw result . getErrors ( ) . get ( 0 ) ; } getErrors ( ) { return errors ; } | org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) ) |
shouldReturnTrueWhenValidOptions ( ) { final uk . gov . gchq . gaffer . accumulostore . key . AbstractElementFilter filter = new uk . gov . gchq . gaffer . accumulostore . key . impl . ElementPreAggregationFilter ( ) ; final java . util . Map < java . lang . String , java . lang . String > options = new java . util . HashMap ( ) ; options . put ( AccumuloStoreConstants . SCHEMA , getSchemaJson ( ) ) ; options . put ( AccumuloStoreConstants . VIEW , getViewJson ( ) ) ; options . put ( AccumuloStoreConstants . ACCUMULO_ELEMENT_CONVERTER_CLASS , uk . gov . gchq . gaffer . accumulostore . key . core . impl . byteEntity . ByteEntityAccumuloElementConverter . class . getName ( ) ) ; final boolean isValid = filter . validateOptions ( options ) ; "<AssertPlaceHolder>" ; } validateOptions ( java . util . Map ) { if ( ! ( super . validateOptions ( options ) ) ) { return false ; } if ( ! ( options . containsKey ( AccumuloStoreConstants . ACCUMULO_ELEMENT_CONVERTER_CLASS ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Must<sp>specify<sp>the<sp>" + ( uk . gov . gchq . gaffer . accumulostore . utils . AccumuloStoreConstants . ACCUMULO_ELEMENT_CONVERTER_CLASS ) ) ) ; } if ( ! ( options . containsKey ( AccumuloStoreConstants . SCHEMA ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Must<sp>specify<sp>the<sp>" + ( uk . gov . gchq . gaffer . accumulostore . utils . AccumuloStoreConstants . SCHEMA ) ) ) ; } return true ; } | org . junit . Assert . assertTrue ( isValid ) |
testValidateStringColumnEmptyString ( ) { org . sagebionetworks . repo . model . table . ColumnModel cm = new org . sagebionetworks . repo . model . table . ColumnModel ( ) ; cm . setColumnType ( ColumnType . STRING ) ; cm . setMaximumSize ( 555L ) ; "<AssertPlaceHolder>" ; } validateRowValue ( java . lang . String , org . sagebionetworks . repo . model . table . ColumnModel , int , int ) { if ( cm == null ) throw new java . lang . IllegalArgumentException ( "ColumnModel<sp>cannot<sp>be<sp>null" ) ; if ( ( cm . getColumnType ( ) ) == null ) throw new java . lang . IllegalArgumentException ( "ColumnModel.columnType<sp>cannot<sp>be<sp>null" ) ; if ( ( "" . equals ( value ) ) && ( ! ( ( ( ( cm . getColumnType ( ) ) == ( org . sagebionetworks . repo . model . table . ColumnType . STRING ) ) || ( ( cm . getColumnType ( ) ) == ( org . sagebionetworks . repo . model . table . ColumnType . LINK ) ) ) || ( ( cm . getColumnType ( ) ) == ( org . sagebionetworks . repo . model . table . ColumnType . LARGETEXT ) ) ) ) ) { value = null ; } if ( value != null ) { try { return org . sagebionetworks . table . cluster . utils . TableModelUtils . validateValue ( value , cm ) ; } catch ( java . lang . Exception e ) { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( org . sagebionetworks . table . cluster . utils . TableModelUtils . INVALID_VALUE_TEMPLATE , rowIndex , columnIndex , cm . getColumnType ( ) , e . getLocalizedMessage ( ) ) ) ; } } else { if ( ( cm . getDefaultValue ( ) ) != null ) { value = cm . getDefaultValue ( ) ; } return value ; } } | org . junit . Assert . assertEquals ( "" , org . sagebionetworks . table . cluster . utils . TableModelUtils . validateRowValue ( "" , cm , 0 , 0 ) ) |
equalsDifferentSampleCountReturnsFalse ( ) { com . rackspacecloud . blueflood . types . BluefloodCounterRollup a = new com . rackspacecloud . blueflood . types . BluefloodCounterRollup ( ) . withCount ( 1 ) . withSampleCount ( 1 ) ; com . rackspacecloud . blueflood . types . BluefloodCounterRollup b = new com . rackspacecloud . blueflood . types . BluefloodCounterRollup ( ) . withCount ( 1 ) . withSampleCount ( 2 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( other instanceof com . rackspacecloud . blueflood . types . BaseRollup ) ) { return false ; } com . rackspacecloud . blueflood . types . BaseRollup otherBaseRollup = ( ( com . rackspacecloud . blueflood . types . BaseRollup ) ( other ) ) ; return ( ( ( ( ( this . count ) == ( otherBaseRollup . getCount ( ) ) ) && ( average . equals ( otherBaseRollup . getAverage ( ) ) ) ) && ( variance . equals ( otherBaseRollup . getVariance ( ) ) ) ) && ( minValue . equals ( otherBaseRollup . getMinValue ( ) ) ) ) && ( maxValue . equals ( otherBaseRollup . getMaxValue ( ) ) ) ; } | org . junit . Assert . assertFalse ( a . equals ( b ) ) |
testGetPrefixForNamespaceURIWhenDefinitionsIsNull ( ) { final java . lang . String namespaceURI = org . kie . workbench . common . dmn . client . editors . types . common . FEEL . getUri ( ) ; when ( dmnGraphUtils . getDefinitions ( ) ) . thenReturn ( null ) ; final java . util . Optional < java . lang . String > prefix = utils . getPrefixForNamespaceURI ( namespaceURI ) ; "<AssertPlaceHolder>" ; } isPresent ( ) { return isPresent ; } | org . junit . Assert . assertFalse ( prefix . isPresent ( ) ) |
test_param_string_copy_4 ( ) { org . apache . jena . query . ParameterizedSparqlString query = new org . apache . jena . query . ParameterizedSparqlString ( ) ; query . setBaseUri ( "http://example.org" ) ; org . apache . jena . query . ParameterizedSparqlString copy = query . copy ( ) ; "<AssertPlaceHolder>" ; } getBaseUri ( ) { return this . baseUri ; } | org . junit . Assert . assertEquals ( "http://example.org" , copy . getBaseUri ( ) ) |
one_$this_array_query_projection_with_match_projection ( ) { com . redhat . lightblue . query . Projection p = com . redhat . lightblue . eval . EvalTestContext . projectionFromJson ( "{'field':'field7.$this','match':{'field':'elemf3','op':'>','rvalue':4},'projection':{'field':'*'}}" ) ; com . redhat . lightblue . eval . Projector projector = com . redhat . lightblue . eval . Projector . getInstance ( p , md ) ; com . fasterxml . jackson . databind . JsonNode expectedNode = com . redhat . lightblue . util . JsonUtils . json ( "{'field7':[{'elemf1':'elvalue2_1','elemf2':'elvalue2_2','elemf3':5},{'elemf1':'elvalue3_1','elemf2':'elvalue3_2','elemf3':6}]}" . replace ( '\'' , '\"' ) ) ; com . redhat . lightblue . util . JsonDoc pdoc = projector . project ( jsonDoc , com . redhat . lightblue . eval . JSON_NODE_FACTORY ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ops [ 0 ] ; } | org . junit . Assert . assertEquals ( expectedNode . toString ( ) , pdoc . toString ( ) ) |
nullFieldDoesntFail ( ) { "<AssertPlaceHolder>" ; } clipSignature ( org . sejda . sambox . pdmodel . interactive . form . PDField ) { if ( ( nonNull ( field ) ) && ( COSName . SIG . getName ( ) . equals ( field . getFieldType ( ) ) ) ) { org . sejda . impl . sambox . component . SignatureClipper . clipSignature ( field . getCOSObject ( ) ) ; return true ; } return false ; } | org . junit . Assert . assertFalse ( org . sejda . impl . sambox . component . SignatureClipper . clipSignature ( null ) ) |
isSupportedShouldBeFalseIfTheClientDoesntSupportTemplates ( ) { when ( client . supports ( eq ( com . openshift . restclient . capability . server . ITemplateProcessing . class ) ) ) . thenReturn ( false ) ; capability = new com . openshift . internal . restclient . capability . resources . ProjectTemplateProcessing ( project , client ) ; "<AssertPlaceHolder>" ; } isSupported ( ) { if ( ( mapper ) != null ) { try { return mapper . getEndpointFor ( resource . getApiVersion ( ) , resource . getKind ( ) ) . isSupported ( capability ) ; } catch ( com . openshift . restclient . UnsupportedEndpointException e ) { } } return false ; } | org . junit . Assert . assertFalse ( capability . isSupported ( ) ) |
testNodeReplacementInEmptyNetwork ( ) { org . apache . beam . vendor . guava . v20_0 . com . google . common . graph . MutableNetwork < java . lang . String , java . lang . String > network = org . apache . beam . runners . dataflow . worker . graph . NetworksTest . createEmptyNetwork ( ) ; org . apache . beam . runners . dataflow . worker . graph . Networks . replaceDirectedNetworkNodes ( network , new java . util . function . Function < java . lang . String , java . lang . String > ( ) { @ org . apache . beam . runners . dataflow . worker . graph . Override @ javax . annotation . Nullable public java . lang . String apply ( @ javax . annotation . Nullable java . lang . String input ) { return input . toLowerCase ( ) ; } } ) ; "<AssertPlaceHolder>" ; } empty ( ) { org . apache . beam . sdk . util . ApiSurface . LOG . debug ( "Returning<sp>an<sp>empty<sp>ApiSurface" ) ; return new org . apache . beam . sdk . util . ApiSurface ( java . util . Collections . emptySet ( ) , java . util . Collections . emptySet ( ) ) ; } | org . junit . Assert . assertThat ( network . nodes ( ) , empty ( ) ) |
test_notify_exception ( ) { try { com . webpagebytes . cms . cmsdata . WPBPage pageMock = org . powermock . api . easymock . PowerMock . createMock ( com . webpagebytes . cms . cmsdata . WPBPage . class ) ; pageCacheMock . Refresh ( ) ; org . easymock . EasyMock . expectLastCall ( ) . andThrow ( new com . webpagebytes . cms . exception . WPBIOException ( "" ) ) ; org . easymock . EasyMock . replay ( httpServletToolboxMock , requestMock , responseMock , pageCacheMock , pageMock , jsonObjectConverterMock , validatorMock , adminStorageMock , objectForControllerMock ) ; controllerForTest . notify ( pageMock , WPBAdminDataStorageListener . AdminDataStorageOperation . CREATE_RECORD , com . webpagebytes . cms . cmsdata . WPBPage . class ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } notify ( T , com . webpagebytes . cms . controllers . AdminDataStorageOperation , java . lang . Class ) { try { if ( type . equals ( com . webpagebytes . cms . cmsdata . WPBProject . class ) ) { projectCache . Refresh ( ) ; } } catch ( com . webpagebytes . cms . exception . WPBIOException e ) { } } | org . junit . Assert . assertTrue ( false ) |
testToObjectArrayForPrimitiveArray ( ) { for ( int i = 0 ; i < ( cz . zcu . kiv . jop . util . ArrayUtilsTest . primitives . length ) ; i ++ ) { int size = getArrayLength ( ) ; java . lang . Object [ ] expected = ( ( java . lang . Object [ ] ) ( java . lang . reflect . Array . newInstance ( cz . zcu . kiv . jop . util . ArrayUtilsTest . wrappers [ i ] , size ) ) ) ; java . lang . Object array = java . lang . reflect . Array . newInstance ( cz . zcu . kiv . jop . util . ArrayUtilsTest . primitives [ i ] , size ) ; for ( int j = 0 ; j < size ; j ++ ) { expected [ j ] = cz . zcu . kiv . jop . util . Defaults . getDefaultValue ( cz . zcu . kiv . jop . util . ArrayUtilsTest . primitives [ i ] ) ; java . lang . reflect . Array . set ( array , j , cz . zcu . kiv . jop . util . Defaults . getDefaultValue ( cz . zcu . kiv . jop . util . ArrayUtilsTest . primitives [ i ] ) ) ; } "<AssertPlaceHolder>" ; } } toObjectArray ( boolean [ ] ) { if ( array == null ) { return null ; } if ( ( array . length ) == 0 ) { return cz . zcu . kiv . jop . util . ArrayUtils . EMPTY_BOOLEAN_OBJECT_ARRAY ; } java . lang . Boolean [ ] retArray = new java . lang . Boolean [ array . length ] ; for ( int i = 0 ; i < ( array . length ) ; i ++ ) { retArray [ i ] = new java . lang . Boolean ( array [ i ] ) ; } return retArray ; } | org . junit . Assert . assertArrayEquals ( expected , cz . zcu . kiv . jop . util . ArrayUtils . toObjectArray ( array ) ) |
testMaakExpressieMetEnkelMaterieelAttribuut ( ) { metElementen ( false , true , false ) ; final nl . bzk . brp . model . algemeen . stamgegeven . kern . Element groepElement = nl . bzk . brp . model . algemeen . stamgegeven . kern . TestElementBuilder . maker ( ) . metNaam ( ElementEnum . PERSOON_ADRES ) . maak ( ) ; final nl . bzk . brp . model . algemeen . stamgegeven . autaut . Dienst dienst = maakDienst ( groepElement , false , true , false ) ; final nl . bzk . brp . expressietaal . Expressie expressie = dienstFilterExpressiesService . geefExpressiesVoorHistorieEnVerantwoordingAttributen ( dienst ) ; "<AssertPlaceHolder>" ; } aantalElementen ( ) { return 1 ; } | org . junit . Assert . assertEquals ( 1 , expressie . aantalElementen ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.