input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testTableColumnsIndex ( ) { org . apache . drill . exec . store . hive . ColumnListsCache cache = new org . apache . drill . exec . store . hive . ColumnListsCache ( ) ; java . util . List < org . apache . hadoop . hive . metastore . api . FieldSchema > columns = org . apache . drill . shaded . guava . com . google . common . collect . Lists . newArrayList ( ) ; columns . add ( new org . apache . hadoop . hive . metastore . api . FieldSchema ( "f1" , "int" , null ) ) ; columns . add ( new org . apache . hadoop . hive . metastore . api . FieldSchema ( "f2" , "int" , null ) ) ; "<AssertPlaceHolder>" ; } addOrGet ( org . apache . drill . exec . record . MaterializedField ) { return org . apache . drill . exec . expr . TypeHelper . getNewVector ( colSchema , allocator , null ) ; }
|
org . junit . Assert . assertEquals ( 0 , cache . addOrGet ( columns ) )
|
test1170825 ( ) { org . jfree . data . xy . YIntervalSeries s1 = new org . jfree . data . xy . YIntervalSeries ( "Series1" ) ; org . jfree . data . xy . YIntervalSeriesCollection dataset = new org . jfree . data . xy . YIntervalSeriesCollection ( ) ; dataset . addSeries ( s1 ) ; try { dataset . getSeries ( 1 ) ; } catch ( java . lang . IllegalArgumentException e ) { } catch ( java . lang . IndexOutOfBoundsException e ) { "<AssertPlaceHolder>" ; } } getSeries ( int ) { if ( ( series < 0 ) || ( series >= ( getSeriesCount ( ) ) ) ) { throw new java . lang . IllegalArgumentException ( "Series<sp>index<sp>out<sp>of<sp>bounds" ) ; } return ( ( org . jfree . data . xy . XYIntervalSeries ) ( this . data . get ( series ) ) ) ; }
|
org . junit . Assert . assertTrue ( false )
|
testGetProvidedExtensionAsServer ( ) { org . java_websocket . extensions . DefaultExtension defaultExtension = new org . java_websocket . extensions . DefaultExtension ( ) ; "<AssertPlaceHolder>" ; } getProvidedExtensionAsServer ( ) { return "" ; }
|
org . junit . Assert . assertEquals ( "" , defaultExtension . getProvidedExtensionAsServer ( ) )
|
testGetTypedArrayType32BitValue ( ) { com . eclipsesource . v8 . V8Array result = ( ( com . eclipsesource . v8 . V8Array ) ( v8 . executeScript ( "var<sp>buf<sp>=<sp>new<sp>ArrayBuffer(4);<sp>var<sp>ints<sp>=<sp>new<sp>Int32Array(buf);<sp>ints[0]<sp>=<sp>255;<sp>ints" ) ) ) ; "<AssertPlaceHolder>" ; result . close ( ) ; } get ( byte [ ] ) { v8 . checkThread ( ) ; checkReleased ( ) ; byteBuffer . get ( dst ) ; return this ; }
|
org . junit . Assert . assertEquals ( 255 , result . get ( 0 ) )
|
testFileInFolderIgnored ( ) { org . eclipse . jgit . revwalk . RevCommit commit = writeFileInFolderAndCommit ( ) ; writeFileInFolderIgnored ( ) ; org . eclipse . jgit . treewalk . TreeWalk treeWalk = createTreeWalk ( commit ) ; "<AssertPlaceHolder>" ; } next ( ) { org . eclipse . jgit . treewalk . CanonicalTreeParser p = this ; for ( ; ; ) { if ( ( p . nextPtr ) == ( p . raw . length ) ) { if ( ( p . parent ) == null ) { p . currPtr = p . nextPtr ; return p ; } p = ( ( org . eclipse . jgit . treewalk . CanonicalTreeParser ) ( p . parent ) ) ; continue ; } p . prevPtr = p . currPtr ; p . currPtr = p . nextPtr ; p . parseEntry ( ) ; return p ; } }
|
org . junit . Assert . assertFalse ( treeWalk . next ( ) )
|
shouldInsertAndGet ( ) { com . couchbase . client . java . document . json . JsonObject content = com . couchbase . client . java . document . json . JsonObject . empty ( ) . put ( "hello" , "world" ) ; final com . couchbase . client . java . document . JsonDocument doc = com . couchbase . client . java . document . JsonDocument . create ( "insert" , content ) ; bucket ( ) . insert ( doc ) ; com . couchbase . client . java . document . JsonDocument response = bucket ( ) . get ( "insert" ) ; "<AssertPlaceHolder>" ; } getString ( java . lang . String ) { return ( ( java . lang . String ) ( content . get ( name ) ) ) ; }
|
org . junit . Assert . assertEquals ( content . getString ( "hello" ) , response . content ( ) . getString ( "hello" ) )
|
testAddAutocompleteSectionWithPhoneType ( ) { java . lang . String sectionName = "foo" ; com . github . bordertech . wcomponents . autocomplete . segment . PhoneFormat phoneType = com . github . bordertech . wcomponents . autocomplete . segment . PhoneFormat . MOBILE ; java . lang . String expected = com . github . bordertech . wcomponents . autocomplete . AutocompleteUtil . getCombinedForSection ( sectionName , phoneType . getValue ( ) , Telephone . FULL . getValue ( ) ) ; com . github . bordertech . wcomponents . WPhoneNumberField field = new com . github . bordertech . wcomponents . WPhoneNumberField ( ) ; field . setFullPhoneAutocomplete ( phoneType ) ; field . addAutocompleteSection ( sectionName ) ; "<AssertPlaceHolder>" ; } getAutocomplete ( ) { return getComponentModel ( ) . autocomplete ; }
|
org . junit . Assert . assertEquals ( expected , field . getAutocomplete ( ) )
|
test4 ( ) { com . jfireframework . sql . test . UserDAO userDAO = sessionFactory . getMapper ( com . jfireframework . sql . test . UserDAO . class ) ; com . jfireframework . sql . page . MysqlPage page = new com . jfireframework . sql . page . MysqlPage ( ) ; page . setPage ( 1 ) ; page . setPageSize ( 20 ) ; userDAO . getUsernames ( page ) ; session . close ( ) ; "<AssertPlaceHolder>" ; } getTotal ( ) { return total ; }
|
org . junit . Assert . assertEquals ( 3 , page . getTotal ( ) )
|
testFetchByPrimaryKeyExisting ( ) { com . liferay . subscription . model . Subscription newSubscription = addSubscription ( ) ; com . liferay . subscription . model . Subscription existingSubscription = _persistence . fetchByPrimaryKey ( newSubscription . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertEquals ( existingSubscription , newSubscription )
|
testImportFormFeedDelimited ( ) { methodWatcher . executeUpdate ( org . junit . Assert . format ( "delete<sp>from<sp>%s.%s" , com . splicemachine . derby . impl . load . HdfsImportIT . spliceSchemaWatcher . schemaName , com . splicemachine . derby . impl . load . HdfsImportIT . TABLE_8 ) ) ; com . splicemachine . derby . impl . load . PreparedStatement ps = methodWatcher . prepareStatement ( org . junit . Assert . format ( ( "call<sp>SYSCS_UTIL.IMPORT_DATA(" + ( ( ( ( ( ( ( ( ( ( ( ( "'%s'," + "'%s'," ) + "null," ) + "'%s'," ) + "'%s'," ) + "null," ) + "null," ) + "null," ) + "null," ) + "%d," ) + "'%s'," ) + "null," ) + "null)" ) ) , com . splicemachine . derby . impl . load . HdfsImportIT . spliceSchemaWatcher . schemaName , com . splicemachine . derby . impl . load . HdfsImportIT . TABLE_8 , ( ( getResourceDirectory ( ) ) + "lu_cust_city_form_feed.txt" ) , "\f" , 0 , com . splicemachine . derby . impl . load . HdfsImportIT . BADDIR . getCanonicalPath ( ) ) ) ; ps . execute ( ) ; com . splicemachine . derby . impl . load . ResultSet rs = methodWatcher . executeQuery ( org . junit . Assert . format ( "select<sp>*<sp>from<sp>%s.%s" , com . splicemachine . derby . impl . load . HdfsImportIT . spliceSchemaWatcher . schemaName , com . splicemachine . derby . impl . load . HdfsImportIT . TABLE_8 ) ) ; com . splicemachine . derby . impl . load . List < java . lang . String > results = org . spark_project . guava . collect . Lists . newArrayList ( ) ; while ( rs . next ( ) ) { int id = rs . getInt ( 1 ) ; java . lang . String name = rs . getString ( 2 ) ; int stateId = rs . getInt ( 3 ) ; results . add ( java . lang . String . format ( "%d\t%s\t%d" , id , name , stateId ) ) ; } "<AssertPlaceHolder>" ; } size ( ) { return entries . size ( ) ; }
|
org . junit . Assert . assertEquals ( ( "null," 0 + results ) , 3 , results . size ( ) )
|
testFeatureServiceRetrievingFallDown ( ) { com . tacitknowledge . flip . FlipContext . setFeatureService ( featureService1 ) ; aspect . setFeatureService ( null ) ; "<AssertPlaceHolder>" ; } getFeatureService ( ) { return com . tacitknowledge . flip . FlipContext . chooseFeatureService ( ) ; }
|
org . junit . Assert . assertEquals ( featureService1 , aspect . getFeatureService ( ) )
|
testGetReasonPhrase ( ) { org . apache . servicecomb . foundation . common . http . HttpStatus status = new org . apache . servicecomb . foundation . common . http . HttpStatus ( 200 , "ok" ) ; "<AssertPlaceHolder>" ; } getReasonPhrase ( ) { return reason ; }
|
org . junit . Assert . assertEquals ( "ok" , status . getReasonPhrase ( ) )
|
resultSQO_should_be_targetSQO ( ) { io . github . seleniumquery . SeleniumQueryObject targetSQO = createStubSeleniumQueryObjectWithAtLeastOneElement ( ) ; io . github . seleniumquery . SeleniumQueryObject resultSQO = sqEachFunction . each ( targetSQO , io . github . seleniumquery . functions . jquery . traversing . SqEachFunctionTest . NON_NULL_EACH_FUNCTION_DOES_NOT_MATTER_IN_THIS_TEST ) ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { return isAnd ( IsEvaluator . IS_EVALUATOR , selector ) ; }
|
org . junit . Assert . assertThat ( resultSQO , org . hamcrest . Matchers . is ( targetSQO ) )
|
testMainStrGram ( ) { org . antlr . v4 . runtime . Lexer lexer = new com . sourceclear . gramtest . bnfLexer ( new org . antlr . v4 . runtime . ANTLRInputStream ( getClass ( ) . getResourceAsStream ( "/main.bnf" ) ) ) ; org . antlr . v4 . runtime . CommonTokenStream tokens = new org . antlr . v4 . runtime . CommonTokenStream ( lexer ) ; com . sourceclear . gramtest . bnfParser grammarparser = new com . sourceclear . gramtest . bnfParser ( tokens ) ; org . antlr . v4 . runtime . ParserRuleContext tree = grammarparser . rulelist ( ) ; com . sourceclear . gramtest . GeneratorVisitor extractor = new com . sourceclear . gramtest . GeneratorVisitor ( 100 , 2 , 1 , 10 , true ) ; extractor . visit ( tree ) ; java . util . List < java . lang . String > generatedTests = extractor . getTests ( ) ; "<AssertPlaceHolder>" ; } getTests ( ) { return tests ; }
|
org . junit . Assert . assertEquals ( 100 , generatedTests . size ( ) )
|
setNull2 ( ) { long count = query ( ) . from ( com . querydsl . sql . Constants . survey ) . fetchCount ( ) ; "<AssertPlaceHolder>" ; } update ( com . querydsl . sql . RelationalPath ) { return new com . querydsl . sql . dml . SQLUpdateClause ( getConnection ( ) , configuration , path ) ; }
|
org . junit . Assert . assertEquals ( count , update ( com . querydsl . sql . Constants . survey ) . set ( survey . name , ( ( java . lang . String ) ( null ) ) ) . execute ( ) )
|
testHashCode1 ( ) { org . jacoco . core . analysis . ICounter c1 = org . jacoco . core . internal . analysis . CounterImpl . getInstance ( 300 , 123 ) ; org . jacoco . core . analysis . ICounter c2 = org . jacoco . core . internal . analysis . CounterImpl . getInstance ( 300 , 123 ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return printer . getText ( ) . hashCode ( ) ; }
|
org . junit . Assert . assertEquals ( c1 . hashCode ( ) , c2 . hashCode ( ) )
|
testGetNext ( ) { org . eclipse . tracecompass . tmf . core . trace . ITmfContext context = fixture . seekEvent ( 0 ) ; org . eclipse . tracecompass . tmf . ctf . core . event . CtfTmfEvent result = fixture . getNext ( context ) ; "<AssertPlaceHolder>" ; context . dispose ( ) ; } getNext ( org . eclipse . tracecompass . tmf . core . trace . ITmfContext ) { if ( ! ( context instanceof org . eclipse . tracecompass . tmf . core . trace . text . TextTraceContext ) ) { throw new java . lang . IllegalArgumentException ( ) ; } org . eclipse . tracecompass . tmf . core . trace . text . TextTraceContext savedContext = new org . eclipse . tracecompass . tmf . core . trace . text . TextTraceContext ( context . getLocation ( ) , context . getRank ( ) ) ; @ org . eclipse . jdt . annotation . Nullable T event = parse ( ( ( org . eclipse . tracecompass . tmf . core . trace . text . TextTraceContext ) ( context ) ) ) ; if ( event != null ) { updateAttributes ( savedContext , event ) ; context . increaseRank ( ) ; } return event ; }
|
org . junit . Assert . assertNotNull ( result )
|
notEqualsByValueExclusionsMismatchThat ( ) { final org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenCoordinate coordinate = this . createCoordinate ( ) ; final org . jboss . shrinkwrap . resolver . api . maven . ScopeType scope = org . jboss . shrinkwrap . resolver . api . maven . ScopeType . RUNTIME ; final boolean optional = true ; final org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependencyExclusion exclusion = new org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependencyExclusionImpl ( "groupId1" , "artifactId1" ) ; final org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependency dependency1 = new org . jboss . shrinkwrap . resolver . impl . maven . coordinate . MavenDependencyImpl ( coordinate , scope , optional , exclusion ) ; final org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenDependency dependency2 = new org . jboss . shrinkwrap . resolver . impl . maven . coordinate . MavenDependencyImpl ( coordinate , scope , optional ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenCoordinateImpl other = ( ( org . jboss . shrinkwrap . resolver . api . maven . coordinate . MavenCoordinateImpl ) ( obj ) ) ; if ( ( classifier ) == null ) { if ( ( other . classifier ) != null ) { return false ; } } else if ( ! ( classifier . equals ( other . classifier ) ) ) { return false ; } if ( ! ( packaging . equals ( other . packaging ) ) ) { return false ; } return true ; }
|
org . junit . Assert . assertTrue ( dependency1 . equals ( dependency2 ) )
|
orExpression ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = Or ( Property ( "foo" ) , Property ( "bar" ) ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "foo<sp>||<sp>bar" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return runtime . compile ( str ) ; }
|
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) )
|
testAfterInsert ( ) { when ( cache . insert ( any ( ) , any ( ) , any ( ) ) ) . thenThrow ( new com . hazelcast . core . HazelcastException ( "expected<sp>exception" ) ) ; "<AssertPlaceHolder>" ; } afterInsert ( java . lang . Object , java . lang . Object , java . lang . Object ) { return delegate . afterInsert ( key , value , version ) ; }
|
org . junit . Assert . assertFalse ( delegate . afterInsert ( null , null , null ) )
|
testStdOut ( ) { org . apache . trevni . TestUtil . resetRandomSeed ( ) ; run ( java . util . Arrays . asList ( "-" , "--count" , org . apache . avro . tool . TestCreateRandomFileTool . COUNT , "--schema-file" , org . apache . avro . tool . TestCreateRandomFileTool . SCHEMA_FILE . toString ( ) , "--seed" , java . lang . Long . toString ( org . apache . avro . tool . TestCreateRandomFileTool . SEED ) ) ) ; byte [ ] file = out . toByteArray ( ) ; org . apache . avro . file . DataFileStream < java . lang . Object > reader = new org . apache . avro . file . DataFileStream ( new java . io . ByteArrayInputStream ( file ) , new org . apache . avro . generic . GenericDatumReader ( ) ) ; java . util . Iterator < java . lang . Object > found = reader . iterator ( ) ; for ( java . lang . Object expected : new org . apache . avro . util . RandomData ( schemaParser . parse ( org . apache . avro . tool . TestCreateRandomFileTool . SCHEMA_FILE ) , java . lang . Integer . parseInt ( org . apache . avro . tool . TestCreateRandomFileTool . COUNT ) , org . apache . avro . tool . TestCreateRandomFileTool . SEED ) ) "<AssertPlaceHolder>" ; reader . close ( ) ; } next ( ) { try { for ( org . apache . trevni . ColumnValues value : values ) if ( value != null ) value . startRow ( ) ; this . column = 0 ; return ( ( D ) ( read ( readSchema ) ) ) ; } catch ( java . io . IOException e ) { throw new org . apache . trevni . TrevniRuntimeException ( e ) ; } }
|
org . junit . Assert . assertEquals ( expected , found . next ( ) )
|
testProcessActivityFeed ( ) { org . joda . time . DateTime now = new org . joda . time . DateTime ( java . lang . System . currentTimeMillis ( ) ) ; com . google . api . services . youtube . YouTube youtube = buildYouTube ( 0 , 0 , 5 , now . plus ( 3000000 ) , now . minus ( 1000000 ) ) ; java . util . concurrent . BlockingQueue < org . apache . streams . core . StreamsDatum > datumQueue = new org . apache . streams . local . queues . ThroughputQueue ( ) ; org . apache . streams . youtube . provider . YoutubeUserActivityCollector collector = new org . apache . streams . youtube . provider . YoutubeUserActivityCollector ( youtube , datumQueue , new org . apache . streams . util . api . requests . backoff . impl . ExponentialBackOffStrategy ( 2 ) , new org . apache . streams . google . gplus . configuration . UserInfo ( ) . withUserId ( org . apache . streams . youtube . provider . YoutubeUserActivityCollectorTest . USER_ID ) , this . config ) ; com . google . api . services . youtube . model . ActivityListResponse feed = buildActivityListResponse ( 1 ) ; collector . processActivityFeed ( feed , new org . joda . time . DateTime ( java . lang . System . currentTimeMillis ( ) ) , null ) ; "<AssertPlaceHolder>" ; } getDatumQueue ( ) { return this . datumQueue ; }
|
org . junit . Assert . assertEquals ( collector . getDatumQueue ( ) . size ( ) , 5 )
|
testRangeCardinality ( ) { org . roaringbitmap . RoaringBitmap r = new org . roaringbitmap . RoaringBitmap ( ) ; long Min = 0L ; long Max = 1000000L ; r . add ( Min , Max ) ; for ( long s = Min ; s <= Max ; s += 100 ) { for ( long e = s ; e <= Max ; e += 100 ) { "<AssertPlaceHolder>" ; } } } rangeCardinality ( long , long ) { if ( ( java . lang . Long . compareUnsigned ( start , end ) ) >= 0 ) { return 0 ; } long size = 0 ; int startIndex = this . highLowContainer . getIndex ( org . roaringbitmap . Util . highbits ( start ) ) ; if ( startIndex < 0 ) { startIndex = ( - startIndex ) - 1 ; } else { int inContainerStart = org . roaringbitmap . Util . toIntUnsigned ( org . roaringbitmap . Util . lowbits ( start ) ) ; if ( inContainerStart != 0 ) { size -= this . highLowContainer . getContainerAtIndex ( startIndex ) . rank ( ( ( short ) ( inContainerStart - 1 ) ) ) ; } } short xhigh = org . roaringbitmap . Util . highbits ( ( end - 1 ) ) ; for ( int i = startIndex ; i < ( this . highLowContainer . size ( ) ) ; i ++ ) { short key = this . highLowContainer . getKeyAtIndex ( i ) ; int comparison = org . roaringbitmap . Util . compareUnsigned ( key , xhigh ) ; if ( comparison < 0 ) { size += this . highLowContainer . getContainerAtIndex ( i ) . getCardinality ( ) ; } else if ( comparison == 0 ) { return size + ( this . highLowContainer . getContainerAtIndex ( i ) . rank ( org . roaringbitmap . Util . lowbits ( ( ( int ) ( end - 1 ) ) ) ) ) ; } } return size ; }
|
org . junit . Assert . assertEquals ( ( e - s ) , r . rangeCardinality ( s , e ) )
|
testEchoStatDataEvents ( ) { final java . lang . String binary = "a/b/c.out" ; final java . lang . String [ ] args = new java . lang . String [ ] { "arg1" , "arg2" , "arg3" } ; final java . lang . String [ ] events = new java . lang . String [ ] { "a/b/c.out" 1 , "event2" , "event3" } ; final int runCount = 3 ; org . eclipse . linuxtools . internal . perf . tests . DataManipulatorTest . StubStatData sData = new org . eclipse . linuxtools . internal . perf . tests . DataManipulatorTest . StubStatData ( "stat<sp>data" , binary , args , runCount , events , proj ) ; sData . parse ( ) ; java . lang . String expected = "perf<sp>stat<sp>-r<sp>" + runCount ; for ( java . lang . String event : events ) { expected += "a/b/c.out" 0 + event ; } expected = ( ( ( expected + "<sp>-o<sp>" ) + ( org . eclipse . linuxtools . internal . perf . tests . DataManipulatorTest . output ) ) + "<sp>" ) + binary ; for ( java . lang . String i : args ) { expected += "<sp>" + i ; } "<AssertPlaceHolder>" ; } getPerfData ( ) { return contents . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expected , sData . getPerfData ( ) . trim ( ) )
|
testPatternMatches ( ) { final org . apache . commons . lang3 . time . DatePrinter printer = getInstance ( org . apache . commons . lang3 . time . FastDatePrinterTest . YYYY_MM_DD ) ; "<AssertPlaceHolder>" ; } getPattern ( ) { return mPattern ; }
|
org . junit . Assert . assertEquals ( org . apache . commons . lang3 . time . FastDatePrinterTest . YYYY_MM_DD , printer . getPattern ( ) )
|
defaultTxTimeout ( ) { when ( mockMuleContext . getConfiguration ( ) . getDefaultTransactionTimeout ( ) ) . thenReturn ( org . mule . runtime . core . internal . processor . DelegateTransactionTestCase . DEFAULT_TX_TIMEOUT ) ; org . mule . runtime . core . internal . processor . DelegateTransaction delegateTransaction = new org . mule . runtime . core . internal . processor . DelegateTransaction ( mockMuleContext ) ; "<AssertPlaceHolder>" ; } getTimeout ( ) { return ( timeout ) == null ? 0 : timeout ; }
|
org . junit . Assert . assertThat ( delegateTransaction . getTimeout ( ) , org . hamcrest . core . Is . is ( org . mule . runtime . core . internal . processor . DelegateTransactionTestCase . DEFAULT_TX_TIMEOUT ) )
|
moveDbToNonExistentCatalog ( ) { java . lang . String dbName = "doomedToHomelessness" ; new org . apache . hadoop . hive . metastore . client . builder . DatabaseBuilder ( ) . setName ( dbName ) . create ( client , org . apache . hadoop . hive . metastore . tools . schematool . TestSchemaToolCatalogOps . conf ) ; try { java . lang . String argsMoveDB = java . lang . String . format ( "-moveDatabase<sp>%s<sp>-fromCatalog<sp>%s<sp>-toCatalog<sp>nosuch" , dbName , org . apache . hadoop . hive . metastore . Warehouse . DEFAULT_CATALOG_NAME ) ; org . apache . hadoop . hive . metastore . tools . schematool . TestSchemaToolCatalogOps . execute ( new org . apache . hadoop . hive . metastore . tools . schematool . SchemaToolTaskMoveDatabase ( ) , argsMoveDB ) ; org . junit . Assert . fail ( "Attempt<sp>to<sp>move<sp>database<sp>to<sp>non-existent<sp>catalog<sp>should<sp>have<sp>failed." ) ; } catch ( org . apache . hadoop . hive . metastore . HiveMetaException e ) { } java . util . Set < java . lang . String > dbNames = new java . util . HashSet ( client . getAllDatabases ( org . apache . hadoop . hive . metastore . Warehouse . DEFAULT_CATALOG_NAME ) ) ; "<AssertPlaceHolder>" ; } contains ( org . apache . hadoop . hive . ql . plan . BaseWork ) { return workGraph . containsKey ( w ) ; }
|
org . junit . Assert . assertTrue ( dbNames . contains ( dbName . toLowerCase ( ) ) )
|
testFindByPrimaryKeyExisting ( ) { com . liferay . calendar . model . CalendarResource newCalendarResource = addCalendarResource ( ) ; com . liferay . calendar . model . CalendarResource existingCalendarResource = _persistence . findByPrimaryKey ( newCalendarResource . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertEquals ( existingCalendarResource , newCalendarResource )
|
testSetGetStack ( ) { org . apache . ambari . server . orm . entities . BlueprintEntity entity = new org . apache . ambari . server . orm . entities . BlueprintEntity ( ) ; entity . setStack ( stackEntity ) ; "<AssertPlaceHolder>" ; } getStack ( ) { java . io . File serviceDir = new java . io . File ( getAbsolutePath ( ) ) ; java . io . File stackVersionDir = serviceDir . getParentFile ( ) . getParentFile ( ) ; java . io . File stackDir = stackVersionDir . getParentFile ( ) ; java . lang . String stackId = java . lang . String . format ( "%s-%s" , stackDir . getName ( ) , stackVersionDir . getName ( ) ) ; return stackId ; }
|
org . junit . Assert . assertEquals ( stackEntity , entity . getStack ( ) )
|
testFindByPrimaryKeyExisting ( ) { com . liferay . portal . security . wedeploy . auth . model . WeDeployAuthToken newWeDeployAuthToken = addWeDeployAuthToken ( ) ; com . liferay . portal . security . wedeploy . auth . model . WeDeployAuthToken existingWeDeployAuthToken = _persistence . findByPrimaryKey ( newWeDeployAuthToken . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertEquals ( existingWeDeployAuthToken , newWeDeployAuthToken )
|
testOk ( ) { new nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstBuilder ( ) . build ( ) ; setup ( true , true ) ; "<AssertPlaceHolder>" ; } setup ( boolean , boolean ) { org . mockito . Mockito . when ( verzoekControleBerichtVanSoortLg01 . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . bericht . model . sync . impl . SynchroniseerNaarBrpVerzoekBericht . class ) ) ) . thenReturn ( berichtVerzoekControleBerichtVanSoortLg01 ) ; org . mockito . Mockito . when ( plControleBevatDatumIngangBlokkering . controleer ( org . mockito . Matchers . any ( nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext . class ) , org . mockito . Matchers . any ( nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst . class ) ) ) . thenReturn ( plControleBevatDatumIngangBlokkeringResult ) ; }
|
org . junit . Assert . assertTrue ( subject . controleer ( new nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext ( null , null , null , null ) ) )
|
testGetGraphDisplayPanel ( ) { System . out . println ( "getGraphDisplayPanel" ) ; kg . apc . jmeter . graphs . JRowsSelectorPanel instance = new kg . apc . jmeter . graphs . JRowsSelectorPanel ( new kg . apc . jmeter . graphs . GraphPanel ( ) ) ; javax . swing . JPanel result = instance . getGraphDisplayPanel ( ) ; "<AssertPlaceHolder>" ; } getGraphDisplayPanel ( ) { return jPanelGraphPreview ; }
|
org . junit . Assert . assertNotNull ( result )
|
shouldStoreDifferenceOfOutgoingTransferSslToNewMergedRecord ( ) { previousRecord . setOutgoingTransferSsl ( 1000 ) ; currentRecord . setOutgoingTransferSsl ( 1200 ) ; usagePollerHelper . calculateUsage ( currentRecord , previousRecord , newMergedRecord ) ; "<AssertPlaceHolder>" ; } getOutgoingTransferSsl ( ) { return outgoingTransferSsl ; }
|
org . junit . Assert . assertEquals ( 200 , newMergedRecord . getOutgoingTransferSsl ( ) )
|
testReaderProblem1 ( ) { de . ovgu . featureide . fm . extended . ui . io . objective . ObjectiveReaderResult r = de . ovgu . featureide . fm . extended . ui . io . objective . ObjectiveReader . readString ( features , attributes , "++1<sp>Phone;" ) ; "<AssertPlaceHolder>" ; } getObjective ( ) { return objective ; }
|
org . junit . Assert . assertEquals ( null , r . getObjective ( ) )
|
shouldFailWebSocketConnectionWhenServerSendPongFrameWithRsv5 ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . jmock . Expectations ( ) { { oneOf ( handler ) . sessionCreated ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionOpened ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionClosed ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; atMost ( 1 ) . of ( handler ) . exceptionCaught ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) , with ( org . hamcrest . core . AllOf . allOf ( any ( java . io . IOException . class ) , org . junit . internal . matchers . ThrowableMessageMatcher . hasMessage ( equal ( LoggingUtils . EARLY_TERMINATION_OF_IOSESSION_MESSAGE ) ) ) ) ) ; } } ) ; org . apache . mina . core . future . ConnectFuture connectFuture = connector . connect ( "ws://localhost:8080/echo" , null , handler ) ; connectFuture . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; k3po . finish ( ) ; } isConnected ( ) { return channel . isConnected ( ) ; }
|
org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) )
|
testReadFromWithIllegalMessageNum5 ( ) { target = new org . o3project . odenos . core . component . network . topology . Topology ( "101" , nodes , links ) ; org . msgpack . MessagePack msg = new org . msgpack . MessagePack ( ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; org . msgpack . packer . Packer pk = msg . createPacker ( out ) ; byte [ ] bytes ; java . io . ByteArrayInputStream in ; org . msgpack . unpacker . Unpacker upk = null ; try { pk . writeMapBegin ( 5 ) ; pk . write ( "type" ) ; pk . write ( "Topology" ) ; pk . write ( "version" ) ; pk . write ( "101" ) ; pk . write ( "nodes" ) ; pk . write ( target . getNodeMap ( ) ) ; pk . write ( "links" ) ; pk . write ( target . getLinkMap ( ) ) ; pk . writeMapEnd ( ) ; bytes = out . toByteArray ( ) ; in = new java . io . ByteArrayInputStream ( bytes ) ; upk = msg . createUnpacker ( in ) ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( "Exception<sp>in<sp>test<sp>setup" ) ; } target = org . mockito . Mockito . spy ( new org . o3project . odenos . core . component . network . topology . Topology ( "0" , null , null ) ) ; try { target . readFrom ( upk ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; return ; } org . junit . Assert . fail ( "could<sp>not<sp>catch<sp>an<sp>exception" ) ; } readFrom ( org . msgpack . unpacker . Unpacker ) { int size = upk . readMapBegin ( ) ; if ( size != ( org . o3project . odenos . remoteobject . event . BaseObjectChanged . MSG_NUM ) ) { throw new java . io . IOException ( ) ; } while ( ( size -- ) > 0 ) { java . lang . String field = upk . readString ( ) ; switch ( field ) { case "action" : action = upk . readString ( ) ; break ; case "prev" : if ( ! ( upk . trySkipNil ( ) ) ) { prev = upk . read ( this . msgClass ) ; } break ; case "curr" : if ( ! ( upk . trySkipNil ( ) ) ) { curr = upk . read ( this . msgClass ) ; } break ; default : throw new java . io . IOException ( ) ; } } upk . readMapEnd ( ) ; }
|
org . junit . Assert . assertTrue ( ( e instanceof java . io . IOException ) )
|
testGetArrowStyleList ( ) { group . setArrowStyleList ( java . util . Arrays . asList ( java . util . Optional . empty ( ) , java . util . Optional . of ( ArrowStyle . LEFT_ARROW ) , java . util . Optional . empty ( ) , java . util . Optional . of ( ArrowStyle . RIGHT_ARROW ) ) , 0 ) ; "<AssertPlaceHolder>" ; } getArrowStyleList ( int ) { return getShapes ( ) . stream ( ) . map ( ( sh ) -> sh instanceof net . sf . latexdraw . model . api . shape . ArrowableSingleShape ? java . util . Optional . of ( ( ( net . sf . latexdraw . model . api . shape . ArrowableSingleShape ) ( sh ) ) . getArrowStyle ( i ) ) : java . util . Optional . < net . sf . latexdraw . model . api . shape . ArrowStyle > empty ( ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; }
|
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( java . util . Optional . empty ( ) , java . util . Optional . of ( ArrowStyle . LEFT_ARROW ) , java . util . Optional . empty ( ) , java . util . Optional . of ( ArrowStyle . RIGHT_ARROW ) ) , group . getArrowStyleList ( 0 ) )
|
testLockFailedFromLockedToUnlocked ( ) { doThrow ( new com . xiaomi . infra . galaxy . talos . thrift . GalaxyTalosException ( ) ) . when ( com . xiaomi . infra . galaxy . talos . consumer . PartitionFetcherTest . consumerClientMock ) . lockPartition ( any ( com . xiaomi . infra . galaxy . talos . thrift . LockPartitionRequest . class ) ) ; com . xiaomi . infra . galaxy . talos . consumer . PartitionFetcherTest . partitionFetcher . lock ( ) ; java . lang . Thread . sleep ( 50 ) ; "<AssertPlaceHolder>" ; } isServing ( ) { return ( curState ) == ( com . xiaomi . infra . galaxy . talos . consumer . PartitionFetcher . TASK_STATE . LOCKED ) ; }
|
org . junit . Assert . assertEquals ( false , com . xiaomi . infra . galaxy . talos . consumer . PartitionFetcherTest . partitionFetcher . isServing ( ) )
|
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . journal . model . JournalArticleResource > journalArticleResources = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( journalArticleResources . isEmpty ( ) )
|
queryParam_encoding_expectEncodedParam ( ) { java . lang . String paramValue = "p%2Fz%2B3" ; com . amazonaws . serverless . proxy . model . AwsProxyRequest request = new com . amazonaws . serverless . proxy . internal . testutils . AwsProxyRequestBuilder ( "/echo" , "GET" ) . queryString ( com . amazonaws . serverless . proxy . struts2 . Struts2AwsProxyTest . QUERY_STRING_KEY , paramValue ) . build ( ) ; com . amazonaws . serverless . proxy . model . AwsProxyResponse resp = handler . proxy ( request , com . amazonaws . serverless . proxy . struts2 . Struts2AwsProxyTest . lambdaContext ) ; "<AssertPlaceHolder>" ; validateSingleValueModel ( resp , paramValue ) ; } getStatusCode ( ) { return statusCode ; }
|
org . junit . Assert . assertEquals ( 200 , resp . getStatusCode ( ) )
|
synchronizedEvent_null_noSynchronization ( ) { com . vaadin . flow . component . AbstractSinglePropertyFieldTest . StringField stringField = new com . vaadin . flow . component . AbstractSinglePropertyFieldTest . StringField ( ) ; com . vaadin . flow . function . SerializableRunnable unregisterListener = org . mockito . Mockito . mock ( com . vaadin . flow . function . SerializableRunnable . class ) ; stringField . getSynchronizationRegistration ( ) . onUnregister ( unregisterListener ) ; stringField . setSynchronizedEvent ( null ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( unregisterListener ) . run ( ) ; } getSynchronizationRegistration ( ) { return super . getSynchronizationRegistration ( ) ; }
|
org . junit . Assert . assertNull ( stringField . getSynchronizationRegistration ( ) )
|
testAsIterator ( ) { queue . asIterator ( ) ; "<AssertPlaceHolder>" ; } remainingBufs ( ) { return ( last ) >= ( first ) ? ( last ) - ( first ) : ( bufs . length ) + ( ( last ) - ( first ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , queue . remainingBufs ( ) )
|
selectsItemsBasedOnString ( ) { table . select ( "Index:9" ) ; org . eclipse . swtbot . swt . finder . utils . TableCollection selection = table . selection ( ) ; "<AssertPlaceHolder>" ; } get ( int , int ) { return get ( row ) . get ( column ) ; }
|
org . junit . Assert . assertEquals ( "Index:9" , selection . get ( 0 , 0 ) )
|
testNegativeShortArray ( ) { short [ ] l = new short [ ] { - 12 } ; java . lang . Object deserialize = org . mapdb . elsa . ElsaSerializerBaseTest . clone ( l ) ; "<AssertPlaceHolder>" ; } clone ( E ) { return org . mapdb . elsa . ElsaSerializerBaseTest . clonePojo ( value ) ; }
|
org . junit . Assert . assertTrue ( org . mapdb . elsa . Arrays . equals ( l , ( ( short [ ] ) ( deserialize ) ) ) )
|
testReadOnlyDefault ( ) { final org . scijava . io . nio . ByteBufferByteBank bank = new org . scijava . io . nio . ByteBufferByteBank ( ) ; "<AssertPlaceHolder>" ; } isReadOnly ( ) { final java . lang . String className = buffer . getClass ( ) . getName ( ) ; return ( className . equals ( "java.nio.HeapByteBufferR" ) ) || ( className . equals ( "java.nio.DirectByteBufferR" ) ) ; }
|
org . junit . Assert . assertFalse ( bank . isReadOnly ( ) )
|
testErrorMessageIsNumber_ReturnsStringValue ( ) { software . amazon . awssdk . protocols . json . internal . dom . SdkJsonNode jsonNode = parseJson ( "{\"message\":<sp>1}" ) ; java . lang . String parsed = software . amazon . awssdk . protocols . json . AwsJsonErrorMessageParserTest . parser . parseErrorMessage ( responseBuilder . build ( ) , jsonNode ) ; "<AssertPlaceHolder>" ; } build ( ) { return new software . amazon . awssdk . services . s3 . S3Utilities ( this ) ; }
|
org . junit . Assert . assertEquals ( "1" , parsed )
|
testGetScope_1 ( ) { org . jinstagram . auth . model . OAuthConfig fixture = new org . jinstagram . auth . model . OAuthConfig ( "key" , "secret" , "callback" , "scope" , "display" ) ; fixture . setRequestProxy ( org . jinstagram . auth . model . OAuthConfigTest . proxy ) ; java . lang . String result = fixture . getScope ( ) ; "<AssertPlaceHolder>" ; } getScope ( ) { return scope ; }
|
org . junit . Assert . assertNotNull ( result )
|
ruleIsAppliedOnce ( ) { org . junit . rules . ClassRulesTest . ExampleTestWithClassRule . counter . count = 0 ; org . junit . runner . JUnitCore . runClasses ( org . junit . rules . ClassRulesTest . ExampleTestWithClassRule . class ) ; "<AssertPlaceHolder>" ; } runClasses ( java . lang . Class [ ] ) { return org . junit . runner . JUnitCore . runClasses ( org . junit . runner . JUnitCore . defaultComputer ( ) , classes ) ; }
|
org . junit . Assert . assertEquals ( 1 , org . junit . rules . ClassRulesTest . ExampleTestWithClassRule . counter . count )
|
basicMap ( ) { javax . persistence . EntityManager em = factory . createEntityManager ( ) ; org . meri . jpa . relationships . entities . manytomany . MtmOwner owner = em . find ( org . meri . jpa . relationships . entities . manytomany . MtmOwner . class , 1 ) ; org . meri . jpa . relationships . entities . manytomany . MtmInverse inverse = em . find ( org . meri . jpa . relationships . entities . manytomany . MtmInverse . class , 5 ) ; java . util . Map < java . lang . String , org . meri . jpa . relationships . entities . manytomany . MtmOwner > owners = inverse . getOwners ( ) ; "<AssertPlaceHolder>" ; em . close ( ) ; } getName ( ) { return name ; }
|
org . junit . Assert . assertEquals ( owner , owners . get ( owner . getName ( ) ) )
|
testSendMessageIncludeSetters ( ) { info . novatec . testit . livingdoc . reflect . Message send = fixture . send ( "setter" ) ; send . send ( "value" ) ; "<AssertPlaceHolder>" ; } send ( java . lang . String [ ] ) { assertArgumentsCount ( args ) ; ognlExpression . insertValue ( args [ 0 ] ) ; return null ; }
|
org . junit . Assert . assertEquals ( "value" , target . field )
|
getAdaptedReallocatorMustReturnNullIfNoAllocatorConfigured ( ) { "<AssertPlaceHolder>" ; } getAdaptedReallocator ( ) { if ( ( allocator ) == null ) { return null ; } if ( ( metricsRecorder ) == null ) { if ( ( allocator ) instanceof stormpot . Reallocator ) { return ( ( stormpot . Reallocator < T > ) ( allocator ) ) ; } return new stormpot . ReallocatingAdaptor ( ( ( stormpot . Allocator < T > ) ( allocator ) ) ) ; } else { if ( ( allocator ) instanceof stormpot . Reallocator ) { return new stormpot . TimingReallocatorAdaptor ( ( ( stormpot . Reallocator < T > ) ( allocator ) ) , metricsRecorder ) ; } return new stormpot . TimingReallocatingAdaptor ( ( ( stormpot . Allocator < T > ) ( allocator ) ) , metricsRecorder ) ; } }
|
org . junit . Assert . assertNull ( config . getAdaptedReallocator ( ) )
|
testROIDeserialization ( ) { org . eclipse . dawnsci . analysis . api . roi . IROI actual = marshaller . unmarshal ( org . eclipse . dawnsci . json . test . JsonMarshallerROITypesTest . JSON_FOR_RECTANGULAR_ROI , org . eclipse . dawnsci . analysis . api . roi . IROI . class ) ; org . eclipse . dawnsci . analysis . api . roi . IROI expected = new org . eclipse . dawnsci . analysis . dataset . roi . RectangularROI ( ( - 3.5 ) , 4.0 , 8.0 , 6.1 , 0.0 ) ; "<AssertPlaceHolder>" ; } unmarshal ( java . lang . String , java . lang . Class ) { try { if ( ( registeredClassMapper ) == null ) registeredClassMapper = createRegisteredClassMapper ( ) ; if ( beanClass != null ) { return registeredClassMapper . readValue ( string , beanClass ) ; } @ org . eclipse . dawnsci . json . SuppressWarnings ( "unchecked" ) U result = ( ( U ) ( registeredClassMapper . readValue ( string , java . lang . Object . class ) ) ) ; return result ; } catch ( com . fasterxml . jackson . databind . JsonMappingException | java . lang . IllegalArgumentException ex ) { if ( ( ( ex instanceof com . fasterxml . jackson . databind . JsonMappingException ) && ( ex . getMessage ( ) . contains ( org . eclipse . dawnsci . json . MarshallerService . TYPE_INFO_FIELD_NAME ) ) ) || ( ( ex instanceof java . lang . IllegalArgumentException ) && ( ( ex . getCause ( ) ) instanceof java . lang . ClassNotFoundException ) ) ) { try { if ( ( oldMapper ) == null ) oldMapper = createOldMapper ( ) ; return oldMapper . readValue ( string , beanClass ) ; } catch ( java . lang . Exception withoutTypeException ) { throw ex ; } } throw ex ; } }
|
org . junit . Assert . assertEquals ( expected , actual )
|
getNearestHouse_SeveralHouse ( ) { java . util . TreeSet < com . gisgraphy . domain . geoloc . entity . HouseNumber > houses = new java . util . TreeSet < com . gisgraphy . domain . geoloc . entity . HouseNumber > ( ) ; com . vividsolutions . jts . geom . Point houseLocation = com . gisgraphy . helper . GeolocHelper . createPoint ( 4.0 , 5.0 ) ; com . gisgraphy . domain . geoloc . entity . HouseNumber house_far = new com . gisgraphy . domain . geoloc . entity . HouseNumber ( "far" , houseLocation , "fr" ) ; com . vividsolutions . jts . geom . Point houseLocation2 = com . gisgraphy . helper . GeolocHelper . createPoint ( 3.1 , 4.1 ) ; com . gisgraphy . domain . geoloc . entity . HouseNumber house2_near = new com . gisgraphy . domain . geoloc . entity . HouseNumber ( "near" , houseLocation2 , "fr" ) ; houses . add ( house_far ) ; houses . add ( house2_near ) ; com . vividsolutions . jts . geom . Point searchPoint = com . gisgraphy . helper . GeolocHelper . createPoint ( 3.0 , 4.0 ) ; com . gisgraphy . reversegeocoding . HouseNumberDistance nearestHouse = generator . getNearestHouse ( houses , searchPoint ) ; "<AssertPlaceHolder>" ; } distance ( com . vividsolutions . jts . geom . Point , java . lang . String ) { return com . gisgraphy . hibernate . projection . SpatialProjection . distance_function ( point , locationColumnName , com . gisgraphy . hibernate . projection . SpatialProjection . DISTANCE_FUNCTION ) ; }
|
org . junit . Assert . assertEquals ( new com . gisgraphy . reversegeocoding . HouseNumberDistance ( house2_near , com . gisgraphy . helper . GeolocHelper . distance ( searchPoint , houseLocation2 ) ) , nearestHouse )
|
filterJars_null_arg_excludedJarsProperty ( ) { org . pentaho . hadoop . shim . HadoopConfigurationLocator locator = new org . pentaho . hadoop . shim . HadoopConfigurationLocator ( ) ; org . apache . commons . vfs2 . FileObject root = org . apache . commons . vfs2 . VFS . getManager ( ) . resolveFile ( org . pentaho . hadoop . shim . HadoopExcludeJarsTest . HADOOP_CONFIGURATIONS_PATH ) ; java . util . List < java . net . URL > urls = locator . parseURLs ( root , root . toString ( ) ) ; count = urls . size ( ) ; java . util . List < java . net . URL > list = locator . filterJars ( urls , null ) ; "<AssertPlaceHolder>" ; } filterJars ( java . util . List , java . lang . String ) { java . util . regex . Pattern pattern ; java . util . regex . Matcher matcher ; java . lang . String [ ] excludedJars ; if ( ! ( ( excludedJarsProperty == null ) || ( excludedJarsProperty . trim ( ) . isEmpty ( ) ) ) ) { excludedJars = excludedJarsProperty . split ( "," ) ; if ( excludedJars != null ) { for ( java . lang . String excludedJar : excludedJars ) { pattern = java . util . regex . Pattern . compile ( ( ( ".*/" + ( excludedJar . toLowerCase ( ) ) ) + "-.*\\.jar$" ) ) ; matcher = pattern . matcher ( "" ) ; java . util . Iterator < java . net . URL > iterator = urls . listIterator ( ) ; while ( iterator . hasNext ( ) ) { java . net . URL url = iterator . next ( ) ; if ( url . toString ( ) . toLowerCase ( ) . contains ( excludedJar . toLowerCase ( ) ) ) { if ( ( excludedJar . endsWith ( ".jar" ) ) || ( url . toString ( ) . toLowerCase ( ) . contains ( ( ( excludedJar . toLowerCase ( ) ) + ".jar" ) ) ) ) { iterator . remove ( ) ; } else { if ( matcher . reset ( url . toString ( ) . toLowerCase ( ) ) . matches ( ) ) { iterator . remove ( ) ; } } } } } } } return urls ; }
|
org . junit . Assert . assertEquals ( count , list . size ( ) )
|
upgradePeerReviewsToVrc3Test ( ) { javax . xml . bind . JAXBContext jaxbContext1 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . record . summary_rc2 . PeerReviews . class ) ; javax . xml . bind . JAXBContext jaxbContext2 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . record . summary_rc2 . PeerReviews . class ) ; javax . xml . bind . Unmarshaller jaxbUnmarshaller = jaxbContext1 . createUnmarshaller ( ) ; java . io . InputStream rc2Stream = org . orcid . record_2_0 . ConvertVrc2ToVrc3Test . class . getClassLoader ( ) . getResourceAsStream ( "test-peer-reviews-2.0_rc2.xml" ) ; java . io . InputStream rc3Stream = org . orcid . record_2_0 . ConvertVrc2ToVrc3Test . class . getClassLoader ( ) . getResourceAsStream ( "test-peer-reviews-2.0_rc3.xml" ) ; org . orcid . jaxb . model . record . summary_rc2 . PeerReviews rc2PeerReviews = ( ( org . orcid . jaxb . model . record . summary_rc2 . PeerReviews ) ( jaxbUnmarshaller . unmarshal ( rc2Stream ) ) ) ; jaxbUnmarshaller = jaxbContext2 . createUnmarshaller ( ) ; org . orcid . jaxb . model . record . summary_rc3 . PeerReviews rc3PeerReviews1 = ( ( org . orcid . jaxb . model . record . summary_rc3 . PeerReviews ) ( jaxbUnmarshaller . unmarshal ( rc3Stream ) ) ) ; org . orcid . core . version . V2Convertible result = versionConverterV2_0_rc2ToV2_0_rc3 . upgrade ( new org . orcid . core . version . V2Convertible ( rc2PeerReviews , "v2_rc2" ) ) ; org . orcid . jaxb . model . record . summary_rc3 . PeerReviews rc3PeerReviews2 = ( ( org . orcid . jaxb . model . record . summary_rc3 . PeerReviews ) ( result . getObjectToConvert ( ) ) ) ; "<AssertPlaceHolder>" ; } getObjectToConvert ( ) { return objectToConvert ; }
|
org . junit . Assert . assertEquals ( rc3PeerReviews1 , rc3PeerReviews2 )
|
GetAll ( ) { System . out . println ( "Get<sp>both<sp>notes" ) ; java . util . List < com . mysema . rdfbean . domains . NoteTermDomain . Note > notes = session . getAll ( com . mysema . rdfbean . domains . NoteTermDomain . Note . class , note1Id , note2Id ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
|
org . junit . Assert . assertEquals ( 2 , notes . size ( ) )
|
testIsUseSuffixTrueByDefault ( ) { "<AssertPlaceHolder>" ; } isUseSuffix ( ) { return org . talend . dataprep . qa . config . FeatureContext . USE_SUFFIX ; }
|
org . junit . Assert . assertTrue ( org . talend . dataprep . qa . config . FeatureContext . isUseSuffix ( ) )
|
testNonBlocking ( ) { boolean fixture = true ; this . libshout . setNonBlocking ( fixture ) ; "<AssertPlaceHolder>" ; } isNonBlocking ( ) { return ( com . gmail . kunicins . olegs . libshout . Libshout . shout_get_nonblocking ( this . instance ) ) == 1 ; }
|
org . junit . Assert . assertEquals ( fixture , this . libshout . isNonBlocking ( ) )
|
withOneSingleChar ( ) { "<AssertPlaceHolder>" ; } compress ( java . lang . String ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; int count = 0 ; for ( int i = 0 ; i < ( s . length ( ) ) ; i ++ ) { count ++ ; if ( ( i == ( ( s . length ( ) ) - 1 ) ) || ( ( s . charAt ( i ) ) != ( s . charAt ( ( i + 1 ) ) ) ) ) { sb . append ( count ) . append ( s . charAt ( i ) ) ; count = 0 ; } } return ( sb . length ( ) ) < ( s . length ( ) ) ? sb . toString ( ) : s ; }
|
org . junit . Assert . assertEquals ( "a" , s . compress ( "a" ) )
|
testSetFullPhoneAutocompleteWithType ( ) { java . lang . String expected ; com . github . bordertech . wcomponents . WSingleSelect field = new com . github . bordertech . wcomponents . WSingleSelect ( ) ; for ( com . github . bordertech . wcomponents . autocomplete . segment . PhoneFormat phoneType : com . github . bordertech . wcomponents . autocomplete . segment . PhoneFormat . values ( ) ) { expected = com . github . bordertech . wcomponents . autocomplete . AutocompleteUtil . getCombinedAutocomplete ( phoneType . getValue ( ) , Telephone . FULL . getValue ( ) ) ; field . setFullPhoneAutocomplete ( phoneType ) ; "<AssertPlaceHolder>" ; } } getAutocomplete ( ) { return getComponentModel ( ) . autocomplete ; }
|
org . junit . Assert . assertEquals ( expected , field . getAutocomplete ( ) )
|
testIntegerRange ( ) { java . lang . String expected = "2147483648" ; org . semanticweb . owlapi . model . OWLDatatype type = df . getIntegerOWLDatatype ( ) ; org . semanticweb . owlapi . model . OWLLiteral lit = df . getOWLLiteral ( expected , type ) ; "<AssertPlaceHolder>" ; } getLiteral ( ) { return verifyNotNull ( value ) ; }
|
org . junit . Assert . assertEquals ( expected , lit . getLiteral ( ) )
|
testReadFromWithMessageNum6 ( ) { org . o3project . odenos . core . component . network . flow . FlowChanged target = new org . o3project . odenos . core . component . network . flow . FlowChanged ( paramPrev , paramCurr , org . o3project . odenos . core . component . network . flow . FlowChanged . Action . add ) ; org . msgpack . MessagePack msg = new org . msgpack . MessagePack ( ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; org . msgpack . packer . Packer pk = msg . createPacker ( out ) ; byte [ ] bytes ; java . io . ByteArrayInputStream in ; org . msgpack . unpacker . Unpacker upk = null ; try { pk . writeMapBegin ( 6 ) ; pk . write ( "id" ) ; pk . write ( "TestId" ) ; pk . write ( "version" ) ; pk . write ( "VERSION" ) ; pk . write ( "action" ) ; pk . write ( "update" ) ; pk . write ( "prev" ) ; pk . write ( target . prev ) ; pk . write ( "curr" ) ; pk . write ( ( ( java . lang . String ) ( null ) ) ) ; pk . writeMapEnd ( ) ; bytes = out . toByteArray ( ) ; in = new java . io . ByteArrayInputStream ( bytes ) ; upk = msg . createUnpacker ( in ) ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( "Exception<sp>in<sp>test<sp>setup" ) ; } target = org . mockito . Mockito . spy ( new org . o3project . odenos . core . component . network . flow . FlowChanged ( ) ) ; try { target . readFrom ( upk ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; return ; } org . junit . Assert . fail ( "could<sp>not<sp>catch<sp>an<sp>exception" ) ; } readFrom ( org . msgpack . unpacker . Unpacker ) { int size = upk . readMapBegin ( ) ; if ( size != ( org . o3project . odenos . remoteobject . event . BaseObjectChanged . MSG_NUM ) ) { throw new java . io . IOException ( ) ; } while ( ( size -- ) > 0 ) { java . lang . String field = upk . readString ( ) ; switch ( field ) { case "action" : action = upk . readString ( ) ; break ; case "prev" : if ( ! ( upk . trySkipNil ( ) ) ) { prev = upk . read ( this . msgClass ) ; } break ; case "curr" : if ( ! ( upk . trySkipNil ( ) ) ) { curr = upk . read ( this . msgClass ) ; } break ; default : throw new java . io . IOException ( ) ; } } upk . readMapEnd ( ) ; }
|
org . junit . Assert . assertTrue ( ( e instanceof java . io . IOException ) )
|
testSetCompensationVector ( ) { dtm . setFloodlightProvider ( new net . floodlightcontroller . core . test . MockFloodlightProvider ( ) ) ; net . floodlightcontroller . core . IOFSwitch switchMock = org . easymock . EasyMock . createNiceMock ( net . floodlightcontroller . core . IOFSwitch . class ) ; expect ( switchMock . getStringId ( ) ) . andReturn ( "mock" ) ; replay ( switchMock ) ; dtm . setSwitch ( null ) ; dtm . setSwitch ( switchMock ) ; dtm . setConfigData ( TestSetUpHelper . CONFIG_DATA_1DC ) ; try { dtm . setCompensationVector ( null ) ; org . junit . Assert . fail ( "Expected<sp>IllegalArgumentException" ) ; } catch ( java . lang . IllegalArgumentException ex ) { eu . smartenit . sdn . floodlight090 . dtm . DTMVectorsProcessingTest . logger . debug ( ( "Caught<sp>exception:<sp>" + ( ex . toString ( ) ) ) ) ; } eu . smartenit . sbox . db . dto . CVector compensationVector = new eu . smartenit . sbox . db . dto . CVector ( ) ; try { dtm . setCompensationVector ( compensationVector ) ; org . junit . Assert . fail ( "Expected<sp>IllegalArgumentException" ) ; } catch ( java . lang . IllegalArgumentException ex ) { eu . smartenit . sdn . floodlight090 . dtm . DTMVectorsProcessingTest . logger . debug ( ( "Caught<sp>exception:<sp>" + ( ex . toString ( ) ) ) ) ; } compensationVector . setVectorValues ( null ) ; compensationVector . addVectorValueForTunnelEndPrefix ( new eu . smartenit . sbox . db . dto . NetworkAddressIPv4 ( eu . smartenit . sdn . floodlight090 . dtm . DTMVectorsProcessingTest . tunnelEndPrefix1 , 24 ) , 0 ) ; try { dtm . setCompensationVector ( compensationVector ) ; org . junit . Assert . fail ( "Expected<sp>IllegalArgumentException" ) ; } catch ( java . lang . IllegalArgumentException ex ) { eu . smartenit . sdn . floodlight090 . dtm . DTMVectorsProcessingTest . logger . debug ( ( "Caught<sp>exception:<sp>" + ( ex . toString ( ) ) ) ) ; } compensationVector . setVectorValues ( null ) ; compensationVector . addVectorValueForTunnelEndPrefix ( new eu . smartenit . sbox . db . dto . NetworkAddressIPv4 ( eu . smartenit . sdn . floodlight090 . dtm . DTMVectorsProcessingTest . tunnelEndPrefix1 , 24 ) , 0 ) ; compensationVector . addVectorValueForTunnelEndPrefix ( new eu . smartenit . sbox . db . dto . NetworkAddressIPv4 ( eu . smartenit . sdn . floodlight090 . dtm . DTMVectorsProcessingTest . tunnelEndPrefix2 , 24 ) , 1 ) ; try { dtm . setCompensationVector ( compensationVector ) ; org . junit . Assert . fail ( "Expected<sp>IllegalArgumentException" ) ; } catch ( java . lang . IllegalArgumentException ex ) { eu . smartenit . sdn . floodlight090 . dtm . DTMVectorsProcessingTest . logger . debug ( ( "Caught<sp>exception:<sp>" + ( ex . toString ( ) ) ) ) ; } compensationVector . setVectorValues ( null ) ; compensationVector . addVectorValueForTunnelEndPrefix ( new eu . smartenit . sbox . db . dto . NetworkAddressIPv4 ( eu . smartenit . sdn . floodlight090 . dtm . DTMVectorsProcessingTest . tunnelEndPrefix1 , 24 ) , ( - 1 ) ) ; compensationVector . addVectorValueForTunnelEndPrefix ( new eu . smartenit . sbox . db . dto . NetworkAddressIPv4 ( eu . smartenit . sdn . floodlight090 . dtm . DTMVectorsProcessingTest . tunnelEndPrefix2 , 24 ) , 1 ) ; dtm . setCompensationVector ( compensationVector ) ; "<AssertPlaceHolder>" ; } getCompensationVector ( ) { eu . smartenit . sdn . floodlight090 . dtm . DTM . logger . debug ( "getCompensationVector()<sp>one-liner" ) ; return compensationVector ; }
|
org . junit . Assert . assertEquals ( compensationVector , dtm . getCompensationVector ( ) )
|
testGeneratingBaseConusmerScenario3 ( ) { haveProperty = false ; java . io . File consumerProps = createPropertyFile ( destDir . getAbsolutePath ( ) , CONSUMER_PROPERTIES ) ; consumerProper . remove ( "-genType" 4 ) ; fillProperties ( consumerProper , consumerProps ) ; java . io . File wsdl = getCodegenQEDataFileInput ( "-genType" 3 ) ; java . lang . String [ ] testArgs1 = new java . lang . String [ ] { "-genType" 0 , "AccountService" , "-genType" , "Consumer" , "-wsdl" , wsdl . getAbsolutePath ( ) , "-dest" , destDir . getAbsolutePath ( ) , "-genType" 7 , ( destDir . getAbsolutePath ( ) ) + "/src" , "-genType" 2 , "-genType" 8 , "-genType" 1 , "COMMON" , "-bin" , binDir . getAbsolutePath ( ) , "-genType" 5 , destDir . getAbsolutePath ( ) , "-cn" , "-genType" 6 } ; performDirectCodeGen ( testArgs1 , binDir ) ; baseConsumer = ( destDir . getAbsolutePath ( ) ) + "/src/org/ebayopensource/turmeric/common/v1/services/gen/BaseAccountServiceConsumer.java" ; baseConsumerClass = new java . io . File ( baseConsumer ) ; "<AssertPlaceHolder>" ; } exists ( ) { return legacyPropertiesFile . exists ( ) ; }
|
org . junit . Assert . assertTrue ( baseConsumerClass . exists ( ) )
|
testEquals4 ( ) { e1 = org . eclipse . tracecompass . internal . ctf . core . event . LostEventDeclaration . INSTANCE ; e2 = org . eclipse . tracecompass . internal . ctf . core . event . LostEventDeclaration . INSTANCE ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( e1 , e2 )
|
testStandAloneOuterJoinWithPrimaryKey ( ) { sqlText = format ( ( "A1<sp>|B1<sp>|<sp>A2<sp>|<sp>B2<sp>|<sp>A3<sp>|<sp>B3<sp>|\n" 8 + ( ( "select<sp>a1,b1,a2,a3<sp>from<sp>t1<sp>--splice-properties<sp>index=null<sp>\n" 1 + "A1<sp>|B1<sp>|<sp>A2<sp>|<sp>B2<sp>|<sp>A3<sp>|<sp>B3<sp>|\n" 0 ) + "MERGE" 0 ) ) , this . joinStrategy , this . useSparkString , this . joinStrategy ) ; rowContainsQuery ( 5 , ( "--------------------\n" 9 + sqlText ) , "<sp>1<sp>|<sp>2<sp>|<sp>1<sp>|<sp>2<sp>|<sp>1<sp>|<sp>2<sp>|\n" 2 , methodWatcher ) ; expected = "select<sp>a1,b1,a2,a3<sp>from<sp>t1<sp>--splice-properties<sp>index=null<sp>\n" 7 + ( ( ( ( ( ( ( ( ( "values<sp>(9,9,9,9)" 2 + "select<sp>a1,b1,a2,a3<sp>from<sp>t1<sp>--splice-properties<sp>index=null<sp>\n" 9 ) + "select<sp>a1,b1,a2,a3<sp>from<sp>t1<sp>--splice-properties<sp>index=null<sp>\n" 9 ) + "select<sp>a1,b1,a2,a3<sp>from<sp>t1<sp>--splice-properties<sp>index=null<sp>\n" 9 ) + "select<sp>a1,b1,a2,a3<sp>from<sp>t1<sp>--splice-properties<sp>index=null<sp>\n" 9 ) + "A1<sp>|B1<sp>|<sp>A2<sp>|<sp>B2<sp>|<sp>A3<sp>|<sp>B3<sp>|\n" 9 ) + "A1<sp>|B1<sp>|<sp>A2<sp>|<sp>B2<sp>|<sp>A3<sp>|<sp>B3<sp>|\n" 9 ) + "A1<sp>|B1<sp>|<sp>A2<sp>|<sp>B2<sp>|<sp>A3<sp>|<sp>B3<sp>|\n" 9 ) + "A1<sp>|B1<sp>|<sp>A2<sp>|<sp>B2<sp>|<sp>A3<sp>|<sp>B3<sp>|\n" 9 ) + "<sp>1<sp>|<sp>2<sp>|<sp>1<sp>|<sp>2<sp>|<sp>1<sp>|<sp>2<sp>|\n" 9 ) ; rs = methodWatcher . executeQuery ( sqlText ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
|
org . junit . Assert . assertEquals ( expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
|
testOpenTwice ( ) { org . orbisgis . coremap . layerModel . MapContext mc = new org . orbisgis . coremap . layerModel . OwsMapContext ( getDataManager ( ) ) ; mc . open ( new org . orbisgis . commons . progress . NullProgressMonitor ( ) ) ; try { mc . open ( new org . orbisgis . commons . progress . NullProgressMonitor ( ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . IllegalStateException e ) { } } open ( org . orbisgis . coremap . stream . WMSStreamSource ) { this . streamSource = streamSource ; org . orbisgis . coremap . stream . SimpleWMSDriver . LOG . trace ( "Opening<sp>WMS<sp>Stream" ) ; try { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( streamSource . getScheme ( ) ) ; sb . append ( "://" ) ; sb . append ( streamSource . getHost ( ) ) ; if ( ( streamSource . getPort ( ) ) != ( WMSStreamSource . DEFAULT_PORT ) ) { sb . append ( ":" ) . append ( streamSource . getPort ( ) ) ; } sb . append ( streamSource . getPath ( ) ) ; sb . append ( "?" ) ; java . util . Map < java . lang . String , java . lang . String > others = streamSource . getOthersQueryMap ( ) ; for ( Map . Entry < java . lang . String , java . lang . String > entry : others . entrySet ( ) ) { sb . append ( entry . getKey ( ) ) . append ( "=" ) . append ( entry . getValue ( ) ) . append ( "&" ) ; } java . lang . String streamURL = sb . toString ( ) ; wmsClient = new com . vividsolutions . wms . WMService ( streamURL , streamSource . getVersion ( ) ) ; wmsClient . initialize ( ) ; cap = wmsClient . getCapabilities ( ) ; java . lang . String name = streamSource . getLayerName ( ) ; com . vividsolutions . wms . MapLayer ml = cap . getTopLayer ( ) ; mapLayer = find ( name , ml ) ; com . vividsolutions . wms . BoundingBox bbox = getLayerBoundingBox ( mapLayer , streamSource . getCRS ( ) ) ; envelope = new com . vividsolutions . jts . geom . Envelope ( bbox . getWestBound ( ) , bbox . getEastBound ( ) , bbox . getSouthBound ( ) , bbox . getNorthBound ( ) ) ; } catch ( java . net . ConnectException e ) { throw new java . io . IOException ( e ) ; } }
|
org . junit . Assert . assertTrue ( false )
|
withPortStringWhenPortIsNull ( ) { final com . azure . common . implementation . http . UrlBuilder builder = new com . azure . common . implementation . http . UrlBuilder ( ) . withPort ( 8080 ) ; builder . withPort ( null ) ; "<AssertPlaceHolder>" ; } port ( ) { return this . port ; }
|
org . junit . Assert . assertNull ( builder . port ( ) )
|
testWebContextDefinesLocaleModule ( ) { java . lang . String sessionLocale = "fo_BA" ; when ( this . mockRequest . getParameter ( "locale" ) ) . thenReturn ( sessionLocale ) ; final java . lang . String response = executeWebContextFilter ( ) ; java . lang . String expected = ( ( ( "//<sp>If<sp>RequireJs<sp>is<sp>available,<sp>supply<sp>a<sp>module" + ( "\nif<sp>(typeof(pen)<sp>!==<sp>\'undefined\'<sp>&&<sp>pen.define)<sp>{" + "\n<sp>pen.define(\'Locale\',<sp>{locale:<sp>\"" ) ) + sessionLocale ) + "\"<sp>});" ) + "\n}\n" ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { return org . pentaho . mantle . client . solutionbrowser . filepicklist . RecentPickList . recentPickList . contains ( new org . pentaho . mantle . client . solutionbrowser . filepicklist . RecentPickItem ( fileNameWithPath ) ) ; }
|
org . junit . Assert . assertTrue ( response . contains ( expected ) )
|
testDoGetReservedCharactersDisplay ( ) { java . lang . String stringBuffer = "/,\\,\\t,\\r,\\n" ; java . util . List < java . lang . Character > characters = new java . util . ArrayList < java . lang . Character > ( ) ; characters . add ( '/' ) ; characters . add ( '\\' ) ; characters . add ( '\t' ) ; characters . add ( '\r' ) ; characters . add ( '\n' ) ; doReturn ( "\\t" ) . when ( org . pentaho . platform . web . http . api . resources . services . FileServiceTest . fileService ) . escapeJava ( ( "" + ( characters . get ( 2 ) ) ) ) ; doReturn ( "\\r" ) . when ( org . pentaho . platform . web . http . api . resources . services . FileServiceTest . fileService ) . escapeJava ( ( "" + ( characters . get ( 3 ) ) ) ) ; doReturn ( "\\n" ) . when ( org . pentaho . platform . web . http . api . resources . services . FileServiceTest . fileService ) . escapeJava ( ( "" + ( characters . get ( 4 ) ) ) ) ; doReturn ( characters ) . when ( org . pentaho . platform . web . http . api . resources . services . FileServiceTest . fileService . defaultUnifiedRepositoryWebService ) . getReservedChars ( ) ; java . lang . StringBuffer buffer = org . pentaho . platform . web . http . api . resources . services . FileServiceTest . fileService . doGetReservedCharactersDisplay ( ) ; "<AssertPlaceHolder>" ; verify ( org . pentaho . platform . web . http . api . resources . services . FileServiceTest . fileService , times ( 3 ) ) . escapeJava ( anyString ( ) ) ; } toString ( ) { return ( ( ( "UserPermission[name=" + ( name ) ) + ",<sp>mask=" ) + ( mask ) ) + "]" ; }
|
org . junit . Assert . assertEquals ( buffer . toString ( ) , stringBuffer . toString ( ) )
|
arrayListRemoveAll ( ) { java . lang . String mSig = "<java.util.ArrayList:<sp>boolean<sp>removeAll(java.util.Collection)>" ; java . util . Set < soot . jimple . infoflow . methodSummary . data . summary . MethodFlow > flow = createSummaries ( mSig ) . getAllFlows ( ) ; "<AssertPlaceHolder>" ; } getAllFlows ( ) { return ( this . flows ) == null ? null : this . flows . values ( ) ; }
|
org . junit . Assert . assertNotNull ( flow )
|
getNumberOfPages ( ) { final long expected = 50 ; when ( readPersistenceService . getNumberOfEntities ( org . bonitasoft . engine . page . SPage . class , queryOptions , null ) ) . thenReturn ( expected ) ; final long numberOfPages = pageServiceImpl . getNumberOfPages ( queryOptions ) ; "<AssertPlaceHolder>" ; } getNumberOfPages ( org . bonitasoft . engine . persistence . QueryOptions ) { return persistenceService . getNumberOfEntities ( org . bonitasoft . engine . page . SPage . class , options , null ) ; }
|
org . junit . Assert . assertEquals ( expected , numberOfPages )
|
getDurationReportByMonthDisabledTenantCheck ( ) { testRule . deployForTenant ( org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyHistoricProcessInstanceReportCmdTenantCheckTest . TENANT_ONE , org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyHistoricProcessInstanceReportCmdTenantCheckTest . BPMN_PROCESS ) ; startAndCompleteProcessInstance ( null ) ; identityService . setAuthentication ( "user" , null , null ) ; processEngineConfiguration . setTenantCheckEnabled ( false ) ; java . util . List < org . camunda . bpm . engine . history . DurationReportResult > result = historyService . createHistoricProcessInstanceReport ( ) . duration ( org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MONTH ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( ( ( historicProcessInstanceIds . size ( ) ) + ( historicDecisionInstanceIds . size ( ) ) ) + ( historicCaseInstanceIds . size ( ) ) ) + ( historicBatchIds . size ( ) ) ; }
|
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) )
|
testSetJobNextRunToTheFuture ( ) { org . quartz . Trigger trigger = org . mockito . Mockito . mock ( org . quartz . Trigger . class ) ; org . pentaho . platform . api . scheduler2 . Job job = new org . pentaho . platform . api . scheduler2 . Job ( ) ; org . pentaho . platform . scheduler2 . quartz . QuartzScheduler quartzScheduler = new org . pentaho . platform . scheduler2 . quartz . QuartzScheduler ( ) ; long nowDate = new java . util . Date ( ) . getTime ( ) ; long futureDate = nowDate + 1000000000 ; org . mockito . Mockito . when ( trigger . getNextFireTime ( ) ) . thenReturn ( new java . util . Date ( futureDate ) ) ; org . mockito . Mockito . when ( trigger . getFireTimeAfter ( any ( ) ) ) . thenReturn ( new java . util . Date ( nowDate ) ) ; quartzScheduler . setJobNextRun ( job , trigger ) ; "<AssertPlaceHolder>" ; } getNextRun ( ) { return nextRun ; }
|
org . junit . Assert . assertEquals ( new java . util . Date ( futureDate ) , job . getNextRun ( ) )
|
createLayerStaxReaderTest ( ) { org . geosdi . geoplatform . support . wfs . feature . reader . WFSGetFeatureStaxReader featureReaderStAX = new org . geosdi . geoplatform . support . wfs . feature . reader . WFSGetFeatureStaxReader ( org . geosdi . geoplatform . wfs . reader . WFSGetFeatureCreateLayerStaxReaderTest . createLayerSchema ) ; org . geosdi . geoplatform . connector . wfs . response . FeatureCollectionDTO featureCollectionDTO = featureReaderStAX . read ( org . geosdi . geoplatform . wfs . reader . WFSGetFeatureCreateLayerStaxReaderTest . getFeatureCreateLayer ) ; "<AssertPlaceHolder>" ; } read ( java . lang . Object ) { javax . xml . stream . XMLStreamReader reader = super . acquireReader ( object ) ; org . geosdi . geoplatform . connector . wfs . response . GeometryAttributeDTO geometryAtt = layerSchema . getGeometry ( ) ; checkArgument ( ( geometryAtt != null ) , "The<sp>Parameter<sp>geometryAttribute<sp>must<sp>not<sp>be<sp>null." ) ; java . lang . String geometryName = geometryAtt . getName ( ) ; checkArgument ( ( ( geometryName != null ) && ( ! ( geometryName . trim ( ) . isEmpty ( ) ) ) ) , "The<sp>Parameter<sp>geometryName<sp>must<sp>not<sp>be<sp>null<sp>or<sp>an<sp>empty<sp>string." ) ; return this . internalRead ( reader , geometryName , layerSchema . getAttributeNames ( ) ) ; }
|
org . junit . Assert . assertTrue ( ( ! ( featureCollectionDTO == null ) ) )
|
testGroupElementByteArray ( ) { final net . i2p . crypto . eddsa . math . GroupElement t = new net . i2p . crypto . eddsa . math . GroupElement ( net . i2p . crypto . eddsa . math . GroupElementTest . curve , net . i2p . crypto . eddsa . math . GroupElementTest . BYTES_PKR ) ; final net . i2p . crypto . eddsa . math . GroupElement s = net . i2p . crypto . eddsa . math . GroupElement . p3 ( net . i2p . crypto . eddsa . math . GroupElementTest . curve , net . i2p . crypto . eddsa . math . GroupElementTest . PKR [ 0 ] , net . i2p . crypto . eddsa . math . GroupElementTest . PKR [ 1 ] , net . i2p . crypto . eddsa . math . GroupElementTest . ONE , net . i2p . crypto . eddsa . math . GroupElementTest . PKR [ 0 ] . multiply ( net . i2p . crypto . eddsa . math . GroupElementTest . PKR [ 1 ] ) ) ; "<AssertPlaceHolder>" ; } p3 ( net . i2p . crypto . eddsa . math . Curve , net . i2p . crypto . eddsa . math . FieldElement , net . i2p . crypto . eddsa . math . FieldElement , net . i2p . crypto . eddsa . math . FieldElement , net . i2p . crypto . eddsa . math . FieldElement ) { return net . i2p . crypto . eddsa . math . GroupElement . p3 ( curve , X , Y , Z , T , false ) ; }
|
org . junit . Assert . assertThat ( t , is ( equalTo ( s ) ) )
|
testCorrectContentTypeForPNG ( ) { email . setHostName ( strTestMailServer ) ; email . setSmtpPort ( getMailServerPort ( ) ) ; email . setFrom ( "a@b.com" ) ; email . addTo ( "c@d.com" ) ; email . setSubject ( "test<sp>mail" ) ; email . setCharset ( "ISO-8859-1" ) ; final java . io . File png = new java . io . File ( "./target/test-classes/images/logos/maven-feather.png" ) ; email . setContent ( png , "image/png" ) ; email . buildMimeMessage ( ) ; final javax . mail . internet . MimeMessage msg = email . getMimeMessage ( ) ; msg . saveChanges ( ) ; "<AssertPlaceHolder>" ; } getContentType ( ) { return ( type ) == null ? "application/octet-stream" : type ; }
|
org . junit . Assert . assertEquals ( "image/png" , msg . getContentType ( ) )
|
testHighlightStateShadow ( ) { when ( handler . getShapeState ( ) ) . thenReturn ( ShapeState . HIGHLIGHT ) ; tested . setBackgroundShape ( ( ) -> backgroundShape ) ; "<AssertPlaceHolder>" ; this . onComplete . execute ( ) ; verify ( backgroundShape , times ( 1 ) ) . setShadow ( anyString ( ) , anyInt ( ) , anyDouble ( ) , anyDouble ( ) ) ; verify ( backgroundShape , never ( ) ) . removeShadow ( ) ; } setBackgroundShape ( java . util . function . Supplier ) { backgroundShapeSupplier = shapeSupplier ; return this ; }
|
org . junit . Assert . assertNotNull ( onComplete )
|
testExtraAttributesMultipleDependenciesNoHang2 ( ) { org . apache . ivy . Ivy ivy = new org . apache . ivy . Ivy ( ) ; ivy . configure ( new java . io . File ( "test/repositories/extra-attributes-multipledependencies/ivysettings-filerepo-noattribs.xml" ) ) ; ivy . getSettings ( ) . setDefaultCache ( cache ) ; org . apache . ivy . core . report . ResolveReport report = ivy . resolve ( org . apache . ivy . core . resolve . ResolveTest . class . getResource ( "ivy-extra-att-multipledependencies2.xml" ) , getResolveOptions ( ivy . getSettings ( ) , new java . lang . String [ ] { "*" } ) . setValidate ( false ) ) ; "<AssertPlaceHolder>" ; } hasError ( ) { return ( ( getUnresolvedDependencies ( ) . length ) > 0 ) || ( ( getFailedArtifactsReports ( ) . length ) > 0 ) ; }
|
org . junit . Assert . assertFalse ( report . hasError ( ) )
|
testReadNonVersioned ( ) { int preVersionedPayload = 563 ; org . apache . flink . core . io . PostVersionedIOReadableWritableTest . TestNonVersionedReadableWritable nonVersionedReadableWritable = new org . apache . flink . core . io . PostVersionedIOReadableWritableTest . TestNonVersionedReadableWritable ( preVersionedPayload ) ; byte [ ] serialized ; try ( org . apache . flink . core . memory . ByteArrayOutputStreamWithPos out = new org . apache . flink . core . memory . ByteArrayOutputStreamWithPos ( ) ) { nonVersionedReadableWritable . write ( new org . apache . flink . core . memory . DataOutputViewStreamWrapper ( out ) ) ; serialized = out . toByteArray ( ) ; } org . apache . flink . core . io . PostVersionedIOReadableWritableTest . TestPostVersionedReadableWritable restoredVersionedReadableWritable = new org . apache . flink . core . io . PostVersionedIOReadableWritableTest . TestPostVersionedReadableWritable ( ) ; try ( org . apache . flink . core . memory . ByteArrayInputStreamWithPos in = new org . apache . flink . core . memory . ByteArrayInputStreamWithPos ( serialized ) ) { restoredVersionedReadableWritable . read ( in ) ; } "<AssertPlaceHolder>" ; } getData ( ) { return data ; }
|
org . junit . Assert . assertEquals ( java . lang . String . valueOf ( preVersionedPayload ) , restoredVersionedReadableWritable . getData ( ) )
|
testDeMorgan ( ) { _andBuilder . add ( org . batfish . datamodel . acl . AclLineMatchExprs . not ( org . batfish . datamodel . acl . AclLineMatchExprs . or ( org . batfish . datamodel . acl . AclLineMatchExprs . not ( org . batfish . datamodel . acl . explanation . ConjunctsBuilderTest . DST_IP ) , org . batfish . datamodel . acl . explanation . ConjunctsBuilderTest . SRC_IP ) ) ) ; _andBuilder . add ( org . batfish . datamodel . acl . explanation . ConjunctsBuilderTest . DST_PREFIX ) ; "<AssertPlaceHolder>" ; } build ( ) { return new org . batfish . referencelibrary . ReferenceBook ( _name , firstNonNull ( _addressGroups , com . google . common . collect . ImmutableList . of ( ) ) , firstNonNull ( _filterGroups , com . google . common . collect . ImmutableList . of ( ) ) , firstNonNull ( _interfaceGroups , com . google . common . collect . ImmutableList . of ( ) ) , firstNonNull ( _serviceEndpoints , com . google . common . collect . ImmutableList . of ( ) ) , firstNonNull ( _serviceObjectGroups , com . google . common . collect . ImmutableList . of ( ) ) , firstNonNull ( _serviceObjects , com . google . common . collect . ImmutableList . of ( ) ) ) ; }
|
org . junit . Assert . assertThat ( _andBuilder . build ( ) , org . hamcrest . Matchers . equalTo ( org . batfish . datamodel . acl . AclLineMatchExprs . and ( org . batfish . datamodel . acl . AclLineMatchExprs . not ( org . batfish . datamodel . acl . explanation . ConjunctsBuilderTest . SRC_IP ) , org . batfish . datamodel . acl . explanation . ConjunctsBuilderTest . DST_IP ) ) )
|
testProxySerialization ( ) { final org . jboss . ejb . client . StatelessEJBLocator < org . jboss . ejb . client . SimpleInterface > locator = new org . jboss . ejb . client . StatelessEJBLocator < org . jboss . ejb . client . SimpleInterface > ( org . jboss . ejb . client . SimpleInterface . class , "a" , "m" , "b" , "d" ) ; final java . lang . Object proxy = org . jboss . ejb . client . EJBClient . createProxy ( locator ) ; final org . jboss . marshalling . MarshallingConfiguration marshallingConfiguration = new org . jboss . marshalling . MarshallingConfiguration ( ) ; marshallingConfiguration . setVersion ( 2 ) ; org . jboss . marshalling . MarshallerFactory factory = new org . jboss . marshalling . river . RiverMarshallerFactory ( ) ; final org . jboss . marshalling . Marshaller marshaller = factory . createMarshaller ( marshallingConfiguration ) ; final java . io . ByteArrayOutputStream bytes = new java . io . ByteArrayOutputStream ( ) ; marshaller . start ( new org . jboss . marshalling . OutputStreamByteOutput ( bytes ) ) ; marshaller . writeObject ( proxy ) ; marshaller . finish ( ) ; org . jboss . marshalling . Unmarshaller unmarshaller = factory . createUnmarshaller ( marshallingConfiguration ) ; java . io . ByteArrayInputStream in = new java . io . ByteArrayInputStream ( bytes . toByteArray ( ) ) ; unmarshaller . start ( new org . jboss . marshalling . InputStreamByteInput ( in ) ) ; java . lang . Object deserialized = unmarshaller . readObject ( ) ; "<AssertPlaceHolder>" ; } createProxy ( org . jboss . ejb . client . EJBLocator ) { return org . jboss . ejb . client . EJBClient . createProxy ( locator , null ) ; }
|
org . junit . Assert . assertEquals ( proxy , deserialized )
|
testGetReportDownloadUrlWithOptions ( ) { com . google . api . ads . admanager . axis . utils . v201811 . ReportDownloader downloader = new com . google . api . ads . admanager . axis . utils . v201811 . ReportDownloader ( reportService , 1 ) ; when ( reportService . getReportJobStatus ( org . mockito . Matchers . anyLong ( ) ) ) . thenReturn ( ReportJobStatus . COMPLETED ) ; when ( reportService . getReportDownloadUrlWithOptions ( org . mockito . Matchers . anyLong ( ) , org . mockito . Matchers . any ( com . google . api . ads . admanager . axis . v201811 . ReportDownloadOptions . class ) ) ) . thenReturn ( "https://www.google.com/" ) ; java . net . URL downloadUrl = downloader . getDownloadUrl ( new com . google . api . ads . admanager . axis . v201811 . ReportDownloadOptions ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return com . google . common . base . MoreObjects . toStringHelper ( this . getClass ( ) ) . omitNullValues ( ) . add ( "currencyCode" , getCurrencyCode ( ) ) . add ( "id" , getId ( ) ) . add ( "name" , getName ( ) ) . add ( "primaryBillingId" , getPrimaryBillingId ( ) ) . add ( "secondaryBillingId" , getSecondaryBillingId ( ) ) . toString ( ) ; }
|
org . junit . Assert . assertEquals ( "https://www.google.com/" , downloadUrl . toString ( ) )
|
testSetIsCollectionOfProxy ( ) { final org . springframework . roo . model . JavaPackage mockTopLevelPackage = mock ( org . springframework . roo . model . JavaPackage . class ) ; final org . springframework . roo . classpath . details . ClassOrInterfaceTypeDetails mockCoitd = mock ( org . springframework . roo . classpath . details . ClassOrInterfaceTypeDetails . class ) ; final org . springframework . roo . model . JavaType genericType = new org . springframework . roo . model . JavaType ( "com.foo.roo2881.client.proxy.Foo1Proxy" ) ; final org . springframework . roo . model . JavaType proxyType = new org . springframework . roo . model . JavaType ( "java.util.Set" , 0 , org . springframework . roo . model . DataType . TYPE , null , java . util . Arrays . asList ( genericType ) ) ; final java . util . List < org . springframework . roo . classpath . details . annotations . AnnotationMetadata > annotations = java . util . Collections . emptyList ( ) ; final org . springframework . roo . addon . gwt . GwtProxyProperty proxyProperty = new org . springframework . roo . addon . gwt . GwtProxyProperty ( mockTopLevelPackage , mockCoitd , proxyType , org . springframework . roo . addon . gwt . GwtProxyPropertyTest . NAME , annotations , org . springframework . roo . addon . gwt . GwtProxyPropertyTest . GETTER ) ; "<AssertPlaceHolder>" ; } isCollectionOfProxy ( ) { return ( ( ( type . getParameters ( ) . size ( ) ) != 0 ) && ( isCollection ( ) ) ) && ( new org . springframework . roo . addon . gwt . GwtProxyProperty ( topLevelPackage , ptmd , type . getParameters ( ) . get ( 0 ) ) . isProxy ( ) ) ; }
|
org . junit . Assert . assertTrue ( proxyProperty . isCollectionOfProxy ( ) )
|
sampleNoContent ( ) { java . io . File sampleFile = com . amazonaws . codesamples . SampleExtractorTestUtils . getSampleFile ( "NoContentSample.java" ) ; "<AssertPlaceHolder>" ; } getSamples ( java . io . File ) { if ( ( file == null ) || ( ! ( file . exists ( ) ) ) ) { throw new com . amazonaws . codesamples . exception . SampleParsingException ( "Must<sp>provide<sp>a<sp>valid<sp>existing<sp>file<sp>to<sp>parse" ) ; } java . util . List < com . amazonaws . codesamples . CodeSample > samples = new java . util . ArrayList < com . amazonaws . codesamples . CodeSample > ( ) ; com . amazonaws . codesamples . SamplesParser . parseFile ( file , samples ) ; return samples ; }
|
org . junit . Assert . assertTrue ( com . amazonaws . codesamples . SamplesParser . getSamples ( sampleFile ) . isEmpty ( ) )
|
testRewriteBasicPomWithInheritedScm ( ) { java . util . List < org . apache . maven . project . MavenProject > reactorProjects = createReactorProjects ( "basic-pom-inherited-scm" ) ; org . apache . maven . shared . release . config . ReleaseDescriptorBuilder builder = createConfigurationForWithParentNextVersion ( reactorProjects , "basic-pom-inherited-scm" ) ; builder . addReleaseVersion ( "groupId:subsubproject" , org . apache . maven . shared . release . phase . RewritePomsForBranchPhaseTest . NEXT_VERSION ) ; phase . execute ( org . apache . maven . shared . release . config . ReleaseUtils . buildReleaseDescriptor ( builder ) , new org . apache . maven . shared . release . env . DefaultReleaseEnvironment ( ) , reactorProjects ) ; "<AssertPlaceHolder>" ; } comparePomFiles ( java . util . List ) { return comparePomFiles ( reactorProjects , true ) ; }
|
org . junit . Assert . assertTrue ( comparePomFiles ( reactorProjects ) )
|
testAddCTerminus_IAtom ( ) { org . openscience . cdk . interfaces . IAminoAcid m = ( ( org . openscience . cdk . interfaces . IAminoAcid ) ( newChemObject ( ) ) ) ; org . openscience . cdk . interfaces . IAtom cTerminus = m . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtom . class , "C" ) ; m . addCTerminus ( cTerminus ) ; "<AssertPlaceHolder>" ; } getCTerminus ( ) { return cTerminus ; }
|
org . junit . Assert . assertEquals ( cTerminus , m . getCTerminus ( ) )
|
preciseLeakDetectionMustBeSettable ( ) { config . setPreciseLeakDetectionEnabled ( false ) ; "<AssertPlaceHolder>" ; } isPreciseLeakDetectionEnabled ( ) { return preciseLeakDetectionEnabled ; }
|
org . junit . Assert . assertFalse ( config . isPreciseLeakDetectionEnabled ( ) )
|
shouldReadBackExplicitTimeToLiveAndSetItToMinusOnelIfPersisted ( ) { org . springframework . data . redis . core . RedisKeyValueTemplateTests . WithTtl source = new org . springframework . data . redis . core . RedisKeyValueTemplateTests . WithTtl ( ) ; source . id = "ttl-1" ; source . ttl = 5L ; source . value = "5<sp>seconds" ; template . insert ( source ) ; nativeTemplate . execute ( ( ( org . springframework . data . redis . core . RedisCallback < java . lang . Boolean > ) ( ( connection ) -> connection . persist ( ( ( . class . getName ( ) ) + ":ttl-1" ) . getBytes ( ) ) ) ) ) ; java . util . Optional < org . springframework . data . redis . core . RedisKeyValueTemplateTests . WithTtl > target = template . findById ( source . id , org . springframework . data . redis . core . RedisKeyValueTemplateTests . WithTtl . class ) ; "<AssertPlaceHolder>" ; } get ( ) { java . lang . Integer value = operations . get ( key ) ; if ( value != null ) { return value ; } throw new org . springframework . dao . DataRetrievalFailureException ( java . lang . String . format ( "The<sp>key<sp>'%s'<sp>seems<sp>to<sp>no<sp>longer<sp>exist." , key ) ) ; }
|
org . junit . Assert . assertThat ( target . get ( ) . ttl , org . hamcrest . CoreMatchers . is ( ( - 1L ) ) )
|
DestinationStateIsCalculatedBasedOnTriggerParameters ( ) { com . github . oxo42 . stateless4j . StateMachineConfig < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > config = new com . github . oxo42 . stateless4j . StateMachineConfig ( ) ; com . github . oxo42 . stateless4j . triggers . TriggerWithParameters1 < java . lang . Integer , com . github . oxo42 . stateless4j . Trigger > trigger = config . setTriggerParameters ( Trigger . X , com . github . oxo42 . stateless4j . Integer . class ) ; config . configure ( State . A ) . permitDynamic ( trigger , new com . github . oxo42 . stateless4j . delegates . Func2 < java . lang . Integer , com . github . oxo42 . stateless4j . State > ( ) { @ com . github . oxo42 . stateless4j . Override public com . github . oxo42 . stateless4j . State call ( java . lang . Integer i ) { return i == 1 ? State . B : State . C ; } } ) ; com . github . oxo42 . stateless4j . StateMachine < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > sm = new com . github . oxo42 . stateless4j . StateMachine ( State . A , config ) ; sm . fire ( trigger , 1 ) ; "<AssertPlaceHolder>" ; } getState ( ) { return stateAccessor . call ( ) ; }
|
org . junit . Assert . assertEquals ( State . B , sm . getState ( ) )
|
testBooleanFunctionCallNoParameters ( ) { v8 . executeVoidScript ( "function<sp>foo()<sp>{return<sp>true;}" ) ; com . eclipsesource . v8 . V8Array parameters = new com . eclipsesource . v8 . V8Array ( v8 ) ; boolean result = v8 . executeBooleanFunction ( "foo" , parameters ) ; "<AssertPlaceHolder>" ; parameters . close ( ) ; } executeBooleanFunction ( java . lang . String , com . eclipsesource . v8 . V8Array ) { throw new java . lang . UnsupportedOperationException ( ) ; }
|
org . junit . Assert . assertTrue ( result )
|
addAndGetTypeConverter ( ) { com . tickaroo . tikxml . TypeConverters converters = new com . tickaroo . tikxml . TypeConverters ( ) ; exception . expect ( java . io . IOException . class ) ; converters . get ( com . tickaroo . tikxml . TypeConvertersTest . TestConverter . class ) ; com . tickaroo . tikxml . TypeConvertersTest . TestConverter converter = new com . tickaroo . tikxml . TypeConvertersTest . TestConverter ( ) ; converters . add ( java . lang . Object . class , converter ) ; "<AssertPlaceHolder>" ; exception . expect ( java . io . IOException . class ) ; converters . get ( java . util . Date . class ) ; } get ( java . lang . reflect . Type ) { type = com . tickaroo . tikxml . Types . canonicalize ( type ) ; com . tickaroo . tikxml . typeadapter . TypeAdapter < T > adapter = ( ( com . tickaroo . tikxml . typeadapter . TypeAdapter < T > ) ( adaptersCache . get ( type ) ) ) ; if ( adapter != null ) { return adapter ; } else if ( type instanceof java . lang . Class ) { java . lang . Class clazz = ( ( java . lang . Class ) ( type ) ) ; java . lang . StringBuilder qualifiedTypeAdapterClassName = new java . lang . StringBuilder ( ) ; try { java . lang . Package packageElement = clazz . getPackage ( ) ; if ( packageElement != null ) { java . lang . String packageName = packageElement . getName ( ) ; if ( ( packageName != null ) && ( ( packageName . length ( ) ) > 0 ) ) { qualifiedTypeAdapterClassName . append ( packageElement . getName ( ) ) ; qualifiedTypeAdapterClassName . append ( '.' ) ; } } qualifiedTypeAdapterClassName . append ( clazz . getSimpleName ( ) ) ; qualifiedTypeAdapterClassName . append ( TypeAdapter . GENERATED_CLASS_SUFFIX ) ; try { java . lang . Class < com . tickaroo . tikxml . typeadapter . TypeAdapter < T > > adapterClass = ( ( java . lang . Class < com . tickaroo . tikxml . typeadapter . TypeAdapter < T > > ) ( java . lang . Class . forName ( qualifiedTypeAdapterClassName . toString ( ) ) ) ) ; com . tickaroo . tikxml . typeadapter . TypeAdapter < T > adapterInstance = adapterClass . newInstance ( ) ; adaptersCache . put ( clazz , adapterInstance ) ; return adapterInstance ; } catch ( java . lang . ClassNotFoundException e ) { if ( clazz . getSimpleName ( ) . matches ( com . tickaroo . tikxml . TypeAdapters . AUTO_VALUE_NAME_PREFIX ) ) { java . lang . Class < ? > superClass = clazz . getSuperclass ( ) ; if ( superClass != null ) { com . tickaroo . tikxml . typeadapter . TypeAdapter < T > superClassAdapter = get ( superClass ) ; adaptersCache . put ( clazz , superClassAdapter ) ; return superClassAdapter ; } else { throw new com . tickaroo . tikxml . TypeAdapterNotFoundException ( ( ( ( "No<sp>TypeAdapter<sp>for<sp>class<sp>" + ( clazz . getCanonicalName ( ) ) ) + "<sp>found.<sp>Expected<sp>name<sp>of<sp>the<sp>type<sp>adapter<sp>is<sp>" ) + ( qualifiedTypeAdapterClassName . toString ( ) ) ) , e ) ; } } else { throw new com . tickaroo . tikxml . TypeAdapterNotFoundException ( ( ( ( "No<sp>TypeAdapter<sp>for<sp>class<sp>" + ( clazz . getCanonicalName ( ) ) ) + "<sp>found.<sp>Expected<sp>name<sp>of<sp>the<sp>type<sp>adapter<sp>is<sp>" ) + ( qualifiedTypeAdapterClassName . toString ( ) ) ) , e ) ; } } } catch ( java . lang . InstantiationException | java . lang . IllegalAccessException e ) { throw new com . tickaroo . tikxml . TypeAdapterNotFoundException ( ( ( ( "No<sp>TypeAdapter<sp>for<sp>class<sp>" + ( clazz . getCanonicalName ( ) ) ) + "<sp>found.<sp>Expected<sp>name<sp>of<sp>the<sp>type<sp>adapter<sp>is<sp>" ) + ( qualifiedTypeAdapterClassName . toString ( ) ) ) , e ) ; } } else { throw new com . tickaroo . tikxml . TypeAdapterNotFoundException ( ( "No<sp>generated<sp>nor<sp>manually<sp>added<sp>TypeAdapter<sp>has<sp>been<sp>found<sp>for<sp>" + ( type . toString ( ) ) ) ) ; } }
|
org . junit . Assert . assertSame ( converter , converters . get ( java . lang . Object . class ) )
|
testToDeployConfiguration_bucketNameIsNull ( ) { when ( preferences . get ( eq ( DeployPreferences . PREF_CUSTOM_BUCKET ) , anyString ( ) ) ) . thenReturn ( null ) ; com . google . cloud . tools . appengine . configuration . DeployConfiguration configuration = com . google . cloud . tools . eclipse . appengine . deploy . DeployPreferencesConverter . toDeployConfiguration ( new com . google . cloud . tools . eclipse . appengine . deploy . DeployPreferences ( preferences ) , deployables ) ; "<AssertPlaceHolder>" ; } getBucket ( ) { return bucket ; }
|
org . junit . Assert . assertNull ( configuration . getBucket ( ) )
|
should_return_error_string ( ) { ch . puzzle . itc . mobiliar . business . generator . control . GenerationUnitGenerationResult result = new ch . puzzle . itc . mobiliar . business . generator . control . GenerationUnitGenerationResult ( ) ; result . addErrorMessage ( new ch . puzzle . itc . mobiliar . common . exception . TemplatePropertyException ( "error" , ch . puzzle . itc . mobiliar . common . exception . TemplatePropertyException . CAUSE . INVALID_PROPERTY ) ) ; ch . puzzle . itc . mobiliar . business . generator . control . GeneratedTemplate generatedTemplate = org . mockito . Mockito . mock ( ch . puzzle . itc . mobiliar . business . generator . control . GeneratedTemplate . class ) ; org . mockito . Mockito . when ( generatedTemplate . hasErrors ( ) ) . thenReturn ( Boolean . TRUE ) ; org . mockito . Mockito . when ( generatedTemplate . getErrorMessageAsString ( ) ) . thenReturn ( "GeneratedTemplateError\n" ) ; java . util . List < ch . puzzle . itc . mobiliar . business . generator . control . GeneratedTemplate > templates = new java . util . ArrayList < ch . puzzle . itc . mobiliar . business . generator . control . GeneratedTemplate > ( ) ; templates . add ( generatedTemplate ) ; result . setGeneratedTemplates ( templates ) ; java . lang . String message = result . getErrorMessageAsString ( ) ; java . lang . String expected = "General<sp>Unit<sp>Template<sp>Errors\n" + ( ( "error\n" + "Template<sp>Errors\n" ) + "GeneratedTemplateError\n" ) ; "<AssertPlaceHolder>" ; } getErrorMessageAsString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ( ( ( generationResults ) != null ) && ( ! ( generationResults . isEmpty ( ) ) ) ) && ( hasErrors ( ) ) ) { sb . append ( "Application<sp>Template<sp>Errors\n" ) ; for ( ch . puzzle . itc . mobiliar . business . generator . control . GenerationUnitGenerationResult result : generationResults ) { if ( ! ( result . isSuccess ( ) ) ) { sb . append ( result . getErrorMessageAsString ( ) ) ; } } } return sb . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expected , message )
|
testDeleteProcessDefinition ( ) { deployment = repositoryService . createDeployment ( ) . addClasspathResource ( "org/camunda/bpm/engine/test/repository/twoProcesses.bpmn20.xml" ) . deploy ( ) ; java . util . List < org . camunda . bpm . engine . repository . ProcessDefinition > processDefinitions = repositoryService . createProcessDefinitionQuery ( ) . list ( ) ; repositoryService . deleteProcessDefinition ( processDefinitions . get ( 0 ) . getId ( ) ) ; "<AssertPlaceHolder>" ; } createProcessDefinitionQuery ( ) { return new org . camunda . bpm . engine . impl . ProcessDefinitionQueryImpl ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , repositoryService . createProcessDefinitionQuery ( ) . count ( ) )
|
testFileWithPathComponents ( ) { java . lang . String tempDirPath = getBuidDirectory ( ) . getAbsolutePath ( ) ; java . io . File result = org . mule . runtime . core . internal . util . FilenameUtils . fileWithPathComponents ( new java . lang . String [ ] { tempDirPath , "tmp" , "foo" , "bar" } ) ; java . lang . String resultNormalized = result . getAbsolutePath ( ) . replace ( File . separatorChar , '|' ) ; java . lang . String expected = ( tempDirPath . replace ( File . separatorChar , '|' ) ) + "|tmp|foo|bar" ; "<AssertPlaceHolder>" ; } getBuidDirectory ( ) { return org . mule . runtime . core . api . util . FileUtils . newFile ( org . apache . commons . lang3 . SystemUtils . getUserDir ( ) , "target" ) ; }
|
org . junit . Assert . assertEquals ( expected , resultNormalized )
|
getValueForEmptyString ( ) { optionalSubject . setValue ( "" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
|
org . junit . Assert . assertEquals ( "" , optionalSubject . getValue ( ) )
|
testSetAllTcpNoDelay ( ) { org . kaazing . mina . netty . socket . nio . DefaultNioSocketChannelIoSessionConfig config = new org . kaazing . mina . netty . socket . nio . DefaultNioSocketChannelIoSessionConfig ( ) ; config . init ( new org . kaazing . mina . netty . socket . nio . NioSocketChannelIoAcceptor ( config ) ) ; config . setTcpNoDelay ( true ) ; org . kaazing . mina . netty . socket . nio . NioSocketChannelIoSessionConfig acceptedConfig = new org . kaazing . mina . netty . socket . nio . NioSocketChannelIoSessionConfig ( new org . kaazing . mina . netty . socket . nio . DefaultNioSocketChannelIoSessionConfigTest . DefaultNioSocketChannelConfig ( new java . net . Socket ( ) ) ) ; acceptedConfig . setAll ( config ) ; "<AssertPlaceHolder>" ; } isTcpNoDelay ( ) { return tcpNoDelay ; }
|
org . junit . Assert . assertEquals ( config . isTcpNoDelay ( ) , acceptedConfig . isTcpNoDelay ( ) )
|
testBondOrFT ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( OR , new org . openscience . cdk . isomorphism . matchers . Expr ( FALSE ) , new org . openscience . cdk . isomorphism . matchers . Expr ( TRUE ) ) ; org . openscience . cdk . interfaces . IBond bond = mock ( org . openscience . cdk . interfaces . IBond . class ) ; "<AssertPlaceHolder>" ; } matches ( org . openscience . cdk . interfaces . IAtomContainer ) { return matches ( atomContainer , true ) ; }
|
org . junit . Assert . assertTrue ( expr . matches ( bond ) )
|
testNoUnConvertCloseBracketEscaped ( ) { java . lang . String testString = com . github . bordertech . wcomponents . WebUtilities . CLOSE_BRACKET_ESCAPE ; "<AssertPlaceHolder>" ; } unescapeToXML ( java . lang . String ) { if ( com . github . bordertech . wcomponents . util . Util . empty ( input ) ) { return input ; } java . lang . String encoded = com . github . bordertech . wcomponents . WebUtilities . doubleEncodeBrackets ( input ) ; java . lang . String unescaped = com . github . bordertech . wcomponents . util . HtmlToXMLUtil . UNESCAPE_HTML_TO_XML . translate ( encoded ) ; java . lang . String decoded = com . github . bordertech . wcomponents . WebUtilities . doubleDecodeBrackets ( unescaped ) ; return decoded ; }
|
org . junit . Assert . assertEquals ( testString , com . github . bordertech . wcomponents . util . HtmlToXMLUtil . unescapeToXML ( testString ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.