input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testConvertISONoTZ ( ) { java . lang . String source = "2018-05-09T17:34:55.000" ; com . box . l10n . mojito . rest . textunit . StringToDateTimeConverter instance = new com . box . l10n . mojito . rest . textunit . StringToDateTimeConverter ( ) ; org . joda . time . DateTime expResult = new org . joda . time . DateTime ( "2018-05-09T17:34:55.000Z" ) ; org . joda . time . DateTime result = instance . convert ( source ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { com . box . l10n . mojito . rest . entity . ExportDropConfig . Type type = null ; if ( string != null ) { try { type = ExportDropConfig . Type . valueOf ( string . toUpperCase ( ) ) ; } catch ( java . lang . IllegalArgumentException iae ) { throw new com . beust . jcommander . ParameterException ( ( ( "Invalid<sp>type<sp>[" + string ) + "]" ) ) ; } } return type ; }
org . junit . Assert . assertEquals ( expResult , result )
eb24_requestHeaderFieldsTooLarge ( ) { try { org . apache . juneau . rest . client . remote . EndToEndInterfaceTest . ieb . requestHeaderFieldsTooLarge ( ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . juneau . rest . client . remote . RequestHeaderFieldsTooLarge e ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return msg ; }
org . junit . Assert . assertEquals ( "foo" , e . getMessage ( ) )
andBigIntsTest ( ) { org . roaringbitmap . RoaringBitmap rb = new org . roaringbitmap . RoaringBitmap ( ) ; org . roaringbitmap . RoaringBitmap rb2 = new org . roaringbitmap . RoaringBitmap ( ) ; java . util . HashSet < java . lang . Integer > hs = new java . util . HashSet < java . lang . Integer > ( ) ; for ( int i = 1 << 31 ; i < ( ( 1 << 31 ) + 65536 ) ; i += 2 ) { rb . add ( i ) ; } for ( int i = ( 1 << 31 ) + ( 3 * 65536 ) ; i < ( ( 1 << 31 ) + ( 4 * 65536 ) ) ; i += 3 ) { rb . add ( i ) ; } for ( int i = ( 1 << 31 ) + ( 5 * 65536 ) ; i < ( ( 1 << 31 ) + ( 7 * 65536 ) ) ; i += 3 ) { rb . add ( i ) ; } for ( int i = ( 1 << 31 ) + ( 6 * 65536 ) ; i < ( ( 1 << 31 ) + ( 7 * 65536 ) ) ; i += 4 ) { rb . add ( i ) ; } for ( int i = ( 1 << 31 ) + ( 9 * 65536 ) ; i < ( ( 1 << 31 ) + ( 10 * 65536 ) ) ; i += 5 ) { rb . add ( i ) ; } for ( int i = ( 1 << 31 ) + ( 3 * 65536 ) ; i < ( ( 1 << 31 ) + ( 4 * 65536 ) ) ; i += 3 ) { hs . add ( i ) ; rb2 . add ( i ) ; } for ( int i = ( 1 << 31 ) + ( 6 * 65536 ) ; i < ( ( 1 << 31 ) + ( 7 * 65536 ) ) ; i += 4 ) { hs . add ( i ) ; rb2 . add ( i ) ; } for ( int i = ( 1 << 31 ) + ( 9 * 65536 ) ; i < ( ( 1 << 31 ) + ( 10 * 65536 ) ) ; i += 5 ) { hs . add ( i ) ; rb2 . add ( i ) ; } for ( int i = ( 1 << 31 ) + ( 13 * 65536 ) ; i < ( ( 1 << 31 ) + ( 14 * 65536 ) ) ; i += 7 ) { rb2 . add ( i ) ; } org . roaringbitmap . RoaringBitmap rband = org . roaringbitmap . RoaringBitmap . and ( rb , rb2 ) ; java . lang . Object [ ] correct = hs . toArray ( ) ; java . util . Arrays . sort ( correct ) ; java . lang . Integer [ ] resand = org . apache . commons . lang3 . ArrayUtils . toObject ( rband . toArray ( ) ) ; "<AssertPlaceHolder>" ; } toArray ( ) { final int [ ] array = new int [ this . getCardinality ( ) ] ; int pos = 0 ; int pos2 = 0 ; while ( pos < ( this . highLowContainer . size ( ) ) ) { final int hs = ( org . roaringbitmap . buffer . BufferUtil . BufferUtil . toIntUnsigned ( this . highLowContainer . getKeyAtIndex ( pos ) ) ) << 16 ; final org . roaringbitmap . buffer . MappeableContainer c = this . highLowContainer . getContainerAtIndex ( ( pos ++ ) ) ; c . fillLeastSignificant16bits ( array , pos2 , hs ) ; pos2 += c . getCardinality ( ) ; } return array ; }
org . junit . Assert . assertArrayEquals ( correct , resand )
testSelectFromClusterNumber ( ) { com . orientechnologies . orient . core . metadata . schema . OClass clazz = com . orientechnologies . orient . core . sql . OCommandExecutorSQLSelectTest . db . getMetadata ( ) . getSchema ( ) . getClass ( "DistinctLimit" ) ; int clusterId = clazz . getClusterIds ( ) [ 0 ] ; com . orientechnologies . orient . core . sql . query . OSQLSynchQuery sql = new com . orientechnologies . orient . core . sql . query . OSQLSynchQuery ( ( ( "select<sp>from<sp>cluster:" + clusterId ) + "<sp>limit<sp>1" ) ) ; com . orientechnologies . orient . core . sql . List < com . orientechnologies . orient . core . record . impl . ODocument > results = com . orientechnologies . orient . core . sql . OCommandExecutorSQLSelectTest . db . query ( sql ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>yet" ) ; }
org . junit . Assert . assertEquals ( results . size ( ) , 1 )
returnsNull_ifPrimaryNotConfiguredAndFallbackNull ( ) { java . lang . String result = this . resolver . getPath ( this . sensorContext , "new<sp>path<sp>key" , null ) ; "<AssertPlaceHolder>" ; } getPath ( org . sonar . api . batch . sensor . SensorContext , java . lang . String , java . lang . String ) { java . lang . String toReturn = context . settings ( ) . getString ( settingKey ) ; if ( ( toReturn == null ) || ( toReturn . isEmpty ( ) ) ) { com . pablissimo . sonar . PathResolverImpl . LOG . debug ( "Path<sp>{}<sp>not<sp>specified,<sp>falling<sp>back<sp>to<sp>{}" , settingKey , defaultValue ) ; toReturn = defaultValue ; } else { com . pablissimo . sonar . PathResolverImpl . LOG . debug ( "Found<sp>{}<sp>path<sp>to<sp>be<sp>'{}'" , settingKey , toReturn ) ; } return getAbsolutePath ( context , toReturn ) ; }
org . junit . Assert . assertNull ( result )
getAndSetProfileIntervalTest ( ) { int TEST_VAL = 100 ; profiler . setPollInterval ( TEST_VAL ) ; "<AssertPlaceHolder>" ; } getPollInterval ( ) { return pStore . pollIntervalInMs ; }
org . junit . Assert . assertEquals ( TEST_VAL , profiler . getPollInterval ( ) )
testObjectMethodReturnsBoolean ( ) { com . eclipsesource . v8 . V8CallbackTest . ICallback callback = mock ( com . eclipsesource . v8 . V8CallbackTest . ICallback . class ) ; doReturn ( true ) . when ( callback ) . objectMethodNoParameter ( ) ; v8 . registerJavaMethod ( callback , "objectMethodNoParameter" , "foo" , new java . lang . Class < ? > [ ] { } ) ; boolean result = v8 . executeBooleanFunction ( "foo" , null ) ; "<AssertPlaceHolder>" ; } executeBooleanFunction ( java . lang . String , com . eclipsesource . v8 . V8Array ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertTrue ( result )
test_getSSLSocketFactory ( ) { javax . net . ssl . SSLSocketFactory factory ; try { factory = org . restfulwhois . rdap . client . util . SSLUtil . getSSLSocketFactory ( org . restfulwhois . rdap . client . util . SSLUtil . getTrustManager ( org . restfulwhois . rdap . client . util . SSLUtil . loadKeyStore ( path , "123456" ) ) ) ; } catch ( org . restfulwhois . rdap . client . exception . RdapClientException e ) { factory = null ; } "<AssertPlaceHolder>" ; } loadKeyStore ( java . lang . String , java . lang . String ) { java . security . KeyStore ks ; try { ks = java . security . KeyStore . getInstance ( java . security . KeyStore . getDefaultType ( ) ) ; java . io . FileInputStream in = new java . io . FileInputStream ( filePath ) ; ks . load ( in , password . toCharArray ( ) ) ; } catch ( java . security . KeyStoreException e ) { throw new org . restfulwhois . rdap . client . exception . RdapClientException ( e . getMessage ( ) ) ; } catch ( java . security . cert . CertificateException e ) { throw new org . restfulwhois . rdap . client . exception . RdapClientException ( e . getMessage ( ) ) ; } catch ( java . security . NoSuchAlgorithmException e ) { throw new org . restfulwhois . rdap . client . exception . RdapClientException ( e . getMessage ( ) ) ; } catch ( java . io . IOException e ) { throw new org . restfulwhois . rdap . client . exception . RdapClientException ( e . getMessage ( ) ) ; } return ks ; }
org . junit . Assert . assertNotNull ( factory )
actionNameDoesntExist ( ) { org . spincast . plugins . attemptslimiter . Attempt attempt = getAttemptsManager ( ) . attempt ( "nope" , org . spincast . plugins . attemptslimiter . AttemptCriteria . of ( "tutu" , "titi" ) ) ; "<AssertPlaceHolder>" ; } isMaxReached ( ) { return ( getSpincastAttemptsLimiterPluginConfig ( ) . isValidationEnabled ( ) ) && ( this . maxReached ) ; }
org . junit . Assert . assertTrue ( attempt . isMaxReached ( ) )
getActiveSubscriptions ( ) { java . util . List < org . oscm . domobjects . Subscription > result = runTX ( new java . util . concurrent . Callable < java . util . List < org . oscm . domobjects . Subscription > > ( ) { @ org . oscm . subscriptionservice . dao . Override public java . util . List < org . oscm . domobjects . Subscription > call ( ) throws org . oscm . subscriptionservice . dao . Exception { return dao . getActiveSubscriptions ( ) ; } } ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , result . size ( ) )
getModelClass_withUnsetClass_loadsAndReturnsClass ( ) { org . openengsb . core . edbi . jdbc . JdbcIndex < org . openengsb . core . edbi . models . TestModel > index = new org . openengsb . core . edbi . jdbc . JdbcIndex ( ) ; index . setName ( org . openengsb . core . edbi . models . TestModel . class . getCanonicalName ( ) ) ; "<AssertPlaceHolder>" ; } getModelClass ( ) { if ( ( modelClass ) == null ) { try { java . lang . ClassLoader cl = ( ( classLoader ) != null ) ? classLoader : org . openengsb . core . edbi . jdbc . JdbcIndex . getClass ( ) . getClassLoader ( ) ; modelClass = ( ( java . lang . Class < T > ) ( java . lang . Class . forName ( name , true , cl ) ) ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new org . openengsb . core . edbi . api . UnavailableTypeInformationException ( ( "Can't<sp>load<sp>class<sp>" + ( name ) ) , e ) ; } } return modelClass ; }
org . junit . Assert . assertEquals ( org . openengsb . core . edbi . models . TestModel . class , index . getModelClass ( ) )
assertCompareToForAscWithOrderByItems ( ) { org . apache . shardingsphere . core . merge . dql . common . MemoryQueryResultRow o1 = new org . apache . shardingsphere . core . merge . dql . common . MemoryQueryResultRow ( mockQueryResult ( "1" , "2" ) ) ; org . apache . shardingsphere . core . merge . dql . common . MemoryQueryResultRow o2 = new org . apache . shardingsphere . core . merge . dql . common . MemoryQueryResultRow ( mockQueryResult ( "3" , "4" ) ) ; org . apache . shardingsphere . core . parse . antlr . sql . statement . dml . SelectStatement selectStatement = new org . apache . shardingsphere . core . parse . antlr . sql . statement . dml . SelectStatement ( ) ; selectStatement . getOrderByItems ( ) . addAll ( java . util . Arrays . asList ( new org . apache . shardingsphere . core . parse . old . parser . context . orderby . OrderItem ( 1 , org . apache . shardingsphere . core . constant . OrderDirection . ASC , org . apache . shardingsphere . core . constant . OrderDirection . ASC ) , new org . apache . shardingsphere . core . parse . old . parser . context . orderby . OrderItem ( 2 , org . apache . shardingsphere . core . constant . OrderDirection . ASC , org . apache . shardingsphere . core . constant . OrderDirection . ASC ) ) ) ; selectStatement . getGroupByItems ( ) . addAll ( java . util . Arrays . asList ( new org . apache . shardingsphere . core . parse . old . parser . context . orderby . OrderItem ( 1 , org . apache . shardingsphere . core . constant . OrderDirection . DESC , org . apache . shardingsphere . core . constant . OrderDirection . ASC ) , new org . apache . shardingsphere . core . parse . old . parser . context . orderby . OrderItem ( 2 , org . apache . shardingsphere . core . constant . OrderDirection . DESC , org . apache . shardingsphere . core . constant . OrderDirection . ASC ) ) ) ; org . apache . shardingsphere . core . merge . dql . groupby . GroupByRowComparator groupByRowComparator = new org . apache . shardingsphere . core . merge . dql . groupby . GroupByRowComparator ( selectStatement ) ; "<AssertPlaceHolder>" ; } compare ( org . apache . shardingsphere . dbtest . cases . dataset . row . DataSetRow , org . apache . shardingsphere . dbtest . cases . dataset . row . DataSetRow ) { return ( java . lang . Integer . parseInt ( o1 . getValues ( ) . get ( 0 ) ) ) - ( java . lang . Integer . parseInt ( o2 . getValues ( ) . get ( 0 ) ) ) ; }
org . junit . Assert . assertTrue ( ( ( groupByRowComparator . compare ( o1 , o2 ) ) < 0 ) )
testBillGets ( ) { int id = 0 ; try { id = _setupTestBill ( false ) ; _checkBillIntoDb ( id ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkBillIntoDb ( int ) { org . isf . accounting . model . Bill foundBill ; foundBill = ( ( org . isf . accounting . model . Bill ) ( org . isf . accounting . test . Tests . jpa . find ( org . isf . accounting . model . Bill . class , id ) ) ) ; org . isf . accounting . test . Tests . testBill . check ( foundBill ) ; org . isf . accounting . test . Tests . testPriceList . check ( foundBill . getList ( ) ) ; org . isf . accounting . test . Tests . testPatient . check ( foundBill . getPatient ( ) ) ; return ; }
org . junit . Assert . assertEquals ( true , false )
testEmptyExpr ( ) { java . lang . String template = "<sp><><sp>" ; org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroup ( ) ; org . stringtemplate . v4 . misc . ErrorBuffer errors = new org . stringtemplate . v4 . misc . ErrorBuffer ( ) ; group . setListener ( errors ) ; try { group . defineTemplate ( "test" , template ) ; } catch ( org . stringtemplate . v4 . compiler . STException se ) { assert false ; } java . lang . String result = errors . toString ( ) ; java . lang . String expected = "test<sp>1:0:<sp>this<sp>doesn\'t<sp>look<sp>like<sp>a<sp>template:<sp>\"<sp><><sp>\"" + ( newline ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( getClass ( ) . getSimpleName ( ) ) + "{" ) + "self=" ) + ( scope . st ) ) + ",<sp>start=" ) + ( outputStartChar ) ) + ",<sp>stop=" ) + ( outputStopChar ) ) + '}' ; }
org . junit . Assert . assertEquals ( expected , result )
testSortG ( ) { jsat . utils . IndexTable idt = new jsat . utils . IndexTable ( jsat . utils . IndexTableTest . arrayD ) ; for ( int i = 0 ; i < ( ( idt . length ( ) ) - 1 ) ; i ++ ) "<AssertPlaceHolder>" ; } index ( int ) { if ( ( i >= ( prevSize ) ) || ( i < 0 ) ) throw new java . lang . IndexOutOfBoundsException ( ( ( ( ( "The<sp>size<sp>of<sp>the<sp>previously<sp>sorted<sp>array/list<sp>is<sp>" + ( prevSize ) ) + "<sp>so<sp>index<sp>" ) + i ) + "<sp>is<sp>not<sp>valid" ) ) ; return index . get ( i ) ; }
org . junit . Assert . assertTrue ( ( ( jsat . utils . IndexTableTest . arrayD [ idt . index ( i ) ] . compareTo ( jsat . utils . IndexTableTest . arrayD [ idt . index ( ( i + 1 ) ) ] ) ) <= 0 ) )
testConstructor ( ) { org . openhealthtools . mdht . uml . cda . ihe . operations . HistoryOfPastIllnessSectionOperations obj = new org . openhealthtools . mdht . uml . cda . ihe . operations . HistoryOfPastIllnessSectionOperations ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
testBothOldAndNewShortCircuitConfigured ( ) { final short REPL_FACTOR = 1 ; final int FILE_LENGTH = 512 ; org . junit . Assume . assumeTrue ( ( null == ( org . apache . hadoop . net . unix . DomainSocket . getLoadingFailureReason ( ) ) ) ) ; org . apache . hadoop . net . unix . TemporarySocketDirectory socketDir = new org . apache . hadoop . net . unix . TemporarySocketDirectory ( ) ; org . apache . hadoop . hdfs . HdfsConfiguration conf = org . apache . hadoop . hdfs . client . impl . TestBlockReaderLocalLegacy . getConfiguration ( socketDir ) ; org . apache . hadoop . hdfs . MiniDFSCluster cluster = new org . apache . hadoop . hdfs . MiniDFSCluster . Builder ( conf ) . numDataNodes ( 1 ) . build ( ) ; cluster . waitActive ( ) ; socketDir . close ( ) ; org . apache . hadoop . fs . FileSystem fs = cluster . getFileSystem ( ) ; org . apache . hadoop . fs . Path path = new org . apache . hadoop . fs . Path ( "/foo" ) ; byte [ ] orig = new byte [ FILE_LENGTH ] ; for ( int i = 0 ; i < ( orig . length ) ; i ++ ) { orig [ i ] = ( ( byte ) ( i % 10 ) ) ; } org . apache . hadoop . fs . FSDataOutputStream fos = fs . create ( path , ( ( short ) ( 1 ) ) ) ; fos . write ( orig ) ; fos . close ( ) ; org . apache . hadoop . hdfs . DFSTestUtil . waitReplication ( fs , path , REPL_FACTOR ) ; org . apache . hadoop . fs . FSDataInputStream fis = cluster . getFileSystem ( ) . open ( path ) ; byte [ ] buf = new byte [ FILE_LENGTH ] ; org . apache . hadoop . io . IOUtils . readFully ( fis , buf , 0 , FILE_LENGTH ) ; fis . close ( ) ; "<AssertPlaceHolder>" ; java . util . Arrays . equals ( orig , buf ) ; cluster . shutdown ( ) ; } close ( ) { proxy . close ( ) ; }
org . junit . Assert . assertArrayEquals ( orig , buf )
testInvokeOperationStringString ( ) { short val1 = 231 ; int val2 = 524 ; java . lang . Object result = com . j256 . simplejmx . client . JmxClientTest . client . invokeOperation ( com . j256 . simplejmx . client . JmxClientTest . JMX_DOMAIN , com . j256 . simplejmx . client . JmxClientTest . beanName , "times" , val1 , val2 ) ; long times = val1 * val2 ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( times , result )
one_$parent_array_range_projection_with_match_projection ( ) { com . redhat . lightblue . query . Projection p = com . redhat . lightblue . eval . EvalTestContext . projectionFromJson ( "{'field':'field6.$parent.field7','range':[1,2],'projection':{'field':'elemf3'}}" ) ; com . redhat . lightblue . eval . Projector projector = com . redhat . lightblue . eval . Projector . getInstance ( p , md ) ; com . fasterxml . jackson . databind . JsonNode expectedNode = com . redhat . lightblue . util . JsonUtils . json ( "{'field7':[{'elemf3':4},{'elemf3':5}]}" . replace ( '\'' , '\"' ) ) ; com . redhat . lightblue . util . JsonDoc pdoc = projector . project ( jsonDoc , com . redhat . lightblue . eval . JSON_NODE_FACTORY ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ops [ 0 ] ; }
org . junit . Assert . assertEquals ( expectedNode . toString ( ) , pdoc . toString ( ) )
test_getClientArea ( ) { org . eclipse . swt . widgets . Display display = new org . eclipse . swt . widgets . Display ( ) ; try { org . eclipse . swt . graphics . Rectangle rect = display . getClientArea ( ) ; "<AssertPlaceHolder>" ; } finally { display . dispose ( ) ; } } getClientArea ( ) { checkWidget ( ) ; org . eclipse . swt . custom . Rectangle clientArea = super . getClientArea ( ) ; clientArea . x += borderLeft ; clientArea . y += borderTop ; clientArea . width -= ( borderLeft ) + ( borderRight ) ; clientArea . height -= ( borderTop ) + ( borderBottom ) ; return clientArea ; }
org . junit . Assert . assertNotNull ( rect )
activeValueToleratesUseTest ( ) { try { final io . opentracing . Scope active = NoopScopeManager . INSTANCE . active ( ) ; "<AssertPlaceHolder>" ; active . close ( ) ; } catch ( final java . lang . NullPointerException e ) { org . junit . Assert . fail ( "NoopScopeManagerImpl.active()<sp>should<sp>return<sp>a<sp>usable<sp>scope" ) ; } } active ( ) { return io . opentracing . noop . NoopScopeManager . NoopScope . INSTANCE ; }
org . junit . Assert . assertNotNull ( active )
testValueIsTriggeredForEmptyNodes ( ) { com . google . firebase . database . DatabaseReference ref = com . google . firebase . testing . IntegrationTestUtils . getRandomNode ( com . google . firebase . database . integration . EventTestIT . masterApp ) ; com . google . firebase . database . DataSnapshot snap = new com . google . firebase . database . future . ReadFuture ( ref ) . timedGet ( ) . get ( 0 ) . getSnapshot ( ) ; com . google . firebase . database . core . ZombieVerifier . verifyRepoZombies ( ref ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return null ; }
org . junit . Assert . assertNull ( snap . getValue ( ) )
findFunctionsByNameInNamespaceForResourceWithoutFunctionsShouldReturnEmptyList ( ) { ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceTypeEntity rootResourceType = createRootResourceType ( ) ; ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceTypeEntity subResourceType = createSubResourceType ( rootResourceType ) ; ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity resource = createResourceWithType ( "amw" , 1000 , subResourceType ) ; when ( resourceRepositoryMock . loadWithFunctionsAndMiksForId ( resource . getId ( ) ) ) . thenReturn ( resource ) ; ch . puzzle . itc . mobiliar . business . function . control . List < ch . puzzle . itc . mobiliar . business . function . entity . AmwFunctionEntity > functionsWithName = functionService . findFunctionsByNameInNamespace ( resource , FUNCTION_A . getName ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { if ( ( ( asProperties ) != null ) && ( ! ( asProperties . isEmpty ( ) ) ) ) { return false ; } if ( ( ( nodeProperties ) != null ) && ( ! ( nodeProperties . isEmpty ( ) ) ) ) { return false ; } if ( ( ( consumerUnit ) != null ) && ( ! ( consumerUnit . isEmpty ( ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( functionsWithName . isEmpty ( ) )
testRunIsolatedJob ( ) { org . apache . flink . streaming . api . environment . LocalStreamEnvironment env = new org . apache . flink . streaming . api . environment . LocalStreamEnvironment ( ) ; "<AssertPlaceHolder>" ; org . apache . flink . streaming . api . environment . LocalStreamEnvironmentITCase . addSmallBoundedJob ( env , 3 ) ; env . execute ( ) ; } getParallelism ( ) { return config . getParallelism ( ) ; }
org . junit . Assert . assertEquals ( 1 , env . getParallelism ( ) )
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . PasswordPolicyRel > passwordPolicyRels = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( passwordPolicyRels . isEmpty ( ) )
testInitialWidth ( ) { "<AssertPlaceHolder>" ; } getWidth ( ) { checkWidget ( ) ; return width ; }
org . junit . Assert . assertEquals ( 0 , column . getWidth ( ) )
testApplyProxyHeadersWithHTTPSSchemeAndXForwardedProtoHTTPS ( ) { edu . illinois . library . cantaloupe . http . Headers headers = new edu . illinois . library . cantaloupe . http . Headers ( ) ; headers . set ( "X-Forwarded-Proto" , "HTTPS" ) ; edu . illinois . library . cantaloupe . http . Reference ref = new edu . illinois . library . cantaloupe . http . Reference ( "https://bogus/cats" ) ; ref . applyProxyHeaders ( headers ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( getVerb ( ) ) + "<sp>" ) + ( edu . illinois . library . cantaloupe . resource . api . APITask . getUUID ( ) ) ; }
org . junit . Assert . assertEquals ( "https://bogus/cats" , ref . toString ( ) )
testJSONEscapeNewlineAndOtherControlCharacters ( ) { final java . lang . String testMsg = "hello\tworld\r\nhh\bere<sp>is<sp>it\f" ; final org . apache . logging . log4j . message . StringMapMessage msg = new org . apache . logging . log4j . message . StringMapMessage ( ) ; msg . put ( "one\ntwo" , testMsg ) ; final java . lang . String result = msg . getFormattedMessage ( new java . lang . String [ ] { "JSON" } ) ; final java . lang . String expected = "{\"one\\ntwo\":\"hello\\tworld\\r\\nhh\\bere<sp>is<sp>it\\f\"}" ; "<AssertPlaceHolder>" ; } getFormattedMessage ( java . lang . String [ ] ) { if ( ( message ) != null ) { return message ; } return super . getFormattedMessage ( formats ) ; }
org . junit . Assert . assertEquals ( expected , result )
empty ( ) { for ( int i = 1 ; i < ( com . yandex . yoctodb . util . mutable . impl . LongArrayBitSetTest . SIZE ) ; i ++ ) { "<AssertPlaceHolder>" ; } } zero ( int ) { return new com . yandex . yoctodb . util . mutable . impl . LongArrayBitSet ( size , new long [ com . yandex . yoctodb . util . mutable . impl . LongArrayBitSet . arraySize ( size ) ] ) ; }
org . junit . Assert . assertTrue ( com . yandex . yoctodb . util . mutable . impl . LongArrayBitSet . zero ( i ) . isEmpty ( ) )
testBuildWithDisabledDefaultCOnstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . mark . scale . type . MarkScaleType context = new org . lnu . is . domain . mark . scale . type . MarkScaleType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>MarkScaleType<sp>e<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . mark . scale . type . MarkScaleType > 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 )
getRemotePatientURLReturnsCorrectValue ( ) { this . pushServerResponse . response . accumulate ( "patient_url" , "b" ) ; "<AssertPlaceHolder>" ; } getRemotePatientURL ( ) { return this . remotePatientURL ; }
org . junit . Assert . assertEquals ( "b" , this . pushServerResponse . getRemotePatientURL ( ) )
testToFixedgrid25plus2 ( ) { java . util . SortedSet < org . onosproject . net . OchSignal > input = org . onosproject . net . DefaultOchSignalComparator . newOchSignalTreeSet ( ) ; input . addAll ( com . google . common . collect . ImmutableList . of ( org . onosproject . net . OchSignal . newFlexGridSlot ( ( 8 - 1 ) ) , org . onosproject . net . OchSignal . newFlexGridSlot ( ( 8 + 1 ) ) ) ) ; org . onosproject . net . OchSignal expected = org . onosproject . net . OchSignal . newDwdmSlot ( org . onosproject . net . ChannelSpacing . CHL_25GHZ , 2 ) ; "<AssertPlaceHolder>" ; } toFixedGrid ( java . util . List , org . onosproject . net . ChannelSpacing ) { int ratio = ( ( int ) ( ( spacing . frequency ( ) . asHz ( ) ) / ( ChannelSpacing . CHL_12P5GHZ . frequency ( ) . asHz ( ) ) ) ) ; checkArgument ( ( ( lambdas . size ( ) ) == ratio ) , "%s<sp>!=<sp>%s" , lambdas . size ( ) , ratio ) ; lambdas . forEach ( ( x ) -> checkArgument ( ( ( x . gridType ( ) ) == GridType . FLEX ) , x . gridType ( ) ) ) ; lambdas . forEach ( ( x ) -> checkArgument ( ( ( x . channelSpacing ( ) ) == ChannelSpacing . CHL_6P25GHZ ) , x . channelSpacing ( ) ) ) ; lambdas . forEach ( ( x ) -> checkArgument ( ( ( x . slotGranularity ( ) ) == 1 ) , x . slotGranularity ( ) ) ) ; java . util . stream . IntStream . range ( 1 , lambdas . size ( ) ) . forEach ( ( i ) -> checkArgument ( ( ( lambdas . get ( i ) . spacingMultiplier ( ) ) == ( ( lambdas . get ( ( i - 1 ) ) . spacingMultiplier ( ) ) + 2 ) ) ) ) ; int spacingMultiplier = ( ( lambdas . stream ( ) . mapToInt ( org . onosproject . net . OchSignal :: spacingMultiplier ) . sum ( ) ) / ( lambdas . size ( ) ) ) / ( ( int ) ( ( spacing . frequency ( ) . asHz ( ) ) / ( org . onosproject . net . ChannelSpacing . CHL_6P25GHZ . frequency ( ) . asHz ( ) ) ) ) ; return new org . onosproject . net . OchSignal ( GridType . DWDM , spacing , spacingMultiplier , lambdas . size ( ) ) ; }
org . junit . Assert . assertEquals ( expected , org . onosproject . net . OchSignal . toFixedGrid ( com . google . common . collect . Lists . newArrayList ( input ) , org . onosproject . net . ChannelSpacing . CHL_25GHZ ) )
testGetTitle ( ) { final org . kie . workbench . common . stunner . core . api . DefinitionManager definitionManager = mock ( org . kie . workbench . common . stunner . core . api . DefinitionManager . class ) ; final org . kie . workbench . common . stunner . core . definition . adapter . AdapterManager adapters = mock ( org . kie . workbench . common . stunner . core . definition . adapter . AdapterManager . class ) ; final org . kie . workbench . common . stunner . core . graph . content . view . View content = mock ( org . kie . workbench . common . stunner . core . graph . content . view . View . class ) ; final java . lang . Object definition = mock ( java . lang . Object . class ) ; final java . lang . String expectedTitle = "title" ; when ( definitionUtils . getDefinitionManager ( ) ) . thenReturn ( definitionManager ) ; when ( definitionManager . adapters ( ) ) . thenReturn ( adapters ) ; when ( adapters . forDefinition ( ) ) . thenReturn ( objectDefinitionAdapter ) ; when ( element . getContent ( ) ) . thenReturn ( content ) ; when ( content . getDefinition ( ) ) . thenReturn ( definition ) ; when ( objectDefinitionAdapter . getTitle ( definition ) ) . thenReturn ( expectedTitle ) ; final java . lang . String actualTitle = factory . getTitle ( element ) ; "<AssertPlaceHolder>" ; } getTitle ( org . kie . workbench . common . stunner . core . graph . Element ) { final org . kie . workbench . common . stunner . core . definition . adapter . AdapterManager adapters = definitionUtils . getDefinitionManager ( ) . adapters ( ) ; final org . kie . workbench . common . stunner . core . definition . adapter . DefinitionAdapter < java . lang . Object > objectDefinitionAdapter = adapters . forDefinition ( ) ; return objectDefinitionAdapter . getTitle ( element . getContent ( ) . getDefinition ( ) ) ; }
org . junit . Assert . assertEquals ( expectedTitle , actualTitle )
testInvalidateCredentialCacheForUpdatingAnotherUsersPassword ( ) { apply ( getService ( ) , getUserAddLdif ( ) ) ; java . lang . String userDn = "uid=akarasulu,ou=users,ou=system" ; org . apache . directory . ldap . client . api . LdapConnection connection = getConnectionAs ( getService ( ) , userDn , "test" ) ; connection . close ( ) ; java . lang . String adminUserDn = "uid=admin,ou=system" ; connection . bind ( adminUserDn , "secret" ) ; org . apache . directory . api . ldap . model . message . ModifyRequest modReq = new org . apache . directory . api . ldap . model . message . ModifyRequestImpl ( ) ; modReq . setName ( new org . apache . directory . api . ldap . model . name . Dn ( getService ( ) . getSchemaManager ( ) , userDn ) ) ; modReq . replace ( "userPassword" , "newpwd" ) ; connection . modify ( modReq ) ; connection . close ( ) ; try { connection . bind ( userDn , "test" ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . directory . api . ldap . model . exception . LdapAuthenticationException lae ) { "<AssertPlaceHolder>" ; } } bind ( javax . naming . Name , java . lang . Object ) { throw new javax . naming . ServiceUnavailableException ( org . apache . directory . server . core . jndi . DeadContext . EXCEPTION_MSG ) ; }
org . junit . Assert . assertTrue ( true )
getValueForNumber ( ) { value = new org . objectstyle . wolips . ruleeditor . model . LhsValue ( createNumberMap ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return _value ; }
org . junit . Assert . assertThat ( value . getValue ( ) , org . hamcrest . CoreMatchers . is ( "1" ) )
testGrowAtomContainerArray ( ) { org . openscience . cdk . interfaces . IAtomContainerSet som = ( ( org . openscience . cdk . interfaces . IAtomContainerSet ) ( newChemObject ( ) ) ) ; som . addAtomContainer ( som . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ) ; som . addAtomContainer ( som . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ) ; som . addAtomContainer ( som . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ) ; som . addAtomContainer ( som . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ) ; som . addAtomContainer ( som . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ) ; som . addAtomContainer ( som . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ) ; som . addAtomContainer ( som . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAtomContainer . class ) ) ; "<AssertPlaceHolder>" ; } getAtomContainerCount ( ) { int retVal = 0 ; if ( ( this . rootStructure ) != null ) retVal ++ ; for ( java . lang . Integer r : rGroupDefinitions . keySet ( ) ) { for ( org . openscience . cdk . isomorphism . matchers . RGroup rgrp : rGroupDefinitions . get ( r ) . getRGroups ( ) ) { if ( ( rgrp . getGroup ( ) ) != null ) { retVal ++ ; } } } return retVal ; }
org . junit . Assert . assertEquals ( 7 , som . getAtomContainerCount ( ) )
testSerializability ( ) { org . apache . cayenne . map . ObjEntity entity = new org . apache . cayenne . map . ObjEntity ( "entity" ) ; org . apache . cayenne . map . ObjEntity d1 = org . apache . cayenne . util . Util . cloneViaSerialization ( entity ) ; "<AssertPlaceHolder>" ; } getName ( ) { return "bindEqual" ; }
org . junit . Assert . assertEquals ( entity . getName ( ) , d1 . getName ( ) )
indexOf_returnsIndexOfLastMember ( ) { object . add ( "a" , true ) ; object . add ( "a" , true ) ; "<AssertPlaceHolder>" ; } indexOf ( java . lang . String ) { int index = table . get ( name ) ; if ( ( index != ( - 1 ) ) && ( name . equals ( names . get ( index ) ) ) ) { return index ; } return names . lastIndexOf ( name ) ; }
org . junit . Assert . assertEquals ( 1 , object . indexOf ( "a" ) )
nullHost ( ) { proxy . setHttpProxy ( com . opera . core . systems . OperaProxyTest . nullHost ) ; "<AssertPlaceHolder>" ; } getHttpProxy ( ) { return ( ( java . lang . String ) ( getProxyValue ( com . opera . core . systems . OperaProxy . ProxyToPreference . HTTP_SERVER ) ) ) ; }
org . junit . Assert . assertNull ( proxy . getHttpProxy ( ) )
testSize ( ) { int expectedSize = ( ( com . sun . jna . Platform . is64Bit ( ) ) && ( ! ( com . sun . jna . Platform . isIntel ( ) ) ) ) ? 16 : 12 ; com . zaxxer . nuprocess . linux . EpollEvent event = new com . zaxxer . nuprocess . linux . EpollEvent ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return com . zaxxer . nuprocess . linux . EpollEvent . size ; }
org . junit . Assert . assertEquals ( expectedSize , event . size ( ) )
test_now ( ) { org . threeten . extra . YearWeek expected = org . threeten . extra . YearWeek . now ( java . time . Clock . systemDefaultZone ( ) ) ; org . threeten . extra . YearWeek test = org . threeten . extra . YearWeek . now ( ) ; for ( int i = 0 ; i < 100 ; i ++ ) { if ( expected . equals ( test ) ) { return ; } expected = org . threeten . extra . YearWeek . now ( java . time . Clock . systemDefaultZone ( ) ) ; test = org . threeten . extra . YearWeek . now ( ) ; } "<AssertPlaceHolder>" ; } now ( ) { return org . threeten . extra . YearWeek . now ( java . time . Clock . systemDefaultZone ( ) ) ; }
org . junit . Assert . assertEquals ( expected , test )
verifyConstructionOk ( ) { java . lang . String email = consistentEmail ( ) ; sendTestEmail ( email ) ; java . util . List < javax . mail . Message > userInbox = org . jvnet . mock_javamail . Mailbox . get ( email ) ; "<AssertPlaceHolder>" ; } size ( ) { return getDynamicProperties ( ) . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , userInbox . size ( ) )
testHyperThreading ( ) { measurement . configure ( conf , com . srotya . sidewinder . core . storage . disk . TestPersistentMeasurement . engine , 4096 , com . srotya . sidewinder . core . storage . disk . TestPersistentMeasurement . DBNAME , "m1" , indexDir , dataDir , metadata , com . srotya . sidewinder . core . storage . disk . TestPersistentMeasurement . bgTaskPool ) ; int nThreads = 20 ; java . util . concurrent . ExecutorService es = java . util . concurrent . Executors . newFixedThreadPool ( nThreads , new com . srotya . sidewinder . core . utils . BackgrounThreadFactory ( "tlinear2" ) ) ; final java . util . List < com . srotya . sidewinder . core . rpc . Tag > tags = java . util . Arrays . asList ( com . srotya . sidewinder . core . rpc . Tag . newBuilder ( ) . setTagKey ( "host" ) . setTagValue ( "ll1.eew.wwe.com" ) . build ( ) , com . srotya . sidewinder . core . rpc . Tag . newBuilder ( ) . setTagKey ( "dc" ) . setTagValue ( "2" ) . build ( ) ) ; final int LIMIT = 1000 ; final long t1 = 1497720452566L ; for ( int i = 0 ; i < ( nThreads * 2 ) ; i ++ ) { final int th = i ; es . submit ( ( ) -> { long t = t1 + ( th * 4096 ) ; for ( int j = 0 ; j < LIMIT ; j ++ ) { try { long timestamp = t + ( j * 1000 ) ; measurement . addPointWithLocking ( com . srotya . sidewinder . core . storage . TestMeasurement . build ( "vf1" , tags , timestamp , j ) , false ) ; } catch ( e ) { com . srotya . sidewinder . core . storage . disk . e . printStackTrace ( ) ; } } } ) ; } es . shutdown ( ) ; es . awaitTermination ( 10 , TimeUnit . SECONDS ) ; measurement . configure ( conf , com . srotya . sidewinder . core . storage . disk . TestPersistentMeasurement . engine , 4096 , com . srotya . sidewinder . core . storage . disk . TestPersistentMeasurement . DBNAME , "m1" , indexDir , dataDir , metadata , com . srotya . sidewinder . core . storage . disk . TestPersistentMeasurement . bgTaskPool ) ; com . srotya . sidewinder . core . storage . Series s = measurement . getOrCreateSeries ( tags , false ) ; java . util . List < com . srotya . sidewinder . core . storage . DataPoint > dps = s . queryDataPoints ( measurement , java . util . Arrays . asList ( "vf1" ) , ( t1 - 100 ) , ( t1 + 10000000 ) , null ) . get ( "vf1" ) ; "<AssertPlaceHolder>" ; measurement . close ( ) ; } get ( java . lang . String ) { return new com . srotya . sidewinder . core . storage . ByteString ( str ) ; }
org . junit . Assert . assertEquals ( ( ( LIMIT * nThreads ) * 2 ) , dps . size ( ) , 10 )
testFilterParseRequest ( ) { final fr . gouv . vitam . common . database . parser . request . multiple . InsertParserMultiple request = new fr . gouv . vitam . common . database . parser . request . multiple . InsertParserMultiple ( ) ; final com . fasterxml . jackson . databind . JsonNode root = null ; request . filterParse ( root ) ; "<AssertPlaceHolder>" ; } filterParse ( com . fasterxml . jackson . databind . JsonNode ) { if ( rootNode == null ) { return ; } fr . gouv . vitam . common . database . builder . request . configuration . GlobalDatas . sanityParametersCheck ( rootNode . toString ( ) , GlobalDatas . NB_FILTERS ) ; try { parseOrderByFilter ( rootNode ) ; request . setFilter ( rootNode ) ; } catch ( final java . lang . Exception e ) { throw new fr . gouv . vitam . common . exception . InvalidParseOperationException ( ( "Parse<sp>in<sp>error<sp>for<sp>Filter:<sp>" + rootNode ) , e ) ; } }
org . junit . Assert . assertNotNull ( request )
testDefaultFocusElement ( ) { de . lessvoid . nifty . controls . dynamic . ScreenCreator createWithId = new de . lessvoid . nifty . controls . dynamic . ScreenCreator ( "myid" ) ; createWithId . setDefaultFocusElement ( "defaultFocusElementId" ) ; de . lessvoid . nifty . screen . Screen screen = createWithId . create ( niftyMock ) ; "<AssertPlaceHolder>" ; } getDefaultFocusElementId ( ) { return defaultFocusElementId ; }
org . junit . Assert . assertEquals ( "defaultFocusElementId" , screen . getDefaultFocusElementId ( ) )
testPutPerforomance ( ) { net . tomp2p . dht . PeerDHT master = null ; try { net . tomp2p . dht . PeerDHT [ ] peers = net . tomp2p . dht . UtilsDHT2 . createNodes ( 2000 , net . tomp2p . dht . TestDHT . rnd , 4001 ) ; master = peers [ 0 ] ; net . tomp2p . dht . UtilsDHT2 . perfectRouting ( peers ) ; for ( int i = 0 ; i < 500 ; i ++ ) { net . tomp2p . dht . FuturePut fp = peers [ 444 ] . put ( net . tomp2p . peers . Number160 . createHash ( "1" ) ) . data ( new net . tomp2p . storage . Data ( "test" ) ) . start ( ) ; fp . awaitUninterruptibly ( ) ; fp . futureRequests ( ) . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; } } finally { if ( master != null ) { master . shutdown ( ) . await ( ) ; } } } isSuccess ( ) { if ( ! ( super . isSuccess ( ) ) ) { return false ; } return checkResults ( result ( ) , rawResult . size ( ) , dataSize ) ; }
org . junit . Assert . assertEquals ( true , fp . isSuccess ( ) )
testTimeZoneDiscovery ( ) { try ( java . sql . Connection connection = getNewConnection ( "&sessionVariables=@@time_zone='US/Central'" , false ) ) { java . util . List < org . mariadb . jdbc . HostAddress > hostAddresses = getProtocolFromConnection ( connection ) . getProxy ( ) . getListener ( ) . getUrlParser ( ) . getHostAddresses ( ) ; for ( org . mariadb . jdbc . HostAddress hostAddress : hostAddresses ) { System . out . println ( ( "hostAddress:" + hostAddress ) ) ; } "<AssertPlaceHolder>" ; } } getHostAddresses ( ) { return this . addresses ; }
org . junit . Assert . assertTrue ( ( ( hostAddresses . size ( ) ) > 1 ) )
testEchoStatData ( ) { final java . lang . String binary = "a/b/c.out" ; final java . lang . String [ ] args = new java . lang . String [ ] { "arg1" , "arg2" , "arg3" } ; final int runCount = 3 ; org . eclipse . linuxtools . internal . perf . tests . DataManipulatorTest . StubStatData sData = new org . eclipse . linuxtools . internal . perf . tests . DataManipulatorTest . StubStatData ( "stat<sp>data" , binary , args , runCount , null , proj ) ; sData . parse ( ) ; java . lang . String expected = ( ( ( ( "perf<sp>stat<sp>-r<sp>" + runCount ) + "<sp>-o<sp>" ) + ( org . eclipse . linuxtools . internal . perf . tests . DataManipulatorTest . output ) ) + "<sp>" ) + binary ; for ( java . lang . String i : args ) { expected += "<sp>" + i ; } "<AssertPlaceHolder>" ; } getPerfData ( ) { return contents . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , sData . getPerfData ( ) . trim ( ) )
testLoadImageWithEmptyFile ( ) { org . apache . hadoop . fs . Path file = new org . apache . hadoop . fs . Path ( dir , "file" ) ; org . apache . hadoop . fs . FSDataOutputStream out = hdfs . create ( file ) ; out . close ( ) ; hdfs . setSafeMode ( SafeModeAction . SAFEMODE_ENTER ) ; hdfs . saveNamespace ( ) ; hdfs . setSafeMode ( SafeModeAction . SAFEMODE_LEAVE ) ; out = hdfs . append ( file ) ; out . write ( 1 ) ; out . close ( ) ; cluster . shutdown ( ) ; cluster = new org . apache . hadoop . hdfs . MiniDFSCluster . Builder ( conf ) . format ( false ) . numDataNodes ( org . apache . hadoop . hdfs . server . namenode . TestFSImageWithSnapshot . NUM_DATANODES ) . build ( ) ; cluster . waitActive ( ) ; hdfs = cluster . getFileSystem ( ) ; org . apache . hadoop . fs . FileStatus status = hdfs . getFileStatus ( file ) ; "<AssertPlaceHolder>" ; } getLen ( ) { return length ; }
org . junit . Assert . assertEquals ( 1 , status . getLen ( ) )
testDoWork ( ) { com . captaindebug . threading . good_example2 . ThreadWrapper instance = new com . captaindebug . threading . good_example2 . ThreadWrapper ( ) ; java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 1 ) ; instance . doWork ( latch ) ; latch . await ( ) ; boolean result = getResultFromDatabase ( ) ; "<AssertPlaceHolder>" ; } getResultFromDatabase ( ) { return true ; }
org . junit . Assert . assertTrue ( result )
anyOfTypes ( ) { javax . lang . model . element . ExecutableElement executableElement = org . androidannotations . helper . ValidatorParameterHelperTest . createMethod ( org . androidannotations . helper . Integer . class , org . androidannotations . helper . Long . class ) ; org . androidannotations . ElementValidation valid = new org . androidannotations . ElementValidation ( "" , executableElement ) ; validator . anyOfTypes ( CanonicalNameConstants . INTEGER , CanonicalNameConstants . LONG ) . multiple ( ) . validate ( executableElement , valid ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return isValid ; }
org . junit . Assert . assertTrue ( valid . isValid ( ) )
testValidatesThatClassFooIsNotInstantiable ( ) { try { final java . lang . reflect . Constructor < org . jrebirth . af . core . concurrent . JRebirth > c = org . jrebirth . af . core . concurrent . JRebirth . class . getDeclaredConstructor ( ) ; c . setAccessible ( true ) ; c . newInstance ( ) ; } catch ( final java . lang . Exception e ) { "<AssertPlaceHolder>" ; } }
org . junit . Assert . assertTrue ( false )
shouldBeEqualsPropertiesAsIdIsTheSame ( ) { final org . apache . tinkerpop . gremlin . structure . Vertex v = graph . addVertex ( ) ; final org . apache . tinkerpop . gremlin . structure . VertexProperty vp = v . property ( VertexProperty . Cardinality . single , "test" , "this" ) ; final org . apache . tinkerpop . gremlin . structure . util . detached . DetachedVertexProperty mp1 = org . apache . tinkerpop . gremlin . structure . util . detached . DetachedFactory . detach ( vp , true ) ; final org . apache . tinkerpop . gremlin . structure . util . detached . DetachedVertexProperty mp2 = org . apache . tinkerpop . gremlin . structure . util . detached . DetachedFactory . detach ( vp , true ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ! ( o instanceof org . apache . tinkerpop . gremlin . server . auth . AuthenticatedUser ) ) return false ; final org . apache . tinkerpop . gremlin . server . auth . AuthenticatedUser u = ( ( org . apache . tinkerpop . gremlin . server . auth . AuthenticatedUser ) ( o ) ) ; return name . equals ( u . name ) ; }
org . junit . Assert . assertTrue ( mp1 . equals ( mp2 ) )
testBuildWithParametersAndDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; org . lnu . is . domain . language . Language language = new org . lnu . is . domain . language . Language ( ) ; java . lang . String name = "fdsfds" ; java . lang . String firstName = "fdsfds" ; java . lang . String fatherName = "rewrtewt" ; java . lang . String surname = "cvdfgfdh" ; org . lnu . is . domain . person . name . PersonName context = new org . lnu . is . domain . person . name . PersonName ( ) ; context . setPerson ( person ) ; context . setLanguage ( language ) ; context . setName ( name ) ; context . setFirstName ( firstName ) ; context . setFatherName ( fatherName ) ; context . setSurname ( surname ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>PersonName<sp>e<sp>WHERE<sp>(<sp>e.person<sp>=<sp>:person<sp>AND<sp>.language<sp>=<sp>:language<sp>AND<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>AND<sp>e.firstName<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>AND<sp>e.fatherName<sp>LIKE<sp>CONCAT('%',:fatherName,'%')<sp>AND<sp>e.surname<sp>LIKE<sp>CONCAT('%',:surname,'%')<sp>)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . person . name . PersonName > 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 ( expected , actualQuery )
itCanModifyABlob ( ) { try ( com . sun . jersey . multipart . FormDataMultiPart form = new com . sun . jersey . multipart . FormDataMultiPart ( ) ) { com . sun . jersey . multipart . BodyPart fdp = new com . sun . jersey . multipart . file . StreamDataBodyPart ( "content" , new java . io . ByteArrayInputStream ( "modifiedData" . getBytes ( ) ) ) ; form . bodyPart ( fdp ) ; try ( org . nuxeo . jaxrs . test . CloseableClientResponse response = getResponse ( RequestType . PUT , ( ( "path" + ( doc . getPathAsString ( ) ) ) + "/@blob/mb:blobs/0/content" ) , form ) ) { fetchInvalidations ( ) ; doc = getTestBlob ( ) ; org . nuxeo . ecm . core . api . Blob blob = ( ( org . nuxeo . ecm . core . api . Blob ) ( doc . getPropertyValue ( "mb:blobs/0/content" ) ) ) ; "<AssertPlaceHolder>" ; } } } getString ( ) { return new java . lang . String ( bytes , ( ( getEncoding ( ) ) == null ? UTF_8 : getEncoding ( ) ) ) ; }
org . junit . Assert . assertEquals ( "modifiedData" , blob . getString ( ) )
TestNeedValidate02 ( ) { java . lang . String tokenName = "aaa" ; org . terasoluna . gfw . web . token . transaction . TransactionTokenType beginToken = TransactionTokenType . IN ; org . terasoluna . gfw . web . token . transaction . TransactionTokenInfo info = new org . terasoluna . gfw . web . token . transaction . TransactionTokenInfo ( tokenName , beginToken ) ; boolean output = info . needValidate ( ) ; "<AssertPlaceHolder>" ; } needValidate ( ) { return tokenType . needValidate ( ) ; }
org . junit . Assert . assertThat ( output , org . hamcrest . CoreMatchers . is ( true ) )
testGetEmpty ( ) { System . out . println ( "getEmpty" ) ; java . lang . Object expResult = null ; java . lang . Object result = map . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { latch . await ( ) ; return data ; }
org . junit . Assert . assertEquals ( expResult , result )
testGetMappingSpecs ( ) { org . eclipse . vorto . repository . web . api . v1 . ModelController modelController = org . mockito . Mockito . mock ( org . eclipse . vorto . repository . web . api . v1 . ModelController . class ) ; try { when ( modelController . getModelContentForTargetPlatform ( org . mockito . Matchers . eq ( "com.mycompany:ColorLightIM:1.0.0" ) , org . mockito . Matchers . any ( ) ) ) . thenReturn ( modelContentForSample1 ( ) ) ; when ( modelController . getModelContent ( org . mockito . Matchers . eq ( "org.eclipse.vorto.examples.fb:ColorLight:1.0.0" ) ) ) . thenReturn ( modelContentForSample2 ( ) ) ; org . eclipse . vorto . repository . web . core . PayloadMappingController controller = new org . eclipse . vorto . repository . web . core . PayloadMappingController ( ) ; controller . setModelController ( modelController ) ; org . eclipse . vorto . mapping . engine . model . spec . IMappingSpecification mappingSpec = controller . getMappingSpecification ( "com.mycompany:ColorLightIM:1.0.0" , "test" ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { org . junit . Assert . fail ( "Unable<sp>to<sp>load<sp>test<sp>resources" ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( "Test<sp>fired<sp>an<sp>exception" ) ; } } getMappingSpecification ( java . lang . String , java . lang . String ) { org . eclipse . vorto . repository . core . ModelContent infoModelContent = modelController . getModelContentForTargetPlatform ( modelId , targetPlatform ) ; org . eclipse . vorto . model . Infomodel infomodel = ( ( org . eclipse . vorto . model . Infomodel ) ( infoModelContent . getModels ( ) . get ( infoModelContent . getRoot ( ) ) ) ) ; if ( infomodel == null ) { org . eclipse . vorto . repository . core . ModelContent infomodelContent = modelController . getModelContent ( modelId ) ; infomodel = ( ( org . eclipse . vorto . model . Infomodel ) ( infomodelContent . getModels ( ) . get ( infomodelContent . getRoot ( ) ) ) ) ; } org . eclipse . vorto . mapping . engine . model . spec . MappingSpecification specification = new org . eclipse . vorto . mapping . engine . model . spec . MappingSpecification ( ) ; specification . setInfoModel ( infomodel ) ; for ( org . eclipse . vorto . model . ModelProperty fbProperty : infomodel . getFunctionblocks ( ) ) { org . eclipse . vorto . model . ModelId fbModelId = ( ( org . eclipse . vorto . model . ModelId ) ( fbProperty . getType ( ) ) ) ; org . eclipse . vorto . model . ModelId mappingId = fbProperty . getMappingReference ( ) ; org . eclipse . vorto . model . FunctionblockModel fbm = null ; if ( mappingId != null ) { fbm = getModelContentByModelAndMappingId ( fbModelId . getPrettyFormat ( ) , mappingId . getPrettyFormat ( ) ) ; } else { org . eclipse . vorto . repository . core . ModelContent fbmContent = modelController . getModelContent ( fbModelId . getPrettyFormat ( ) ) ; fbm = ( ( org . eclipse . vorto . model . FunctionblockModel ) ( fbmContent . getModels ( ) . get ( fbmContent . getRoot ( ) ) ) ) ; } specification . getProperties ( ) . put ( fbProperty . getName ( ) , initEmptyProperties ( fbm ) ) ; } return specification ; }
org . junit . Assert . assertTrue ( ( mappingSpec != null ) )
testCreate ( ) { org . oscarehr . billing . CA . BC . model . Hl7Orc entity = new org . oscarehr . billing . CA . BC . model . Hl7Orc ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( entity ) ; dao . persist ( entity ) ; "<AssertPlaceHolder>" ; } getId ( ) { return this . id ; }
org . junit . Assert . assertNotNull ( entity . getId ( ) )
emptyConstructor ( ) { org . openscience . cdk . group . AbstractDiscretePartitionRefinerTest . MockRefiner refiner = new org . openscience . cdk . group . AbstractDiscretePartitionRefinerTest . MockRefiner ( null ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( refiner )
testServerGetList ( ) { System . out . println ( "testServerGetList" ) ; java . lang . Long id = storage . indexPicture ( retrieval . utils . FileUtils . readPicture ( retrieval . storage . LOCALPICTURE1 ) , null , null ) ; System . out . println ( ( "qsdfg=" + id ) ) ; System . out . println ( ( "storage.getAllPictures()=" + ( storage . getAllPictures ( ) ) ) ) ; "<AssertPlaceHolder>" ; } getAllPictures ( ) { return index . getAllPicturesList ( ) ; }
org . junit . Assert . assertEquals ( true , storage . getAllPictures ( ) . contains ( id ) )
testGetBytesWithByteArray ( ) { byte [ ] bytes = io . vertx . test . core . TestUtils . randomByteArray ( 100 ) ; io . vertx . core . buffer . Buffer b = io . vertx . core . buffer . Buffer . buffer ( bytes ) ; byte [ ] sub = new byte [ ( bytes . length ) / 2 ] ; java . lang . System . arraycopy ( bytes , ( ( bytes . length ) / 4 ) , sub , 0 , ( ( bytes . length ) / 2 ) ) ; byte [ ] result = new byte [ ( bytes . length ) / 2 ] ; b . getBytes ( ( ( bytes . length ) / 4 ) , ( ( ( bytes . length ) / 4 ) + ( ( bytes . length ) / 2 ) ) , result ) ; "<AssertPlaceHolder>" ; } byteArraysEqual ( byte [ ] , byte [ ] ) { if ( ( b1 . length ) != ( b2 . length ) ) return false ; for ( int i = 0 ; i < ( b1 . length ) ; i ++ ) { if ( ( b1 [ i ] ) != ( b2 [ i ] ) ) return false ; } return true ; }
org . junit . Assert . assertTrue ( io . vertx . test . core . TestUtils . byteArraysEqual ( sub , result ) )
should_return_null_if_object_is_null ( ) { "<AssertPlaceHolder>" ; } toStringOf ( java . lang . Object ) { if ( org . fest . util . Arrays . isArray ( o ) ) { return org . fest . util . Arrays . format ( o ) ; } if ( o instanceof org . fest . util . Calendar ) { return org . fest . util . ToString . toStringOf ( o ) ; } if ( o instanceof java . lang . Class < ? > ) { return org . fest . util . ToString . toStringOf ( ( ( java . lang . Class < ? > ) ( o ) ) ) ; } if ( o instanceof org . fest . util . Collection < ? > ) { return org . fest . util . ToString . toStringOf ( ( ( org . fest . util . Collection < ? > ) ( o ) ) ) ; } if ( o instanceof org . fest . util . Date ) { return org . fest . util . ToString . toStringOf ( o ) ; } if ( o instanceof java . lang . Float ) { return org . fest . util . ToString . toStringOf ( ( ( java . lang . Float ) ( o ) ) ) ; } if ( o instanceof java . lang . Long ) { return org . fest . util . ToString . toStringOf ( ( ( java . lang . Long ) ( o ) ) ) ; } if ( o instanceof java . io . File ) { return org . fest . util . ToString . toStringOf ( ( ( java . io . File ) ( o ) ) ) ; } if ( o instanceof org . fest . util . Map < ? , ? > ) { return org . fest . util . ToString . toStringOf ( ( ( org . fest . util . Map < ? , ? > ) ( o ) ) ) ; } if ( o instanceof java . lang . String ) { return org . fest . util . Strings . quote ( ( ( java . lang . String ) ( o ) ) ) ; } if ( o instanceof org . fest . util . Comparator ) { return org . fest . util . ToString . toStringOf ( ( ( org . fest . util . Comparator < ? > ) ( o ) ) ) ; } return o == null ? null : o . toString ( ) ; }
org . junit . Assert . assertNull ( org . fest . util . ToString . toStringOf ( null ) )
testPersoonZonderNamenReeksEnMetVoornamen ( ) { final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView persoon = bouwPersoonView ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . samengesteldenaam . BRAL0502Test . INDICATIE_NAMEN_REEKS_NIET_AANWEZIG , nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . samengesteldenaam . BRAL0502Test . SAMENGESTELDE_NAAM_AANWEZIG , "Jan" , nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . samengesteldenaam . BRAL0502Test . BSN_OUDER , nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . samengesteldenaam . BRAL0502Test . ID_OUDER ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteits = bral0502 . voerRegelUit ( persoon , bouwPersoonBericht ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . samengesteldenaam . BRAL0502Test . BSN_OUDER ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( berichtEntiteits . isEmpty ( ) )
testStickyNoCheck ( ) { int count = testSticky ( null , false ) ; System . out . println ( count ) ; "<AssertPlaceHolder>" ; } testSticky ( java . lang . String , boolean ) { if ( methodName == null ) { url = url . addParameter ( Constants . CLUSTER_STICKY_KEY , java . lang . String . valueOf ( check ) ) ; } else { url = url . addParameter ( ( ( methodName + "." ) + ( com . alibaba . dubbo . common . Constants . CLUSTER_STICKY_KEY ) ) , java . lang . String . valueOf ( check ) ) ; } org . easymock . EasyMock . reset ( invoker1 ) ; org . easymock . EasyMock . expect ( invoker1 . invoke ( invocation ) ) . andReturn ( result ) . anyTimes ( ) ; org . easymock . EasyMock . expect ( invoker1 . isAvailable ( ) ) . andReturn ( true ) . anyTimes ( ) ; org . easymock . EasyMock . expect ( invoker1 . getUrl ( ) ) . andReturn ( url ) . anyTimes ( ) ; org . easymock . EasyMock . expect ( invoker1 . getInterface ( ) ) . andReturn ( com . alibaba . dubbo . rpc . cluster . StickyTest . class ) . anyTimes ( ) ; org . easymock . EasyMock . replay ( invoker1 ) ; org . easymock . EasyMock . reset ( invoker2 ) ; org . easymock . EasyMock . expect ( invoker2 . invoke ( invocation ) ) . andReturn ( result ) . anyTimes ( ) ; org . easymock . EasyMock . expect ( invoker2 . isAvailable ( ) ) . andReturn ( true ) . anyTimes ( ) ; org . easymock . EasyMock . expect ( invoker2 . getUrl ( ) ) . andReturn ( url ) . anyTimes ( ) ; org . easymock . EasyMock . expect ( invoker2 . getInterface ( ) ) . andReturn ( com . alibaba . dubbo . rpc . cluster . StickyTest . class ) . anyTimes ( ) ; org . easymock . EasyMock . replay ( invoker2 ) ; invocation . setMethodName ( methodName ) ; int count = 0 ; for ( int i = 0 ; i < ( runs ) ; i ++ ) { org . junit . Assert . assertEquals ( null , clusterinvoker . invoke ( invocation ) ) ; if ( ( invoker1 ) == ( clusterinvoker . getSelectedInvoker ( ) ) ) { count ++ ; } } return count ; }
org . junit . Assert . assertTrue ( ( ( count > 0 ) && ( count <= ( runs ) ) ) )
testInvokeVarargsCoerce03 ( ) { javax . el . BeanELResolver resolver = new javax . el . BeanELResolver ( ) ; javax . el . ELContext context = new javax . el . StandardELContext ( javax . el . ELManager . getExpressionFactory ( ) ) ; java . lang . Object result = resolver . invoke ( context , new javax . el . TesterBean ( javax . el . TestBeanELResolver . BEAN_NAME ) , "getNameVarargs" , null , new java . lang . String [ ] { } ) ; "<AssertPlaceHolder>" ; } invoke ( javax . el . ELContext , java . lang . Object , java . lang . Object , javax . el . Class [ ] , java . lang . Object [ ] ) { context . setPropertyResolved ( false ) ; int sz = this . size ; for ( int i = 0 ; i < sz ; i ++ ) { java . lang . Object obj = this . resolvers [ i ] . invoke ( context , base , method , paramTypes , params ) ; if ( context . isPropertyResolved ( ) ) { return obj ; } } return null ; }
org . junit . Assert . assertEquals ( javax . el . TestBeanELResolver . BEAN_NAME , result )
testHighlightWithLink ( ) { java . lang . String term = "Bart<sp>Simpson" ; java . lang . String publication = "<a<sp>href=\"www.simpson.com\"<sp>id=\"Bart<sp>Simpson\">Bart<sp>Simpson</a>" ; java . lang . String definition = "Skatter" ; java . lang . String className = "cool" ; boolean onlyFirst = true ; com . silverpeas . glossary . HighlightGlossaryTerms instance = new com . silverpeas . glossary . HighlightGlossaryTerms ( ) ; java . lang . String expResult = "<a<sp>href=\"www.simpson.com\"<sp>id=\"Bart<sp>Simpson\">Bart<sp>Simpson</a>" ; java . lang . String result = instance . highlight ( term , publication , definition , className , onlyFirst ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expResult , result )
testCompilationMustFailComparingAClassLiteral ( ) { java . lang . String str = "import<sp>Misc2Test.Answer\n" + ( ( ( ( ( "import<sp>Misc2Test.AnswerGiver\n" + "rule<sp>\"Test<sp>Rule\"\n" ) + "when\n" ) + "<sp>AnswerGiver(Answer<sp>==<sp>Answer.YES)\n" ) + "then\n" ) + "end" ) ; org . kie . internal . builder . KnowledgeBuilder kbuilder = org . kie . internal . builder . KnowledgeBuilderFactory . newKnowledgeBuilder ( ) ; kbuilder . add ( org . kie . internal . io . ResourceFactory . newByteArrayResource ( str . getBytes ( ) ) , ResourceType . DRL ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return messages . stream ( ) . anyMatch ( ( m ) -> DMNMessage . Severity . ERROR . equals ( m . getSeverity ( ) ) ) ; }
org . junit . Assert . assertTrue ( kbuilder . hasErrors ( ) )
hasClass_Jar ( ) { java . lang . Class < ? > testClass = org . slf4j . Logger . class ; com . navercorp . pinpoint . profiler . instrument . scanner . Scanner scanner = com . navercorp . pinpoint . profiler . instrument . scanner . ClassScannerFactory . newScanner ( testClass . getProtectionDomain ( ) , this . getClass ( ) . getClassLoader ( ) ) ; java . lang . String fileName = com . navercorp . pinpoint . profiler . util . JavaAssistUtils . javaClassNameToJvmResourceName ( testClass . getName ( ) ) ; boolean exist = scanner . exist ( fileName ) ; scanner . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { }
org . junit . Assert . assertTrue ( exist )
processTimeZoneForNoSetting ( ) { org . slim3 . tester . MockServletContext servletContext = new org . slim3 . tester . MockServletContext ( ) ; org . slim3 . tester . MockHttpServletRequest request = new org . slim3 . tester . MockHttpServletRequest ( servletContext ) ; org . slim3 . controller . FrontController frontController = new org . slim3 . controller . FrontController ( ) ; "<AssertPlaceHolder>" ; } processTimeZone ( javax . servlet . http . HttpServletRequest ) { java . util . TimeZone timeZone = null ; javax . servlet . http . HttpSession session = request . getSession ( false ) ; if ( session != null ) { java . lang . Object o = session . getAttribute ( ControllerConstants . TIME_ZONE_KEY ) ; if ( o instanceof java . lang . String ) { timeZone = java . util . TimeZone . getTimeZone ( ( ( java . lang . String ) ( o ) ) ) ; } else if ( o instanceof java . util . TimeZone ) { timeZone = ( ( java . util . TimeZone ) ( o ) ) ; } } if ( timeZone == null ) { timeZone = defaultTimeZone ; } if ( timeZone == null ) { timeZone = java . util . TimeZone . getDefault ( ) ; } return timeZone ; }
org . junit . Assert . assertThat ( frontController . processTimeZone ( request ) , org . hamcrest . CoreMatchers . is ( java . util . TimeZone . getDefault ( ) ) )
convertUserSyncRequestTest ( ) { org . kaaproject . kaa . server . sync . platform . AvroEncDec avroEncDec = new org . kaaproject . kaa . server . sync . platform . AvroEncDec ( ) ; java . lang . reflect . Method method = org . kaaproject . kaa . server . sync . platform . AvroEncDec . class . getDeclaredMethod ( org . kaaproject . kaa . server . sync . platform . AvroEncDecTest . CONVER_METHOD , org . kaaproject . kaa . common . endpoint . gen . UserSyncRequest . class ) ; method . setAccessible ( true ) ; org . kaaproject . kaa . common . endpoint . gen . UserSyncRequest syncRequest = null ; "<AssertPlaceHolder>" ; method . invoke ( avroEncDec , new org . kaaproject . kaa . common . endpoint . gen . UserSyncRequest ( ) ) ; }
org . junit . Assert . assertNull ( method . invoke ( avroEncDec , syncRequest ) )
links ( ) { "<AssertPlaceHolder>" ; } links ( ) { org . junit . Assert . assertThat ( facebook . links ( ) , org . hamcrest . CoreMatchers . instanceOf ( facebook4j . LinkMethods . class ) ) ; }
org . junit . Assert . assertThat ( facebook . links ( ) , org . hamcrest . CoreMatchers . instanceOf ( facebook4j . LinkMethods . class ) )
normalCreateAndRetrieve ( ) { org . candlepin . model . ConsumerContentOverride cco = new org . candlepin . model . ConsumerContentOverride ( consumer , "test-content" , "name" , "value" ) ; consumerContentOverrideCurator . create ( cco ) ; org . candlepin . model . ConsumerContentOverride cco2 = consumerContentOverrideCurator . retrieve ( consumer , "test-content" , "name" ) ; assert cco2 != null ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( "value" , cco2 . getValue ( ) )
testFullMap ( ) { random = new java . util . Random ( 25000 ) ; org . apache . hadoop . hive . ql . exec . vector . mapjoin . fast . VectorMapJoinFastLongHashMultiSet map = new org . apache . hadoop . hive . ql . exec . vector . mapjoin . fast . VectorMapJoinFastLongHashMultiSet ( false , false , org . apache . hadoop . hive . ql . plan . VectorMapJoinDesc . HashTableKeyType . LONG , CAPACITY , 1.0F , WB_SIZE , ( - 1 ) ) ; org . apache . hadoop . hive . ql . exec . vector . mapjoin . fast . CheckFastHashTable . VerifyFastLongHashMultiSet verifyTable = new org . apache . hadoop . hive . ql . exec . vector . mapjoin . fast . CheckFastHashTable . VerifyFastLongHashMultiSet ( ) ; for ( int i = 0 ; i < ( CAPACITY ) ; i ++ ) { long key ; while ( true ) { key = random . nextLong ( ) ; if ( ! ( verifyTable . contains ( key ) ) ) { break ; } } map . testPutRow ( key ) ; verifyTable . add ( key ) ; } verifyTable . verify ( map ) ; long anotherKey ; while ( true ) { anotherKey = random . nextLong ( ) ; if ( ! ( verifyTable . contains ( anotherKey ) ) ) { break ; } } org . apache . hadoop . hive . ql . exec . vector . mapjoin . hashtable . VectorMapJoinHashMultiSetResult hashMultiSetResult = map . createHashMultiSetResult ( ) ; org . apache . hadoop . hive . ql . exec . JoinUtil . JoinResult joinResult = map . contains ( anotherKey , hashMultiSetResult ) ; "<AssertPlaceHolder>" ; } contains ( long , org . apache . hadoop . hive . ql . exec . vector . mapjoin . hashtable . VectorMapJoinHashMultiSetResult ) { org . apache . hadoop . hive . ql . exec . vector . mapjoin . fast . VectorMapJoinFastHashMultiSet . HashMultiSetResult optimizedHashMultiSetResult = ( ( org . apache . hadoop . hive . ql . exec . vector . mapjoin . fast . VectorMapJoinFastHashMultiSet . HashMultiSetResult ) ( hashMultiSetResult ) ) ; optimizedHashMultiSetResult . forget ( ) ; long hashCode = org . apache . hive . common . util . HashCodeUtil . calculateLongHashCode ( key ) ; int pairIndex = findReadSlot ( key , hashCode ) ; org . apache . hadoop . hive . ql . exec . JoinUtil . JoinResult joinResult ; if ( pairIndex == ( - 1 ) ) { joinResult = JoinUtil . JoinResult . NOMATCH ; } else { optimizedHashMultiSetResult . set ( slotPairs [ pairIndex ] ) ; joinResult = JoinUtil . JoinResult . MATCH ; } optimizedHashMultiSetResult . setJoinResult ( joinResult ) ; return joinResult ; }
org . junit . Assert . assertTrue ( ( joinResult == ( JoinUtil . JoinResult . NOMATCH ) ) )
testTrackingNestedSet ( ) { com . orientechnologies . orient . core . id . ORID orid ; com . orientechnologies . orient . core . record . impl . ODocument document = new com . orientechnologies . orient . core . record . impl . ODocument ( ) ; com . orientechnologies . orient . core . db . record . Set objects = new com . orientechnologies . orient . core . db . record . HashSet ( ) ; document . field ( "objects" , objects ) ; document . save ( db . getClusterNameById ( db . getDefaultClusterId ( ) ) ) ; objects = document . field ( "objects" ) ; com . orientechnologies . orient . core . db . record . Set subObjects = new com . orientechnologies . orient . core . db . record . HashSet ( ) ; objects . add ( subObjects ) ; document . save ( db . getClusterNameById ( db . getDefaultClusterId ( ) ) ) ; orid = document . getIdentity ( ) ; objects = document . field ( "objects" ) ; subObjects = ( ( com . orientechnologies . orient . core . db . record . Set ) ( objects . iterator ( ) . next ( ) ) ) ; com . orientechnologies . orient . core . record . impl . ODocument nestedDoc = new com . orientechnologies . orient . core . record . impl . ODocument ( ) ; subObjects . add ( nestedDoc ) ; document . save ( db . getClusterNameById ( db . getDefaultClusterId ( ) ) ) ; db . getLocalCache ( ) . clear ( ) ; document = db . load ( orid ) ; objects = document . field ( "objects" ) ; subObjects = ( ( com . orientechnologies . orient . core . db . record . Set ) ( objects . iterator ( ) . next ( ) ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return recordList . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( ( ! ( subObjects . isEmpty ( ) ) ) )
testDescribeBackups ( ) { try { com . fit2cloud . aliyun . rds . model . request . DescribeBackupsRequest request = new com . fit2cloud . aliyun . rds . model . request . DescribeBackupsRequest ( ) ; request . setDBInstanceId ( dBInstanceId ) ; request . setPageNumber ( 1 ) ; request . setPageSize ( 30 ) ; java . util . Date date = new java . util . Date ( ) ; java . lang . String endTime = new java . text . SimpleDateFormat ( "YYYY-MM-dd'T'HH:mm'Z'" ) . format ( date ) ; date = new java . util . Date ( ( ( date . getTime ( ) ) - 36000000 ) ) ; java . lang . String startTime = new java . text . SimpleDateFormat ( "YYYY-MM-dd'T'HH:mm'Z'" ) . format ( date ) ; request . setStartTime ( startTime ) ; request . setEndTime ( endTime ) ; com . fit2cloud . aliyun . Response response = client . describeBackups ( request ) ; System . out . println ( ( "testDescribeBackups<sp>::<sp>" + ( new com . google . gson . Gson ( ) . toJson ( response ) ) ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } } describeBackups ( com . fit2cloud . aliyun . rds . model . request . DescribeBackupsRequest ) { return listPageableData ( describeBackupsRequest , "DescribeBackups" , com . fit2cloud . aliyun . rds . model . response . DescribeBackupsResponse . class ) ; }
org . junit . Assert . assertTrue ( true )
testLengthExpression2 ( ) { org . odata4j . expression . CommonExpression ex = org . odata4j . expression . Expression . length ( org . odata4j . expression . Expression . string ( "aaa" ) ) ; java . lang . Object evaluate = org . odata4j . producer . inmemory . InMemoryEvaluation . evaluate ( ex , this , new org . odata4j . producer . inmemory . BeanBasedPropertyModel ( getClass ( ) ) ) ; "<AssertPlaceHolder>" ; } evaluate ( org . odata4j . expression . CommonExpression , java . lang . Object , org . odata4j . producer . inmemory . PropertyModel ) { if ( expression instanceof org . odata4j . expression . LiteralExpression ) return org . odata4j . expression . Expression . literalValue ( ( ( org . odata4j . expression . LiteralExpression ) ( expression ) ) ) ; if ( expression instanceof org . odata4j . expression . EntitySimpleProperty ) return properties . getPropertyValue ( target , ( ( org . odata4j . expression . EntitySimpleProperty ) ( expression ) ) . getPropertyName ( ) ) ; if ( expression instanceof org . odata4j . expression . BoolCommonExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . evaluate ( ( ( org . odata4j . expression . BoolCommonExpression ) ( expression ) ) , target , properties ) ; if ( expression instanceof org . odata4j . expression . AddExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . binaryFunction ( ( ( org . odata4j . expression . BinaryCommonExpression ) ( expression ) ) , target , properties , org . odata4j . producer . inmemory . InMemoryEvaluation . BinaryFunction . ADD ) ; if ( expression instanceof org . odata4j . expression . SubExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . binaryFunction ( ( ( org . odata4j . expression . BinaryCommonExpression ) ( expression ) ) , target , properties , org . odata4j . producer . inmemory . InMemoryEvaluation . BinaryFunction . SUB ) ; if ( expression instanceof org . odata4j . expression . MulExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . binaryFunction ( ( ( org . odata4j . expression . BinaryCommonExpression ) ( expression ) ) , target , properties , org . odata4j . producer . inmemory . InMemoryEvaluation . BinaryFunction . MUL ) ; if ( expression instanceof org . odata4j . expression . DivExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . binaryFunction ( ( ( org . odata4j . expression . BinaryCommonExpression ) ( expression ) ) , target , properties , org . odata4j . producer . inmemory . InMemoryEvaluation . BinaryFunction . DIV ) ; if ( expression instanceof org . odata4j . expression . ModExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . binaryFunction ( ( ( org . odata4j . expression . BinaryCommonExpression ) ( expression ) ) , target , properties , org . odata4j . producer . inmemory . InMemoryEvaluation . BinaryFunction . MOD ) ; if ( expression instanceof org . odata4j . expression . ParenExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . evaluate ( ( ( org . odata4j . expression . ParenExpression ) ( expression ) ) . getExpression ( ) , target , properties ) ; if ( expression instanceof org . odata4j . expression . BoolParenExpression ) return org . odata4j . producer . inmemory . InMemoryEvaluation . evaluate ( ( ( org . odata4j . expression . BoolParenExpression ) ( expression ) ) . getExpression ( ) , target , properties ) ; if ( expression instanceof org . odata4j . expression . CastExpression ) { org . odata4j . expression . CastExpression castExpression = ( ( org . odata4j . expression . CastExpression ) ( expression ) ) ; org . odata4j . edm . EdmSimpleType < ? > t = org . odata4j . edm . EdmType . getSimple ( castExpression . getType ( ) ) ; if ( t == null ) throw new java . lang . UnsupportedOperationException ( "Only<sp>simple<sp>types<sp>supported" ) ; java . lang . Class < ? > javaType = t . getJavaTypes ( ) . iterator ( ) . next ( ) ; return org . odata4j . internal . TypeConverter . convert ( org . odata4j . producer . inmemory . InMemoryEvaluation . evaluate ( castExpression . getExpression ( ) , target , properties ) , javaType ) ; } if ( expression instanceof org . odata4j . expression . ToLowerMethodCallExpression ) { org . odata4j . expression . ToLowerMethodCallExpression e = ( ( org . odata4j . expression . ToLowerMethodCallExpression ) ( expression ) ) ; java . lang . String value = org . odata4j . producer . inmemory . InMemoryEvaluation . evaluateToString ( e . getTarget ( ) , target , properties ) ; return value == null ? null : value . toLowerCase ( ) ; } if ( expression instanceof org . odata4j . expression . ToUpperMethodCallExpression ) { org . odata4j . expression . ToUpperMethodCallExpression e = ( ( org . odata4j . expression . ToUpperMethodCallExpression ) ( expression ) ) ; java . lang . String value = org . odata4j . producer . inmemory . InMemoryEvaluation . evaluateToString ( e . getTarget ( ) , target , properties ) ; return value == null ? null : value . toUpperCase ( ) ; } if ( expression instanceof org . odata4j . expression . SubstringMethodCallExpression ) { org . odata4j . expression . SubstringMethodCallExpression e = ( ( org . odata4j . expression . SubstringMethodCallExpression ) ( expression ) ) ; java . lang . String value = org . odata4j . producer . inmemory . InMemoryEvaluation . evaluateToString ( e . getTarget ( ) , target , properties ) ; if ( (
org . junit . Assert . assertEquals ( evaluate , ( ( java . lang . Integer ) ( 3 ) ) )
testShutdownNowNullService ( ) { "<AssertPlaceHolder>" ; } shutdownNow ( java . util . concurrent . ExecutorService ) { if ( executorService == null ) { return java . util . Collections . emptyList ( ) ; } java . util . List < java . lang . Runnable > answer = null ; if ( ! ( executorService . isShutdown ( ) ) ) { org . apache . qpid . jms . util . ThreadPoolUtils . LOG . debug ( "Forcing<sp>shutdown<sp>of<sp>ExecutorService:<sp>{}" , executorService ) ; answer = executorService . shutdownNow ( ) ; org . apache . qpid . jms . util . ThreadPoolUtils . LOG . trace ( "Shutdown<sp>of<sp>ExecutorService:<sp>{}<sp>is<sp>shutdown:<sp>{}<sp>and<sp>terminated:<sp>{}." , new java . lang . Object [ ] { executorService , executorService . isShutdown ( ) , executorService . isTerminated ( ) } ) ; } if ( answer == null ) { answer = java . util . Collections . emptyList ( ) ; } return answer ; }
org . junit . Assert . assertNotNull ( org . apache . qpid . jms . util . ThreadPoolUtils . shutdownNow ( null ) )
testReindexingWithCompositeIds ( ) { try ( org . hibernate . search . FullTextSession fullTextSession = ftsBuilder . openFullTextSession ( ) ) { storeTestData ( fullTextSession ) ; } try ( org . hibernate . search . FullTextSession fullTextSession = ftsBuilder . openFullTextSession ( ) ) { fullTextSession . createIndexer ( ) . startAndWait ( ) ; } org . hibernate . search . SearchFactory searchFactory = ftsBuilder . getSearchFactory ( ) ; org . hibernate . search . spi . SearchIntegrator searchIntegrator = searchFactory . unwrap ( org . hibernate . search . spi . SearchIntegrator . class ) ; org . hibernate . search . testsupport . setup . CountingErrorHandler errorHandler = ( ( org . hibernate . search . testsupport . setup . CountingErrorHandler ) ( searchIntegrator . getErrorHandler ( ) ) ) ; "<AssertPlaceHolder>" ; } getTotalCount ( ) { int total = 0 ; for ( java . lang . Integer i : stats . values ( ) ) { total += i ; } return total ; }
org . junit . Assert . assertEquals ( 0 , errorHandler . getTotalCount ( ) )
testConvertAll ( ) { java . lang . Long id = 1L ; java . lang . String name = "n<sp>a<sp>m<sp>e" ; java . lang . String abbrName = "abbrName" ; org . lnu . is . resource . enrolment . type . EnrolmentTypeResource source = new org . lnu . is . resource . enrolment . type . EnrolmentTypeResource ( ) ; source . setId ( id ) ; source . setName ( name ) ; source . setAbbrName ( abbrName ) ; java . util . List < org . lnu . is . resource . enrolment . type . EnrolmentTypeResource > sources = java . util . Arrays . asList ( source ) ; org . lnu . is . domain . enrolment . type . EnrolmentType expected = new org . lnu . is . domain . enrolment . type . EnrolmentType ( ) ; expected . setId ( id ) ; expected . setName ( name ) ; expected . setAbbrName ( abbrName ) ; java . util . List < org . lnu . is . domain . enrolment . type . EnrolmentType > expecteds = java . util . Arrays . asList ( expected ) ; java . util . List < org . lnu . is . domain . enrolment . type . EnrolmentType > actuals = unit . convertAll ( sources ) ; "<AssertPlaceHolder>" ; } convertAll ( java . util . List ) { return convertAll ( sources , new java . util . ArrayList < TARGET > ( sources . size ( ) ) ) ; }
org . junit . Assert . assertEquals ( expecteds , actuals )
testIsSubgraph_IAtomContainer_IAtomContainer ( ) { org . openscience . cdk . interfaces . IAtomContainer mol = org . openscience . cdk . templates . TestMoleculeFactory . makeAlphaPinene ( ) ; org . openscience . cdk . interfaces . IAtomContainer frag1 = org . openscience . cdk . templates . TestMoleculeFactory . makeCyclohexene ( ) ; org . openscience . cdk . tools . manipulator . AtomContainerManipulator . percieveAtomTypesAndConfigureAtoms ( mol ) ; org . openscience . cdk . tools . manipulator . AtomContainerManipulator . percieveAtomTypesAndConfigureAtoms ( frag1 ) ; org . openscience . cdk . aromaticity . Aromaticity . cdkLegacy ( ) . apply ( mol ) ; org . openscience . cdk . aromaticity . Aromaticity . cdkLegacy ( ) . apply ( frag1 ) ; if ( standAlone ) { System . out . println ( ( "Cyclohexene<sp>is<sp>a<sp>subgraph<sp>of<sp>alpha-Pinen:<sp>" + ( uiTester . isSubgraph ( mol , frag1 ) ) ) ) ; } else { "<AssertPlaceHolder>" ; } } isSubgraph ( org . openscience . cdk . interfaces . IAtomContainer , org . openscience . cdk . interfaces . IAtomContainer ) { if ( g1 instanceof org . openscience . cdk . isomorphism . matchers . IQueryAtomContainer ) throw new org . openscience . cdk . exception . CDKException ( "The<sp>first<sp>IAtomContainer<sp>must<sp>not<sp>be<sp>an<sp>IQueryAtomContainer" ) ; if ( ( g2 . getAtomCount ( ) ) > ( g1 . getAtomCount ( ) ) ) return false ; if ( ( g2 . getAtomCount ( ) ) == 1 ) { org . openscience . cdk . interfaces . IAtom atom = g2 . getAtom ( 0 ) ; for ( int i = 0 ; i < ( g1 . getAtomCount ( ) ) ; i ++ ) { org . openscience . cdk . interfaces . IAtom atom2 = g1 . getAtom ( i ) ; if ( atom instanceof org . openscience . cdk . isomorphism . matchers . IQueryAtom ) { org . openscience . cdk . isomorphism . matchers . IQueryAtom qAtom = ( ( org . openscience . cdk . isomorphism . matchers . IQueryAtom ) ( atom ) ) ; if ( qAtom . matches ( atom2 ) ) return true ; } else if ( atom2 instanceof org . openscience . cdk . isomorphism . matchers . IQueryAtom ) { org . openscience . cdk . isomorphism . matchers . IQueryAtom qAtom = ( ( org . openscience . cdk . isomorphism . matchers . IQueryAtom ) ( atom2 ) ) ; if ( qAtom . matches ( atom ) ) return true ; } else { if ( atom2 . getSymbol ( ) . equals ( atom . getSymbol ( ) ) ) return true ; } } return false ; } if ( ! ( org . openscience . cdk . isomorphism . UniversalIsomorphismTester . testSubgraphHeuristics ( g1 , g2 ) ) ) return false ; return ( getSubgraphMap ( g1 , g2 ) ) != null ; }
org . junit . Assert . assertTrue ( uiTester . isSubgraph ( mol , frag1 ) )
testGetBooleanReplaceValue ( ) { v8 . executeVoidScript ( "x<sp>=<sp>true;<sp>x<sp>=<sp>false" ) ; boolean result = v8 . getBoolean ( "x" ) ; "<AssertPlaceHolder>" ; } getBoolean ( java . lang . String ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertFalse ( result )
shouldAddMultipleTermsFromRedisOnSrandmemberCommandWithExplicitCount ( ) { when ( localParamsMock . get ( "command" ) ) . thenReturn ( "srandmember" ) ; when ( localParamsMock . get ( "key" ) ) . thenReturn ( "simpleKey" ) ; when ( localParamsMock . get ( "count" ) ) . thenReturn ( "2" ) ; when ( localParamsMock . get ( QueryParsing . V ) ) . thenReturn ( "string_field" ) ; when ( jedisMock . srandmember ( anyString ( ) , anyInt ( ) ) ) . thenReturn ( com . sematext . solr . redis . Arrays . asList ( "123" , "321" ) ) ; when ( requestMock . getSchema ( ) ) . thenReturn ( schema ) ; when ( schema . getQueryAnalyzer ( ) ) . thenReturn ( new org . apache . lucene . analysis . standard . StandardAnalyzer ( ) ) ; redisQParser = new com . sematext . solr . redis . RedisQParser ( "string_field" , localParamsMock , paramsMock , requestMock , commandHandler ) ; final org . apache . lucene . search . Query query = redisQParser . parse ( ) ; verify ( jedisMock ) . srandmember ( "simpleKey" , 2 ) ; org . apache . lucene . search . IndexSearcher searcher = new org . apache . lucene . search . IndexSearcher ( new org . apache . lucene . index . MultiReader ( ) ) ; final com . sematext . solr . redis . Set < org . apache . lucene . index . Term > terms = com . sematext . solr . redis . TestRedisQParser . extractTerms ( searcher , query ) ; "<AssertPlaceHolder>" ; } extractTerms ( org . apache . lucene . search . IndexSearcher , org . apache . lucene . search . Query ) { final com . sematext . solr . redis . Set < org . apache . lucene . index . Term > terms = new com . sematext . solr . redis . HashSet ( ) ; org . apache . lucene . search . Query rewrittenQuery = searcher . rewrite ( query ) ; if ( rewrittenQuery instanceof org . apache . lucene . search . ConstantScoreQuery ) { org . apache . lucene . search . ConstantScoreQuery constantScoreQuery = ( ( org . apache . lucene . search . ConstantScoreQuery ) ( rewrittenQuery ) ) ; rewrittenQuery = constantScoreQuery . getQuery ( ) ; } searcher . createNormalizedWeight ( rewrittenQuery , true ) . extractTerms ( terms ) ; return terms ; }
org . junit . Assert . assertEquals ( 2 , terms . size ( ) )
shouldMatchWhenIndexesOverlap ( ) { final org . pitest . mutationtest . engine . MutationIdentifier a = new org . pitest . mutationtest . engine . MutationIdentifier ( org . pitest . mutationtest . LocationMother . aLocation ( ) . build ( ) , new java . util . HashSet ( java . util . Arrays . asList ( 1 , 2 ) ) , "M" ) ; final org . pitest . mutationtest . engine . MutationIdentifier b = new org . pitest . mutationtest . engine . MutationIdentifier ( org . pitest . mutationtest . LocationMother . aLocation ( ) . build ( ) , 1 , "M" ) ; "<AssertPlaceHolder>" ; } matches ( org . pitest . mutationtest . engine . MutationDetails ) { return value . getId ( ) . getLocation ( ) . getMethodName ( ) . name ( ) . equals ( name ) ; }
org . junit . Assert . assertTrue ( a . matches ( b ) )
testResetDurabilityNullLevel ( ) { mock . setTransactionSettings ( settings . withDurability ( DurabilityLevel . QUORUM ) . withDurability ( ( ( com . franz . agraph . repository . repl . DurabilityLevel ) ( null ) ) ) ) ; mock . size ( ) ; "<AssertPlaceHolder>" ; } getReplHeader ( ) { if ( ( lastHeaders ) == null ) { return null ; } for ( final org . apache . commons . httpclient . Header header : lastHeaders ) { if ( header . getName ( ) . equalsIgnoreCase ( AGProtocol . X_REPL_SETTINGS ) ) { return header . getValue ( ) ; } } return null ; }
org . junit . Assert . assertNull ( getReplHeader ( ) )
testBspFail ( ) { if ( ! ( runningInDistributedMode ( ) ) ) { System . out . println ( "testBspFail:<sp>not<sp>executed<sp>for<sp>local<sp>setup." ) ; return ; } org . apache . giraph . conf . GiraphConfiguration conf = new org . apache . giraph . conf . GiraphConfiguration ( ) ; conf . setComputationClass ( org . apache . giraph . examples . SimpleFailComputation . class ) ; conf . setVertexInputFormatClass ( org . apache . giraph . examples . SimplePageRankComputation . SimplePageRankVertexInputFormat . class ) ; org . apache . giraph . job . GiraphJob job = prepareJob ( getCallingMethodName ( ) , conf , getTempPath ( getCallingMethodName ( ) ) ) ; job . getConfiguration ( ) . setInt ( "mapred.map.max.attempts" , 1 ) ; "<AssertPlaceHolder>" ; } run ( boolean ) { setIntConfIfDefault ( "mapreduce.job.counters.limit" , 512 ) ; setIntConfIfDefault ( "mapred.job.map.memory.mb" , 1024 ) ; setIntConfIfDefault ( "mapred.job.reduce.memory.mb" , 0 ) ; giraphConfiguration . setBoolean ( "mapred.map.tasks.speculative.execution" , false ) ; org . apache . hadoop . ipc . Client . setPingInterval ( giraphConfiguration , ( 60000 * 5 ) ) ; giraphConfiguration . setBoolean ( "Waiting<sp>for<sp>resources...<sp>Job<sp>will<sp>start<sp>only<sp>when<sp>it<sp>gets<sp>all<sp>" 5 , true ) ; giraphConfiguration . setBoolean ( "Waiting<sp>for<sp>resources...<sp>Job<sp>will<sp>start<sp>only<sp>when<sp>it<sp>gets<sp>all<sp>" 1 , true ) ; if ( ( giraphConfiguration . getCheckpointFrequency ( ) ) == 0 ) { int oldMaxTaskAttempts = giraphConfiguration . getMaxTaskAttempts ( ) ; giraphConfiguration . setMaxTaskAttempts ( 1 ) ; if ( org . apache . giraph . job . GiraphJob . LOG . isInfoEnabled ( ) ) { org . apache . giraph . job . GiraphJob . LOG . info ( ( ( ( ( ( ( "Waiting<sp>for<sp>resources...<sp>Job<sp>will<sp>start<sp>only<sp>when<sp>it<sp>gets<sp>all<sp>" 0 + "do<sp>not<sp>allow<sp>any<sp>task<sp>retries<sp>(setting<sp>" ) + ( GiraphConstants . MAX_TASK_ATTEMPTS . getKey ( ) ) ) + "<sp>=<sp>1,<sp>" ) + "Waiting<sp>for<sp>resources...<sp>Job<sp>will<sp>start<sp>only<sp>when<sp>it<sp>gets<sp>all<sp>" 2 ) + oldMaxTaskAttempts ) + ")" ) ) ; } } org . apache . giraph . conf . ImmutableClassesGiraphConfiguration conf = new org . apache . giraph . conf . ImmutableClassesGiraphConfiguration ( giraphConfiguration ) ; org . apache . giraph . job . GiraphJob . checkLocalJobRunnerConfiguration ( conf ) ; int tryCount = 0 ; org . apache . giraph . job . GiraphJobRetryChecker retryChecker = conf . getJobRetryChecker ( ) ; while ( true ) { org . apache . giraph . job . GiraphJobObserver jobObserver = conf . getJobObserver ( ) ; org . apache . giraph . job . JobProgressTrackerService jobProgressTrackerService = org . apache . giraph . job . DefaultJobProgressTrackerService . createJobProgressTrackerService ( conf , jobObserver ) ; org . apache . giraph . job . ClientThriftServer clientThriftServer = null ; if ( jobProgressTrackerService != null ) { clientThriftServer = new org . apache . giraph . job . ClientThriftServer ( conf , com . google . common . collect . ImmutableList . of ( jobProgressTrackerService ) ) ; } tryCount ++ ; org . apache . hadoop . mapreduce . Job submittedJob = new org . apache . hadoop . mapreduce . Job ( conf , jobName ) ; if ( ( submittedJob . getJar ( ) ) == null ) { submittedJob . setJarByClass ( getClass ( ) ) ; } submittedJob . setNumReduceTasks ( 0 ) ; submittedJob . setMapperClass ( org . apache . giraph . graph . GraphMapper . class ) ; submittedJob . setInputFormatClass ( org . apache . giraph . bsp . BspInputFormat . class ) ; submittedJob . setOutputFormatClass ( GiraphConstants . HADOOP_OUTPUT_FORMAT_CLASS . get ( conf ) ) ; if ( jobProgressTrackerService != null ) { jobProgressTrackerService . setJob ( submittedJob ) ; } jobObserver . launchingJob ( submittedJob ) ; submittedJob . submit ( ) ; if ( org . apache . giraph . job . GiraphJob . LOG . isInfoEnabled ( ) ) { org . apache . giraph . job . GiraphJob . LOG . info ( ( "Tracking<sp>URL:<sp>" + ( submittedJob . getTrackingURL ( ) ) ) ) ; org . apache . giraph . job . GiraphJob . LOG . info ( ( ( "Waiting<sp>for<sp>resources...<sp>Job<sp>will<sp>start<sp>only<sp>when<sp>it<sp>gets<sp>all<sp>" + ( ( conf . getMinWorkers ( ) ) + 1 ) ) + "Waiting<sp>for<sp>resources...<sp>Job<sp>will<sp>start<sp>only<sp>when<sp>it<sp>gets<sp>all<sp>" 3 ) ) ; } jobObserver . jobRunning ( submittedJob ) ; org . apache . giraph . job . HaltApplicationUtils . printHaltInfo ( submittedJob , conf ) ; boolean passed = submittedJob . waitForCompletion ( verbose ) ; if ( jobProgressTrackerService != null ) { jobProgressTrackerService . stop ( passed ) ; } if ( clientThriftServer != null ) { clientThriftServer . stopThriftServer ( ) ; } jobObserver . jobFinished ( submittedJob , passed ) ; if ( ! passed ) { java . lang . String restartFrom = retryChecker . shouldRestartCheckpoint ( submittedJob ) ; if ( restartFrom != null ) { GiraphConstants . RESTART_JOB_ID . set ( conf , restartFrom ) ; continue ; } } if ( passed || ( ! ( retryChecker . shouldRetry ( submittedJob , tryCount ) ) ) ) { return passed ; } if ( org . apache . giraph . job . GiraphJob . LOG . isInfoEnabled ( ) ) { org . apache . giraph . job . GiraphJob . LOG . info ( ( ( "Waiting<sp>for<sp>resources...<sp>Job<sp>will<sp>start<sp>only<sp>when<sp>it<sp>gets<sp>all<sp>" 4 + tryCount ) + "<sp>try" ) ) ; } } }
org . junit . Assert . assertTrue ( ( ! ( job . run ( true ) ) ) )
testParallelRollout ( ) { final com . spotify . helios . common . descriptors . DeploymentGroup deploymentGroup = com . spotify . helios . common . descriptors . DeploymentGroup . newBuilder ( ) . setRolloutOptions ( com . spotify . helios . common . descriptors . RolloutOptions . newBuilder ( ) . setParallelism ( 2 ) . build ( ) ) . build ( ) ; final com . spotify . helios . rollingupdate . RolloutPlanner rolloutPlanner = com . spotify . helios . rollingupdate . RollingUpdatePlanner . of ( deploymentGroup ) ; final java . util . List < com . spotify . helios . common . descriptors . RolloutTask > tasks = rolloutPlanner . plan ( com . spotify . helios . rollingupdate . RollingUpdatePlannerTest . HOSTS ) ; final java . util . List < com . spotify . helios . common . descriptors . RolloutTask > expected = com . google . common . collect . Lists . newArrayList ( com . spotify . helios . common . descriptors . RolloutTask . of ( RolloutTask . Action . UNDEPLOY_OLD_JOBS , "agent1" ) , com . spotify . helios . common . descriptors . RolloutTask . of ( RolloutTask . Action . DEPLOY_NEW_JOB , "agent1" ) , com . spotify . helios . common . descriptors . RolloutTask . of ( RolloutTask . Action . UNDEPLOY_OLD_JOBS , "agent2" ) , com . spotify . helios . common . descriptors . RolloutTask . of ( RolloutTask . Action . DEPLOY_NEW_JOB , "agent2" ) , com . spotify . helios . common . descriptors . RolloutTask . of ( RolloutTask . Action . AWAIT_RUNNING , "agent1" ) , com . spotify . helios . common . descriptors . RolloutTask . of ( RolloutTask . Action . AWAIT_RUNNING , "agent2" ) , com . spotify . helios . common . descriptors . RolloutTask . of ( RolloutTask . Action . UNDEPLOY_OLD_JOBS , "agent3" ) , com . spotify . helios . common . descriptors . RolloutTask . of ( RolloutTask . Action . DEPLOY_NEW_JOB , "agent3" ) , com . spotify . helios . common . descriptors . RolloutTask . of ( RolloutTask . Action . UNDEPLOY_OLD_JOBS , "agent4" ) , com . spotify . helios . common . descriptors . RolloutTask . of ( RolloutTask . Action . DEPLOY_NEW_JOB , "agent4" ) , com . spotify . helios . common . descriptors . RolloutTask . of ( RolloutTask . Action . AWAIT_RUNNING , "agent3" ) , com . spotify . helios . common . descriptors . RolloutTask . of ( RolloutTask . Action . AWAIT_RUNNING , "agent4" ) ) ; "<AssertPlaceHolder>" ; } of ( com . spotify . helios . common . descriptors . RolloutTask$Action , java . lang . String ) { return new com . spotify . helios . common . descriptors . RolloutTask ( action , target ) ; }
org . junit . Assert . assertEquals ( expected , tasks )
testWebsocketVersion ( ) { props . setProperty ( "KETTLE_AEL_PDI_DAEMON_VERSION" , "2.0" ) ; when ( meta . getVariable ( "engine" ) ) . thenReturn ( "spark" ) ; when ( meta . getVariable ( "engine.host" ) ) . thenReturn ( "hostname" ) ; when ( meta . getVariable ( "engine.port" ) ) . thenReturn ( "8080" ) ; when ( meta . nrTransHops ( ) ) . thenReturn ( 0 ) ; when ( meta . getTransHop ( 0 ) ) . thenReturn ( transHopMeta ) ; when ( meta . realClone ( false ) ) . thenReturn ( meta ) ; when ( transHopMeta . isEnabled ( ) ) . thenReturn ( false ) ; transSupplier = new org . pentaho . di . trans . TransSupplier ( meta , log , fallbackSupplier ) ; org . pentaho . di . trans . Trans transRet = transSupplier . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( org . pentaho . di . core . util . Utils . isEmpty ( transMeta . getVariable ( "engine" ) ) ) { log . logBasic ( "Using<sp>legacy<sp>execution<sp>engine" ) ; return fallbackSupplier . get ( ) ; } org . pentaho . di . core . variables . Variables variables = new org . pentaho . di . core . variables . Variables ( ) ; variables . initializeVariablesFrom ( null ) ; java . lang . String protocol = transMeta . getVariable ( "engine.protocol" ) ; java . lang . String host = transMeta . getVariable ( "engine.host" ) ; java . lang . String port = transMeta . getVariable ( "engine.port" ) ; boolean ssl = ( "https" . equalsIgnoreCase ( protocol ) ) || ( "wss" . equalsIgnoreCase ( protocol ) ) ; return new org . pentaho . di . trans . ael . websocket . TransWebSocketEngineAdapter ( transMeta , host , port , ssl ) ; }
org . junit . Assert . assertTrue ( ( transRet instanceof org . pentaho . di . trans . ael . websocket . TransWebSocketEngineAdapter ) )
testXmlSerialization007 ( ) { org . apache . log4j . Logger . getLogger ( getClass ( ) ) . debug ( ( "TEST<sp>" + ( name . getMethodName ( ) ) ) ) ; org . ihtsdo . tutorial . util . XmlSerializationTester tester = new org . ihtsdo . tutorial . util . XmlSerializationTester ( object ) ; tester . proxy ( org . ihtsdo . tutorial . rf2 . ConceptRef . class , 1 , c1 ) ; tester . proxy ( org . ihtsdo . tutorial . rf2 . ConceptRef . class , 2 , c2 ) ; tester . proxy ( org . ihtsdo . tutorial . rf2 . Membership . class , 1 , m1 ) ; tester . proxy ( org . ihtsdo . tutorial . rf2 . Membership . class , 2 , m2 ) ; tester . proxy ( org . ihtsdo . tutorial . rf2 . Language . class , 1 , l1 ) ; tester . proxy ( org . ihtsdo . tutorial . rf2 . Language . class , 2 , l2 ) ; tester . proxy ( org . ihtsdo . tutorial . rf2 . Description . class , 1 , d1 ) ; tester . proxy ( org . ihtsdo . tutorial . rf2 . Description . class , 2 , d2 ) ; tester . proxy ( org . ihtsdo . tutorial . rf2 . Relationship . class , 1 , r1 ) ; tester . proxy ( org . ihtsdo . tutorial . rf2 . Relationship . class , 2 , r2 ) ; "<AssertPlaceHolder>" ; } testXmlSerialization ( ) { org . apache . log4j . Logger . getLogger ( getClass ( ) ) . debug ( ( "Test<sp>xml<sp>serialization<sp>-<sp>" + ( clazz . getName ( ) ) ) ) ; java . lang . Object obj = createObject ( 1 ) ; org . apache . log4j . Logger . getLogger ( getClass ( ) ) . debug ( obj ) ; java . lang . String xml = org . ihtsdo . tutorial . util . Utility . getStringForGraph ( obj ) ; org . apache . log4j . Logger . getLogger ( getClass ( ) ) . debug ( ( "xml<sp>=<sp>" + xml ) ) ; java . lang . Object obj2 = org . ihtsdo . tutorial . util . Utility . getGraphForString ( xml , obj . getClass ( ) ) ; java . lang . String json = org . ihtsdo . tutorial . util . Utility . getJsonForGraph ( obj ) ; org . apache . log4j . Logger . getLogger ( getClass ( ) ) . debug ( ( "json<sp>=<sp>" + json ) ) ; java . lang . Object obj3 = org . ihtsdo . tutorial . util . Utility . getGraphForJson ( json , obj . getClass ( ) ) ; org . apache . log4j . Logger . getLogger ( getClass ( ) ) . debug ( obj ) ; org . apache . log4j . Logger . getLogger ( getClass ( ) ) . debug ( obj2 ) ; org . apache . log4j . Logger . getLogger ( getClass ( ) ) . debug ( obj3 ) ; try { final java . lang . reflect . Method method = obj . getClass ( ) . getMethod ( "getId" , new java . lang . Class < ? > [ ] { } ) ; if ( ( method != null ) && ( ( method . getReturnType ( ) ) == ( org . ihtsdo . tutorial . util . Long . class ) ) ) { final java . lang . Long id1 = ( ( java . lang . Long ) ( method . invoke ( obj , new java . lang . Object [ ] { } ) ) ) ; final java . lang . Long id2 = ( ( java . lang . Long ) ( method . invoke ( obj2 , new java . lang . Object [ ] { } ) ) ) ; final java . lang . Long id3 = ( ( java . lang . Long ) ( method . invoke ( obj3 , new java . lang . Object [ ] { } ) ) ) ; if ( ( ! ( id1 . equals ( id2 ) ) ) || ( ! ( id2 . equals ( id3 ) ) ) ) { org . apache . log4j . Logger . getLogger ( getClass ( ) ) . debug ( ( ( ( ( ( "<sp>id<sp>fields<sp>do<sp>not<sp>match<sp>" + id1 ) + ",<sp>" ) + id2 ) + ",<sp>" ) + id3 ) ) ; return false ; } } } catch ( java . lang . NoSuchMethodException e ) { } return ( obj . equals ( obj2 ) ) && ( obj . equals ( obj3 ) ) ; }
org . junit . Assert . assertTrue ( tester . testXmlSerialization ( ) )
testGetBusinessObjectDataVersions ( ) { org . finra . herd . model . api . xml . BusinessObjectDataKey businessObjectDataKey = new org . finra . herd . model . api . xml . BusinessObjectDataKey ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , PARTITION_VALUE , SUBPARTITION_VALUES , DATA_VERSION ) ; java . lang . String delimitedSubPartitionValues = java . lang . String . join ( "|" , org . finra . herd . rest . SUBPARTITION_VALUES ) ; org . finra . herd . model . api . xml . BusinessObjectDataVersions businessObjectDataVersions = new org . finra . herd . model . api . xml . BusinessObjectDataVersions ( java . util . Arrays . asList ( new org . finra . herd . model . api . xml . BusinessObjectDataVersion ( ) ) ) ; when ( herdStringHelper . splitStringWithDefaultDelimiterEscaped ( delimitedSubPartitionValues ) ) . thenReturn ( org . finra . herd . rest . SUBPARTITION_VALUES ) ; when ( businessObjectDataService . getBusinessObjectDataVersions ( businessObjectDataKey ) ) . thenReturn ( businessObjectDataVersions ) ; org . finra . herd . model . api . xml . BusinessObjectDataVersions result = businessObjectDataRestController . getBusinessObjectDataVersions ( org . finra . herd . rest . BDEF_NAMESPACE , org . finra . herd . rest . BDEF_NAME , org . finra . herd . rest . FORMAT_USAGE_CODE , org . finra . herd . rest . FORMAT_FILE_TYPE_CODE , org . finra . herd . rest . PARTITION_VALUE , delimitedSubPartitionValues , org . finra . herd . rest . FORMAT_VERSION , org . finra . herd . rest . DATA_VERSION ) ; verify ( herdStringHelper ) . splitStringWithDefaultDelimiterEscaped ( delimitedSubPartitionValues ) ; verify ( businessObjectDataService ) . getBusinessObjectDataVersions ( businessObjectDataKey ) ; verifyNoMoreInteractionsHelper ( ) ; "<AssertPlaceHolder>" ; } verifyNoMoreInteractionsHelper ( ) { verifyNoMoreInteractions ( awsHelper , javaPropertiesHelper , retryPolicyFactory , s3Operations ) ; }
org . junit . Assert . assertEquals ( businessObjectDataVersions , result )
deveObterCnpjComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral retorno = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral ( ) ; retorno . setCnpj ( "28087726000122" ) ; "<AssertPlaceHolder>" ; } getCnpj ( ) { return this . cnpj ; }
org . junit . Assert . assertEquals ( "28087726000122" , retorno . getCnpj ( ) )
testIsConditionalInputs ( ) { org . talend . components . filterrow . TFilterRowDefinition definition = new org . talend . components . filterrow . TFilterRowDefinition ( ) ; boolean result = definition . isConditionalInputs ( ) ; "<AssertPlaceHolder>" ; } isConditionalInputs ( ) { return false ; }
org . junit . Assert . assertTrue ( result )
theOneThatFailedWithTheOldCounting ( ) { org . eclipse . elk . alg . layered . graph . LNode [ ] leftNodes = addNodesToLayer ( 4 , makeLayer ( getGraph ( ) ) ) ; org . eclipse . elk . alg . layered . graph . LNode [ ] middleNodes = addNodesToLayer ( 5 , makeLayer ( getGraph ( ) ) ) ; setFixedOrderConstraint ( middleNodes [ 4 ] ) ; for ( int i = 3 ; i >= 0 ; -- i ) { addNorthSouthEdge ( PortSide . NORTH , middleNodes [ 4 ] , middleNodes [ i ] , leftNodes [ i ] , false ) ; } int crossingCount = initCounterForLayerWithIndexAndCountInLayer ( 1 ) ; "<AssertPlaceHolder>" ; } initCounterForLayerWithIndexAndCountInLayer ( int ) { setUpIds ( ) ; int numPorts = 0 ; for ( org . eclipse . elk . alg . layered . graph . Layer l : getGraph ( ) ) { for ( org . eclipse . elk . alg . layered . graph . LNode lNode : l ) { numPorts += lNode . getPorts ( ) . size ( ) ; } } org . eclipse . elk . alg . layered . p3order . counting . CrossingsCounter counter = new org . eclipse . elk . alg . layered . p3order . counting . CrossingsCounter ( new int [ numPorts ] ) ; return counter . countNorthSouthPortCrossingsInLayer ( getGraph ( ) . toNodeArray ( ) [ layerIndex ] ) ; }
org . junit . Assert . assertThat ( crossingCount , org . hamcrest . CoreMatchers . is ( 0 ) )
shouldReadAndWriteConsistentValues ( ) { org . neo4j . values . storable . Value [ ] values = new org . neo4j . values . storable . Value [ ] { org . neo4j . values . storable . DateTimeValue . datetime ( 9999 , 100 , java . time . ZoneId . of ( "+18:00" ) ) , org . neo4j . values . storable . DateTimeValue . datetime ( 10000 , 100 , java . time . ZoneId . of ( "-18:00" ) ) , org . neo4j . values . storable . DateTimeValue . datetime ( 10000 , 100 , java . time . ZoneOffset . of ( "-17:59:59" ) ) , org . neo4j . values . storable . DateTimeValue . datetime ( 10000 , 100 , java . time . ZoneId . of ( "UTC" ) ) , org . neo4j . values . storable . DateTimeValue . datetime ( 10000 , 100 , java . time . ZoneId . of ( "+01:00" ) ) , org . neo4j . values . storable . DateTimeValue . datetime ( 10000 , 100 , java . time . ZoneId . of ( "Europe/Stockholm" ) ) , org . neo4j . values . storable . DateTimeValue . datetime ( 10000 , 100 , java . time . ZoneId . of ( "+03:00" ) ) , org . neo4j . values . storable . DateTimeValue . datetime ( 10000 , 101 , java . time . ZoneId . of ( "-18:00" ) ) } ; org . neo4j . kernel . impl . index . schema . ZonedDateTimeLayout layout = new org . neo4j . kernel . impl . index . schema . ZonedDateTimeLayout ( ) ; org . neo4j . io . pagecache . PageCursor cursor = new org . neo4j . io . pagecache . StubPageCursor ( 0 , ( 8 * 1024 ) ) ; org . neo4j . kernel . impl . index . schema . ZonedDateTimeIndexKey writeKey = layout . newKey ( ) ; org . neo4j . kernel . impl . index . schema . ZonedDateTimeIndexKey readKey = layout . newKey ( ) ; for ( org . neo4j . values . storable . Value value : values ) { value . writeTo ( writeKey ) ; layout . writeKey ( cursor , writeKey ) ; } cursor . setOffset ( 0 ) ; for ( org . neo4j . values . storable . Value value : values ) { layout . readKey ( cursor , readKey , ZonedDateTimeIndexKey . SIZE ) ; "<AssertPlaceHolder>" ; } } asValue ( ) { if ( org . neo4j . values . storable . TimeZones . validZoneOffset ( zoneOffsetSeconds ) ) { return org . neo4j . values . storable . TimeValue . time ( nanosOfDayUTC , java . time . ZoneOffset . ofTotalSeconds ( zoneOffsetSeconds ) ) ; } return NO_VALUE ; }
org . junit . Assert . assertEquals ( value , readKey . asValue ( ) )
testGetSetPath ( ) { java . lang . String expectedPath = "testPath" ; com . microsoft . windowsazure . services . media . models . LocatorInfo locatorInfo = new com . microsoft . windowsazure . services . media . models . LocatorInfo ( null , new com . microsoft . windowsazure . services . media . implementation . content . LocatorRestType ( ) . setPath ( expectedPath ) ) ; java . lang . String actualPath = locatorInfo . getPath ( ) ; "<AssertPlaceHolder>" ; } getPath ( ) { return this . path ; }
org . junit . Assert . assertEquals ( expectedPath , actualPath )
shouldReturnFalseForBackSlash ( ) { boolean start = edu . stanford . bmir . protege . web . shared . entity . EntityNameUtils . isWordStart ( "\\" , 0 ) ; "<AssertPlaceHolder>" ; } isWordStart ( java . lang . String , int ) { checkNotNull ( entityName ) ; int length = entityName . length ( ) ; checkElementIndex ( index , length ) ; edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType indexCharType = edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . getType ( entityName , index ) ; if ( ! ( indexCharType . isWordLetter ( ) ) ) { return false ; } if ( index == 0 ) { return true ; } edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType prevCharType = edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . getType ( entityName , ( index - 1 ) ) ; if ( prevCharType != indexCharType ) { return ! ( ( indexCharType == ( EntityNameCharType . LETTER ) ) && ( prevCharType == ( EntityNameCharType . UPPER_CASE_LETTER ) ) ) ; } if ( indexCharType == ( EntityNameCharType . UPPER_CASE_LETTER ) ) { boolean hasFollowingCharacter = index < ( length - 1 ) ; return hasFollowingCharacter && ( ( edu . stanford . bmir . protege . web . shared . entity . EntityNameCharType . getType ( entityName , ( index + 1 ) ) ) == ( EntityNameCharType . LETTER ) ) ; } return false ; }
org . junit . Assert . assertEquals ( false , start )
testGetSubtreeSize ( ) { org . intelligentjava . algos . trees . AbstractBinarySearchTree . Node root = new org . intelligentjava . algos . trees . AbstractBinarySearchTree . Node ( 4 , null , null , null ) ; org . intelligentjava . algos . trees . AbstractBinarySearchTree . Node rightChild = new org . intelligentjava . algos . trees . AbstractBinarySearchTree . Node ( 6 , root , null , null ) ; root . right = rightChild ; org . intelligentjava . algos . trees . AbstractBinarySearchTree . Node leftGrandChild = new org . intelligentjava . algos . trees . AbstractBinarySearchTree . Node ( 5 , rightChild , null , null ) ; org . intelligentjava . algos . trees . AbstractBinarySearchTree . Node rightGrandChild = new org . intelligentjava . algos . trees . AbstractBinarySearchTree . Node ( 7 , rightChild , null , null ) ; rightChild . left = leftGrandChild ; rightChild . right = rightGrandChild ; org . intelligentjava . algos . trees . ScapegoatTree tree = new org . intelligentjava . algos . trees . ScapegoatTree ( ) ; "<AssertPlaceHolder>" ; } getSubtreeSize ( org . intelligentjava . algos . trees . Node ) { if ( node == null ) { return 0 ; } if ( node . isLeaf ( ) ) { return 1 ; } else { int sum = 1 ; sum += getSubtreeSize ( node . left ) ; sum += getSubtreeSize ( node . right ) ; return sum ; } }
org . junit . Assert . assertEquals ( tree . getSubtreeSize ( root ) , 4 )
testScriptPath ( ) { executeMojo . sourceEncoding = "UTF-8" ; java . io . File file = new java . io . File ( "target/testFile.txt" ) ; java . lang . String line = "Hello<sp>world!" ; executeMojo . scripts = new java . lang . String [ ] { new java . io . File ( "src/test/resources/testScript.groovy" ) . getCanonicalPath ( ) } ; java . lang . String actualLine ; try { executeMojo . execute ( ) ; } finally { java . io . BufferedReader reader = new java . io . BufferedReader ( new java . io . FileReader ( file ) ) ; actualLine = reader . readLine ( ) ; org . codehaus . gmavenplus . util . FileUtils . closeQuietly ( reader ) ; file . delete ( ) ; } "<AssertPlaceHolder>" ; } closeQuietly ( org . codehaus . gmavenplus . util . InputStream ) { if ( inputStream != null ) { try { inputStream . close ( ) ; } catch ( org . codehaus . gmavenplus . util . IOException e ) { } } }
org . junit . Assert . assertEquals ( line , actualLine )
shouldCloseTransactionOnRollback ( ) { org . neo4j . bolt . runtime . BoltStateMachine machine = env . newMachine ( org . neo4j . bolt . v1 . runtime . integration . BoltConnectionIT . BOLT_CHANNEL ) ; machine . process ( new org . neo4j . bolt . v1 . messaging . request . InitMessage ( org . neo4j . bolt . v1 . runtime . integration . BoltConnectionIT . USER_AGENT , emptyMap ( ) ) , nullResponseHandler ( ) ) ; runAndPull ( machine , "BEGIN" ) ; runAndPull ( machine , "RETURN<sp>1" ) ; runAndPull ( machine , "ROLLBACK" ) ; "<AssertPlaceHolder>" ; } hasTransaction ( org . neo4j . bolt . runtime . BoltStateMachine ) { return ( ( org . neo4j . bolt . v1 . runtime . BoltStateMachineV1 ) ( machine ) ) . statementProcessor ( ) . hasTransaction ( ) ; }
org . junit . Assert . assertFalse ( org . neo4j . bolt . v1 . runtime . integration . BoltConnectionIT . hasTransaction ( machine ) )
testFindFirstSourceProduct ( ) { org . esa . snap . core . datamodel . Product toBeClosedProduct = new org . esa . snap . core . datamodel . Product ( "ToBeClosed" , "Type" , 100 , 100 ) ; org . esa . snap . core . datamodel . Product dependentProduct = createDependentProduct ( toBeClosedProduct ) ; java . util . HashSet < org . esa . snap . core . datamodel . Product > stillOpen = new java . util . HashSet ( java . util . Collections . singletonList ( dependentProduct ) ) ; org . esa . snap . core . datamodel . Product firstSourceProduct = org . esa . snap . rcp . actions . file . CloseProductAction . findFirstSourceProduct ( toBeClosedProduct , stillOpen ) ; "<AssertPlaceHolder>" ; } findFirstSourceProduct ( org . esa . snap . core . datamodel . Product , java . util . Set ) { org . esa . snap . core . datamodel . Product firstSourceProduct = org . esa . snap . rcp . actions . file . CloseProductAction . findFirstDirectSourceProduct ( productToClose , productsStillOpen ) ; if ( firstSourceProduct != null ) { return firstSourceProduct ; } return org . esa . snap . rcp . actions . file . CloseProductAction . findFirstExpressionSourceProduct ( productToClose , productsStillOpen ) ; }
org . junit . Assert . assertEquals ( dependentProduct , firstSourceProduct )