input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testContentNameParsePerformance ( ) { org . ccnx . ccn . impl . support . Log . info ( Log . FAC_TEST , "Starting<sp>testContentNameParsePerformance" ) ; org . ccnx . ccn . protocol . ContentName name = null ; long loops = 0 ; long elapsed = 0 ; int i ; while ( elapsed < 1000 ) try { long time = java . lang . System . currentTimeMillis ( ) ; for ( i = 0 ; i < 10000 ; i ++ ) { name = org . ccnx . ccn . protocol . ContentName . fromURI ( veryEscapedName ) ; } elapsed += ( java . lang . System . currentTimeMillis ( ) ) - time ; loops += i ; } catch ( org . ccnx . ccn . protocol . MalformedContentNameStringException e ) { name = null ; } System . out . println ( ( ( ( ( ( ( "Executed<sp>" + loops ) + "<sp>ContentName.fromURI<sp>in<sp>" ) + elapsed ) + "<sp>ms;<sp>" ) + ( ( loops * 1000 ) / elapsed ) ) + "/s" ) ) ; "<AssertPlaceHolder>" ; org . ccnx . ccn . impl . support . Log . info ( Log . FAC_TEST , "Completed<sp>testContentNameParsePerformance" ) ; } info ( java . lang . String , java . lang . Object [ ] ) { org . ccnx . ccn . impl . support . Log . doLog ( org . ccnx . ccn . impl . support . Log . FAC_DEFAULT , Level . INFO , msg , params ) ; }
|
org . junit . Assert . assertNotNull ( name )
|
testTwinMimicsObject ( ) { com . eclipsesource . v8 . V8Object v8Object = new com . eclipsesource . v8 . V8Object ( v8 ) ; com . eclipsesource . v8 . V8Object twin = v8Object . twin ( ) ; v8Object . add ( "foo" , "bar" ) ; "<AssertPlaceHolder>" ; v8Object . close ( ) ; twin . close ( ) ; } getString ( java . lang . String ) { throw new java . lang . UnsupportedOperationException ( ) ; }
|
org . junit . Assert . assertEquals ( "bar" , twin . getString ( "foo" ) )
|
testDiffWithPrefixes ( ) { write ( new java . io . File ( db . getWorkTree ( ) , "test.txt" ) , "test" ) ; try ( org . eclipse . jgit . api . Git git = new org . eclipse . jgit . api . Git ( db ) ) { git . add ( ) . addFilepattern ( "index<sp>30d74d2..4dba797<sp>100644\n" 3 ) . call ( ) ; git . commit ( ) . setMessage ( "index<sp>30d74d2..4dba797<sp>100644\n" 4 ) . call ( ) ; write ( new java . io . File ( db . getWorkTree ( ) , "test.txt" ) , "index<sp>30d74d2..4dba797<sp>100644\n" 1 ) ; java . io . OutputStream out = new java . io . ByteArrayOutputStream ( ) ; git . diff ( ) . setOutputStream ( out ) . setSourcePrefix ( "old/" ) . setDestinationPrefix ( "new/" ) . call ( ) ; java . lang . String actual = out . toString ( ) ; java . lang . String expected = "index<sp>30d74d2..4dba797<sp>100644\n" 2 + ( ( ( ( ( ( ( "index<sp>30d74d2..4dba797<sp>100644\n" + "index<sp>30d74d2..4dba797<sp>100644\n" 0 ) + "+++<sp>new/test.txt\n" ) + "@@<sp>-1<sp>+1<sp>@@\n" ) + "-test\n" ) + "\\<sp>No<sp>newline<sp>at<sp>end<sp>of<sp>file\n" ) + "+test<sp>change\n" ) + "\\<sp>No<sp>newline<sp>at<sp>end<sp>of<sp>file\n" ) ; "<AssertPlaceHolder>" ; } } toString ( ) { java . lang . StringBuilder b = new java . lang . StringBuilder ( ) ; b . append ( method ) ; b . append ( '<sp>' ) ; b . append ( uri ) ; if ( ! ( parameters . isEmpty ( ) ) ) { b . append ( '?' ) ; boolean first = true ; for ( Map . Entry < java . lang . String , java . lang . String [ ] > e : parameters . entrySet ( ) ) { for ( java . lang . String val : e . getValue ( ) ) { if ( ! first ) { b . append ( '&' ) ; } first = false ; b . append ( e . getKey ( ) ) ; b . append ( '=' ) ; b . append ( val ) ; } } } b . append ( '<sp>' ) ; b . append ( status ) ; return b . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testSetSentenceIndex ( ) { rte . setSentenceIndex ( 2 ) ; "<AssertPlaceHolder>" ; } getSentenceIndex ( ) { return getIntValue ( net . sf . marineapi . nmea . parser . GSVParser . SENTENCE_NUMBER ) ; }
|
org . junit . Assert . assertEquals ( 2 , rte . getSentenceIndex ( ) )
|
notify_withPoisonPill ( ) { failureCollector . notify ( normalExitFailure ) ; "<AssertPlaceHolder>" ; } getFailureCount ( ) { return ( criticalFailureCounter . get ( ) ) + ( nonCriticalFailureCounter . get ( ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , failureCollector . getFailureCount ( ) )
|
testShouldDoNothingForNotExistingAccount ( ) { final org . solovyev . android . messenger . accounts . Account account = new org . solovyev . android . messenger . realms . test . TestAccount ( realm , 100 ) ; final java . util . Collection < org . solovyev . android . messenger . accounts . Account > accountsBefore = dao . readAll ( ) ; dao . deleteById ( account . getId ( ) ) ; final java . util . Collection < org . solovyev . android . messenger . accounts . Account > accountsAfter = dao . readAll ( ) ; "<AssertPlaceHolder>" ; } readAll ( ) { return org . solovyev . android . db . AndroidDbUtils . doDbQuery ( org . solovyev . android . db . SqliteDao . getSqliteOpenHelper ( ) , new LoadEntity ( org . solovyev . android . db . SqliteDao . getContext ( ) , null , org . solovyev . android . db . SqliteDao . getSqliteOpenHelper ( ) ) ) ; }
|
org . junit . Assert . assertEquals ( accountsBefore , accountsAfter )
|
testWrite_06 ( ) { filterStream . write ( ( "<sp>*<sp>$Id" + "$\n<sp>*" ) . getBytes ( ) ) ; filterStream . flush ( ) ; java . lang . String res = new java . lang . String ( result . toByteArray ( ) ) ; java . lang . String expected = "<sp>*" ; "<AssertPlaceHolder>" ; } toByteArray ( ) { return this . buf ; }
|
org . junit . Assert . assertEquals ( expected , res )
|
testOnBlockBreakNotAllowed ( ) { when ( island . isAllowed ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . any ( ) ) ) . thenReturn ( false ) ; org . bukkit . block . Block block = mock ( org . bukkit . block . Block . class ) ; when ( block . getLocation ( ) ) . thenReturn ( location ) ; org . bukkit . event . block . BlockBreakEvent e = new org . bukkit . event . block . BlockBreakEvent ( block , player ) ; bbl . onBlockBreak ( e ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( notifier ) . notify ( org . mockito . Mockito . any ( ) , org . mockito . Mockito . eq ( "protection.protected" ) ) ; } isCancelled ( ) { return cancelled ; }
|
org . junit . Assert . assertTrue ( e . isCancelled ( ) )
|
discoversNativeQuery ( ) { org . springframework . data . jpa . repository . query . JpaQueryMethod method = getQueryMethod ( org . springframework . data . jpa . repository . query . JpaQueryMethodUnitTests . ValidRepository . class , "findByLastname" , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } isNativeQuery ( ) { return getAnnotationValue ( "nativeQuery" , org . springframework . data . jpa . repository . query . Boolean . class ) . booleanValue ( ) ; }
|
org . junit . Assert . assertThat ( method . isNativeQuery ( ) , is ( true ) )
|
test_longlong_disc_union_streamable ( ) { org . jacorb . test . orb . LongLongDiscUnion testValue = new org . jacorb . test . orb . LongLongDiscUnion ( ) ; testValue . s ( "foo" ) ; org . omg . CORBA . Any outAny = setup . getClientOrb ( ) . create_any ( ) ; outAny . insert_Streamable ( new org . jacorb . test . orb . LongLongDiscUnionHolder ( testValue ) ) ; org . omg . CORBA . Any inAny = server . bounce_any ( outAny ) ; "<AssertPlaceHolder>" ; } equal ( java . lang . Object ) { if ( ( obj1 == null ) || ( ( current ) == null ) ) { throw new org . jacorb . collection . util . ObjectInvalid ( ) ; } check_object ( obj1 ) ; return ops . equal ( current , ( ( org . omg . CORBA . Any ) ( obj1 ) ) ) ; }
|
org . junit . Assert . assertTrue ( outAny . equal ( inAny ) )
|
executeArithmetic ( ) { java . lang . String attributeName = "name" ; java . util . List < java . lang . Object > objects = new java . util . ArrayList < java . lang . Object > ( ) ; doReturn ( attributeName ) . when ( arithmeticCriteria ) . getAttributeName ( ) ; doReturn ( cacheIndex ) . when ( indexes ) . get ( attributeName ) ; doReturn ( objects ) . when ( arithmeticCriteria ) . meets ( cacheIndex ) ; java . util . List < java . lang . Object > actualObjects = handler . executeArithmetic ( arithmeticCriteria ) ; "<AssertPlaceHolder>" ; } executeArithmetic ( com . cetsoft . imcache . cache . search . criteria . ArithmeticCriteria ) { com . cetsoft . imcache . cache . search . index . CacheIndex cacheIndex = indexes . get ( arithmeticCriteria . getAttributeName ( ) ) ; if ( cacheIndex == null ) { throw new com . cetsoft . imcache . cache . search . index . IndexNotFoundException ( ) ; } return arithmeticCriteria . meets ( cacheIndex ) ; }
|
org . junit . Assert . assertEquals ( objects , actualObjects )
|
firstTest ( ) { com . microsoft . azure . management . logic . v2016_06_01 . LogicTest . rgName = com . microsoft . azure . arm . utils . SdkContext . randomResourceName ( "rg" , 20 ) ; com . microsoft . azure . management . resources . ResourceGroup group = com . microsoft . azure . management . logic . v2016_06_01 . LogicTest . resourceManager . resourceGroups ( ) . define ( com . microsoft . azure . management . logic . v2016_06_01 . LogicTest . rgName ) . withRegion ( Region . US_WEST . toString ( ) ) . create ( ) ; "<AssertPlaceHolder>" ; } create ( ) { return this . create ( null , null , null , null ) ; }
|
org . junit . Assert . assertNotNull ( group )
|
testExceptionWithMissingTypeOnClient ( ) { java . lang . Exception ex1 = new java . lang . UnsupportedOperationException ( ) ; ex1 . initCause ( org . apache . hive . service . cli . TestHiveSQLException . createSimpleCause ( ) ) ; java . util . List < java . lang . String > details = org . apache . hive . service . cli . HiveSQLException . toString ( ex1 ) ; java . lang . String [ ] tokens = details . get ( 0 ) . split ( ":" ) ; tokens [ 0 ] = "*DummyException" ; details . set ( 0 , org . apache . commons . lang . StringUtils . join ( tokens , ":" ) ) ; java . lang . Throwable ex = org . apache . hive . service . cli . HiveSQLException . toCause ( details ) ; "<AssertPlaceHolder>" ; } toCause ( java . util . List ) { return org . apache . hive . service . cli . HiveSQLException . toStackTrace ( details , null , 0 ) ; }
|
org . junit . Assert . assertEquals ( org . apache . hive . service . cli . RuntimeException . class , ex . getClass ( ) )
|
testIndent_1Level_SingleLine ( ) { java . lang . String expected = "\t1<sp>line<sp>string" ; java . lang . String input = "1<sp>line<sp>string" ; java . lang . String actual = it . indent ( input ) ; "<AssertPlaceHolder>" ; } indent ( java . lang . String ) { if ( ( count ) > 0 ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "\n" ) ; sb . append ( getIndentation ( ) ) ; java . lang . StringBuilder r = new java . lang . StringBuilder ( ) ; r . append ( getIndentation ( ) ) ; r . append ( s . replaceAll ( "\n" , sb . toString ( ) ) ) ; return r . toString ( ) ; } else { return s ; } }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testSetContent2 ( ) { org . apache . abdera . Abdera abdera = new org . apache . abdera . Abdera ( ) ; org . apache . abdera . model . Entry entry = abdera . newEntry ( ) ; java . io . InputStream in = new java . io . ByteArrayInputStream ( "tst" . getBytes ( "utf-16" ) ) ; org . apache . abdera . model . Document < org . apache . abdera . model . Entry > edoc = entry . getDocument ( ) ; entry . setContent ( in , "text/plain;charset=\"utf-16\"" ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; java . io . OutputStreamWriter w = new java . io . OutputStreamWriter ( out , "utf-16" ) ; edoc . writeTo ( w ) ; in = new java . io . ByteArrayInputStream ( out . toByteArray ( ) ) ; entry = ( ( org . apache . abdera . model . Entry ) ( abdera . getParser ( ) . parse ( in ) . getRoot ( ) ) ) ; "<AssertPlaceHolder>" ; } getContent ( ) { return content ; }
|
org . junit . Assert . assertEquals ( "tst" , entry . getContent ( ) )
|
givenTraceDisabled_whenIsEnabled_thenReturnsFalse ( ) { com . brandwatch . robots . util . LogLevel level = LogLevel . TRACE ; when ( mockLogger . isTraceEnabled ( ) ) . thenReturn ( false ) ; boolean result = level . isEnabled ( mockLogger ) ; "<AssertPlaceHolder>" ; verify ( mockLogger , only ( ) ) . isTraceEnabled ( ) ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) )
|
composeStringToSignTest ( ) { com . aliyuncs . auth . ISignatureComposer composer = com . aliyuncs . auth . OssSignatureComposer . getComposer ( ) ; com . aliyuncs . http . MethodType methodType = com . aliyuncs . http . MethodType . GET ; java . lang . String uriPattern = "queryKey3" 4 ; com . aliyuncs . auth . Signer signer = mock ( com . aliyuncs . auth . Signer . class ) ; java . util . Map < java . lang . String , java . lang . String > queries = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "19910706" 5 , "19910706" 8 ) ; put ( "queryKey2" , "19910706" 3 ) ; put ( "queryKey3" , null ) ; } } ; java . util . Map < java . lang . String , java . lang . String > headers = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "headerKey1" , "queryKey3" 1 ) ; put ( "headerKey2" , "19910706" 4 ) ; put ( "queryKey3" 0 , "XML" ) ; put ( "queryKey3" 6 , "queryKey3" 2 ) ; put ( "Content-Type" , "19910706" 1 ) ; put ( "queryKey3" 3 , "19910706" ) ; put ( "19910706" 7 , "queryKey3" 9 ) ; } } ; java . util . Map < java . lang . String , java . lang . String > paths = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "queryKey3" 5 , "queryKey3" 8 ) ; put ( "queryKey3" 7 , "19910706" 6 ) ; } } ; java . lang . String stringToSign = composer . composeStringToSign ( methodType , uriPattern , signer , queries , headers , paths ) ; java . lang . String expected = "19910706" 2 + ( ( ( ( "Content-MD5-Value\n" + "19910706" 0 ) + "19910706" 9 ) + "x-oss-header-key1:x-oss-header-value1\n" ) + "http://www.aliyun.com/[pathKey1]?queryKey2=queryValue2&queryKey1=queryValue1&queryKey3" ) ; "<AssertPlaceHolder>" ; } composeStringToSign ( com . aliyuncs . http . MethodType , java . lang . String , com . aliyuncs . auth . Signer , java . util . Map , java . util . Map , java . util . Map ) { java . lang . String [ ] sortedKeys = queries . keySet ( ) . toArray ( new java . lang . String [ ] { } ) ; java . util . Arrays . sort ( sortedKeys ) ; java . lang . StringBuilder canonicalizedQueryString = new java . lang . StringBuilder ( ) ; try { for ( java . lang . String key : sortedKeys ) { canonicalizedQueryString . append ( "&" ) . append ( com . aliyuncs . auth . AcsURLEncoder . percentEncode ( key ) ) . append ( "=" ) . append ( com . aliyuncs . auth . AcsURLEncoder . percentEncode ( queries . get ( key ) ) ) ; } java . lang . StringBuilder stringToSign = new java . lang . StringBuilder ( ) ; stringToSign . append ( method . toString ( ) ) ; stringToSign . append ( com . aliyuncs . auth . RpcSignatureComposer . SEPARATOR ) ; stringToSign . append ( com . aliyuncs . auth . AcsURLEncoder . percentEncode ( "/" ) ) ; stringToSign . append ( com . aliyuncs . auth . RpcSignatureComposer . SEPARATOR ) ; stringToSign . append ( com . aliyuncs . auth . AcsURLEncoder . percentEncode ( canonicalizedQueryString . toString ( ) . substring ( 1 ) ) ) ; return stringToSign . toString ( ) ; } catch ( java . io . UnsupportedEncodingException exp ) { throw new java . lang . RuntimeException ( "UTF-8<sp>encoding<sp>is<sp>not<sp>supported." ) ; } }
|
org . junit . Assert . assertEquals ( expected , stringToSign )
|
testDeleteEntities ( ) { com . google . datastore . v1 . Key key = makeKey ( "bird" , "finch" ) . build ( ) ; com . google . datastore . v1 . Entity entity = com . google . datastore . v1 . Entity . newBuilder ( ) . setKey ( key ) . build ( ) ; org . apache . beam . sdk . io . gcp . datastore . DatastoreV1 . DeleteEntityFn deleteEntityFn = new org . apache . beam . sdk . io . gcp . datastore . DatastoreV1 . DeleteEntityFn ( ) ; com . google . datastore . v1 . Mutation exceptedMutation = makeDelete ( entity . getKey ( ) ) . build ( ) ; "<AssertPlaceHolder>" ; } apply ( NodeT ) { if ( type . isInstance ( input ) ) { return typedApply ( ( ( T ) ( input ) ) ) ; } return input ; }
|
org . junit . Assert . assertEquals ( deleteEntityFn . apply ( entity ) , exceptedMutation )
|
asyncGetAttributeWithProviderRuntimeException ( ) { io . joynr . proxy . ProxyBuilder < joynr . tests . testProxy > proxyBuilder = consumerRuntime . getProxyBuilder ( domain , joynr . tests . testProxy . class ) ; joynr . tests . testProxy proxy = proxyBuilder . setMessagingQos ( messagingQos ) . setDiscoveryQos ( discoveryQos ) . build ( ) ; joynr . exceptions . ProviderRuntimeException expected = new joynr . exceptions . ProviderRuntimeException ( "ProviderRuntimeException" ) ; io . joynr . proxy . Future < java . lang . Integer > future = proxy . getAttributeWithProviderRuntimeException ( callbackInteger ) ; try { future . get ( ) ; org . junit . Assert . fail ( "Should<sp>throw<sp>ProviderRuntimeException" ) ; } catch ( joynr . exceptions . ProviderRuntimeException e ) { "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( e . toString ( ) ) ; } verify ( callbackInteger ) . onFailure ( expected ) ; } get ( ) { if ( ( headerPingProxy ) == null ) { headerPingProxy = serviceLocator . get ( joynr . examples . customheaders . HeaderPingSync . class , "io.joynr.examples.customheaders.jee.provider" ) ; } return headerPingProxy ; }
|
org . junit . Assert . assertEquals ( expected , e )
|
testSaveMessage ( ) { com . dianping . swallow . common . internal . message . SwallowMessage expectedMessage = com . dianping . swallow . common . internal . dao . impl . mongodb . MessageDAOImplTest . createMessage ( ) ; expectedMessage . setContent ( "content<sp>in<sp>testSaveMessage" ) ; messageDAO . saveMessage ( com . dianping . swallow . common . internal . dao . impl . mongodb . TOPIC_NAME , expectedMessage ) ; com . dianping . swallow . common . internal . message . SwallowMessage actualMessage = messageDAO . getMaxMessage ( com . dianping . swallow . common . internal . dao . impl . mongodb . TOPIC_NAME ) ; "<AssertPlaceHolder>" ; } equalsWithoutMessageId ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ! ( obj instanceof com . dianping . swallow . common . internal . message . SwallowMessage ) ) { return false ; } com . dianping . swallow . common . internal . message . SwallowMessage other = ( ( com . dianping . swallow . common . internal . message . SwallowMessage ) ( obj ) ) ; if ( ( content ) == null ) { if ( ( other . content ) != null ) { return false ; } } else if ( ! ( content . equals ( other . content ) ) ) { return false ; } if ( ( generatedTime ) == null ) { if ( ( other . generatedTime ) != null ) { return false ; } } else if ( ! ( generatedTime . equals ( other . generatedTime ) ) ) { return false ; } if ( ( properties ) == null ) { if ( ( other . properties ) != null ) { return false ; } } else if ( ! ( properties . equals ( other . properties ) ) ) { return false ; } if ( ( internalProperties ) == null ) { if ( ( other . internalProperties ) != null ) { return false ; } } else if ( ! ( internalProperties . equals ( other . internalProperties ) ) ) { return false ; } if ( ( sha1 ) == null ) { if ( ( other . sha1 ) != null ) { return false ; } } else if ( ! ( sha1 . equals ( other . sha1 ) ) ) { return false ; } if ( ( sourceIp ) == null ) { if ( ( other . sourceIp ) != null ) { return false ; } } else if ( ! ( sourceIp . equals ( other . sourceIp ) ) ) { return false ; } if ( ( type ) == null ) { if ( ( other . type ) != null ) { return false ; } } else if ( ! ( type . equals ( other . type ) ) ) { return false ; } if ( ( version ) == null ) { if ( ( other . version ) != null ) { return false ; } } else if ( ! ( version . equals ( other . version ) ) ) { return false ; } return true ; }
|
org . junit . Assert . assertTrue ( expectedMessage . equalsWithoutMessageId ( actualMessage ) )
|
getGroups ( ) { java . util . List < nl . surfnet . coin . api . client . domain . Group > groups = service . getGroups ( "foo" , "some<sp>logged<sp>in<sp>user" , 10 , 0 , null ) . getEntry ( ) ; "<AssertPlaceHolder>" ; } getEntry ( ) { return entry ; }
|
org . junit . Assert . assertEquals ( 2 , groups . size ( ) )
|
testGetScreenHeight ( ) { try { java . awt . Dimension screenSize = java . awt . Toolkit . getDefaultToolkit ( ) . getScreenSize ( ) ; "<AssertPlaceHolder>" ; } catch ( java . awt . HeadlessException e ) { warnHeadless ( ) ; } } getScreenHeight ( ) { return org . esa . beam . framework . ui . UIUtils . getScreenSize ( ) . height ; }
|
org . junit . Assert . assertEquals ( org . esa . beam . framework . ui . UIUtils . getScreenHeight ( ) , screenSize . height )
|
forceExceptionTest ( ) { com . kixeye . janus . ServerStatsFactory factory = new com . kixeye . janus . ServerStatsFactory ( com . kixeye . janus . BaseServerStatsFactoryTest . BadServerStats . class , new com . codahale . metrics . MetricRegistry ( ) ) ; com . kixeye . janus . ServerStats stats = factory . createServerStats ( new com . kixeye . janus . ServerInstance ( "test" , "http://localhost" ) ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNull ( stats )
|
testIsInitialized_negative ( ) { java . util . List < java . lang . String > required = java . util . Arrays . asList ( "name" , "description" , "dev-comments" , "last-modified" , "creation-time" ) ; for ( java . lang . String prop : required ) { com . hp . alm . ali . idea . model . Entity entity = new com . hp . alm . ali . idea . model . Entity ( "defect" , 1 ) ; for ( java . lang . String key : required ) { if ( ! ( key . equals ( prop ) ) ) { entity . setProperty ( key , key ) ; } } com . hp . alm . ali . idea . tasks . HpAlmTask task = new com . hp . alm . ali . idea . tasks . HpAlmTask ( getProject ( ) , entity ) ; "<AssertPlaceHolder>" ; } } isInitialized ( ) { return ( entity . isComplete ( ) ) || ( ( ( ( entity . isInitialized ( "name" ) ) && ( hasDateProperties ( entity ) ) ) && ( entity . isInitialized ( com . hp . alm . ali . idea . tasks . HpAlmTask . getDescriptionField ( entity . getType ( ) ) ) ) ) && ( ( entity . isInitialized ( "dev-comments" ) ) || ( entity . isInitialized ( "comments" ) ) ) ) ; }
|
org . junit . Assert . assertFalse ( task . isInitialized ( ) )
|
testGetValue ( ) { net . bluemix . todo . model . CloudantRow row = new net . bluemix . todo . model . CloudantRow ( ) ; row . setValue ( ctd . getToDo ( ) ) ; "<AssertPlaceHolder>" ; } getToDo ( ) { net . bluemix . todo . model . ToDo td = new net . bluemix . todo . model . ToDo ( ) ; td . setId ( this . get_id ( ) ) ; td . setCompleted ( this . isCompleted ( ) ) ; td . setTitle ( this . getTitle ( ) ) ; return td ; }
|
org . junit . Assert . assertEquals ( ctd . getToDo ( ) , row . getValue ( ) )
|
sexEqualAndAgeGreaterthanequal_sortAddressDesc_limitL100 ( ) { java . lang . String sqlite = "SELECT<sp>*<sp>FROM<sp>users<sp>WHERE<sp>sex<sp>=<sp>'male'<sp>and<sp>age<sp>>=<sp>35<sp>ORDER<sp>BY<sp>address<sp>desc<sp>LIMIT<sp>100" ; java . lang . String api = "select<sp>*<sp>where<sp>sex<sp>=<sp>'male'<sp>and<sp>age<sp>>=<sp>35<sp>order<sp>by<sp>address<sp>desc" ; int limit = 100 ; org . apache . usergrid . query . validator . QueryRequest request = new org . apache . usergrid . query . validator . QueryRequest ( ) ; request . setDbQuery ( sqlite ) ; request . getApiQuery ( ) . setQuery ( api ) ; request . getApiQuery ( ) . setLimit ( limit ) ; org . apache . usergrid . query . validator . QueryResponse response = validator . execute ( request ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ( serviceName ) != null ) { sb . append ( "/" ) ; sb . append ( serviceName ) ; } for ( int i = 0 ; i < ( parameters . size ( ) ) ; i ++ ) { org . apache . usergrid . services . ServiceParameter p = parameters . get ( i ) ; if ( p instanceof org . apache . usergrid . services . ServiceParameter . QueryParameter ) { if ( i == ( ( parameters . size ( ) ) - 1 ) ) { sb . append ( '?' ) ; } else { sb . append ( ';' ) ; } boolean has_prev_param = false ; java . lang . String q = p . toString ( ) ; if ( isNotBlank ( q ) ) { try { sb . append ( "ql=" ) . append ( java . net . URLEncoder . encode ( q , "UTF-8" ) ) ; } catch ( java . io . UnsupportedEncodingException e ) { org . apache . usergrid . services . ServiceRequest . logger . error ( "Unable<sp>to<sp>encode<sp>url" , e ) ; } has_prev_param = true ; } int limit = p . getQuery ( ) . getLimit ( ) ; if ( limit != ( org . apache . usergrid . persistence . Query . DEFAULT_LIMIT ) ) { if ( has_prev_param ) { sb . append ( '&' ) ; } sb . append ( "limit=" ) . append ( limit ) ; has_prev_param = true ; } if ( ( p . getQuery ( ) . getStartResult ( ) ) != null ) { if ( has_prev_param ) { sb . append ( '&' ) ; } sb . append ( "start=" ) . append ( p . getQuery ( ) . getStartResult ( ) ) ; has_prev_param = true ; } } else { sb . append ( '/' ) ; sb . append ( p . toString ( ) ) ; } } return sb . toString ( ) ; }
|
org . junit . Assert . assertTrue ( response . toString ( ) , response . result ( ) )
|
testRegexpFilter ( ) { thredds . server . catalog . ConfigCatalog cat = thredds . server . catalog . TestConfigCatalogBuilder . getFromResource ( "thredds/server/catalog/TestDatasetScan.xml" ) ; thredds . client . catalog . Dataset ds = cat . findDatasetByID ( "testGridScanReg" ) ; assert ds != null ; assert ds instanceof thredds . server . catalog . DatasetScan ; thredds . server . catalog . DatasetScan dss = ( ( thredds . server . catalog . DatasetScan ) ( ds ) ) ; java . lang . String serviceName = dss . getServiceNameDefault ( ) ; assert serviceName . equals ( "all" ) ; thredds . client . catalog . Catalog scanCat = dss . makeCatalogForDirectory ( "testGridScanReg" , cat . getBaseURI ( ) ) . makeCatalog ( ) ; assert scanCat != null ; thredds . client . catalog . tools . CatalogXmlWriter writer = new thredds . client . catalog . tools . CatalogXmlWriter ( ) ; System . out . printf ( "%n%s%n" , writer . writeXML ( scanCat ) ) ; assert ( scanCat . getDatasets ( ) . size ( ) ) == 1 ; thredds . client . catalog . Dataset root = scanCat . getDatasets ( ) . get ( 0 ) ; assert ( root . getDatasets ( ) . size ( ) ) == 1 ; scanCat = dss . makeCatalogForDirectory ( "testGridScanReg/testDatafilesInDateTimeNestedDirs/profiles" , cat . getBaseURI ( ) ) . makeCatalog ( ) ; System . out . printf ( "%n%s%n" , writer . writeXML ( scanCat ) ) ; assert ( scanCat . getDatasets ( ) . size ( ) ) == 1 ; root = scanCat . getDatasets ( ) . get ( 0 ) ; assert ( root . getDatasets ( ) . size ( ) ) == 2 ; scanCat = dss . makeCatalogForDirectory ( "testGridScanReg/testDatafilesInDateTimeNestedDirs/profiles/20131106" , cat . getBaseURI ( ) ) . makeCatalog ( ) ; System . out . printf ( "%n%s%n" , writer . writeXML ( scanCat ) ) ; assert ( scanCat . getDatasets ( ) . size ( ) ) == 1 ; root = scanCat . getDatasets ( ) . get ( 0 ) ; "<AssertPlaceHolder>" ; scanCat = dss . makeCatalogForDirectory ( "testGridScanReg/testDatafilesInDateTimeNestedDirs/profiles/20131107" , cat . getBaseURI ( ) ) . makeCatalog ( ) ; System . out . printf ( "%n%s%n" , writer . writeXML ( scanCat ) ) ; assert ( scanCat . getDatasets ( ) . size ( ) ) == 1 ; root = scanCat . getDatasets ( ) . get ( 0 ) ; assert ( root . getDatasets ( ) . size ( ) ) == 3 ; } getDatasets ( ) { return datasets ; }
|
org . junit . Assert . assertEquals ( 3 , root . getDatasets ( ) . size ( ) )
|
testGetServiceForConfigTypeWithExcludedConfigs ( ) { org . apache . ambari . server . controller . AmbariManagementController controller = createNiceMock ( org . apache . ambari . server . controller . AmbariManagementController . class ) ; org . apache . ambari . server . api . services . AmbariMetaInfo metaInfo = createNiceMock ( org . apache . ambari . server . api . services . AmbariMetaInfo . class ) ; org . apache . ambari . server . controller . StackServiceResponse stackServiceResponse = createNiceMock ( org . apache . ambari . server . controller . StackServiceResponse . class ) ; org . apache . ambari . server . controller . StackServiceComponentResponse stackComponentResponse = createNiceMock ( org . apache . ambari . server . controller . StackServiceComponentResponse . class ) ; org . apache . ambari . server . controller . StackConfigurationResponse stackConfigurationResponse1 = createNiceMock ( org . apache . ambari . server . controller . StackConfigurationResponse . class ) ; java . lang . String testServiceName = "service1" ; java . lang . String testEmptyConfigType = "test-empty-config-type" ; java . lang . String testSiteConfigFile = "test-site.xml" ; java . lang . String testSiteConfigType = "test-site" ; expect ( controller . getAmbariMetaInfo ( ) ) . andReturn ( metaInfo ) . anyTimes ( ) ; expect ( controller . getStackServices ( org . easymock . EasyMock . anyObject ( ) ) ) . andReturn ( java . util . Collections . singleton ( stackServiceResponse ) ) . anyTimes ( ) ; expect ( stackServiceResponse . getServiceName ( ) ) . andReturn ( testServiceName ) . anyTimes ( ) ; expect ( stackServiceResponse . getExcludedConfigTypes ( ) ) . andReturn ( java . util . Collections . singleton ( testSiteConfigType ) ) ; expect ( stackComponentResponse . getComponentName ( ) ) . andReturn ( "component1" ) . anyTimes ( ) ; expect ( stackComponentResponse . getComponentCategory ( ) ) . andReturn ( testSiteConfigFile ) . anyTimes ( ) ; expect ( controller . getStackComponents ( org . easymock . EasyMock . anyObject ( ) ) ) . andReturn ( java . util . Collections . singleton ( stackComponentResponse ) ) . anyTimes ( ) ; expect ( stackConfigurationResponse1 . getPropertyName ( ) ) . andReturn ( "prop1" ) . anyTimes ( ) ; expect ( stackConfigurationResponse1 . getPropertyValue ( ) ) . andReturn ( null ) . anyTimes ( ) ; expect ( stackConfigurationResponse1 . getType ( ) ) . andReturn ( testSiteConfigFile ) . anyTimes ( ) ; expect ( stackConfigurationResponse1 . getPropertyType ( ) ) . andReturn ( java . util . Collections . singleton ( PropertyInfo . PropertyType . TEXT ) ) . anyTimes ( ) ; expect ( stackConfigurationResponse1 . getPropertyAttributes ( ) ) . andReturn ( java . util . Collections . emptyMap ( ) ) . anyTimes ( ) ; expect ( stackConfigurationResponse1 . isRequired ( ) ) . andReturn ( true ) . anyTimes ( ) ; expect ( controller . getStackConfigurations ( org . easymock . EasyMock . anyObject ( ) ) ) . andReturn ( java . util . Collections . singleton ( stackConfigurationResponse1 ) ) . anyTimes ( ) ; expect ( stackServiceResponse . getConfigTypes ( ) ) . andReturn ( java . util . Collections . singletonMap ( testEmptyConfigType , java . util . Collections . emptyMap ( ) ) ) ; expect ( controller . getStackLevelConfigurations ( org . easymock . EasyMock . anyObject ( ) ) ) . andReturn ( java . util . Collections . emptySet ( ) ) . anyTimes ( ) ; expect ( metaInfo . getComponentDependencies ( "test" , "1.0" , "service1" , "component1" ) ) . andReturn ( java . util . Collections . emptyList ( ) ) . anyTimes ( ) ; replay ( controller , stackServiceResponse , stackComponentResponse , stackConfigurationResponse1 , metaInfo ) ; org . apache . ambari . server . controller . internal . Stack stack = new org . apache . ambari . server . controller . internal . Stack ( "test" , "1.0" , controller ) ; try { stack . getServiceForConfigType ( testSiteConfigType ) ; org . junit . Assert . fail ( "Exception<sp>not<sp>thrown" ) ; } catch ( java . lang . IllegalArgumentException e ) { } "<AssertPlaceHolder>" ; verifyAll ( ) ; } getServiceForConfigType ( java . lang . String ) { for ( Map . Entry < java . lang . String , java . util . Map < java . lang . String , java . util . Map < java . lang . String , org . apache . ambari . server . controller . internal . Stack . ConfigProperty > > > entry : serviceConfigurations . entrySet ( ) ) { java . util . Map < java . lang . String , java . util . Map < java . lang . String , org . apache . ambari . server . controller . internal . Stack . ConfigProperty > > typeMap = entry . getValue ( ) ; java . lang . String serviceName = entry . getKey ( ) ; if ( ( typeMap . containsKey ( config ) ) && ( ! ( getExcludedConfigurationTypes ( serviceName ) . contains ( config ) ) ) ) { return serviceName ; } } throw new java . lang . IllegalArgumentException ( ( "Specified<sp>configuration<sp>type<sp>is<sp>not<sp>associated<sp>with<sp>any<sp>service:<sp>" + config ) ) ; }
|
org . junit . Assert . assertEquals ( testServiceName , stack . getServiceForConfigType ( testEmptyConfigType ) )
|
testCombine3 ( ) { org . apache . accumulo . core . client . summary . SummarizerConfiguration sc = org . apache . accumulo . core . client . summary . SummarizerConfiguration . builder ( org . apache . accumulo . core . client . summary . summarizers . EntryLengthSummarizer . class ) . build ( ) ; org . apache . accumulo . core . client . summary . summarizers . EntryLengthSummarizer entrySum = new org . apache . accumulo . core . client . summary . summarizers . EntryLengthSummarizer ( ) ; org . apache . accumulo . core . client . summary . Summarizer . Collector collector1 = entrySum . collector ( sc ) ; collector1 . accept ( new org . apache . accumulo . core . data . Key ( "r1" , "row.sum" 7 ) , new org . apache . accumulo . core . data . Value ( "qualifier.logHist.1" 3 ) ) ; java . util . HashMap < java . lang . String , java . lang . Long > stats1 = new java . util . HashMap ( ) ; collector1 . summarize ( stats1 :: put ) ; org . apache . accumulo . core . client . summary . Summarizer . Collector collector2 = entrySum . collector ( sc ) ; collector2 . accept ( new org . apache . accumulo . core . data . Key ( "key.logHist.4" 4 , "qualifier.logHist.1" 0 , "key.logHist.4" 0 ) , new org . apache . accumulo . core . data . Value ( "row.sum" 2 ) ) ; java . util . HashMap < java . lang . String , java . lang . Long > stats2 = new java . util . HashMap ( ) ; collector2 . summarize ( stats2 :: put ) ; org . apache . accumulo . core . client . summary . Summarizer . Combiner combiner = entrySum . combiner ( sc ) ; combiner . merge ( stats1 , stats2 ) ; java . util . HashMap < java . lang . String , java . lang . Long > expected = new java . util . HashMap ( ) ; expected . put ( "key.min" , 4L ) ; expected . put ( "row.sum" 5 , 13L ) ; expected . put ( "key.logHist.4" 8 , 17L ) ; expected . put ( "key.logHist.4" 1 , 1L ) ; expected . put ( "key.logHist.4" , 1L ) ; expected . put ( "row.sum" 6 , 2L ) ; expected . put ( "key.logHist.4" 7 , 4L ) ; expected . put ( "row.sum" , 6L ) ; expected . put ( "qualifier.logHist.1" 5 , 1L ) ; expected . put ( "key.logHist.4" 2 , 1L ) ; expected . put ( "row.sum" 3 , 2L ) ; expected . put ( "key.logHist.4" 9 , 7L ) ; expected . put ( "family.sum" , 9L ) ; expected . put ( "key.logHist.4" 6 , 1L ) ; expected . put ( "qualifier.logHist.1" 1 , 1L ) ; expected . put ( "qualifier.min" , 0L ) ; expected . put ( "key.logHist.4" 5 , 2L ) ; expected . put ( "qualifier.logHist.1" 4 , 2L ) ; expected . put ( "row.sum" 4 , 1L ) ; expected . put ( "qualifier.logHist.1" , 1L ) ; expected . put ( "qualifier.logHist.1" 6 , 0L ) ; expected . put ( "row.sum" 8 , 0L ) ; expected . put ( "row.sum" 9 , 0L ) ; expected . put ( "visibility.logHist.0" , 2L ) ; expected . put ( "value.min" , 0L ) ; expected . put ( "qualifier.logHist.1" 2 , 2L ) ; expected . put ( "row.sum" 1 , 2L ) ; expected . put ( "value.logHist.0" , 1L ) ; expected . put ( "key.logHist.4" 3 , 1L ) ; expected . put ( "row.sum" 0 , 2L ) ; "<AssertPlaceHolder>" ; } put ( java . lang . Long , org . apache . accumulo . server . tabletserver . LargestFirstMemoryManager$TabletInfo ) { if ( ( map . size ( ) ) == ( max ) ) { if ( ( key . compareTo ( map . firstKey ( ) ) ) < 0 ) return false ; try { add ( key , value ) ; return true ; } finally { map . remove ( map . firstKey ( ) ) ; } } else { add ( key , value ) ; return true ; } }
|
org . junit . Assert . assertEquals ( expected , stats1 )
|
readData2 ( ) { org . mockito . Mockito . when ( filereader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( true ) ; java . lang . String [ ] arr = new java . lang . String [ ] { "1.414011237411E9<sp>UNKNOWN" , "1.414011237411E9<sp>ACTIVE" , "1.414011282953E9<sp>ACTIVE" , "bad<sp>data<sp>PhonyState" , "1.414011300035E9<sp>ACTIVE" , "1.414011311924E9<sp>STANDBY" } ; org . mockito . Mockito . when ( filereader . readAllLine ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( arr ) ; gpsEventReader . setFileReader ( filereader ) ; java . util . List < com . att . aro . core . peripheral . pojo . GpsInfo > info = gpsEventReader . readData ( "/" , 0 , 0 ) ; "<AssertPlaceHolder>" ; } size ( ) { return sessionTable . size ( ) ; }
|
org . junit . Assert . assertTrue ( ( ( info . size ( ) ) > 0 ) )
|
apply_returning_no_tsv ( ) { final com . groupon . lex . metrics . expression . LiteralGroupExpression expr = new com . groupon . lex . metrics . expression . LiteralGroupExpression ( resolver ) ; when ( resolver . apply ( ctx ) ) . thenReturn ( java . util . Optional . of ( com . groupon . lex . metrics . SimpleGroupPath . valueOf ( "foobar" ) ) ) ; when ( ctx . getTSData ( ) ) . thenReturn ( ts_data ) ; when ( ts_data . getTSValue ( com . groupon . lex . metrics . SimpleGroupPath . valueOf ( "foobar" ) ) ) . thenReturn ( TimeSeriesValueSet . EMPTY ) ; "<AssertPlaceHolder>" ; } getTSDelta ( com . groupon . lex . metrics . timeseries . expression . Context ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>supported<sp>yet." ) ; }
|
org . junit . Assert . assertEquals ( TimeSeriesValueSet . EMPTY , expr . getTSDelta ( ctx ) )
|
testGetCacheKey ( ) { org . apache . druid . query . dimension . RegexFilteredDimensionSpec spec1 = new org . apache . druid . query . dimension . RegexFilteredDimensionSpec ( new org . apache . druid . query . dimension . DefaultDimensionSpec ( "foo" , "bar" ) , "xxx" ) ; org . apache . druid . query . dimension . RegexFilteredDimensionSpec spec2 = new org . apache . druid . query . dimension . RegexFilteredDimensionSpec ( new org . apache . druid . query . dimension . DefaultDimensionSpec ( "foo" , "bar" ) , "xyz" ) ; "<AssertPlaceHolder>" ; } getCacheKey ( ) { final org . apache . druid . query . cache . CacheKeyBuilder builder = new org . apache . druid . query . cache . CacheKeyBuilder ( org . apache . druid . query . aggregation . post . PostAggregatorIds . MOMENTS_SKETCH_TO_MAX_CACHE_TYPE_ID ) . appendCacheable ( field ) ; return builder . build ( ) ; }
|
org . junit . Assert . assertFalse ( java . util . Arrays . equals ( spec1 . getCacheKey ( ) , spec2 . getCacheKey ( ) ) )
|
ask ( ) { book . enter ( 1 , Side . SELL , 1000 , 100 ) ; com . paritytrading . parity . match . Event ask = new com . paritytrading . parity . match . Add ( 1 , Side . SELL , 1000 , 100 ) ; "<AssertPlaceHolder>" ; } collect ( ) { return events ; }
|
org . junit . Assert . assertEquals ( asList ( ask ) , events . collect ( ) )
|
testGetFragmentSize ( ) { org . openscience . cdk . smiles . SmilesParser sp = new org . openscience . cdk . smiles . SmilesParser ( org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAtomContainer target = sp . parseSmiles ( "C\\C=C/Nc1cccc(c1)N(O)\\C=C\\C\\C=C\\C=C/C" ) ; org . openscience . cdk . interfaces . IAtomContainer queryac = sp . parseSmiles ( "Nc1ccccc1" ) ; org . openscience . cdk . smsd . Isomorphism smsd1 = new org . openscience . cdk . smsd . Isomorphism ( org . openscience . cdk . smsd . interfaces . Algorithm . SubStructure , false ) ; smsd1 . init ( queryac , target , true , true ) ; smsd1 . setChemFilters ( false , true , false ) ; java . lang . Integer score = 2 ; "<AssertPlaceHolder>" ; } getFragmentSize ( int ) { return ( ( fragmentSize ) != null ) && ( ! ( fragmentSize . isEmpty ( ) ) ) ? fragmentSize . get ( key ) : null ; }
|
org . junit . Assert . assertEquals ( score , smsd1 . getFragmentSize ( 0 ) )
|
testGetHttpURLFromEndpointUri ( ) { org . apache . camel . Endpoint endpoint = org . mockito . Mockito . mock ( org . apache . camel . Endpoint . class ) ; org . apache . camel . Exchange exchange = org . mockito . Mockito . mock ( org . apache . camel . Exchange . class ) ; org . apache . camel . Message message = org . mockito . Mockito . mock ( org . apache . camel . Message . class ) ; org . mockito . Mockito . when ( endpoint . getEndpointUri ( ) ) . thenReturn ( org . apache . camel . opentracing . decorators . AbstractHttpSpanDecoratorTest . TEST_URI ) ; org . mockito . Mockito . when ( exchange . getIn ( ) ) . thenReturn ( message ) ; org . apache . camel . opentracing . decorators . AbstractHttpSpanDecorator decorator = new org . apache . camel . opentracing . decorators . AbstractHttpSpanDecorator ( ) { @ org . apache . camel . opentracing . decorators . Override public java . lang . String getComponent ( ) { return null ; } } ; "<AssertPlaceHolder>" ; } getHttpURL ( org . apache . camel . Exchange , org . apache . camel . Endpoint ) { java . lang . Object url = exchange . getIn ( ) . getHeader ( Exchange . HTTP_URL ) ; if ( url instanceof java . lang . String ) { return ( ( java . lang . String ) ( url ) ) ; } else { java . lang . Object uri = exchange . getIn ( ) . getHeader ( Exchange . HTTP_URI ) ; if ( uri instanceof java . lang . String ) { return ( ( java . lang . String ) ( uri ) ) ; } else { int index = endpoint . getEndpointUri ( ) . lastIndexOf ( "http:" ) ; if ( index != ( - 1 ) ) { return endpoint . getEndpointUri ( ) . substring ( index ) ; } } } return null ; }
|
org . junit . Assert . assertEquals ( org . apache . camel . opentracing . decorators . AbstractHttpSpanDecoratorTest . TEST_URI , decorator . getHttpURL ( exchange , endpoint ) )
|
testGetComponentDetailsForProcessorWithSpecificClientRevision ( ) { org . apache . nifi . web . NiFiWebConfigurationContext configurationContext = mock ( org . apache . nifi . web . NiFiWebConfigurationContext . class ) ; when ( configurationContext . getComponentDetails ( any ( org . apache . nifi . web . HttpServletConfigurationRequestContext . class ) ) ) . thenReturn ( new org . apache . nifi . web . ComponentDetails . Builder ( ) . build ( ) ) ; org . apache . nifi . web . ComponentDetails componentDetails = org . apache . nifi . web . standard . api . processor . ProcessorWebUtils . getComponentDetails ( configurationContext , "1" , mock ( javax . servlet . http . HttpServletRequest . class ) ) ; "<AssertPlaceHolder>" ; } getComponentDetails ( org . apache . nifi . web . NiFiWebConfigurationContext , java . lang . String , javax . servlet . http . HttpServletRequest ) { final org . apache . nifi . web . NiFiWebRequestContext requestContext = org . apache . nifi . web . standard . api . processor . ProcessorWebUtils . getRequestContext ( processorId , request ) ; return configurationContext . getComponentDetails ( requestContext ) ; }
|
org . junit . Assert . assertNotNull ( componentDetails )
|
shouldReturnTrueOnMatchingConditionGivenAnyActiveProfileIsPresentInExpectedProfilesWithActiveProfilesMoreThanExpectedProfiles ( ) { org . flips . model . FeatureContext featureContext = mock ( org . flips . model . FeatureContext . class ) ; org . flips . model . FlipAnnotationAttributes flipAnnotationAttributes = mock ( org . flips . model . FlipAnnotationAttributes . class ) ; java . lang . String [ ] expectedActiveProfiles = new java . lang . String [ ] { "dev" , "qa" } ; java . lang . String [ ] activeProfiles = new java . lang . String [ ] { "uat" , "dev" , "qa" } ; when ( flipAnnotationAttributes . getAttributeValue ( "activeProfiles" , Utils . EMPTY_STRING_ARRAY ) ) . thenReturn ( expectedActiveProfiles ) ; when ( featureContext . getActiveProfilesOrEmpty ( ) ) . thenReturn ( activeProfiles ) ; org . flips . condition . SpringProfileFlipCondition condition = new org . flips . condition . SpringProfileFlipCondition ( ) ; boolean result = condition . evaluateCondition ( featureContext , flipAnnotationAttributes ) ; "<AssertPlaceHolder>" ; verify ( flipAnnotationAttributes ) . getAttributeValue ( "activeProfiles" , Utils . EMPTY_STRING_ARRAY ) ; verify ( featureContext ) . getActiveProfilesOrEmpty ( ) ; } evaluateCondition ( org . flips . model . FeatureContext , org . flips . model . FlipAnnotationAttributes ) { java . lang . String expression = flipAnnotationAttributes . getAttributeValue ( "expression" , "" ) ; org . flips . utils . ValidationUtils . requireNonEmpty ( expression , "expression<sp>element<sp>can<sp>not<sp>be<sp>NULL<sp>or<sp>EMPTY<sp>when<sp>using<sp>@FlipOnSpringExpression" ) ; return evaluateExpression ( featureContext , expression ) ; }
|
org . junit . Assert . assertEquals ( true , result )
|
testOr ( ) { int value = com . annimon . stream . OptionalInt . of ( 42 ) . or ( new com . annimon . stream . function . Supplier < com . annimon . stream . OptionalInt > ( ) { @ com . annimon . stream . Override public com . annimon . stream . OptionalInt get ( ) { return com . annimon . stream . OptionalInt . of ( 19 ) ; } } ) . getAsInt ( ) ; "<AssertPlaceHolder>" ; } getAsInt ( ) { int v = value ; value *= 2 ; return v ; }
|
org . junit . Assert . assertEquals ( 42 , value )
|
testQuery_Script_Parents3 ( ) { com . nhl . link . move . runtime . json . query . JsonQuery query = compiler . compile ( "$#parent" ) ; java . util . List < com . fasterxml . jackson . databind . JsonNode > nodes = collectJsonNodes ( query . execute ( document ) ) ; "<AssertPlaceHolder>" ; } execute ( com . fasterxml . jackson . databind . JsonNode ) { return execute ( rootNode , com . nhl . link . move . runtime . json . query . Utils . createWrapperNode ( null , rootNode ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , nodes . size ( ) )
|
shouldSendListDeviceAction ( ) { com . devicehive . ListDeviceRequest deviceRequest = new com . devicehive . ListDeviceRequest ( ) ; deviceRequest . setName ( com . devicehive . UUID . randomUUID ( ) . toString ( ) ) ; deviceRequest . setSortOrder ( com . devicehive . DESC . name ( ) ) ; com . devicehive . shim . api . Request request = com . devicehive . shim . api . Request . newBuilder ( ) . withBody ( deviceRequest ) . build ( ) ; java . util . concurrent . CompletableFuture < com . devicehive . shim . api . Response > future = new java . util . concurrent . CompletableFuture ( ) ; client . call ( request , future :: complete ) ; com . devicehive . shim . api . Response response = future . get ( 10 , TimeUnit . SECONDS ) ; com . devicehive . ListDeviceResponse responseBody = ( ( com . devicehive . ListDeviceResponse ) ( response . getBody ( ) ) ) ; "<AssertPlaceHolder>" ; } getDevices ( ) { return devices ; }
|
org . junit . Assert . assertNotNull ( responseBody . getDevices ( ) . isEmpty ( ) )
|
testFinding ( ) { org . gedcom4j . validate . Validator . Finding f = new org . gedcom4j . validate . Validator . Finding ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( f )
|
testIsConnected ( ) { System . out . println ( "isConnected" ) ; boolean expResult = true ; boolean result = instance . isConnected ( ) ; "<AssertPlaceHolder>" ; } isConnected ( ) { return channel . isConnected ( ) ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testLeftJoin_2 ( ) { java . lang . String query = "Rack[@location=\"LVS01-01-400-1605\"].assets{*}+.powerStrip{*}" ; com . ebay . cloud . cms . query . service . IQueryResult queryResult = queryService . query ( query , cmsdbContext ) ; "<AssertPlaceHolder>" ; } getEntities ( ) { return entities ; }
|
org . junit . Assert . assertEquals ( 7 , queryResult . getEntities ( ) . size ( ) )
|
testAnyScriptReturnString ( ) { java . lang . Object result = v8 . executeScript ( "'foo';" ) ; "<AssertPlaceHolder>" ; } executeScript ( java . lang . String ) { return executeScript ( script , null , 0 ) ; }
|
org . junit . Assert . assertEquals ( "foo" , result )
|
testEpsEquals1 ( ) { org . nd4j . linalg . api . ndarray . INDArray array = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { - 1 , - 1 , - 1.0E-8 , 1.0E-8 , 1 , 1 } ) ; org . nd4j . linalg . api . ops . impl . reduce . longer . MatchCondition condition = new org . nd4j . linalg . api . ops . impl . reduce . longer . MatchCondition ( array , org . nd4j . linalg . indexing . conditions . Conditions . epsEquals ( 0.0 ) ) ; int numZeroes = org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( condition ) . getInt ( 0 ) ; "<AssertPlaceHolder>" ; } getInt ( long ) { return cachedByteByteBuffer ( ) . getInt ( ( ( ( int ) ( i ) ) * 4 ) ) ; }
|
org . junit . Assert . assertEquals ( 2 , numZeroes )
|
testAddOperatorToUndeploy ( ) { int operatorId = 1 ; underTest . addOperatorToUndeploy ( operatorId ) ; "<AssertPlaceHolder>" ; } getOperatorsToUndeploy ( ) { return operatorsToUndeploy ; }
|
org . junit . Assert . assertTrue ( underTest . getOperatorsToUndeploy ( ) . contains ( operatorId ) )
|
testMenuSql ( ) { lombok . val visitor = org . n3r . eql . dbfieldcryptor . parser . OracleSensitiveFieldsParser . parseSql ( menuSql , com . google . common . collect . Sets . newHashSet ( "TF_B_ORDER_NETIN.PSPT_NO" ) ) ; "<AssertPlaceHolder>" ; } parseSql ( java . lang . String , java . util . Set ) { lombok . var fieldsParser = org . n3r . eql . dbfieldcryptor . parser . OracleSensitiveFieldsParser . tryParseHint ( sql , secureFields ) ; if ( fieldsParser == null ) { lombok . val sqlStatement = org . n3r . eql . dbfieldcryptor . parser . OracleSensitiveFieldsParser . parseSql ( sql ) ; lombok . val sensitiveFieldsParser = new org . n3r . eql . dbfieldcryptor . parser . OracleSensitiveFieldsParser ( secureFields , sql ) ; fieldsParser = org . n3r . eql . dbfieldcryptor . parser . SensitiveFieldsParser . parseStatement ( sensitiveFieldsParser , sqlStatement ) ; } if ( fieldsParser == null ) return null ; if ( fieldsParser . haveNonSecureFields ( ) ) return null ; return fieldsParser ; }
|
org . junit . Assert . assertNull ( visitor )
|
testSimpleWithDecimalsTrunc ( ) { org . hipparchus . linear . RealMatrix m = org . hipparchus . linear . MatrixUtils . createRealMatrix ( new double [ ] [ ] { new double [ ] { 1.232323232323 , 1.43 , 1.63 } , new double [ ] { 2.46 , 2.46 , 2.666666666666 } } ) ; java . lang . String expected = ( ( ( ( ( ( ( ( ( ( ( "{{1" + ( getDecimalCharacter ( ) ) ) + "2323232323,1" ) + ( getDecimalCharacter ( ) ) ) + "43,1" ) + ( getDecimalCharacter ( ) ) ) + "63},{2" ) + ( getDecimalCharacter ( ) ) ) + "46,2" ) + ( getDecimalCharacter ( ) ) ) + "46,2" ) + ( getDecimalCharacter ( ) ) ) + "6666666667}}" ; java . lang . String actual = realMatrixFormat . format ( m ) ; "<AssertPlaceHolder>" ; } format ( org . hipparchus . geometry . Vector ) { return format ( vector , new java . lang . StringBuffer ( ) , new java . text . FieldPosition ( 0 ) ) . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . polls . model . PollsVote missingPollsVote = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
|
org . junit . Assert . assertNull ( missingPollsVote )
|
testSerialization ( ) { org . jfree . chart . axis . NumberAxis a1 = new org . jfree . chart . axis . NumberAxis ( "Test<sp>Axis" ) ; org . jfree . chart . axis . NumberAxis a2 = ( ( org . jfree . chart . axis . NumberAxis ) ( org . jfree . chart . TestUtils . serialised ( a1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( a1 , a2 )
|
testAdd ( ) { "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( 4 , ( 2 + 2 ) )
|
testExtractPayload_PayloadIncluded ( ) { byte [ ] payload = extractor . extractPayload ( com . ngdata . sep . impl . BasePayloadExtractorTest . TABLE_NAME , new org . apache . hadoop . hbase . KeyValue ( com . ngdata . sep . impl . BasePayloadExtractorTest . ROW , com . ngdata . sep . impl . BasePayloadExtractorTest . COLUMN_FAMILY , com . ngdata . sep . impl . BasePayloadExtractorTest . COLUMN_QUALIFIER , com . ngdata . sep . impl . BasePayloadExtractorTest . PAYLOAD_DATA ) ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertArrayEquals ( com . ngdata . sep . impl . BasePayloadExtractorTest . PAYLOAD_DATA , payload )
|
testJob ( ) { final org . apache . hadoop . mapreduce . Job job = org . apache . hadoop . mapred . TestMiniMRClientCluster . createJob ( ) ; org . apache . hadoop . mapreduce . lib . input . FileInputFormat . setInputPaths ( job , org . apache . hadoop . mapred . TestMiniMRClientCluster . inDir ) ; org . apache . hadoop . mapreduce . lib . output . FileOutputFormat . setOutputPath ( job , new org . apache . hadoop . fs . Path ( org . apache . hadoop . mapred . TestMiniMRClientCluster . outDir , "testJob" ) ) ; "<AssertPlaceHolder>" ; validateCounters ( job . getCounters ( ) , 5 , 25 , 5 , 5 ) ; } waitForCompletion ( boolean ) { if ( ( state ) == ( org . apache . hadoop . mapreduce . Job . JobState . DEFINE ) ) { submit ( ) ; } if ( verbose ) { monitorAndPrintJob ( ) ; } else { int completionPollIntervalMillis = org . apache . hadoop . mapreduce . Job . getCompletionPollInterval ( cluster . getConf ( ) ) ; while ( ! ( isComplete ( ) ) ) { try { java . lang . Thread . sleep ( completionPollIntervalMillis ) ; } catch ( java . lang . InterruptedException ie ) { } } } return isSuccessful ( ) ; }
|
org . junit . Assert . assertTrue ( job . waitForCompletion ( true ) )
|
shouldEchoServerSendTextFrameWithPayloadNotFragmented ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; final java . util . List < java . nio . ByteBuffer > bufferList = new java . util . ArrayList ( ) ; context . checking ( new org . kaazing . gateway . transport . test . 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 ) ) ) ; oneOf ( handler ) . messageReceived ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) , with ( any ( java . lang . Object . class ) ) ) ; will ( new org . jmock . lib . action . CustomAction ( "Capture<sp>messageReceived()<sp>parameters" ) { @ org . kaazing . gateway . transport . wsn . specification . ws . connector . Override public java . lang . Object invoke ( org . jmock . api . Invocation invocation ) throws java . lang . Throwable { java . lang . Object message = invocation . getParameter ( 1 ) ; org . kaazing . mina . core . buffer . IoBufferEx ioBuffer = ( ( org . kaazing . mina . core . buffer . IoBufferEx ) ( message ) ) ; bufferList . add ( ioBuffer . buf ( ) ) ; if ( ( bufferList . size ( ) ) == 1 ) { org . kaazing . gateway . transport . wsn . WsnSession wsnConnectSession = ( ( org . kaazing . gateway . transport . wsn . WsnSession ) ( invocation . getParameter ( 0 ) ) ) ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 4096 ) ; for ( java . nio . ByteBuffer bb : bufferList ) { buffer . put ( bb ) ; } buffer . flip ( ) ; org . kaazing . mina . core . buffer . IoBufferAllocatorEx < ? extends org . kaazing . gateway . transport . ws . bridge . filter . WsBuffer > allocator = wsnConnectSession . getBufferAllocator ( ) ; org . kaazing . gateway . transport . ws . bridge . filter . WsBuffer wsBuffer = allocator . wrap ( buffer , IoBufferEx . FLAG_SHARED ) ; wsBuffer . setKind ( WsBuffer . Kind . TEXT ) ; wsnConnectSession . write ( wsBuffer ) ; } return null ; } } ) ; 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 ) ) ) ) ) ; } } ) ; final 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 ( ) )
|
testBadge_0 ( ) { cn . jpush . api . push . model . notification . IosNotification ios = cn . jpush . api . push . model . notification . IosNotification . newBuilder ( ) . setBadge ( 0 ) . build ( ) ; com . google . gson . JsonObject json = new com . google . gson . JsonObject ( ) ; json . add ( "badge" , new com . google . gson . JsonPrimitive ( "0" ) ) ; json . add ( "sound" , new com . google . gson . JsonPrimitive ( "" ) ) ; "<AssertPlaceHolder>" ; } toJSON ( ) { cn . jpush . api . report . model . JsonObject jsonObject = new cn . jpush . api . report . model . JsonObject ( ) ; if ( ( msgId ) != ( - 1L ) ) { jsonObject . addProperty ( cn . jpush . api . report . model . CheckMessagePayload . MSG_ID , msgId ) ; } if ( null != ( registrationIds ) ) { cn . jpush . api . report . model . JsonArray jsonArray = new cn . jpush . api . report . model . JsonArray ( ) ; for ( java . lang . String rid : registrationIds ) { jsonArray . add ( new cn . jpush . api . report . model . JsonPrimitive ( rid ) ) ; } jsonObject . add ( cn . jpush . api . report . model . CheckMessagePayload . REGISTRATION_IDS , jsonArray ) ; } if ( null != ( date ) ) { jsonObject . addProperty ( cn . jpush . api . report . model . CheckMessagePayload . DATE , date ) ; } return jsonObject ; }
|
org . junit . Assert . assertEquals ( "" , json , ios . toJSON ( ) )
|
toImmutable ( ) { org . onlab . graph . MutablePath < org . onlab . graph . TestVertex , org . onlab . graph . TestEdge > p = new org . onlab . graph . DefaultMutablePath ( ) ; p . appendEdge ( new org . onlab . graph . TestEdge ( A , B ) ) ; p . appendEdge ( new org . onlab . graph . TestEdge ( B , C ) ) ; validatePath ( p , org . onlab . graph . A , org . onlab . graph . C , 2 ) ; "<AssertPlaceHolder>" ; validatePath ( p . toImmutable ( ) , org . onlab . graph . A , org . onlab . graph . C , 2 ) ; } toImmutable ( ) { org . onlab . graph . MutablePath < org . onlab . graph . TestVertex , org . onlab . graph . TestEdge > p = new org . onlab . graph . DefaultMutablePath ( ) ; p . appendEdge ( new org . onlab . graph . TestEdge ( A , B ) ) ; p . appendEdge ( new org . onlab . graph . TestEdge ( B , C ) ) ; validatePath ( p , org . onlab . graph . A , org . onlab . graph . C , 2 ) ; org . junit . Assert . assertEquals ( "immutables<sp>should<sp>equal" , p . toImmutable ( ) , p . toImmutable ( ) ) ; validatePath ( p . toImmutable ( ) , org . onlab . graph . A , org . onlab . graph . C , 2 ) ; }
|
org . junit . Assert . assertEquals ( "immutables<sp>should<sp>equal" , p . toImmutable ( ) , p . toImmutable ( ) )
|
shouldTruncatePropertyBytes ( ) { final uk . gov . gchq . gaffer . data . element . Properties properties = new uk . gov . gchq . gaffer . data . element . Properties ( ) { { put ( AccumuloPropertyNames . COLUMN_QUALIFIER , 1 ) ; put ( AccumuloPropertyNames . COLUMN_QUALIFIER_2 , 2 ) ; put ( AccumuloPropertyNames . COLUMN_QUALIFIER_3 , 3 ) ; put ( AccumuloPropertyNames . COLUMN_QUALIFIER_4 , 4 ) ; } } ; final byte [ ] bytes = converter . buildColumnQualifier ( TestGroups . EDGE , properties ) ; final uk . gov . gchq . gaffer . accumulostore . utils . BytesAndRange br = converter . getPropertiesAsBytesFromColumnQualifier ( TestGroups . EDGE , bytes , 2 ) ; final uk . gov . gchq . gaffer . data . element . Properties truncatedProperties = new uk . gov . gchq . gaffer . data . element . Properties ( ) { { put ( AccumuloPropertyNames . COLUMN_QUALIFIER , 1 ) ; put ( AccumuloPropertyNames . COLUMN_QUALIFIER_2 , 2 ) ; } } ; byte [ ] truncatedBytes = new byte [ br . getLength ( ) ] ; java . lang . System . arraycopy ( bytes , br . getOffSet ( ) , truncatedBytes , 0 , br . getLength ( ) ) ; "<AssertPlaceHolder>" ; } getPropertiesFromColumnQualifier ( java . lang . String , byte [ ] ) { final uk . gov . gchq . gaffer . store . schema . SchemaElementDefinition elementDefinition = schema . getElement ( group ) ; if ( null == elementDefinition ) { throw new uk . gov . gchq . gaffer . exception . SerialisationException ( ( ( "No<sp>SchemaElementDefinition<sp>found<sp>for<sp>group<sp>" + group ) + ",<sp>is<sp>this<sp>group<sp>in<sp>your<sp>schema<sp>or<sp>do<sp>your<sp>table<sp>iterators<sp>need<sp>updating?" ) ) ; } final uk . gov . gchq . gaffer . data . element . Properties properties = new uk . gov . gchq . gaffer . data . element . Properties ( ) ; if ( ( null == bytes ) || ( ( bytes . length ) == 0 ) ) { return properties ; } int carriage = ( uk . gov . gchq . gaffer . serialisation . implementation . raw . CompactRawSerialisationUtils . decodeVIntSize ( bytes [ 0 ] ) ) + ( org . apache . hadoop . hbase . util . Bytes . toBytes ( group ) . length ) ; final int arrayLength = bytes . length ; final java . util . Iterator < java . lang . String > propertyNames = elementDefinition . getGroupBy ( ) . iterator ( ) ; while ( ( propertyNames . hasNext ( ) ) && ( carriage < arrayLength ) ) { final java . lang . String propertyName = propertyNames . next ( ) ; final uk . gov . gchq . gaffer . store . schema . TypeDefinition typeDefinition = elementDefinition . getPropertyTypeDef ( propertyName ) ; final uk . gov . gchq . gaffer . serialisation . ToBytesSerialiser serialiser = ( null != typeDefinition ) ? ( ( uk . gov . gchq . gaffer . serialisation . ToBytesSerialiser ) ( typeDefinition . getSerialiser ( ) ) ) : null ; if ( null != serialiser ) { final int numBytesForLength = uk . gov . gchq . gaffer . serialisation . implementation . raw . CompactRawSerialisationUtils . decodeVIntSize ( bytes [ carriage ] ) ; int currentPropLength ; try { currentPropLength = ( ( int ) ( uk . gov . gchq . gaffer . serialisation . implementation . raw . CompactRawSerialisationUtils . readLong ( bytes , carriage ) ) ) ; } catch ( final uk . gov . gchq . gaffer . exception . SerialisationException e ) { throw new uk . gov . gchq . gaffer . exception . SerialisationException ( "Exception<sp>reading<sp>length<sp>of<sp>property" ) ; } carriage += numBytesForLength ; if ( currentPropLength > 0 ) { try { properties . put ( propertyName , serialiser . deserialise ( bytes , carriage , currentPropLength ) ) ; carriage += currentPropLength ; } catch ( final uk . gov . gchq . gaffer . exception . SerialisationException e ) { throw new uk . gov . gchq . gaffer . exception . SerialisationException ( ( "Failed<sp>to<sp>deserialise<sp>property<sp>" + propertyName ) , e ) ; } } else { try { properties . put ( propertyName , serialiser . deserialiseEmpty ( ) ) ; } catch ( final uk . gov . gchq . gaffer . exception . SerialisationException e ) { throw new uk . gov . gchq . gaffer . exception . SerialisationException ( ( "Failed<sp>to<sp>deserialise<sp>property<sp>" + propertyName ) , e ) ; } } } } return properties ; }
|
org . junit . Assert . assertEquals ( truncatedProperties , converter . getPropertiesFromColumnQualifier ( TestGroups . EDGE , truncatedBytes ) )
|
findSingleSignOn ( ) { java . lang . String id = "sso" ; org . wildfly . clustering . ee . Batcher < org . wildfly . clustering . ee . Batch > batcher = mock ( org . wildfly . clustering . ee . Batcher . class ) ; org . wildfly . clustering . ee . Batch batch = mock ( org . wildfly . clustering . ee . Batch . class ) ; org . wildfly . clustering . web . sso . SSO < io . undertow . security . api . AuthenticatedSessionManager . AuthenticatedSession , java . lang . String , java . lang . String , java . lang . Void > sso = mock ( org . wildfly . clustering . web . sso . SSO . class ) ; when ( this . manager . getBatcher ( ) ) . thenReturn ( batcher ) ; when ( batcher . createBatch ( ) ) . thenReturn ( batch ) ; when ( this . manager . findSSO ( id ) ) . thenReturn ( sso ) ; io . undertow . security . impl . SingleSignOn result = this . subject . findSingleSignOn ( id ) ; "<AssertPlaceHolder>" ; verify ( batcher ) . suspendBatch ( ) ; } findSingleSignOn ( java . lang . String ) { try { java . util . Base64 . getUrlDecoder ( ) . decode ( id ) ; } catch ( java . lang . IllegalArgumentException e ) { return null ; } org . wildfly . clustering . ee . Batcher < org . wildfly . clustering . ee . Batch > batcher = this . manager . getBatcher ( ) ; @ org . wildfly . clustering . web . undertow . sso . SuppressWarnings ( "resource" ) org . wildfly . clustering . ee . Batch batch = batcher . createBatch ( ) ; try { org . wildfly . clustering . web . sso . SSO < io . undertow . security . api . AuthenticatedSessionManager . AuthenticatedSession , java . lang . String , java . lang . String , java . lang . Void > sso = this . manager . findSSO ( id ) ; if ( sso == null ) { if ( org . wildfly . clustering . web . undertow . sso . DistributableSingleSignOnManager . log . isTraceEnabled ( ) ) { org . wildfly . clustering . web . undertow . sso . DistributableSingleSignOnManager . log . tracef ( "SSO<sp>ID<sp>%s<sp>not<sp>found<sp>on<sp>the<sp>session<sp>manager." , id ) ; } batch . close ( ) ; return null ; } if ( org . wildfly . clustering . web . undertow . sso . DistributableSingleSignOnManager . log . isTraceEnabled ( ) ) { org . wildfly . clustering . web . undertow . sso . DistributableSingleSignOnManager . log . tracef ( "SSO<sp>ID<sp>%s<sp>found<sp>on<sp>the<sp>session<sp>manager." , id ) ; } return new org . wildfly . clustering . web . undertow . sso . DistributableSingleSignOn ( sso , this . registry , batcher , batcher . suspendBatch ( ) ) ; } catch ( java . lang . RuntimeException | java . lang . Error e ) { batch . discard ( ) ; batch . close ( ) ; throw e ; } }
|
org . junit . Assert . assertNotNull ( result )
|
testDataObjectWithInvalidDependencyCheck ( ) { com . emc . storageos . db . common . DbSchemaCheckerTest . log . info ( "testDataObjectWithInvalidDependencyCheck()<sp>started..." ) ; com . emc . storageos . db . common . DataObjectScanner scanner = new com . emc . storageos . db . common . DataObjectScanner ( ) ; java . lang . String [ ] packages = new java . lang . String [ ] { "com.emc.storageos.db.common.model" } ; scanner . setPackages ( packages ) ; boolean pass = true ; try { scanner . init ( ) ; com . emc . storageos . db . common . DbSchemaCheckerTest . log . info ( "testDataObjectWithInvalidDependencyCheck()<sp>passed." ) ; } catch ( java . lang . Exception ex ) { com . emc . storageos . db . common . DbSchemaCheckerTest . log . info ( ( "testDataObjectWithInvalidDependencyCheck(),<sp>dependency<sp>check<sp>failed<sp>-><sp>" + ( ex . getMessage ( ) ) ) ) ; pass = false ; } "<AssertPlaceHolder>" ; } getMessage ( ) { return getLocalizedMessage ( ) ; }
|
org . junit . Assert . assertFalse ( pass )
|
getDeferredConstruction ( ) { com . esotericsoftware . yamlbeans . DeferredConstruction construction = com . esotericsoftware . yamlbeans . Beans . getDeferredConstruction ( com . esotericsoftware . yamlbeans . BeansTest . MockClass . class , yamlConfig ) ; "<AssertPlaceHolder>" ; } getDeferredConstruction ( java . lang . Class , com . esotericsoftware . yamlbeans . YamlConfig ) { com . esotericsoftware . yamlbeans . YamlConfig . ConstructorParameters parameters = config . readConfig . constructorParameters . get ( type ) ; if ( parameters != null ) return new com . esotericsoftware . yamlbeans . DeferredConstruction ( parameters . constructor , parameters . parameterNames ) ; try { java . lang . Class constructorProperties = java . lang . Class . forName ( "java.beans.ConstructorProperties" ) ; for ( java . lang . reflect . Constructor typeConstructor : type . getConstructors ( ) ) { java . lang . annotation . Annotation annotation = typeConstructor . getAnnotation ( constructorProperties ) ; if ( annotation == null ) continue ; java . lang . String [ ] parameterNames = ( ( java . lang . String [ ] ) ( constructorProperties . getMethod ( "value" ) . invoke ( annotation , ( ( java . lang . Object [ ] ) ( null ) ) ) ) ) ; return new com . esotericsoftware . yamlbeans . DeferredConstruction ( typeConstructor , parameterNames ) ; } } catch ( java . lang . Exception ignored ) { } return null ; }
|
org . junit . Assert . assertEquals ( null , construction )
|
test_Integer ( ) { com . alibaba . dubbo . common . serialize . ObjectOutput objectOutput = serialization . serialize ( url , byteArrayOutputStream ) ; objectOutput . writeInt ( 1 ) ; objectOutput . flushBuffer ( ) ; java . io . ByteArrayInputStream byteArrayInputStream = new java . io . ByteArrayInputStream ( byteArrayOutputStream . toByteArray ( ) ) ; com . alibaba . dubbo . common . serialize . ObjectInput deserialize = serialization . deserialize ( url , byteArrayInputStream ) ; int i = deserialize . readInt ( ) ; "<AssertPlaceHolder>" ; try { deserialize . readInt ( ) ; org . junit . Assert . fail ( ) ; } catch ( java . io . IOException expected ) { } } readInt ( ) { return input . readInt ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , i )
|
testNewReactionSet ( ) { org . openscience . cdk . interfaces . IChemObjectBuilder builder = org . openscience . cdk . AbstractChemObjectBuilderTest . rootObject . getBuilder ( ) ; org . openscience . cdk . interfaces . IReactionSet set = builder . newInstance ( org . openscience . cdk . interfaces . IReactionSet . class ) ; "<AssertPlaceHolder>" ; } getBuilder ( ) { return org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ; }
|
org . junit . Assert . assertNotNull ( set )
|
lowerCase_EmptyString ( ) { "<AssertPlaceHolder>" ; } lowerCase ( java . lang . String ) { if ( com . aliyun . oss . common . utils . StringUtils . isNullOrEmpty ( str ) ) { return str ; } return str . toLowerCase ( com . aliyun . oss . common . utils . StringUtils . LOCALE_ENGLISH ) ; }
|
org . junit . Assert . assertEquals ( com . aliyun . oss . common . utils . StringUtils . lowerCase ( "" ) , "" )
|
testMapConstructorCopiesData ( ) { gnu . trove . TIntObjectHashMap < java . lang . String > first = new gnu . trove . TIntObjectHashMap ( ) ; first . put ( 0 , gnu . trove . TIntObjectHashMapTest . ZERO ) ; gnu . trove . TIntObjectHashMap < java . lang . String > copy = new gnu . trove . TIntObjectHashMap ( first ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return metadata . find ( key ) ; }
|
org . junit . Assert . assertEquals ( gnu . trove . TIntObjectHashMapTest . ZERO , copy . get ( 0 ) )
|
normalScaleTest ( ) { com . itextpdf . kernel . geom . AffineTransform expected = com . itextpdf . kernel . geom . AffineTransform . getScaleInstance ( 10.0 , 20.0 ) ; com . itextpdf . kernel . geom . AffineTransform actual = com . itextpdf . svg . utils . TransformUtils . parseTransform ( "scale(10,<sp>20)" ) ; "<AssertPlaceHolder>" ; } parseTransform ( java . lang . String ) { if ( transform == null ) { throw new com . itextpdf . svg . exceptions . SvgProcessingException ( com . itextpdf . svg . exceptions . SvgLogMessageConstant . TRANSFORM_NULL ) ; } if ( transform . isEmpty ( ) ) { throw new com . itextpdf . svg . exceptions . SvgProcessingException ( com . itextpdf . svg . exceptions . SvgLogMessageConstant . TRANSFORM_EMPTY ) ; } com . itextpdf . kernel . geom . AffineTransform matrix = new com . itextpdf . kernel . geom . AffineTransform ( ) ; java . util . List < java . lang . String > listWithTransformations = com . itextpdf . svg . utils . TransformUtils . splitString ( transform ) ; for ( java . lang . String transformation : listWithTransformations ) { com . itextpdf . kernel . geom . AffineTransform newMatrix = com . itextpdf . svg . utils . TransformUtils . transformationStringToMatrix ( transformation ) ; if ( newMatrix != null ) { matrix . concatenate ( newMatrix ) ; } } return matrix ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
evaluateNaiveBayesIris ( ) { org . jpmml . rattle . Batch batch = new org . jpmml . rattle . RattleBatch ( "NaiveBayes" , "Iris" ) ; "<AssertPlaceHolder>" ; } evaluate ( org . jpmml . evaluator . Batch ) { org . jpmml . evaluator . PMML pmml = org . jpmml . evaluator . IOUtil . unmarshal ( batch . getModel ( ) ) ; org . jpmml . evaluator . PMMLManager pmmlManager = new org . jpmml . evaluator . PMMLManager ( pmml ) ; org . jpmml . evaluator . ModelManager < ? > modelManager = pmmlManager . getModelManager ( null , org . jpmml . evaluator . ModelEvaluatorFactory . getInstance ( ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > > input = org . jpmml . evaluator . CsvUtil . load ( batch . getInput ( ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > > output = org . jpmml . evaluator . CsvUtil . load ( batch . getOutput ( ) ) ; org . jpmml . evaluator . Evaluator evaluator = ( ( org . jpmml . evaluator . Evaluator ) ( modelManager ) ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . Object > > table = org . jpmml . evaluator . Lists . newArrayList ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > activeFields = evaluator . getActiveFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > groupFields = evaluator . getGroupFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > predictedFields = evaluator . getPredictedFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > outputFields = evaluator . getOutputFields ( ) ; org . jpmml . evaluator . List < org . jpmml . evaluator . FieldName > inputFields = org . jpmml . evaluator . Lists . newArrayList ( ) ; inputFields . addAll ( activeFields ) ; inputFields . addAll ( groupFields ) ; for ( int i = 0 ; i < ( input . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > inputRow = input . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . Object > arguments = org . jpmml . evaluator . Maps . newLinkedHashMap ( ) ; for ( org . jpmml . evaluator . FieldName inputField : inputFields ) { java . lang . String inputCell = inputRow . get ( inputField ) ; java . lang . Object inputValue = evaluator . prepare ( inputField , inputCell ) ; arguments . put ( inputField , inputValue ) ; } table . add ( arguments ) ; } if ( ( groupFields . size ( ) ) == 1 ) { org . jpmml . evaluator . FieldName groupField = groupFields . get ( 0 ) ; table = org . jpmml . evaluator . EvaluatorUtil . groupRows ( groupField , table ) ; } else if ( ( groupFields . size ( ) ) > 1 ) { throw new org . jpmml . evaluator . EvaluationException ( ) ; } if ( output . isEmpty ( ) ) { for ( int i = 0 ; i < ( table . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > arguments = table . get ( i ) ; evaluator . evaluate ( arguments ) ; } return true ; } else { if ( ( table . size ( ) ) != ( output . size ( ) ) ) { throw new org . jpmml . evaluator . EvaluationException ( ) ; } boolean success = true ; for ( int i = 0 ; i < ( output . size ( ) ) ; i ++ ) { org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , java . lang . String > outputRow = output . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > arguments = table . get ( i ) ; org . jpmml . evaluator . Map < org . jpmml . evaluator . FieldName , ? > result = evaluator . evaluate ( arguments ) ; for ( org . jpmml . evaluator . FieldName predictedField : predictedFields ) { java . lang . String outputCell = outputRow . get ( predictedField ) ; java . lang . Object predictedValue = org . jpmml . evaluator . EvaluatorUtil . decode ( result . get ( predictedField ) ) ; success &= org . jpmml . evaluator . BatchUtil . acceptable ( outputCell , predictedValue ) ; } for ( org . jpmml . evaluator . FieldName outputField : outputFields ) { java . lang . String outputCell = outputRow . get ( outputField ) ; java . lang . Object computedValue = result . get ( outputField ) ; success &= ( outputCell != null ) ? org . jpmml . evaluator . BatchUtil . acceptable ( outputCell , computedValue
|
org . junit . Assert . assertTrue ( org . jpmml . rattle . BatchUtil . evaluate ( batch ) )
|
testBaseCryptoRecordDecrypt ( ) { java . lang . String base64CipherText = "NMsdnRulLwQsVcwxKW9XwaUe7ouJk5Wn" + ( ( ( ( ( ( ( ( ( ( ( ( "egmujHWQSGyf8JeudZjKzfi0OFRRvvm4" 3 + "vadoY38hhW2LCMkoZcNfgCqJ26lO1O0s" 8 ) + "lvbpiPQQLC6/ffF2vbzL0nzMUuSyvaQz" ) + "vadoY38hhW2LCMkoZcNfgCqJ26lO1O0s" 1 ) + "vadoY38hhW2LCMkoZcNfgCqJ26lO1O0s" ) + "egmujHWQSGyf8JeudZjKzfi0OFRRvvm4" 2 ) + "egmujHWQSGyf8JeudZjKzfi0OFRRvvm4" ) + "vadoY38hhW2LCMkoZcNfgCqJ26lO1O0s" 9 ) + "whgLWbN+21NitNwWYknoEWe1m6hmGZDg" ) + "egmujHWQSGyf8JeudZjKzfi0OFRRvvm4" 1 ) + "vadoY38hhW2LCMkoZcNfgCqJ26lO1O0s" 7 ) + "5QgzmlNyvB+KPFvPsYzxDnSCjOoRSLx7" ) + "vadoY38hhW2LCMkoZcNfgCqJ26lO1O0s" 3 ) ; java . lang . String base64IV = "GX8L37AAb2FZJMzIoXlX8w==" ; java . lang . String base16Hmac = "vadoY38hhW2LCMkoZcNfgCqJ26lO1O0s" 2 + "vadoY38hhW2LCMkoZcNfgCqJ26lO1O0s" 4 ; org . mozilla . gecko . sync . ExtendedJSONObject body = new org . mozilla . gecko . sync . ExtendedJSONObject ( ) ; org . mozilla . gecko . sync . ExtendedJSONObject payload = new org . mozilla . gecko . sync . ExtendedJSONObject ( ) ; payload . put ( "ciphertext" , base64CipherText ) ; payload . put ( "IV" , base64IV ) ; payload . put ( "egmujHWQSGyf8JeudZjKzfi0OFRRvvm4" 0 , base16Hmac ) ; body . put ( "vadoY38hhW2LCMkoZcNfgCqJ26lO1O0s" 5 , payload . toJSONString ( ) ) ; org . mozilla . gecko . sync . CryptoRecord record = org . mozilla . gecko . sync . CryptoRecord . fromJSONRecord ( body ) ; byte [ ] decodedKey = org . mozilla . apache . commons . codec . binary . Base64 . decodeBase64 ( base64EncryptionKey . getBytes ( "UTF-8" ) ) ; byte [ ] decodedHMAC = org . mozilla . apache . commons . codec . binary . Base64 . decodeBase64 ( base64HmacKey . getBytes ( "UTF-8" ) ) ; record . keyBundle = new org . mozilla . gecko . sync . crypto . KeyBundle ( decodedKey , decodedHMAC ) ; record . decrypt ( ) ; java . lang . String id = ( ( java . lang . String ) ( record . payload . get ( "vadoY38hhW2LCMkoZcNfgCqJ26lO1O0s" 6 ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return this . resource . equals ( obj ) ; }
|
org . junit . Assert . assertTrue ( id . equals ( "vadoY38hhW2LCMkoZcNfgCqJ26lO1O0s" 0 ) )
|
iterationIsInOrder ( ) { for ( java . util . Map < java . lang . Integer , java . lang . Integer > any : net . java . quickcheck . generator . CombinedGeneratorsIterables . someMaps ( net . java . quickcheck . generator . PrimitiveGenerators . integers ( ) , net . java . quickcheck . generator . PrimitiveGenerators . integers ( ) ) ) { java . util . List < java . lang . Integer > expectedKeys = new java . util . ArrayList ( any . keySet ( ) ) ; java . util . Collections . sort ( expectedKeys ) ; com . google . firebase . database . collection . ImmutableSortedMap < java . lang . Integer , java . lang . Integer > map = com . google . firebase . database . collection . ArraySortedMap . fromMap ( any , com . google . firebase . database . collection . ArraySortedMapTest . IntComparator ) ; java . util . List < java . lang . Integer > actualKeys = new java . util . ArrayList ( ) ; for ( Map . Entry < java . lang . Integer , java . lang . Integer > entry : map ) { actualKeys . add ( entry . getKey ( ) ) ; } "<AssertPlaceHolder>" ; } } getKey ( ) { return query . getKey ( ) ; }
|
org . junit . Assert . assertEquals ( expectedKeys , actualKeys )
|
testCompleteStandaloneTaskWithVariablesInReturn ( ) { java . lang . String taskVarName = "taskVar" ; java . lang . String taskVarValue = "taskVarValue" ; java . lang . String taskId = "myTask" ; org . camunda . bpm . engine . task . Task standaloneTask = taskService . newTask ( taskId ) ; taskService . saveTask ( standaloneTask ) ; java . util . Map < java . lang . String , java . lang . Object > variables = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; variables . put ( taskVarName , taskVarValue ) ; java . util . Map < java . lang . String , java . lang . Object > returnedVariables = taskService . completeWithVariablesInReturn ( taskId , variables ) ; "<AssertPlaceHolder>" ; historyService . deleteHistoricTaskInstance ( taskId ) ; } size ( ) { return ( ( ( historicProcessInstanceIds . size ( ) ) + ( historicDecisionInstanceIds . size ( ) ) ) + ( historicCaseInstanceIds . size ( ) ) ) + ( historicBatchIds . size ( ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , returnedVariables . size ( ) )
|
getDeclaredFields ( ) { jetbrick . bean . KlassInfo klass = jetbrick . bean . KlassInfo . create ( java . util . UUID . class ) ; "<AssertPlaceHolder>" ; } getDeclaredFields ( ) { return declaredFieldsGetter . get ( ) ; }
|
org . junit . Assert . assertTrue ( ( ( klass . getDeclaredFields ( ) . size ( ) ) > 0 ) )
|
testIgnoreBetweenSpecialComments ( ) { net . sourceforge . pmd . cpd . SourceCode sourceCode = new net . sourceforge . pmd . cpd . SourceCode ( new net . sourceforge . pmd . cpd . SourceCode . StringCodeLoader ( ( ( ( ( ( ( ( "//<sp>CPD-OFF" + ( net . sourceforge . pmd . PMD . EOL ) ) + "static<sp>SecCertificateRef<sp>gNServerLogonCertificate;" ) + ( net . sourceforge . pmd . PMD . EOL ) ) + "//<sp>CPD-ON" ) + ( net . sourceforge . pmd . PMD . EOL ) ) + "@end" ) + ( net . sourceforge . pmd . PMD . EOL ) ) ) ) ; net . sourceforge . pmd . cpd . Tokens tokens = new net . sourceforge . pmd . cpd . Tokens ( ) ; tokenizer . tokenize ( sourceCode , tokens ) ; net . sourceforge . pmd . cpd . TokenEntry . getEOF ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return rules . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , tokens . size ( ) )
|
testGetAdminsEmpty ( ) { System . out . println ( ( ( cz . metacentrum . perun . core . entry . SecurityTeamsManagerEntryIntegrationTest . CLASS_NAME ) + "testGetAdminsEmpty" ) ) ; setUpSecurityTeams ( ) ; setUpUsers ( ) ; java . util . List < cz . metacentrum . perun . core . api . User > expected = new java . util . ArrayList ( ) ; java . util . List < cz . metacentrum . perun . core . api . User > actual = securityTeamsManagerEntry . getAdmins ( sess , st0 , false ) ; java . util . Collections . sort ( expected ) ; java . util . Collections . sort ( actual ) ; "<AssertPlaceHolder>" ; } getAdmins ( cz . metacentrum . perun . core . api . PerunSession , cz . metacentrum . perun . core . api . Facility , boolean ) { if ( onlyDirectAdmins ) { return getFacilitiesManagerImpl ( ) . getDirectAdmins ( perunSession , facility ) ; } else { return getFacilitiesManagerImpl ( ) . getAdmins ( perunSession , facility ) ; } }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testIsActive ( ) { com . google . cloud . datastore . Transaction transaction = com . google . cloud . examples . datastore . snippets . ITTransactionSnippets . datastore . newTransaction ( ) ; com . google . cloud . examples . datastore . snippets . TransactionSnippets transactionSnippets = new com . google . cloud . examples . datastore . snippets . TransactionSnippets ( transaction ) ; com . google . cloud . datastore . Key key = transactionSnippets . isActive ( ) ; com . google . cloud . datastore . Entity result = com . google . cloud . examples . datastore . snippets . ITTransactionSnippets . datastore . get ( key ) ; "<AssertPlaceHolder>" ; com . google . cloud . examples . datastore . snippets . ITTransactionSnippets . datastore . delete ( key ) ; } get ( java . lang . String ) { com . google . cloud . datastore . Datastore datastore = transaction . getDatastore ( ) ; com . google . cloud . datastore . Key key = datastore . newKeyFactory ( ) . setKind ( "MyKind" ) . newKey ( keyName ) ; com . google . cloud . datastore . Entity entity = transaction . get ( key ) ; transaction . commit ( ) ; return entity ; }
|
org . junit . Assert . assertNotNull ( result )
|
notnull ( ) { "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( cache )
|
testCopyFromBuffer ( ) { java . nio . ByteBuffer srcBuffer = java . nio . ByteBuffer . allocate ( array . length ) ; java . nio . ByteBuffer dstBuffer = java . nio . ByteBuffer . allocate ( array . length ) ; srcBuffer . put ( array ) ; org . apache . hadoop . hbase . util . ByteBufferUtils . copyFromBufferToBuffer ( dstBuffer , srcBuffer , ( ( array . length ) / 2 ) , ( ( array . length ) / 4 ) ) ; for ( int i = 0 ; i < ( ( array . length ) / 4 ) ; ++ i ) { "<AssertPlaceHolder>" ; } } get ( java . util . List ) { throw new java . io . IOException ( "get(List<Get>)<sp>not<sp>supported" ) ; }
|
org . junit . Assert . assertEquals ( srcBuffer . get ( ( i + ( ( array . length ) / 2 ) ) ) , dstBuffer . get ( i ) )
|
testUpdate_processing_workflow_run ( ) { logger . info ( "update_processing_workflow_run" ) ; java . util . Date beforeDate = new java . sql . Timestamp ( java . lang . System . currentTimeMillis ( ) ) ; int processingID = 5395 ; int workflowRunAccession = 872 ; int expResult = net . sourceforge . seqware . common . module . ReturnValue . SUCCESS ; net . sourceforge . seqware . common . module . ReturnValue result = net . sourceforge . seqware . common . metadata . MetadataWSTest . instance . update_processing_workflow_run ( processingID , workflowRunAccession ) ; "<AssertPlaceHolder>" ; testTimestamp ( ( "select<sp>update_tstmp<sp>from<sp>processing<sp>" + "where<sp>processing_id=5395<sp>and<sp>workflow_run_id=24;" ) , "update_tstmp" , beforeDate ) ; } getExitStatus ( ) { return exitStatus ; }
|
org . junit . Assert . assertEquals ( expResult , result . getExitStatus ( ) )
|
testGetLambdaClientConfig ( ) { com . xti . jenkins . plugin . awslambda . publish . LambdaPublishVariables variables = new com . xti . jenkins . plugin . awslambda . publish . LambdaPublishVariables ( false , "KEY" , hudson . util . Secret . fromString ( "SECRET}" ) , "eu-west-1" , "ARN" , "ALIAS" , "DESCRIPTION" ) ; variables . expandVariables ( new hudson . EnvVars ( ) ) ; com . xti . jenkins . plugin . awslambda . util . LambdaClientConfig lambdaClientConfig = variables . getLambdaClientConfig ( ) ; com . amazonaws . services . lambda . AWSLambda lambda = lambdaClientConfig . getClient ( ) ; "<AssertPlaceHolder>" ; } getClient ( ) { if ( useDefaultAWSCredentials ) { return new com . amazonaws . services . lambda . AWSLambdaClient ( new com . amazonaws . auth . DefaultAWSCredentialsProviderChain ( ) , getClientConfiguration ( ) ) . withRegion ( com . amazonaws . regions . Region . getRegion ( com . amazonaws . regions . Regions . fromName ( region ) ) ) ; } else { return new com . amazonaws . services . lambda . AWSLambdaClient ( new com . amazonaws . auth . BasicAWSCredentials ( accessKeyId , secretKey ) , getClientConfiguration ( ) ) . withRegion ( com . amazonaws . regions . Region . getRegion ( com . amazonaws . regions . Regions . fromName ( region ) ) ) ; } }
|
org . junit . Assert . assertNotNull ( lambda )
|
requestIsremovedFromTheQeueAfterItcrashes ( ) { try { org . openqa . grid . web . servlet . handler . SeleniumBasedRequest newSession = org . openqa . grid . internal . mock . GridHelper . createNewSessionRequest ( registry , ff ) ; org . openqa . grid . internal . mock . MockedRequestHandler newSessionRequest = new org . openqa . grid . internal . NewRequestCrashesDuringNewSessionTest . MockedBuggyNewSessionRequestHandler ( newSession , null , registry ) ; newSessionRequest . process ( ) ; } catch ( java . lang . RuntimeException e ) { System . out . println ( e . getMessage ( ) ) ; } "<AssertPlaceHolder>" ; } getNewSessionRequestCount ( ) { lock . readLock ( ) . lock ( ) ; try { return newSessionRequests . size ( ) ; } finally { lock . readLock ( ) . unlock ( ) ; } }
|
org . junit . Assert . assertEquals ( 0 , registry . getNewSessionRequestCount ( ) )
|
detachedResults ( ) { for ( com . querydsl . jdo . test . domain . Product p : detachedQuery ( ) . from ( product ) . select ( product ) . fetch ( ) ) { "<AssertPlaceHolder>" ; } } fetch ( ) { return innerList ( ) ; }
|
org . junit . Assert . assertNotNull ( p )
|
testString ( ) { int objectNumber = 3000 ; org . eclipse . birt . data . engine . olap . data . util . BufferedRandomAccessFile file = new org . eclipse . birt . data . engine . olap . data . util . BufferedRandomAccessFile ( new java . io . File ( ( ( ( org . eclipse . birt . data . engine . olap . data . util . BufferedRandomAccessFileTest . tmpPath ) + ( java . io . File . separatorChar ) ) + "BufferedRandomAccessFile" ) ) , "rw" , 1000 ) ; for ( int i = 0 ; i < objectNumber ; i ++ ) { file . writeUTF ( ( "string" + i ) ) ; } file . seek ( 0 ) ; for ( int i = 0 ; i < objectNumber ; i ++ ) { "<AssertPlaceHolder>" ; } file . close ( ) ; } readUTF ( ) { return java . io . DataInputStream . readUTF ( this ) ; }
|
org . junit . Assert . assertEquals ( file . readUTF ( ) , ( "string" + i ) )
|
testArbitraryPojo ( ) { final org . apache . metron . common . utils . SerDeUtilsTest . ArbitraryPojo expected = new org . apache . metron . common . utils . SerDeUtilsTest . ArbitraryPojo ( ) ; byte [ ] raw = org . apache . metron . common . utils . SerDeUtils . toBytes ( expected ) ; java . lang . Object actual = org . apache . metron . common . utils . SerDeUtils . fromBytes ( raw , java . lang . Object . class ) ; "<AssertPlaceHolder>" ; } fromBytes ( byte [ ] , java . lang . Class ) { try { com . esotericsoftware . kryo . io . Input input = new com . esotericsoftware . kryo . io . Input ( new java . io . ByteArrayInputStream ( value ) ) ; return clazz . cast ( org . apache . metron . common . utils . SerDeUtils . kryo . get ( ) . readClassAndObject ( input ) ) ; } catch ( java . lang . Throwable t ) { org . apache . metron . common . utils . SerDeUtils . LOG . error ( "Unable<sp>to<sp>deserialize<sp>because<sp>{}" , t . getMessage ( ) , t ) ; throw t ; } }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testHasValue ( ) { com . laytonsmith . persistence . PersistenceNetworkImpl network = new com . laytonsmith . persistence . PersistenceNetworkImpl ( "**=json://folder/default.json" , new java . net . URI ( "default" ) , options ) ; network . set ( dm , new java . lang . String [ ] { "key" } , "value" ) ; dm . waitForThreads ( ) ; "<AssertPlaceHolder>" ; com . laytonsmith . persistence . TestPersistence . deleteFiles ( "folder/" ) ; } hasKey ( java . lang . String [ ] ) { return source . hasKey ( key ) ; }
|
org . junit . Assert . assertTrue ( network . hasKey ( new java . lang . String [ ] { "key" } ) )
|
testWalLargeValue ( ) { org . apache . ignite . internal . IgniteEx ignite = startGrid ( 1 ) ; ignite . cluster ( ) . active ( true ) ; org . apache . ignite . IgniteCache < java . lang . Object , java . lang . Object > cache = ignite . cache ( org . apache . ignite . internal . processors . cache . persistence . db . wal . IgniteWalRecoveryTest . CACHE_NAME ) ; for ( int i = 0 ; i < 10000 ; i ++ ) { final byte [ ] data = new byte [ i ] ; java . util . Arrays . fill ( data , ( ( byte ) ( i ) ) ) ; cache . put ( i , data ) ; if ( ( i % 1000 ) == 0 ) org . apache . ignite . internal . util . typedef . X . println ( ( "<sp>---><sp>put:<sp>" + i ) ) ; } stopGrid ( 1 ) ; ignite = startGrid ( 1 ) ; ignite . cluster ( ) . active ( true ) ; cache = ignite . cache ( org . apache . ignite . internal . processors . cache . persistence . db . wal . IgniteWalRecoveryTest . CACHE_NAME ) ; info ( "<sp>--><sp>check2" ) ; for ( int i = 0 ; i < 10000 ; i ++ ) { final byte [ ] data = new byte [ i ] ; java . util . Arrays . fill ( data , ( ( byte ) ( i ) ) ) ; final byte [ ] loaded = ( ( byte [ ] ) ( cache . get ( i ) ) ) ; "<AssertPlaceHolder>" ; if ( ( i % 1000 ) == 0 ) org . apache . ignite . internal . util . typedef . X . println ( ( "<sp>---><sp>get:<sp>" + i ) ) ; } } get ( java . lang . Object ) { try { return cache . get ( key ) ; } catch ( org . apache . ignite . IgniteCheckedException e ) { throw new org . hibernate . cache . CacheException ( e ) ; } }
|
org . junit . Assert . assertArrayEquals ( data , loaded )
|
projectContributorCanNotDeleteProjectTest ( ) { final org . guvnor . common . services . project . model . WorkspaceProject project = getProject ( ) ; doReturn ( false ) . when ( libraryPermissions ) . userIsAtLeast ( eq ( ContributorType . OWNER ) , any ( ) ) ; "<AssertPlaceHolder>" ; } userCanDeleteProject ( org . guvnor . common . services . project . model . WorkspaceProject ) { return ( ( userIsAtLeast ( ContributorType . OWNER , project . getRepository ( ) . getContributors ( ) ) ) || ( userIsAtLeast ( ContributorType . ADMIN , project . getOrganizationalUnit ( ) . getContributors ( ) ) ) ) || ( projectController . canDeleteProject ( project ) ) ; }
|
org . junit . Assert . assertFalse ( libraryPermissions . userCanDeleteProject ( project ) )
|
singleUuidMatch ( ) { java . lang . String uuid = org . apache . jackrabbit . oak . commons . UUIDUtils . generateUUID ( ) ; org . apache . jackrabbit . oak . plugins . observation . filter . UuidPredicate p = new org . apache . jackrabbit . oak . plugins . observation . filter . UuidPredicate ( new java . lang . String [ ] { uuid } ) ; org . apache . jackrabbit . oak . spi . state . NodeState tree = org . apache . jackrabbit . oak . plugins . observation . filter . UuidPredicateTest . createNodeWithUuid ( uuid ) ; "<AssertPlaceHolder>" ; } apply ( java . lang . String ) { return new org . apache . jackrabbit . oak . plugins . memory . MemoryChildNodeEntry ( input , EMPTY_NODE ) ; }
|
org . junit . Assert . assertTrue ( p . apply ( tree ) )
|
toString_WithController_WithAction_NoParamPath ( ) { org . bigtesting . routd . Route r = new org . bigtesting . routd . Route ( "/cntrl/actn" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return pattern . toString ( ) ; }
|
org . junit . Assert . assertEquals ( "/cntrl/actn" , r . toString ( ) )
|
testEmptyInput ( ) { java . io . ByteArrayOutputStream outputStream = new java . io . ByteArrayOutputStream ( ) ; projects = java . util . Collections . emptyList ( ) ; doReturn ( outputStream ) . when ( fileSystemFacade ) . create ( any ( ) ) ; doReturn ( null ) . when ( fileSystemFacade ) . getFileSystem ( ) ; doReturn ( new java . io . FileOutputStream ( outputFile ) ) . when ( process ) . getOutputStream ( ) ; doReturn ( 0 ) . when ( process ) . exitValue ( ) ; dbBuilder . run ( portBindings , conf , parameters ) ; "<AssertPlaceHolder>" ; } size ( ) { return linkMap . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , outputStream . size ( ) )
|
getType_FailCase ( ) { java . lang . String type = "hardwareTypeNotExist" ; org . ebayopensource . turmeric . common . config . LibraryType libraryType = null ; java . lang . String libNS = org . ebayopensource . turmeric . tools . library . TypeLibraryRegistryInterfaceTest . getTypeLibrary ( org . ebayopensource . turmeric . tools . library . TypeLibraryRegistryInterfaceTest . m_libraryName ) . getLibraryNamespace ( ) ; javax . xml . namespace . QName typesQName = new javax . xml . namespace . QName ( libNS , type ) ; libraryType = org . ebayopensource . turmeric . tools . library . TypeLibraryRegistryInterfaceTest . m_soaTypeRegistry . getType ( typesQName ) ; "<AssertPlaceHolder>" ; } getType ( javax . xml . namespace . QName ) { org . ebayopensource . turmeric . tools . library . SOAGlobalRegistryImpl . getLogger ( ) . log ( Level . FINE , "method<sp>called<sp>:<sp>getType" ) ; org . ebayopensource . turmeric . tools . library . SOAGlobalRegistryImpl . getLogger ( ) . log ( Level . FINE , ( "getType:<sp>typeQName<sp>:" + typeQName ) ) ; org . ebayopensource . turmeric . tools . library . LibraryTypeWrapper wrapper = masterTypeInfoTable . get ( typeQName ) ; if ( wrapper == null ) return null ; return wrapper . getLibraryType ( ) ; }
|
org . junit . Assert . assertNull ( libraryType )
|
testCreateFromMapNestedList ( ) { io . vertx . core . json . Map < java . lang . String , java . lang . Object > map = new io . vertx . core . json . HashMap ( ) ; io . vertx . core . json . List < java . lang . String > nestedArr = io . vertx . core . json . Arrays . asList ( "foo" ) ; map . put ( "nested" , nestedArr ) ; io . vertx . core . json . JsonObject obj = new io . vertx . core . json . JsonObject ( map ) ; io . vertx . core . json . JsonArray nestedRetrieved = obj . getJsonArray ( "nested" ) ; "<AssertPlaceHolder>" ; } getString ( java . nio . charset . Charset ) { throw new java . lang . UnsupportedOperationException ( ) ; }
|
org . junit . Assert . assertEquals ( "foo" , nestedRetrieved . getString ( 0 ) )
|
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . enrolment . Enrolment context = new org . lnu . is . domain . enrolment . Enrolment ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>Enrolment<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . enrolment . Enrolment > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
|
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
|
testQueryMissingSortField ( ) { ddf . catalog . source . solr . provider . SolrProviderTestUtil . deleteAll ( ddf . catalog . source . solr . provider . SolrProviderQuery . provider ) ; ddf . catalog . source . solr . provider . MockMetacard m = new ddf . catalog . source . solr . provider . MockMetacard ( ddf . catalog . source . solr . provider . Library . getTampaRecord ( ) ) ; m . setTitle ( "Tampa" ) ; java . util . List < ddf . catalog . data . Metacard > list = java . util . Arrays . asList ( m , new ddf . catalog . source . solr . provider . MockMetacard ( ddf . catalog . source . solr . provider . Library . getFlagstaffRecord ( ) ) ) ; ddf . catalog . source . solr . provider . SolrProviderTestUtil . create ( list , ddf . catalog . source . solr . provider . SolrProviderQuery . provider ) ; org . opengis . filter . Filter txtFilter = ddf . catalog . source . solr . provider . SolrProviderTestUtil . getFilterBuilder ( ) . attribute ( "id" ) . like ( ) . text ( "*" ) ; ddf . catalog . operation . impl . QueryImpl query = new ddf . catalog . operation . impl . QueryImpl ( txtFilter ) ; query . setSortBy ( new ddf . catalog . filter . impl . SortByImpl ( "unknownField" , org . opengis . filter . sort . SortOrder . ASCENDING ) ) ; ddf . catalog . operation . SourceResponse response = ddf . catalog . source . solr . provider . SolrProviderQuery . provider . query ( new ddf . catalog . operation . impl . QueryRequestImpl ( query ) ) ; "<AssertPlaceHolder>" ; } getResults ( ) { return delegate . getResults ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , response . getResults ( ) . size ( ) )
|
canConvertTransaction ( ) { converter = new edu . zipcloud . cloudstreetmarket . core . converters . IdentifiableToIdConverter ( edu . zipcloud . cloudstreetmarket . core . converters . Transaction . class ) ; "<AssertPlaceHolder>" ; } canConvert ( java . lang . Class ) { return type . isAssignableFrom ( this . type ) ; }
|
org . junit . Assert . assertTrue ( converter . canConvert ( edu . zipcloud . cloudstreetmarket . core . converters . Transaction . class ) )
|
testSortByFixedOrderPropertyValuesNullList ( ) { java . lang . String [ ] names = new java . lang . String [ ] { "" , "" } ; "<AssertPlaceHolder>" ; } sortListByFixedOrderPropertyValueArray ( java . util . List , java . lang . String , V [ ] ) { if ( null == list ) { return java . util . Collections . emptyList ( ) ; } org . apache . commons . lang3 . Validate . notBlank ( propertyName , "propertyName<sp>can't<sp>be<sp>blank!" ) ; java . util . Comparator < O > propertyComparator = com . feilong . core . util . comparator . BeanComparatorUtil . propertyComparator ( propertyName , propertyValues ) ; return com . feilong . core . util . SortUtil . sortList ( list , propertyComparator ) ; }
|
org . junit . Assert . assertEquals ( emptyList ( ) , com . feilong . core . util . SortUtil . sortListByFixedOrderPropertyValueArray ( null , "name" , names ) )
|
testFindAllByFacility ( ) { int facilityId1 = 100 ; int facilityId2 = 200 ; java . util . Date created1 = new java . util . Date ( dfm . parse ( "20110110" ) . getTime ( ) ) ; java . util . Date created2 = new java . util . Date ( dfm . parse ( "20131110" ) . getTime ( ) ) ; java . util . Date created3 = new java . util . Date ( dfm . parse ( "20120410" ) . getTime ( ) ) ; org . oscarehr . common . model . OcanStaffForm ocanStaffForm1 = new org . oscarehr . common . model . OcanStaffForm ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( ocanStaffForm1 ) ; ocanStaffForm1 . setFacilityId ( facilityId1 ) ; ocanStaffForm1 . setCreated ( created1 ) ; dao . persist ( ocanStaffForm1 ) ; org . oscarehr . common . model . OcanStaffForm ocanStaffForm2 = new org . oscarehr . common . model . OcanStaffForm ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( ocanStaffForm2 ) ; ocanStaffForm2 . setFacilityId ( facilityId2 ) ; ocanStaffForm2 . setCreated ( created2 ) ; dao . persist ( ocanStaffForm2 ) ; org . oscarehr . common . model . OcanStaffForm ocanStaffForm3 = new org . oscarehr . common . model . OcanStaffForm ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( ocanStaffForm3 ) ; ocanStaffForm3 . setFacilityId ( facilityId1 ) ; ocanStaffForm3 . setCreated ( created3 ) ; dao . persist ( ocanStaffForm3 ) ; java . util . List < org . oscarehr . common . model . OcanStaffForm > expectedResult = new java . util . ArrayList < org . oscarehr . common . model . OcanStaffForm > ( java . util . Arrays . asList ( ocanStaffForm3 , ocanStaffForm1 ) ) ; java . util . List < org . oscarehr . common . model . OcanStaffForm > result = dao . findAllByFacility ( facilityId1 ) ; org . apache . log4j . Logger logger = org . oscarehr . util . MiscUtils . getLogger ( ) ; if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { logger . warn ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedResult . size ( ) ) ; i ++ ) { if ( ! ( expectedResult . get ( i ) . equals ( result . get ( i ) ) ) ) { logger . warn ( "Items<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Items<sp>do<sp>not<sp>match." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
|
org . junit . Assert . assertTrue ( true )
|
testLessThanOrEquals2 ( ) { com . liferay . dynamic . data . mapping . expression . internal . DDMExpressionImpl < java . lang . Boolean > ddmExpression = createDDMExpression ( "1.9<sp><=<sp>1.89" ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { java . util . stream . Stream < java . lang . reflect . Method > methodStream = _parentTestMethods . stream ( ) ; org . junit . Assume . assumeTrue ( methodStream . noneMatch ( ( m ) -> java . util . Objects . equals ( m . getName ( ) , description . getMethodName ( ) ) ) ) ; statement . evaluate ( ) ; }
|
org . junit . Assert . assertFalse ( ddmExpression . evaluate ( ) )
|
testSerialization ( ) { org . apache . druid . query . DataSource dataSource = new org . apache . druid . query . TableDataSource ( "somedatasource" ) ; java . lang . String json = org . apache . druid . query . DataSourceTest . jsonMapper . writeValueAsString ( dataSource ) ; org . apache . druid . query . DataSource serdeDataSource = org . apache . druid . query . DataSourceTest . jsonMapper . readValue ( json , org . apache . druid . query . DataSource . class ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( dataSource , serdeDataSource )
|
testEvaluate ( ) { org . geolatte . common . expressions . DateProperty prop = new org . geolatte . common . expressions . DateProperty ( "aDate" ) ; java . util . Date date = new java . util . Date ( ) ; obj . setaDate ( date ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . Object ) { return ( getLeft ( ) . compareTo ( o , getRight ( ) . evaluate ( o ) ) ) <= 0 ; }
|
org . junit . Assert . assertEquals ( date , prop . evaluate ( obj ) )
|
shouldReturnProperChainObject ( ) { "<AssertPlaceHolder>" ; } whenHttp ( com . xebialabs . restito . server . StubServer ) { return new com . xebialabs . restito . builder . stub . StubHttp ( server ) ; }
|
org . junit . Assert . assertNotNull ( com . xebialabs . restito . builder . stub . StubHttp . whenHttp ( mock ( com . xebialabs . restito . server . StubServer . class ) ) )
|
getInstanceFields ( ) { java . util . List < java . lang . reflect . Field > instanceFields = org . jpmml . model . ReflectionUtil . getInstanceFields ( org . dmg . pmml . PMML . class ) ; java . util . List < java . lang . reflect . Field > customInstanceFields = org . jpmml . model . ReflectionUtil . getInstanceFields ( org . dmg . pmml . CustomPMML . class ) ; + 8 ) , instanceFields . size ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return 2 ; }
|
org . junit . Assert . assertEquals ( new java . util . HashSet ( instanceFields ) , new java . util . HashSet ( customInstanceFields ) )
|
getDelayValue_A$Calendar$TimeUnit_hour ( ) { com . github . seratch . taskun . scheduler . impl . TaskunImpl target = new com . github . seratch . taskun . scheduler . impl . TaskunImpl ( ) ; java . util . Calendar arg0 = com . github . seratch . taskun . util . CalendarUtil . getCurrentTime ( ) ; arg0 = com . github . seratch . taskun . util . CalendarUtil . addHours ( arg0 , 1 ) ; long actual = target . getDelayValue ( arg0 , TimeUnit . HOURS ) ; long expected = 1L ; "<AssertPlaceHolder>" ; } getDelayValue ( java . util . Calendar , java . util . concurrent . TimeUnit ) { java . util . Calendar current = com . github . seratch . taskun . util . CalendarUtil . getCurrentTime ( ) ; long delayMillis = ( executeDate . getTimeInMillis ( ) ) - ( current . getTimeInMillis ( ) ) ; if ( timeUnit . equals ( TimeUnit . DAYS ) ) { return ( ( ( delayMillis / 1000 ) / 60 ) / 60 ) / 24 ; } else if ( timeUnit . equals ( TimeUnit . HOURS ) ) { return ( ( delayMillis / 1000 ) / 60 ) / 60 ; } else if ( timeUnit . equals ( TimeUnit . MICROSECONDS ) ) { return delayMillis * 1000 ; } else if ( timeUnit . equals ( TimeUnit . MILLISECONDS ) ) { return delayMillis ; } else if ( timeUnit . equals ( TimeUnit . MINUTES ) ) { return ( delayMillis / 1000 ) / 60 ; } else if ( timeUnit . equals ( TimeUnit . NANOSECONDS ) ) { return ( delayMillis * 1000 ) * 1000 ; } else if ( timeUnit . equals ( TimeUnit . SECONDS ) ) { return delayMillis / 1000 ; } else { throw new java . lang . UnsupportedOperationException ( "unexpected<sp>TimeUnit<sp>value" ) ; } }
|
org . junit . Assert . assertEquals ( expected , actual )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.