input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testGetAdapter_Proxy ( ) { org . apache . cayenne . di . Provider < org . apache . cayenne . dba . DbAdapter > adapterProvider = mock ( org . apache . cayenne . di . Provider . class ) ; when ( adapterProvider . get ( ) ) . thenReturn ( dataNode . getAdapter ( ) ) ; org . apache . cayenne . dba . AutoAdapter adapter = new org . apache . cayenne . dba . AutoAdapter ( adapterProvider , org . apache . cayenne . log . NoopJdbcEventLogger . getInstance ( ) ) ; org . apache . cayenne . dba . DbAdapter detected = adapter . getAdapter ( ) ; "<AssertPlaceHolder>" ; } getAdapter ( ) { return adapter ; }
|
org . junit . Assert . assertSame ( dataNode . getAdapter ( ) , detected )
|
getHelp ( ) { java . lang . String [ ] help = new java . lang . String [ ] { "Help<sp>1" , "Help<sp>2" , "Help<sp>3" } ; when ( expr . getHelp ( ) ) . thenReturn ( help ) ; "<AssertPlaceHolder>" ; verify ( expr ) . getHelp ( ) ; verifyNoMoreInteractions ( expr ) ; } getHelp ( ) { if ( ( this . help ) == null ) { this . help = new org . apache . hadoop . fs . FsShell . Help ( ) ; } return this . help ; }
|
org . junit . Assert . assertArrayEquals ( help , test . getHelp ( ) )
|
testToArrayValueMapNull ( ) { "<AssertPlaceHolder>" ; } toArrayValueMap ( java . util . Map ) { if ( com . feilong . core . Validator . isNullOrEmpty ( singleValueMap ) ) { return java . util . Collections . emptyMap ( ) ; } java . util . Map < K , java . lang . String [ ] > arrayValueMap = com . feilong . core . util . MapUtil . newLinkedHashMap ( singleValueMap . size ( ) ) ; for ( Map . Entry < K , java . lang . String > entry : singleValueMap . entrySet ( ) ) { arrayValueMap . put ( entry . getKey ( ) , toArray ( entry . getValue ( ) ) ) ; } return arrayValueMap ; }
|
org . junit . Assert . assertEquals ( emptyMap ( ) , com . feilong . core . util . MapUtil . toArrayValueMap ( null ) )
|
createCardCoupon ( ) { com . foxinmy . weixin4j . model . card . CouponBaseInfo . Builder builder = com . foxinmy . weixin4j . model . card . CardCoupons . customBase ( ) ; builder . logoUrl ( "logo" ) . brandName ( "" ) . title ( "100" ) ; builder . codeType ( CardCodeType . CODE_TYPE_BARCODE ) . cardColor ( CardColor . Color010 ) ; java . util . Calendar ca = java . util . Calendar . getInstance ( ) ; ca . add ( Calendar . DAY_OF_MONTH , 1 ) ; java . util . Date beginTime = ca . getTime ( ) ; ca . add ( Calendar . DAY_OF_MONTH , 1 ) ; java . util . Date endTime = ca . getTime ( ) ; builder . notice ( "" ) . description ( "" ) . quantity ( 100 ) . activeAt ( beginTime , endTime ) ; com . foxinmy . weixin4j . model . card . CardCoupon coupon = com . foxinmy . weixin4j . model . card . CardCoupons . createGeneralCoupon ( builder , "" ) ; java . lang . String cardId = cardApi . createCardCoupon ( coupon ) ; "<AssertPlaceHolder>" ; } createCardCoupon ( com . foxinmy . weixin4j . model . card . CardCoupon ) { com . alibaba . fastjson . JSONObject content = new com . alibaba . fastjson . JSONObject ( ) ; java . lang . String cardType = cardCoupon . getCardType ( ) . name ( ) ; content . put ( "card_type" , cardType ) ; content . put ( cardType . toLowerCase ( ) , cardCoupon ) ; com . alibaba . fastjson . JSONObject card = new com . alibaba . fastjson . JSONObject ( ) ; card . put ( "card" , content ) ; com . foxinmy . weixin4j . model . Token token = tokenManager . getCache ( ) ; java . lang . String card_create_uri = getRequestUri ( "card_create_uri" ) ; com . foxinmy . weixin4j . http . weixin . WeixinResponse response = weixinExecutor . post ( java . lang . String . format ( card_create_uri , token . getAccessToken ( ) ) , card . toJSONString ( ) ) ; return response . getAsJson ( ) . getString ( "card_id" ) ; }
|
org . junit . Assert . assertNotNull ( cardId )
|
hasMultiPartShouldReturnTrueIfMultipartsAreDetectedInParam ( ) { java . util . Map < java . lang . String , java . lang . Object > metaDatas = java . util . Collections . singletonMap ( "multipart.flag" , new java . lang . Object ( ) ) ; org . codegist . crest . param . Param param = mock ( org . codegist . crest . param . Param . class ) ; org . codegist . crest . config . ParamConfig paramConfig = mock ( org . codegist . crest . config . ParamConfig . class ) ; when ( paramConfig . getMetaDatas ( ) ) . thenReturn ( metaDatas ) ; when ( param . getParamConfig ( ) ) . thenReturn ( paramConfig ) ; "<AssertPlaceHolder>" ; } hasMultiPart ( org . codegist . crest . config . ParamConfig [ ] ) { for ( org . codegist . crest . config . ParamConfig cfg : paramConfigs ) { if ( org . codegist . crest . util . MultiParts . hasMultiPart ( cfg . getMetaDatas ( ) ) ) { return true ; } } return false ; }
|
org . junit . Assert . assertTrue ( org . codegist . crest . util . MultiParts . hasMultiPart ( param ) )
|
saveAll_boolean_Test ( ) { de . bytefish . pgbulkinsert . pgsql . handlers . List < de . bytefish . pgbulkinsert . pgsql . handlers . PgBulkInsertTest . SampleEntity > entities = new de . bytefish . pgbulkinsert . pgsql . handlers . ArrayList ( ) ; de . bytefish . pgbulkinsert . pgsql . handlers . PgBulkInsertTest . SampleEntity entity = new de . bytefish . pgbulkinsert . pgsql . handlers . PgBulkInsertTest . SampleEntity ( ) ; entity . col_boolean = true ; entities . add ( entity ) ; de . bytefish . pgbulkinsert . PgBulkInsert < de . bytefish . pgbulkinsert . pgsql . handlers . PgBulkInsertTest . SampleEntity > pgBulkInsert = new de . bytefish . pgbulkinsert . PgBulkInsert ( new de . bytefish . pgbulkinsert . pgsql . handlers . PgBulkInsertTest . SampleEntityMapping ( ) ) ; pgBulkInsert . saveAll ( de . bytefish . pgbulkinsert . util . PostgreSqlUtils . getPGConnection ( connection ) , entities . stream ( ) ) ; de . bytefish . pgbulkinsert . pgsql . handlers . ResultSet rs = getAll ( ) ; while ( rs . next ( ) ) { boolean v = rs . getBoolean ( "col_boolean" ) ; "<AssertPlaceHolder>" ; } } getAll ( ) { java . lang . String sqlStatement = java . lang . String . format ( "SELECT<sp>*<sp>FROM<sp>%s.unit_test" , schema ) ; java . sql . Statement statement = connection . createStatement ( ) ; return statement . executeQuery ( sqlStatement ) ; }
|
org . junit . Assert . assertEquals ( true , v )
|
testOperationsServerLoadHistory ( ) { org . kaaproject . kaa . server . control . service . loadmgmt . dynamicmgmt . OperationsServerLoadHistory hist = new org . kaaproject . kaa . server . control . service . loadmgmt . dynamicmgmt . OperationsServerLoadHistory ( org . kaaproject . kaa . server . control . service . loadmgmt . OperationsServerLoadHistoryTest . MAX_HISTORY_TIME_LIVE ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( hist )
|
testSerialization ( ) { org . jfree . chart . plot . CombinedDomainXYPlot plot1 = createPlot ( ) ; org . jfree . chart . plot . CombinedDomainXYPlot plot2 = ( ( org . jfree . chart . plot . CombinedDomainXYPlot ) ( org . jfree . chart . TestUtilities . serialised ( plot1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( plot1 , plot2 )
|
toPrimitiveBooleanForNull ( ) { "<AssertPlaceHolder>" ; } toPrimitiveBoolean ( java . lang . Object ) { java . lang . Boolean b = org . slim3 . util . BooleanUtil . toBoolean ( o ) ; if ( b != null ) { return b . booleanValue ( ) ; } return false ; }
|
org . junit . Assert . assertThat ( org . slim3 . util . BooleanUtil . toPrimitiveBoolean ( null ) , org . hamcrest . CoreMatchers . is ( false ) )
|
metricNullNameRateMeter ( ) { org . apache . edgent . test . metrics . MetricsCommonTest . Context < java . lang . Object , java . lang . Object > ctx = new org . apache . edgent . test . metrics . MetricsCommonTest . Context < > ( ) ; org . apache . edgent . metrics . oplets . RateMeter < java . lang . Object > op = new org . apache . edgent . metrics . oplets . RateMeter ( ) ; op . initialize ( ctx ) ; "<AssertPlaceHolder>" ; op . close ( ) ; } getMetricName ( ) { return metricName ; }
|
org . junit . Assert . assertNull ( op . getMetricName ( ) )
|
testConversionOfArrayIntoCollection ( ) { final java . lang . Object [ ] array = new java . lang . Object [ ] { 1 , 2 , 3 } ; final java . util . Set < java . lang . Object > set = net . unicon . cas . mfa . util . MultiFactorUtils . convertValueToCollection ( array ) ; "<AssertPlaceHolder>" ; } convertValueToCollection ( java . lang . Object ) { final java . util . Set < java . lang . Object > c = new java . util . HashSet ( ) ; if ( obj instanceof java . util . Collection ) { c . addAll ( ( ( java . util . Collection < java . lang . Object > ) ( obj ) ) ) ; } else if ( obj instanceof java . util . Map ) { throw new java . lang . UnsupportedOperationException ( ( ( java . util . Map . class . getCanonicalName ( ) ) + "<sp>is<sp>not<sp>supoorted" ) ) ; } else if ( obj . getClass ( ) . isArray ( ) ) { for ( final java . lang . Object object : ( ( java . lang . Object [ ] ) ( obj ) ) ) { c . add ( object ) ; } } else { c . add ( obj ) ; } return c ; }
|
org . junit . Assert . assertEquals ( set . size ( ) , 3 )
|
testXHappy ( ) { org . sonatype . nexus . selector . Selector selector = buildSelector ( "X<sp>==<sp>true<sp>and<sp>Y<sp>==<sp>false" ) ; "<AssertPlaceHolder>" ; } evaluate ( org . sonatype . nexus . selector . VariableSource ) { return java . lang . Boolean . TRUE . equals ( expression . evaluate ( org . sonatype . nexus . selector . JexlSelector . asJexlContext ( source ) ) ) ; }
|
org . junit . Assert . assertTrue ( selector . evaluate ( source ) )
|
testInvalidSpdyGoAwayFrameLength ( ) { short type = 7 ; byte flags = 0 ; int length = 12 ; int lastGoodStreamId = ( io . netty . handler . codec . spdy . SpdyFrameDecoderTest . RANDOM . nextInt ( ) ) & 2147483647 ; int statusCode = ( io . netty . handler . codec . spdy . SpdyFrameDecoderTest . RANDOM . nextInt ( ) ) | 1 ; io . netty . buffer . ByteBuf buf = io . netty . buffer . Unpooled . buffer ( ( ( io . netty . handler . codec . spdy . SpdyCodecUtil . SPDY_HEADER_SIZE ) + length ) ) ; io . netty . handler . codec . spdy . SpdyFrameDecoderTest . encodeControlFrameHeader ( buf , type , flags , length ) ; buf . writeInt ( lastGoodStreamId ) ; buf . writeInt ( statusCode ) ; decoder . decode ( buf ) ; verify ( delegate ) . readFrameError ( anyString ( ) ) ; "<AssertPlaceHolder>" ; buf . release ( ) ; } isReadable ( ) { return ( writerIndex ) > ( readerIndex ) ; }
|
org . junit . Assert . assertFalse ( buf . isReadable ( ) )
|
testSelectionSort ( ) { int [ ] input = new int [ ] { 3 , 2 , 1 } ; int [ ] result = new int [ ] { 1 , 2 , 3 } ; chapter3 . selectionsort . JaegyuSelectionSort selection = new chapter3 . selectionsort . JaegyuSelectionSort ( ) ; "<AssertPlaceHolder>" ; } sort ( int [ ] ) { int loc = 0 ; int newItem = 0 ; for ( int i = 1 ; i < ( input . length ) ; i ++ ) { loc = i - 1 ; newItem = input [ i ] ; while ( ( loc >= 0 ) && ( newItem < ( input [ loc ] ) ) ) { int temp = input [ ( loc + 1 ) ] ; input [ ( loc + 1 ) ] = input [ loc ] ; input [ loc ] = temp ; loc -- ; } } return input ; }
|
org . junit . Assert . assertArrayEquals ( result , selection . sort ( input ) )
|
testIsValidJavascripWithWrongContentType ( ) { org . eclipse . rap . rwt . cluster . testfixture . test . TestHttpUrlConnection connection = new org . eclipse . rap . rwt . cluster . testfixture . test . TestHttpUrlConnection ( 200 , org . eclipse . rap . rwt . cluster . testfixture . client . Response_Test . TYPE_HTML , org . eclipse . rap . rwt . cluster . testfixture . client . Response_Test . VALID_JSON ) ; org . eclipse . rap . rwt . cluster . testfixture . client . Response response = new org . eclipse . rap . rwt . cluster . testfixture . client . Response ( connection ) ; "<AssertPlaceHolder>" ; } isValidJsonResponse ( ) { return ( ( ( ( responseCode ) == 200 ) && ( contentType . toLowerCase ( ) . startsWith ( "application/json" ) ) ) && ( contentType . toLowerCase ( ) . endsWith ( "charset=utf-8" ) ) ) && ( getContentText ( ) . trim ( ) . startsWith ( "{" ) ) ; }
|
org . junit . Assert . assertFalse ( response . isValidJsonResponse ( ) )
|
testOnEnderChestOpenEnderChestNotInWorld ( ) { org . bukkit . block . BlockFace clickedBlockFace = org . bukkit . block . BlockFace . EAST ; org . bukkit . event . player . PlayerInteractEvent e = new org . bukkit . event . player . PlayerInteractEvent ( player , action , item , clickedBlock , clickedBlockFace ) ; when ( iwm . inWorld ( any ( org . bukkit . World . class ) ) ) . thenReturn ( false ) ; when ( iwm . inWorld ( any ( org . bukkit . Location . class ) ) ) . thenReturn ( false ) ; new world . bentobox . bentobox . listeners . flags . protection . BlockInteractionListener ( ) . onPlayerInteract ( e ) ; "<AssertPlaceHolder>" ; } isCancelled ( ) { return cancelled ; }
|
org . junit . Assert . assertFalse ( e . isCancelled ( ) )
|
testListReservationsInvalidTimeIntervalDefaults ( ) { org . apache . hadoop . yarn . api . protocolrecords . ReservationListRequest request = new org . apache . hadoop . yarn . api . protocolrecords . impl . pb . ReservationListRequestPBImpl ( ) ; request . setQueue ( ReservationSystemTestUtil . reservationQ ) ; request . setEndTime ( ( - 2 ) ) ; request . setStartTime ( ( - 1 ) ) ; when ( rSystem . getPlan ( ReservationSystemTestUtil . reservationQ ) ) . thenReturn ( this . plan ) ; org . apache . hadoop . yarn . server . resourcemanager . reservation . Plan plan = null ; try { plan = rrValidator . validateReservationListRequest ( rSystem , request ) ; } catch ( org . apache . hadoop . yarn . exceptions . YarnException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; }
|
org . junit . Assert . assertNotNull ( plan )
|
testDisassociateTrustBundlesFromDomain_noEntityManager_assertException ( ) { final org . nhindirect . config . store . dao . impl . TrustBundleDaoImpl dao = new org . nhindirect . config . store . dao . impl . TrustBundleDaoImpl ( ) ; boolean exceptionOccured = false ; try { dao . disassociateTrustBundlesFromDomain ( 1234 ) ; } catch ( java . lang . IllegalStateException ex ) { exceptionOccured = true ; } "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( exceptionOccured )
|
testComment ( ) { try { final org . eclipse . xtext . xdoc . xdoc . XdocFile file = this . _parseHelperExtensions . getDocFromFile ( ( ( org . eclipse . xtext . xdoc . util . ParserTestConstants . TEST_FILE_DIR ) + "commentTest.xdoc" ) ) ; org . eclipse . xtext . xdoc . xdoc . AbstractSection _mainSection = file . getMainSection ( ) ; org . eclipse . emf . common . util . EList < org . eclipse . xtext . xdoc . xdoc . TextOrMarkup > _contents = _mainSection . getContents ( ) ; int _size = _contents . size ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Throwable _e ) { throw org . eclipse . xtext . xbase . lib . Exceptions . sneakyThrow ( _e ) ; } } getContents ( ) { return getChapter ( ) . getContents ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , _size )
|
testZeroNeg ( ) { java . lang . String numA = "0" ; java . lang . String numB = "-27384627835298756289327365" ; java . lang . String res = "-27384627835298756289327365" ; java . math . BigInteger aNumber = new java . math . BigInteger ( numA ) ; java . math . BigInteger bNumber = new java . math . BigInteger ( numB ) ; java . math . BigInteger result = aNumber . xor ( bNumber ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( object instanceof org . teavm . classlib . java . text . TParsePosition ) ) { return false ; } org . teavm . classlib . java . text . TParsePosition pos = ( ( org . teavm . classlib . java . text . TParsePosition ) ( object ) ) ; return ( ( currentPosition ) == ( pos . currentPosition ) ) && ( ( errorIndex ) == ( pos . errorIndex ) ) ; }
|
org . junit . Assert . assertTrue ( res . equals ( result . toString ( ) ) )
|
shortParamShouldHandleNull ( ) { create ( "shortParam" ) . invoke ( mockController , context ) ; verify ( mockController ) . shortParam ( null ) ; "<AssertPlaceHolder>" ; } hasViolations ( ) { return ! ( this . violations . isEmpty ( ) ) ; }
|
org . junit . Assert . assertFalse ( validation . hasViolations ( ) )
|
isLinkHidden_SubscriptionMenu ( ) { doReturn ( Boolean . FALSE ) . when ( ctrl ) . isLoggedInAndAdmin ( ) ; doReturn ( Boolean . FALSE ) . when ( ctrl ) . isLoggedInAndSubscriptionManager ( ) ; doReturn ( Boolean . FALSE ) . when ( ctrl ) . isLoggedInAndUnitAdmin ( ) ; ctrl . getModel ( ) ; boolean result = ctrl . isLinkVisible ( 3 ) ; "<AssertPlaceHolder>" ; } isLinkVisible ( int ) { if ( ( index < 1 ) || ( index > ( getLink ( ) . size ( ) ) ) ) { return false ; } java . lang . String hiddenElement = getHiddenElement ( ) . get ( ( index - 1 ) ) ; if ( HiddenUIConstants . MARKETPLACE_MENU_ITEM_ACCOUNT_REPORTS . equals ( hiddenElement ) ) { return isReportingAvailable ( ) ; } else if ( HiddenUIConstants . MARKETPLACE_MENU_ITEM_ACCOUNT_USERS . equals ( hiddenElement ) ) { return ( isLoggedInAndAdmin ( ) ) && ( ! ( applicationBean . isUIElementHidden ( hiddenElement ) ) ) ; } else if ( HiddenUIConstants . MARKETPLACE_MENU_ITEM_ACCOUNT_PAYMENT . equals ( hiddenElement ) ) { return isPaymentAvailable ( ) ; } else if ( HiddenUIConstants . MARKETPLACE_MENU_ITEM_ACCOUNT_SUBSCRIPTIONS . equals ( hiddenElement ) ) { return ( ( ( isLoggedInAndAdmin ( ) ) || ( isLoggedInAndSubscriptionManager ( ) ) ) || ( isLoggedInAndUnitAdmin ( ) ) ) && ( ! ( applicationBean . isUIElementHidden ( hiddenElement ) ) ) ; } else if ( HiddenUIConstants . MARKETPLACE_MENU_ITEM_ACCOUNT_UNITS . equals ( hiddenElement ) ) { return ( isLoggedInAndUnitAdmin ( ) ) && ( ! ( applicationBean . isUIElementHidden ( hiddenElement ) ) ) ; } else if ( HiddenUIConstants . MARKETPLACE_MENU_ITEM_ACCOUNT_ADMINISTRATION . equals ( hiddenElement ) ) { return ( isAdministrationAccess ( ) ) && ( ! ( applicationBean . isUIElementHidden ( hiddenElement ) ) ) ; } return ! ( applicationBean . isUIElementHidden ( hiddenElement ) ) ; }
|
org . junit . Assert . assertEquals ( Boolean . FALSE , java . lang . Boolean . valueOf ( result ) )
|
test2 ( ) { java . lang . reflect . Type type = new com . firefly . utils . lang . GenericTypeReference < test . utils . lang . TestGenericTypeReference . Foo > ( ) { } . getType ( ) ; System . out . println ( type ) ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { return _string . equalsIgnoreCase ( s ) ; }
|
org . junit . Assert . assertThat ( ( type == ( test . utils . lang . TestGenericTypeReference . Foo . class ) ) , org . hamcrest . Matchers . is ( true ) )
|
testGetPlaceholderSentenceWhenTypeIsBuiltInTypeWithoutDefinedSentence ( ) { final java . lang . String expectedPlaceholder = "Enter<sp>a<sp>valid<sp>expression" ; when ( translationService . format ( "ConstraintPlaceholderHelper.SentenceDefault" ) ) . thenReturn ( expectedPlaceholder ) ; final java . lang . String actualPlaceholder = placeholderHelper . getPlaceholderSentence ( "context" ) ; "<AssertPlaceHolder>" ; } getPlaceholderSentence ( java . lang . String ) { final java . lang . String sentence = getTranslation ( type , org . kie . workbench . common . dmn . client . editors . types . listview . constraint . common . ConstraintPlaceholderHelper . CONSTRAINT_PLACEHOLDER_SENTENCE_PREFIX ) ; return ! ( isEmpty ( sentence ) ) ? sentence : defaultSentence ( ) ; }
|
org . junit . Assert . assertEquals ( expectedPlaceholder , actualPlaceholder )
|
testInstanceOf ( ) { System . out . println ( "instanceof" ) ; java . lang . String query = "select<sp>classof(cl).name<sp>from<sp>instanceof<sp>java.lang.ClassLoader<sp>cl" ; final int [ ] counter = new int [ 1 ] ; instance . executeQuery ( query , new org . netbeans . modules . profiler . oql . engine . api . OQLEngine . ObjectVisitor ( ) { public boolean visit ( java . lang . Object o ) { System . out . println ( o ) ; ( counter [ 0 ] ) ++ ; return false ; } } ) ; "<AssertPlaceHolder>" ; } println ( long ) { delegate ( ) . println ( x ) ; }
|
org . junit . Assert . assertEquals ( 2 , counter [ 0 ] )
|
testInvalidCase ( ) { params . add ( new org . apache . jmeter . engine . util . CompoundVariable ( "ab-<sp>eF" ) ) ; params . add ( new org . apache . jmeter . engine . util . CompoundVariable ( "INVALID_CASE" ) ) ; changeCase . setParameters ( params ) ; changeCase . setParameters ( params ) ; java . lang . String returnValue = changeCase . execute ( result , null ) ; "<AssertPlaceHolder>" ; } execute ( org . apache . jmeter . samplers . SampleResult , org . apache . jmeter . samplers . Sampler ) { java . lang . String tstName = values [ 0 ] . execute ( ) ; java . lang . String concName = tstName + "_concurrency" ; if ( justStarted ) { org . apache . jmeter . util . JMeterUtils . setProperty ( concName , java . lang . String . valueOf ( values [ 1 ] . execute ( ) ) ) ; justStarted = false ; } int limit = Integer . MAX_VALUE ; if ( ( values . length ) > 2 ) { try { limit = java . lang . Integer . parseInt ( values [ 2 ] . execute ( ) ) ; } catch ( java . lang . NumberFormatException exc ) { kg . apc . jmeter . timers . functions . TSTFeedback . log . debug ( "Failed<sp>to<sp>parse<sp>value<sp>for<sp>limit,<sp>defaulting<sp>to<sp>infinity" , exc ) ; } } double spare = 0.1 ; if ( ( values . length ) > 3 ) { try { spare = java . lang . Double . parseDouble ( values [ 3 ] . execute ( ) ) ; } catch ( java . lang . NumberFormatException exc ) { kg . apc . jmeter . timers . functions . TSTFeedback . log . debug ( "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" , exc ) ; spare = 1 ; } } int con = java . lang . Integer . parseInt ( org . apache . jmeter . util . JMeterUtils . getPropDefault ( concName , "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 2 ) ) ; int delayed = java . lang . Integer . parseInt ( org . apache . jmeter . util . JMeterUtils . getPropDefault ( ( tstName + "_cntDelayed" ) , "0" ) ) ; int sent = java . lang . Integer . parseInt ( org . apache . jmeter . util . JMeterUtils . getPropDefault ( ( tstName + "_cntSent" ) , "0" ) ) ; float rps = java . lang . Float . parseFloat ( org . apache . jmeter . util . JMeterUtils . getPropDefault ( ( tstName + "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 4 ) , "0" ) ) ; int needed = con ; if ( rps <= 0 ) { } else if ( delayed > 0 ) { needed = decreaseNeeded ( spare , con , delayed , needed ) ; } else if ( sent < rps ) { needed = ( ( int ) ( java . lang . Math . ceil ( ( con * ( 2 - ( sent / rps ) ) ) ) ) ) ; } if ( ( needed != con ) && ( kg . apc . jmeter . timers . functions . TSTFeedback . log . isDebugEnabled ( ) ) ) { kg . apc . jmeter . timers . functions . TSTFeedback . log . debug ( ( ( ( ( ( ( ( ( ( ( ( ( "Need<sp>to<sp>change<sp>" + concName ) + ":<sp>" ) + con ) + "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 5 ) + needed ) + "<sp>(" ) + sent ) + "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 3 ) + rps ) + "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 3 ) + delayed ) + "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 0 ) ) ; } if ( needed <= 0 ) { kg . apc . jmeter . timers . functions . TSTFeedback . log . warn ( ( "Got<sp>concurrency<sp>less<sp>than<sp>zero:<sp>" + needed ) ) ; needed = 1 ; } if ( needed > limit ) { kg . apc . jmeter . timers . functions . TSTFeedback . log . warn ( ( "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 1 + needed ) ) ; needed = limit ; } org . apache . jmeter . util . JMeterUtils . setProperty ( concName , java . lang . String . valueOf ( needed ) ) ; org . apache . jmeter . util . JMeterUtils . setProperty ( ( tstName + "Failed<sp>to<sp>parse<sp>value<sp>for<sp>spare<sp>ratio,<sp>defaulting<sp>to<sp>0" 4 ) , "0" ) ; return java . lang . String . valueOf ( needed ) ; }
|
org . junit . Assert . assertEquals ( "ab-<sp>eF" , returnValue )
|
testGetIndexFromColumnName ( ) { java . util . Map < java . lang . String , java . lang . String > metaDataSource = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; java . lang . String key1 = "key1" ; java . lang . String val1 = "10003" ; java . lang . String key2 = "key2" ; java . lang . String val2 = "10004" ; metaDataSource . put ( key1 , val1 ) ; metaDataSource . put ( key2 , val2 ) ; org . irods . jargon . core . query . ExtensibleMetaDataMapping metaDataMapping = org . irods . jargon . core . query . ExtensibleMetaDataMapping . instance ( metaDataSource ) ; java . lang . String index = metaDataMapping . getIndexFromColumnName ( key1 ) ; "<AssertPlaceHolder>" ; } getIndexFromColumnName ( java . lang . String ) { java . lang . String index = extensibleMappings . get ( columnName ) ; return index ; }
|
org . junit . Assert . assertEquals ( val1 , index )
|
insertByDigest ( ) { int i = 0 ; for ( int x = 1 ; x <= ( TestQueryEngine . RECORD_COUNT ) ; x ++ ) { java . lang . String keyString = "selector-test:" + x ; com . aerospike . client . Bin name = new com . aerospike . client . Bin ( "name" , ( "name:" + x ) ) ; com . aerospike . client . Bin age = new com . aerospike . client . Bin ( "age" , ages [ i ] ) ; com . aerospike . client . Bin colour = new com . aerospike . client . Bin ( "color" , colours [ i ] ) ; com . aerospike . client . Bin animal = new com . aerospike . client . Bin ( "animal" , animals [ i ] ) ; java . util . List < com . aerospike . client . Bin > bins = java . util . Arrays . asList ( name , age , colour , animal ) ; com . aerospike . client . Key key = new com . aerospike . client . Key ( TestQueryEngine . NAMESPACE , TestQueryEngine . SET_NAME , keyString ) ; this . client . delete ( null , key ) ; com . aerospike . helper . query . KeyQualifier kq = new com . aerospike . helper . query . KeyQualifier ( key . digest ) ; com . aerospike . client . query . Statement stmt = new com . aerospike . client . query . Statement ( ) ; stmt . setNamespace ( TestQueryEngine . NAMESPACE ) ; stmt . setSetName ( TestQueryEngine . SET_NAME ) ; queryEngine . insert ( stmt , kq , bins ) ; com . aerospike . client . Record record = this . client . get ( null , key ) ; "<AssertPlaceHolder>" ; i ++ ; if ( i == 5 ) i = 0 ; } } get ( com . aerospike . client . policy . BatchPolicy , com . aerospike . client . Key [ ] ) { if ( policy == null ) { policy = batchPolicyDefault ; } com . aerospike . client . Record [ ] records = new com . aerospike . client . Record [ keys . length ] ; com . aerospike . client . command . BatchExecutor . execute ( cluster , policy , keys , null , records , null , ( ( com . aerospike . client . command . Command . INFO1_READ ) | ( com . aerospike . client . command . Command . INFO1_GET_ALL ) ) ) ; return records ; }
|
org . junit . Assert . assertNotNull ( record )
|
testSimpleDataSourceString ( ) { java . lang . String url = "jdbc:h2:mem:baz" ; com . j256 . ormlite . jdbc . JdbcConnectionSource sds = new com . j256 . ormlite . jdbc . JdbcConnectionSource ( url ) ; "<AssertPlaceHolder>" ; sds . close ( ) ; } getUrl ( ) { return url ; }
|
org . junit . Assert . assertEquals ( url , sds . getUrl ( ) )
|
testSetGetProductName ( ) { model . setProductName ( "Obelix" ) ; "<AssertPlaceHolder>" ; } getProductName ( ) { com . bc . ceres . binio . SequenceData sequence = getHeader ( ) . getCompound ( "FILE_IDENTIFICATION" ) . getSequence ( "DATA_SET_NAME" ) ; return org . esa . beam . dataio . avhrr . noaa . HeaderWrapper . getAsString ( sequence ) ; }
|
org . junit . Assert . assertEquals ( "Obelix" , model . getProductName ( ) )
|
testStartTLSServerBadPassword ( ) { org . apache . bookkeeper . conf . ServerConfiguration bookieConf = newServerConfiguration ( ) . setTLSKeyStorePasswordPath ( "badpassword" ) ; try { bs . add ( startBookie ( bookieConf ) ) ; org . junit . Assert . fail ( "Shouldn't<sp>have<sp>been<sp>able<sp>to<sp>start" ) ; } catch ( java . lang . SecurityException se ) { "<AssertPlaceHolder>" ; } } fail ( java . lang . Throwable ) { closed = java . util . Optional . of ( exc ) ; for ( java . util . concurrent . CompletableFuture < org . apache . distributedlog . common . util . Permit > future : waitq ) { future . cancel ( true ) ; } waitq . clear ( ) ; }
|
org . junit . Assert . assertTrue ( true )
|
nonExistentClassYieldsNull ( ) { com . rackspacecloud . blueflood . service . Configuration . getInstance ( ) . setProperty ( CoreConfig . DISCOVERY_MODULES , "com.rackspacecloud.blueflood.NonExistentClass" ) ; java . lang . Object loadedModule = com . rackspacecloud . blueflood . utils . ModuleLoader . getInstance ( com . rackspacecloud . blueflood . io . DiscoveryIO . class , CoreConfig . DISCOVERY_MODULES ) ; "<AssertPlaceHolder>" ; } getInstance ( java . lang . Class , com . rackspacecloud . blueflood . service . CoreConfig ) { java . lang . Object moduleInstance = com . rackspacecloud . blueflood . utils . ModuleLoader . loadedModules . get ( moduleName . name ( ) . toString ( ) ) ; if ( moduleInstance != null ) return moduleInstance ; java . util . List < java . lang . String > modules = com . rackspacecloud . blueflood . service . Configuration . getInstance ( ) . getListProperty ( moduleName ) ; if ( modules . isEmpty ( ) ) return null ; if ( ( modules . size ( ) ) != 1 ) { throw new java . lang . RuntimeException ( ( ( "Cannot<sp>load<sp>service<sp>with<sp>more<sp>than<sp>one<sp>" + moduleName ) + "<sp>module" ) ) ; } java . lang . String module = modules . get ( 0 ) ; com . rackspacecloud . blueflood . utils . ModuleLoader . log . info ( ( "Loading<sp>the<sp>module<sp>" + module ) ) ; try { java . lang . ClassLoader loader = c . getClassLoader ( ) ; java . lang . Class genericClass = loader . loadClass ( module ) ; moduleInstance = genericClass . newInstance ( ) ; com . rackspacecloud . blueflood . utils . ModuleLoader . loadedModules . put ( moduleName . name ( ) . toString ( ) , moduleInstance ) ; com . rackspacecloud . blueflood . utils . ModuleLoader . log . info ( ( "Registering<sp>the<sp>module<sp>" + module ) ) ; } catch ( java . lang . InstantiationException e ) { com . rackspacecloud . blueflood . utils . ModuleLoader . log . error ( java . lang . String . format ( "Unable<sp>to<sp>create<sp>instance<sp>of<sp>%s<sp>class<sp>for<sp>%s" , c . getName ( ) , module ) , e ) ; } catch ( java . lang . IllegalAccessException e ) { com . rackspacecloud . blueflood . utils . ModuleLoader . log . error ( ( "Error<sp>starting<sp>module:<sp>" + module ) , e ) ; } catch ( java . lang . ClassNotFoundException e ) { com . rackspacecloud . blueflood . utils . ModuleLoader . log . error ( ( "Unable<sp>to<sp>locate<sp>module:<sp>" + module ) , e ) ; } catch ( java . lang . RuntimeException e ) { com . rackspacecloud . blueflood . utils . ModuleLoader . log . error ( ( "Error<sp>starting<sp>module:<sp>" + module ) , e ) ; } catch ( java . lang . Throwable e ) { com . rackspacecloud . blueflood . utils . ModuleLoader . log . error ( ( "Error<sp>starting<sp>module:<sp>" + module ) , e ) ; } return moduleInstance ; }
|
org . junit . Assert . assertNull ( loadedModule )
|
testMockType_Interface ( ) { java . lang . Object o = createMock ( java . util . List . class ) ; java . lang . Class < ? > c = getMockedClass ( o ) ; "<AssertPlaceHolder>" ; } getMockedClass ( T ) { if ( java . lang . reflect . Proxy . isProxyClass ( proxy . getClass ( ) ) ) { return ( ( java . lang . Class < R > ) ( proxy . getClass ( ) . getInterfaces ( ) [ 0 ] ) ) ; } return ( ( java . lang . Class < R > ) ( proxy . getClass ( ) . getSuperclass ( ) ) ) ; }
|
org . junit . Assert . assertSame ( java . util . List . class , c )
|
fieldTest ( ) { com . addthis . hydra . data . filter . bundle . BundleFilterHttp bfh = com . addthis . hydra . data . filter . bundle . BundleFilterHttp . create ( com . addthis . hydra . data . filter . bundle . BundleFilterTemplate . create ( new java . lang . String [ ] { "http://" , "{{domain}}" , "/" , "{{path}}" } , "url" ) , "content" ) ; com . addthis . bundle . util . map . MapBundle bundle = com . addthis . bundle . util . map . MapBundle . createBundle ( new java . lang . String [ ] { "domain" , "example.com" , "path" , "" } ) ; bfh . filter ( bundle ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { try { com . clearspring . analytics . stream . frequency . CountMinSketch sketch = super . get ( key ) ; if ( sketch == null ) { java . io . ByteArrayInputStream byteStream = null ; java . util . zip . GZIPInputStream zipStream = null ; try { java . nio . file . Path path = java . nio . file . Paths . get ( dataDir , ( key + ".gz" ) ) ; if ( java . nio . file . Files . exists ( path ) ) { byte [ ] data = java . nio . file . Files . readAllBytes ( path ) ; byteStream = new java . io . ByteArrayInputStream ( data ) ; zipStream = new java . util . zip . GZIPInputStream ( byteStream ) ; sketch = com . clearspring . analytics . stream . frequency . CountMinSketch . deserialize ( com . google . common . io . ByteStreams . toByteArray ( zipStream ) ) ; } else { sketch = new com . clearspring . analytics . stream . frequency . CountMinSketch ( calcDepth , calcWidth , 0 ) ; } } finally { if ( zipStream != null ) { zipStream . close ( ) ; } if ( byteStream != null ) { byteStream . close ( ) ; } } put ( key . toString ( ) , sketch ) ; } return sketch ; } catch ( java . io . IOException ex ) { throw new java . io . UncheckedIOException ( ex ) ; } }
|
org . junit . Assert . assertTrue ( ( ( bundle . get ( "content" ) ) != null ) )
|
getResultingSize1WithAspectFitInsideAndMaxScale1 ( ) { final edu . illinois . library . cantaloupe . image . Dimension fullSize = new edu . illinois . library . cantaloupe . image . Dimension ( 600 , 400 ) ; final edu . illinois . library . cantaloupe . image . ScaleConstraint scaleConstraint = new edu . illinois . library . cantaloupe . image . ScaleConstraint ( 1 , 1 ) ; instance . setMode ( Scale . Mode . ASPECT_FIT_INSIDE ) ; instance . setMaxScale ( 1.0 ) ; instance . setWidth ( 1200 ) ; instance . setHeight ( 600 ) ; "<AssertPlaceHolder>" ; } getResultingSize ( edu . illinois . library . cantaloupe . image . Dimension , edu . illinois . library . cantaloupe . image . ScaleConstraint ) { return getResultingSize ( fullSize , new edu . illinois . library . cantaloupe . operation . ReductionFactor ( 0 ) , scaleConstraint ) ; }
|
org . junit . Assert . assertEquals ( new edu . illinois . library . cantaloupe . image . Dimension ( 600 , 400 ) , instance . getResultingSize ( fullSize , scaleConstraint ) )
|
c01_primitiveFormData ( ) { java . lang . String r = proxy . primitiveFormData ( "foo" , null , 123 , 123 , null , true , 1.0F , 1.0F ) ; "<AssertPlaceHolder>" ; } primitiveFormData ( java . lang . String , java . lang . String , int , java . lang . Integer , java . lang . Integer , java . lang . Boolean , float , java . lang . Float ) { org . junit . Assert . assertEquals ( "foo" , a ) ; org . junit . Assert . assertNull ( an ) ; org . junit . Assert . assertEquals ( 123 , b ) ; org . junit . Assert . assertEquals ( 123 , ( ( int ) ( c ) ) ) ; org . junit . Assert . assertNull ( cn ) ; org . junit . Assert . assertTrue ( d ) ; org . junit . Assert . assertTrue ( ( 1.0F == e ) ) ; org . junit . Assert . assertTrue ( ( 1.0F == f ) ) ; return "OK" ; }
|
org . junit . Assert . assertEquals ( "OK" , r )
|
getListeners ( ) { java . util . Set < java . lang . Object > expected = java . util . Collections . singleton ( new java . lang . Object ( ) ) ; when ( this . manager . getListeners ( ) ) . thenReturn ( expected ) ; java . util . Set < java . lang . Object > result = this . subject . getListeners ( ) ; "<AssertPlaceHolder>" ; } getListeners ( ) { return ( ( java . util . List ) ( listeners ) ) ; }
|
org . junit . Assert . assertSame ( expected , result )
|
findAll ( ) { org . openstreetmap . osmosis . plugin . elasticsearch . dao . Node node1 = org . openstreetmap . osmosis . plugin . elasticsearch . testutils . OsmDataBuilder . buildSampleNode ( 1 ) ; org . openstreetmap . osmosis . plugin . elasticsearch . dao . Node node2 = org . openstreetmap . osmosis . plugin . elasticsearch . testutils . OsmDataBuilder . buildSampleNode ( 2 ) ; org . elasticsearch . action . get . MultiGetRequestBuilder multiGetRequestBuilderMocked = mock ( org . elasticsearch . action . get . MultiGetRequestBuilder . class ) ; doReturn ( multiGetRequestBuilderMocked ) . when ( entityDao ) . buildMultiGetRequest ( org . openstreetmap . osmosis . plugin . elasticsearch . model . entity . ESNode . class , 1 , 2 ) ; doReturn ( org . openstreetmap . osmosis . plugin . elasticsearch . dao . Arrays . asList ( node1 , node2 ) ) . when ( entityDao ) . executeMultiGetRequest ( org . openstreetmap . osmosis . plugin . elasticsearch . model . entity . ESNode . class , multiGetRequestBuilderMocked ) ; org . openstreetmap . osmosis . plugin . elasticsearch . dao . List < org . openstreetmap . osmosis . plugin . elasticsearch . model . entity . ESNode > nodes = entityDao . findAll ( org . openstreetmap . osmosis . plugin . elasticsearch . model . entity . ESNode . class , 1 , 2 ) ; verify ( entityDao ) . buildMultiGetRequest ( org . openstreetmap . osmosis . plugin . elasticsearch . model . entity . ESNode . class , 1 , 2 ) ; verify ( entityDao ) . executeMultiGetRequest ( org . openstreetmap . osmosis . plugin . elasticsearch . model . entity . ESNode . class , multiGetRequestBuilderMocked ) ; "<AssertPlaceHolder>" ; } executeMultiGetRequest ( java . lang . Class , org . elasticsearch . action . get . MultiGetRequestBuilder ) { org . elasticsearch . action . get . MultiGetResponse responses = request . execute ( ) . actionGet ( ) ; org . openstreetmap . osmosis . plugin . elasticsearch . dao . List < T > entities = new org . openstreetmap . osmosis . plugin . elasticsearch . dao . ArrayList < T > ( ) ; for ( org . elasticsearch . action . get . MultiGetItemResponse item : responses ) { entities . add ( buildEntityFromGetResponse ( entityClass , item ) ) ; } return org . openstreetmap . osmosis . plugin . elasticsearch . dao . Collections . unmodifiableList ( entities ) ; }
|
org . junit . Assert . assertEquals ( org . openstreetmap . osmosis . plugin . elasticsearch . dao . Arrays . asList ( node1 , node2 ) , nodes )
|
dataConversionTest ( ) { org . kaaproject . kaa . common . dto . EndpointSpecificConfigurationDto dto = new org . kaaproject . kaa . common . dto . EndpointSpecificConfigurationDto ( "hash" . getBytes ( ) , 1 , "conf<sp>body" , 2L ) ; org . kaaproject . kaa . server . common . nosql . mongo . dao . model . MongoEndpointSpecificConfiguration configuration = new org . kaaproject . kaa . server . common . nosql . mongo . dao . model . MongoEndpointSpecificConfiguration ( dto ) ; "<AssertPlaceHolder>" ; } toDto ( ) { java . util . List < org . kaaproject . kaa . common . dto . TopicDto > topicDtos = org . kaaproject . kaa . server . common . dao . model . sql . ModelUtils . getTopicDtos ( topicIds ) ; return new org . kaaproject . kaa . common . dto . TopicListEntryDto ( simpleHash , hash , topicDtos ) ; }
|
org . junit . Assert . assertEquals ( dto , configuration . toDto ( ) )
|
testLivelinessHealthCheck ( ) { @ org . gitlab4j . api . SuppressWarnings ( "deprecation" ) org . gitlab4j . api . models . HealthCheckInfo liveness = org . gitlab4j . api . TestHealthCheckApi . gitLabApi . getHealthCheckApi ( ) . getLiveness ( org . gitlab4j . api . TestHealthCheckApi . TEST_HEALTH_CHECK_TOKEN ) ; "<AssertPlaceHolder>" ; } getLiveness ( java . lang . String ) { try { java . net . URL livenessUrl = getApiClient ( ) . getUrlWithBase ( "-" , "liveness" ) ; org . gitlab4j . api . GitLabApiForm formData = new org . gitlab4j . api . GitLabApiForm ( ) . withParam ( "token" , token , false ) ; javax . ws . rs . core . Response response = get ( Response . Status . OK , formData . asMap ( ) , livenessUrl ) ; return response . readEntity ( org . gitlab4j . api . models . HealthCheckInfo . class ) ; } catch ( java . io . IOException ioe ) { throw new org . gitlab4j . api . GitLabApiException ( ioe ) ; } }
|
org . junit . Assert . assertNotNull ( liveness )
|
houdtRekeningMetBlokkeringDienstbundel ( ) { dienst . getDienstbundel ( ) . setIndicatieGeblokkeerd ( true ) ; java . util . Collection < nl . bzk . brp . beheer . service . selectie . SelectieTaakDTO > taken = service . filter ( java . util . Collections . singleton ( taak ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertThat ( taken . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
|
average_from_list_of_numbers_with_apache_commons ( ) { double [ ] elements = org . apache . commons . lang3 . ArrayUtils . toPrimitive ( com . levelup . java . collections . AverageFromList . NUMBERS_FOR_AVERAGE . toArray ( new java . lang . Double [ com . levelup . java . collections . AverageFromList . NUMBERS_FOR_AVERAGE . size ( ) ] ) ) ; org . apache . commons . math3 . stat . descriptive . moment . Mean mean = new org . apache . commons . math3 . stat . descriptive . moment . Mean ( ) ; double average = mean . evaluate ( elements ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . Object ) { java . lang . String compare = ( ( java . lang . String ) ( arg0 ) ) ; return compare . equalsIgnoreCase ( "Elephants" ) ; }
|
org . junit . Assert . assertEquals ( 10 , average , 0 )
|
test_Servlet9 ( ) { java . lang . String expected = "Equinox<sp>Jetty-based<sp>Http<sp>Service" ; java . lang . String actual ; org . osgi . framework . Bundle bundle = installBundle ( org . eclipse . equinox . http . servlet . tests . TEST_BUNDLE_1 ) ; try { bundle . start ( ) ; actual = requestAdvisor . request ( "TestServlet9" ) ; } finally { uninstallBundle ( bundle ) ; } "<AssertPlaceHolder>" ; } uninstallBundle ( org . osgi . framework . Bundle ) { org . eclipse . equinox . internal . security . tests . storage . WaitingRegistryListener listener = new org . eclipse . equinox . internal . security . tests . storage . WaitingRegistryListener ( ) ; listener . register ( "org.eclipse.equinox.security.secureStorage" ) ; try { bundle . uninstall ( ) ; bundle = null ; org . junit . Assert . assertTrue ( ( ( listener . waitFor ( 1 , ( 10 * ( org . eclipse . equinox . internal . security . tests . storage . DynamicPreferencesTest . MAX_TIME_PER_BUNDLE ) ) ) ) == 1 ) ) ; return true ; } finally { listener . unregister ( ) ; if ( bundle != null ) bundle . uninstall ( ) ; } }
|
org . junit . Assert . assertEquals ( expected , actual )
|
show ( ) { java . lang . String queue = com . github . xetorthio . jedisque . JedisqueTest . getQueueName ( ) ; java . lang . String jobId = com . github . xetorthio . jedisque . JedisqueTest . q . addJob ( queue , "testJob" , 10 ) ; com . github . xetorthio . jedisque . JobInfo jobInfo = com . github . xetorthio . jedisque . JedisqueTest . q . show ( jobId ) ; "<AssertPlaceHolder>" ; } show ( java . lang . String ) { sendCommand ( Command . SHOW , jobId ) ; return JedisqueBuilder . JOB_SHOW . build ( getObjectMultiBulkReply ( ) ) ; }
|
org . junit . Assert . assertNotNull ( jobInfo )
|
getSetSourceObjectId ( ) { final org . bonitasoft . engine . data . instance . model . archive . impl . SAXMLObjectDataInstanceImpl saxmlObjectDataInstanceImpl = new org . bonitasoft . engine . data . instance . model . archive . impl . SAXMLObjectDataInstanceImpl ( ) ; saxmlObjectDataInstanceImpl . setSourceObjectId ( 85 ) ; "<AssertPlaceHolder>" ; } getSourceObjectId ( ) { return sourceObjectId ; }
|
org . junit . Assert . assertEquals ( 85 , saxmlObjectDataInstanceImpl . getSourceObjectId ( ) )
|
testBasicMaxAgeParse ( ) { org . apache . ogt . http . impl . cookie . BasicClientCookie cookie = new org . apache . ogt . http . impl . cookie . BasicClientCookie ( "name" , "value" ) ; org . apache . ogt . http . cookie . CookieAttributeHandler h = new org . apache . ogt . http . impl . cookie . BasicMaxAgeHandler ( ) ; h . parse ( cookie , "2000" ) ; "<AssertPlaceHolder>" ; } getExpiryDate ( ) { return cookieExpiryDate ; }
|
org . junit . Assert . assertNotNull ( cookie . getExpiryDate ( ) )
|
testRead ( ) { final com . google . common . util . concurrent . CheckedFuture < java . lang . Void , org . opendaylight . controller . md . sal . common . api . data . TransactionCommitFailedException > fut = mdsalUtilsAsync . put ( LogicalDatastoreType . CONFIGURATION , org . opendaylight . ovsdb . utils . mdsal . utils . ControllerMdsalUtilsAsyncTest . TEST_IID , org . opendaylight . ovsdb . utils . mdsal . utils . ControllerMdsalUtilsAsyncTest . DATA ) ; com . google . common . util . concurrent . Futures . addCallback ( fut , new com . google . common . util . concurrent . FutureCallback < java . lang . Void > ( ) { @ org . opendaylight . ovsdb . utils . mdsal . utils . Override public void onSuccess ( final java . lang . Void result ) { final com . google . common . util . concurrent . CheckedFuture < com . google . common . base . Optional < org . opendaylight . yang . gen . v1 . urn . tbd . params . xml . ns . yang . network . topology . rev131021 . network . topology . topology . Node > , org . opendaylight . controller . md . sal . common . api . data . ReadFailedException > future = mdsalUtilsAsync . read ( LogicalDatastoreType . CONFIGURATION , org . opendaylight . ovsdb . utils . mdsal . utils . ControllerMdsalUtilsAsyncTest . TEST_IID ) ; com . google . common . base . Optional < org . opendaylight . yang . gen . v1 . urn . tbd . params . xml . ns . yang . network . topology . rev131021 . network . topology . topology . Node > optNode ; try { optNode = future . get ( ) ; if ( optNode . isPresent ( ) ) { "<AssertPlaceHolder>" ; } else { org . junit . Assert . fail ( "Couldn't<sp>read<sp>node" ) ; } } catch ( java . lang . InterruptedException | java . util . concurrent . ExecutionException e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } @ org . opendaylight . ovsdb . utils . mdsal . utils . Override public void onFailure ( final java . lang . Throwable ex ) { org . junit . Assert . fail ( ex . getMessage ( ) ) ; } } , com . google . common . util . concurrent . MoreExecutors . directExecutor ( ) ) ; } read ( org . opendaylight . mdsal . common . api . LogicalDatastoreType , org . opendaylight . yangtools . yang . binding . InstanceIdentifier ) { java . util . Optional < D > optionalDataObject = readOptional ( store , path ) ; if ( optionalDataObject . isPresent ( ) ) { return optionalDataObject . get ( ) ; } org . opendaylight . ovsdb . utils . mdsal . utils . MdsalUtils . LOG . debug ( "{}:<sp>Failed<sp>to<sp>read<sp>{}" , java . lang . Thread . currentThread ( ) . getStackTrace ( ) [ 1 ] , path ) ; return null ; }
|
org . junit . Assert . assertEquals ( org . opendaylight . ovsdb . utils . mdsal . utils . ControllerMdsalUtilsAsyncTest . DATA , optNode . get ( ) )
|
testCreateNewVersion ( ) { org . libreplan . business . calendars . entities . BaseCalendar calendar = org . libreplan . business . test . calendars . entities . BaseCalendarTest . createBasicCalendar ( ) ; calendar . newVersion ( new org . joda . time . LocalDate ( ) . plusDays ( 1 ) ) ; "<AssertPlaceHolder>" ; } getCalendarDataVersions ( ) { return java . util . Collections . unmodifiableList ( calendarDataVersions ) ; }
|
org . junit . Assert . assertThat ( calendar . getCalendarDataVersions ( ) . size ( ) , org . hamcrest . CoreMatchers . equalTo ( 2 ) )
|
testConstantNullFill ( ) { org . orbisgis . coremap . renderer . se . Style st = getStyle ( org . orbisgis . legend . analyzer . CONSTANT_POINT ) ; org . orbisgis . coremap . renderer . se . PointSymbolizer ps = ( ( org . orbisgis . coremap . renderer . se . PointSymbolizer ) ( st . getRules ( ) . get ( 0 ) . getCompositeSymbolizer ( ) . getSymbolizerList ( ) . get ( 0 ) ) ) ; org . orbisgis . coremap . renderer . se . graphic . MarkGraphic mg = ( ( org . orbisgis . coremap . renderer . se . graphic . MarkGraphic ) ( ps . getGraphicCollection ( ) . getGraphic ( 0 ) ) ) ; mg . setFill ( null ) ; org . orbisgis . legend . thematic . constant . UniqueSymbolPoint uvp = new org . orbisgis . legend . thematic . constant . UniqueSymbolPoint ( ps ) ; org . orbisgis . legend . analyzer . symbolizers . PointSymbolizerAnalyzer psa = new org . orbisgis . legend . analyzer . symbolizers . PointSymbolizerAnalyzer ( ps ) ; "<AssertPlaceHolder>" ; } getLegend ( ) { return ( ( org . orbisgis . legend . LookupFieldName ) ( legend ) ) ; }
|
org . junit . Assert . assertTrue ( ( ( psa . getLegend ( ) ) instanceof org . orbisgis . legend . thematic . constant . UniqueSymbolPoint ) )
|
testDeleteExistingCustomer ( ) { java . lang . String sql = "Insert<sp>into<sp>customer(F_Name,L_Name,Title,UserId,Address1,Address2,<sp>Company,<sp>Province,City,<sp>Country,Postal_Code," + "Insert<sp>into<sp>customer(F_Name,L_Name,Title,UserId,Address1,Address2,<sp>Company,<sp>Province,City,<sp>Country,Postal_Code," 0 ; values . add ( "Insert<sp>into<sp>customer(F_Name,L_Name,Title,UserId,Address1,Address2,<sp>Company,<sp>Province,City,<sp>Country,Postal_Code," 4 ) ; values . add ( "Gomes" ) ; values . add ( "Mr." ) ; values . add ( 84L ) ; values . add ( "4512<sp>Kirkland<sp>str.<sp>" ) ; values . add ( "apt.306<sp>" ) ; values . add ( "Insert<sp>into<sp>customer(F_Name,L_Name,Title,UserId,Address1,Address2,<sp>Company,<sp>Province,City,<sp>Country,Postal_Code," 3 ) ; values . add ( "Quebec" ) ; values . add ( "Montreal" ) ; values . add ( "Canada" ) ; values . add ( "Insert<sp>into<sp>customer(F_Name,L_Name,Title,UserId,Address1,Address2,<sp>Company,<sp>Province,City,<sp>Country,Postal_Code," 2 ) ; values . add ( "514-569-4124" ) ; values . add ( "Insert<sp>into<sp>customer(F_Name,L_Name,Title,UserId,Address1,Address2,<sp>Company,<sp>Province,City,<sp>Country,Postal_Code," 1 ) ; values . add ( "Insert<sp>into<sp>customer(F_Name,L_Name,Title,UserId,Address1,Address2,<sp>Company,<sp>Province,City,<sp>Country,Postal_Code," 5 ) ; values . add ( 3L ) ; cdao . insert ( sql , values ) ; values = new java . util . ArrayList < java . lang . Object > ( ) ; values . add ( "Insert<sp>into<sp>customer(F_Name,L_Name,Title,UserId,Address1,Address2,<sp>Company,<sp>Province,City,<sp>Country,Postal_Code," 4 ) ; customer = cdao . select ( "Select<sp>*<sp>from<sp>customer<sp>where<sp>F_Name=?" , values ) . get ( 0 ) ; g7w14 . test . CustomerManagerTest . result = manager . deleteRecord ( ) ; "<AssertPlaceHolder>" ; } deleteRecord ( ) { int result = 0 ; try { result = review . deleteRecord ( "Delete<sp>from<sp>customer_review<sp>where<sp>ReviewId<sp>=<sp>?" , reviewBean . getReviewId ( ) ) ; } catch ( java . sql . SQLException e ) { log . error ( "Error<sp>in<sp>deleting<sp>a<sp>record<sp>in<sp>customer_review<sp>table" , e ) ; } return result ; }
|
org . junit . Assert . assertTrue ( ( ( g7w14 . test . CustomerManagerTest . result ) == 1 ) )
|
getType_normal_returnsStringClass ( ) { com . vaadin . v7 . data . util . sqlcontainer . ColumnProperty cp = new com . vaadin . v7 . data . util . sqlcontainer . ColumnProperty ( "NAME" , false , true , true , false , "Ville" , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } getType ( ) { java . util . Map < java . lang . String , java . lang . String > styleToTypeMap = initStyleToTypeMap ( ) ; for ( Map . Entry < java . lang . String , java . lang . String > entry : styleToTypeMap . entrySet ( ) ) { java . lang . String notifType = entry . getKey ( ) ; if ( getAttribute ( "class" ) . contains ( notifType ) ) { return entry . getValue ( ) ; } } return "" ; }
|
org . junit . Assert . assertSame ( java . lang . String . class , cp . getType ( ) )
|
testRegisterWithAdditionalProperties ( ) { javax . management . ObjectName objectName = null ; try { counter = 42 ; java . util . Map < java . lang . String , java . lang . String > properties = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; properties . put ( "flavour" , "server" ) ; objectName = org . apache . hadoop . metrics2 . util . MBeans . register ( "UnitTest" , "RegisterTest" , properties , this ) ; javax . management . MBeanServer platformMBeanServer = java . lang . management . ManagementFactory . getPlatformMBeanServer ( ) ; int jmxCounter = ( ( int ) ( platformMBeanServer . getAttribute ( objectName , "Counter" ) ) ) ; "<AssertPlaceHolder>" ; } finally { if ( objectName != null ) { org . apache . hadoop . metrics2 . util . MBeans . unregister ( objectName ) ; } } } register ( java . lang . String , java . lang . String , java . util . Map , java . lang . Object ) { final javax . management . MBeanServer mbs = java . lang . management . ManagementFactory . getPlatformMBeanServer ( ) ; com . google . common . base . Preconditions . checkNotNull ( properties , ( "JMX<sp>bean<sp>properties<sp>should<sp>not<sp>be<sp>null<sp>for<sp>" + "bean<sp>registration." ) ) ; javax . management . ObjectName name = org . apache . hadoop . metrics2 . util . MBeans . getMBeanName ( serviceName , nameName , properties ) ; if ( name != null ) { try { mbs . registerMBean ( theMbean , name ) ; org . apache . hadoop . metrics2 . util . MBeans . LOG . debug ( ( "Registered<sp>" + name ) ) ; return name ; } catch ( javax . management . InstanceAlreadyExistsException iaee ) { if ( org . apache . hadoop . metrics2 . util . MBeans . LOG . isTraceEnabled ( ) ) { org . apache . hadoop . metrics2 . util . MBeans . LOG . trace ( ( ( "Failed<sp>to<sp>register<sp>MBean<sp>\"" + name ) + "\"" ) , iaee ) ; } else { org . apache . hadoop . metrics2 . util . MBeans . LOG . warn ( ( ( "Failed<sp>to<sp>register<sp>MBean<sp>\"" + name ) + "\":<sp>Instance<sp>already<sp>exists." ) ) ; } } catch ( java . lang . Exception e ) { org . apache . hadoop . metrics2 . util . MBeans . LOG . warn ( ( ( "Failed<sp>to<sp>register<sp>MBean<sp>\"" + name ) + "\"" ) , e ) ; } } return null ; }
|
org . junit . Assert . assertEquals ( counter , jmxCounter )
|
parseWithProtocolAndHostAndPortAndPathAndTwoQueryParameters ( ) { final com . azure . common . implementation . http . UrlBuilder builder = com . azure . common . implementation . http . UrlBuilder . parse ( "https://www.bing.com:987/my/path/again?a=1&b=2" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . value ; }
|
org . junit . Assert . assertEquals ( "https://www.bing.com:987/my/path/again?a=1&b=2" , builder . toString ( ) )
|
testCatchException_Obj_noExceptionThrown ( ) { java . util . List < java . lang . String > list = new java . util . ArrayList ( ) ; com . googlecode . catchexception . throwable . CatchThrowable . catchThrowable ( list :: size ) ; "<AssertPlaceHolder>" ; } caughtThrowable ( ) { return com . googlecode . catchexception . throwable . ThrowableHolder . get ( ) ; }
|
org . junit . Assert . assertNull ( com . googlecode . catchexception . throwable . CatchThrowable . caughtThrowable ( ) )
|
testDefaultSourceCodeTypesList ( ) { System . out . println ( "testDefaultSourceCodeTypesList" ) ; java . util . List < java . lang . String > defaultSourceCodeTypesList = java . util . Arrays . asList ( net . sourceforge . pmd . util . database . DBURITest . C_DEFAULT_SOURCE_CODE_TYPES . split ( "," ) ) ; net . sourceforge . pmd . util . database . DBURI instance = new net . sourceforge . pmd . util . database . DBURI ( net . sourceforge . pmd . util . database . DBURITest . C_TEST_DEFAULTS ) ; java . util . List < java . lang . String > result = instance . getSourceCodeTypesList ( ) ; "<AssertPlaceHolder>" ; } getSourceCodeTypesList ( ) { return sourceCodeTypesList ; }
|
org . junit . Assert . assertEquals ( defaultSourceCodeTypesList , result )
|
testUpdatingAssociateFwd ( ) { org . nd4j . autodiff . samediff . SameDiff sd = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . autodiff . samediff . SDVariable in = sd . var ( "in" , org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 12 , 12 ) . reshape ( 3 , 4 ) ) ; org . nd4j . autodiff . samediff . SDVariable w = sd . var ( "w" , org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 20 , 20 ) . reshape ( 4 , 5 ) ) ; org . nd4j . autodiff . samediff . SDVariable out = sd . mmul ( in , w ) ; org . nd4j . autodiff . samediff . SDVariable loss = out . std ( "out" , true ) ; org . nd4j . linalg . api . ndarray . INDArray outArr = sd . execAndEndResult ( ) . dup ( ) ; sd . execBackwards ( org . nd4j . autodiff . samediff . Collections . emptyMap ( ) ) ; org . nd4j . autodiff . samediff . Map < java . lang . String , org . nd4j . linalg . api . ndarray . INDArray > origGrad = new org . nd4j . autodiff . samediff . HashMap ( ) ; origGrad . put ( "in" , in . gradient ( ) . getArr ( ) . dup ( ) ) ; origGrad . put ( "w" , w . gradient ( ) . getArr ( ) . dup ( ) ) ; origGrad . put ( "out" , out . gradient ( ) . getArr ( ) . dup ( ) ) ; org . nd4j . linalg . api . ndarray . INDArray newIn = in . getArr ( ) . dup ( ) . muli ( 5 ) ; in . setArray ( newIn ) ; org . nd4j . autodiff . samediff . SameDiff sdGrad = sd . getFunction ( "grad" ) ; org . nd4j . linalg . api . ndarray . INDArray gradArrIn = sdGrad . getVariable ( "in" ) . getArr ( ) ; "<AssertPlaceHolder>" ; } getArr ( ) { return getArr ( false ) ; }
|
org . junit . Assert . assertEquals ( newIn , gradArrIn )
|
constructCert ( ) { java . security . Security . addProvider ( new org . bouncycastle . jce . provider . BouncyCastleProvider ( ) ) ; ( ( ch . qos . logback . classic . Logger ) ( org . slf4j . LoggerFactory . getLogger ( com . codeabovelab . dm . agent . security . CertificateGenerator . class ) ) ) . setLevel ( Level . DEBUG ) ; java . io . File file = new java . io . File ( "/tmp/dm-agent.jks" ) ; java . security . KeyPair keypair = com . codeabovelab . dm . agent . security . CertificateGenerator . createKeypair ( ) ; org . bouncycastle . cert . jcajce . JcaX509v3CertificateBuilder cb = com . codeabovelab . dm . agent . security . CertificateGeneratorTest . createRootCert ( keypair ) ; org . bouncycastle . operator . ContentSigner signer = new org . bouncycastle . operator . jcajce . JcaContentSignerBuilder ( "SHA256withRSA" ) . build ( keypair . getPrivate ( ) ) ; org . bouncycastle . cert . X509CertificateHolder rootCert = cb . build ( signer ) ; com . codeabovelab . dm . agent . security . KeystoreConfig cert = com . codeabovelab . dm . agent . security . CertificateGenerator . constructCert ( rootCert , keypair . getPrivate ( ) , file , com . google . common . collect . ImmutableSet . of ( "test1" , "test2" ) ) ; "<AssertPlaceHolder>" ; } build ( java . lang . String ) { com . codeabovelab . dm . cluman . ds . clusters . ClusterCreationContext ccc = new com . codeabovelab . dm . cluman . ds . clusters . ClusterCreationContext ( this , clusterId ) ; processConfig ( ccc ) ; com . codeabovelab . dm . cluman . ds . clusters . AbstractNodesGroup < ? > cluster ; if ( ( config ) instanceof com . codeabovelab . dm . cluman . ds . clusters . DefaultNodesGroupConfig ) { cluster = com . codeabovelab . dm . cluman . ds . clusters . NodesGroupImpl . builder ( ) . config ( ( ( com . codeabovelab . dm . cluman . ds . clusters . DefaultNodesGroupConfig ) ( config ) ) ) . storage ( storage ) . build ( ) ; } else if ( ( config ) instanceof com . codeabovelab . dm . cluman . ds . clusters . SwarmNodesGroupConfig ) { com . codeabovelab . dm . cluman . ds . clusters . SwarmNodesGroupConfig localConfig = ( ( com . codeabovelab . dm . cluman . ds . clusters . SwarmNodesGroupConfig ) ( config ) ) ; cluster = new com . codeabovelab . dm . cluman . ds . clusters . SwarmCluster ( storage , localConfig ) ; } else if ( ( config ) instanceof com . codeabovelab . dm . cluman . ds . clusters . DockerClusterConfig ) { com . codeabovelab . dm . cluman . ds . clusters . DockerClusterConfig localConfig = ( ( com . codeabovelab . dm . cluman . ds . clusters . DockerClusterConfig ) ( config ) ) ; cluster = new com . codeabovelab . dm . cluman . ds . clusters . DockerCluster ( storage , localConfig ) ; } else { throw new java . lang . IllegalArgumentException ( ( "Unsupported<sp>type<sp>of<sp>cluster<sp>config:<sp>" + ( config . getClass ( ) ) ) ) ; } beanFactory . autowireBean ( cluster ) ; ccc . beforeClusterInit ( cluster ) ; storage . getExecutor ( ) . execute ( ( ) -> { try ( com . codeabovelab . dm . cluman . security . TempAuth ta = com . codeabovelab . dm . cluman . security . TempAuth . asSystem ( ) ) { cluster . init ( ) ; } } ) ; return cluster ; }
|
org . junit . Assert . assertNotNull ( cert )
|
headsWithQueryParametersFrom1_1OriginsVia1_0ProxiesAreCacheableWithExpires ( ) { policy = new org . apache . hc . client5 . http . impl . cache . ResponseCachingPolicy ( 0 , true , false , false ) ; request = new org . apache . hc . core5 . http . message . BasicHttpRequest ( "HEAD" , "/foo?s=bar" ) ; response = new org . apache . hc . core5 . http . message . BasicHttpResponse ( org . apache . hc . core5 . http . HttpStatus . SC_OK , "OK" ) ; response . setVersion ( HttpVersion . HTTP_1_0 ) ; response . setHeader ( "Date" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( now ) ) ; response . setHeader ( "Expires" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( tenSecondsFromNow ) ) ; response . setHeader ( "Via" , "1.1<sp>someproxy" ) ; "<AssertPlaceHolder>" ; } isResponseCacheable ( org . apache . hc . core5 . http . HttpRequest , org . apache . hc . core5 . http . HttpResponse ) { final org . apache . hc . core5 . http . ProtocolVersion version = ( ( request . getVersion ( ) ) != null ) ? request . getVersion ( ) : org . apache . hc . core5 . http . HttpVersion . DEFAULT ; if ( ( version . compareToVersion ( HttpVersion . HTTP_1_1 ) ) > 0 ) { if ( log . isDebugEnabled ( ) ) { log . debug ( ( ( "Protocol<sp>version<sp>" + version ) + "<sp>is<sp>non-cacheable" ) ) ; } return false ; } final java . lang . String [ ] uncacheableRequestDirectives = new java . lang . String [ ] { org . apache . hc . client5 . http . cache . HeaderConstants . CACHE_CONTROL_NO_STORE } ; if ( hasCacheControlParameterFrom ( request , uncacheableRequestDirectives ) ) { log . debug ( "Response<sp>is<sp>explcitily<sp>non-cacheable<sp>per<sp>cache<sp>control<sp>directive" ) ; return false ; } if ( request . getRequestUri ( ) . contains ( "?" ) ) { if ( ( neverCache1_0ResponsesWithQueryString ) && ( from1_0Origin ( response ) ) ) { log . debug ( "Response<sp>is<sp>not<sp>cacheable<sp>as<sp>it<sp>had<sp>a<sp>query<sp>string" ) ; return false ; } else if ( ! ( isExplicitlyCacheable ( response ) ) ) { log . debug ( "Response<sp>is<sp>not<sp>cacheable<sp>as<sp>it<sp>is<sp>missing<sp>explicit<sp>caching<sp>headers" ) ; return false ; } } if ( expiresHeaderLessOrEqualToDateHeaderAndNoCacheControl ( response ) ) { log . debug ( "Expires<sp>header<sp>less<sp>or<sp>equal<sp>to<sp>Date<sp>header<sp>and<sp>no<sp>cache<sp>control<sp>directives" ) ; return false ; } if ( sharedCache ) { if ( ( ( request . countHeaders ( HeaderConstants . AUTHORIZATION ) ) > 0 ) && ( ! ( hasCacheControlParameterFrom ( response , org . apache . hc . client5 . http . impl . cache . ResponseCachingPolicy . AUTH_CACHEABLE_PARAMS ) ) ) ) { log . debug ( "Request<sp>contains<sp>private<sp>credentials" ) ; return false ; } } final java . lang . String method = request . getMethod ( ) ; return isResponseCacheable ( method , response ) ; }
|
org . junit . Assert . assertTrue ( policy . isResponseCacheable ( request , response ) )
|
testNgApp1 ( ) { tern . angular . MapDirectiveCollector collector = new tern . angular . MapDirectiveCollector ( ) ; tern . angular . modules . AngularModulesManager . getInstance ( ) . collectDirectives ( null , null , "ngApp1" , null , null , null , collector ) ; "<AssertPlaceHolder>" ; } getNames ( ) { return names ; }
|
org . junit . Assert . assertEquals ( 0 , collector . getNames ( ) . size ( ) )
|
shouldAutowire ( ) { "<AssertPlaceHolder>" ; final org . elasticsearch . client . IndicesAdminClient indices = client . admin ( ) . indices ( ) ; indices . prepareCreate ( "test" ) . execute ( ) . actionGet ( ) ; flush ( "test" ) ; indices . prepareDelete ( "test" ) . execute ( ) . actionGet ( ) ; }
|
org . junit . Assert . assertNotNull ( client )
|
deveObterUFComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral retorno = new com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral ( ) ; retorno . setUf ( DFUnidadeFederativa . SC ) ; "<AssertPlaceHolder>" ; } getUf ( ) { return this . uf ; }
|
org . junit . Assert . assertEquals ( DFUnidadeFederativa . SC , retorno . getUf ( ) )
|
testSimpleTree ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( "options<sp>{output=AST;}\n" + "a<sp>:<sp>ID<sp>INT<sp>-><sp>^(ID<sp>INT);\n" ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "a" 0 ) + "a" 1 ) ; java . lang . String treeGrammar = "tree<sp>grammar<sp>TP;\n" + ( ( "options<sp>{output=AST;<sp>ASTLabelType=CommonTree;<sp>tokenVocab=T;}\n" + "a<sp>:<sp>^(ID<sp>INT)<sp>-><sp>^(INT<sp>ID)\n" ) + "a" 2 ) ; java . lang . String found = execTreeParser ( "a" 7 , grammar , "TParser" , "a" 6 , treeGrammar , "TP" , "a" 3 , "a" , "a" , "a" 4 ) ; "<AssertPlaceHolder>" ; } execTreeParser ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { return execTreeParser ( parserGrammarFileName , parserGrammarStr , parserName , treeParserGrammarFileName , treeParserGrammarStr , treeParserName , lexerName , parserStartRuleName , treeParserStartRuleName , input , false ) ; }
|
org . junit . Assert . assertEquals ( "a" 5 , found )
|
testReturnOriginalStateTwo ( ) { final com . orientechnologies . orient . core . record . impl . ODocument doc = new com . orientechnologies . orient . core . record . impl . ODocument ( ) ; final com . orientechnologies . orient . core . db . record . OTrackedMap < java . lang . String > trackedMap = new com . orientechnologies . orient . core . db . record . OTrackedMap < java . lang . String > ( doc ) ; trackedMap . put ( "value10" 5 , "value11" 1 ) ; trackedMap . put ( "key2" , "value10" 0 ) ; trackedMap . put ( "value10" 6 , "value11" 0 ) ; trackedMap . put ( "value10" 3 , "value10" 1 ) ; trackedMap . put ( "value10" 7 , "value5" ) ; trackedMap . put ( "key6" , "value6" ) ; trackedMap . put ( "value10" 8 , "value10" 4 ) ; final com . orientechnologies . orient . core . db . record . Map < java . lang . Object , java . lang . String > original = new com . orientechnologies . orient . core . db . record . HashMap < java . lang . Object , java . lang . String > ( trackedMap ) ; final com . orientechnologies . orient . core . db . record . List < com . orientechnologies . orient . core . db . record . OMultiValueChangeEvent < java . lang . Object , java . lang . String > > firedEvents = new com . orientechnologies . orient . core . db . record . ArrayList < com . orientechnologies . orient . core . db . record . OMultiValueChangeEvent < java . lang . Object , java . lang . String > > ( ) ; trackedMap . addChangeListener ( new com . orientechnologies . orient . core . db . record . OMultiValueChangeListener < java . lang . Object , java . lang . String > ( ) { public void onAfterRecordChanged ( final com . orientechnologies . orient . core . db . record . OMultiValueChangeEvent < java . lang . Object , java . lang . String > event ) { firedEvents . add ( event ) ; } } ) ; trackedMap . put ( "key8" , "value10" 2 ) ; trackedMap . put ( "key9" , "value10" 9 ) ; trackedMap . put ( "key2" , "value10" ) ; trackedMap . put ( "key11" , "value11" ) ; trackedMap . remove ( "value10" 7 ) ; trackedMap . remove ( "value10" 7 ) ; trackedMap . clear ( ) ; trackedMap . put ( "value10" 6 , "value12" ) ; trackedMap . remove ( "key8" ) ; trackedMap . remove ( "value10" 6 ) ; "<AssertPlaceHolder>" ; } returnOriginalState ( com . orientechnologies . orient . core . db . record . List ) { final com . orientechnologies . orient . core . db . record . Set < com . orientechnologies . orient . core . db . record . OIdentifiable > reverted = new com . orientechnologies . orient . core . db . record . HashSet < com . orientechnologies . orient . core . db . record . OIdentifiable > ( this ) ; final com . orientechnologies . orient . core . db . record . ListIterator < com . orientechnologies . orient . core . db . record . OMultiValueChangeEvent < com . orientechnologies . orient . core . db . record . OIdentifiable , com . orientechnologies . orient . core . db . record . OIdentifiable > > listIterator = events . listIterator ( events . size ( ) ) ; while ( listIterator . hasPrevious ( ) ) { final com . orientechnologies . orient . core . db . record . OMultiValueChangeEvent < com . orientechnologies . orient . core . db . record . OIdentifiable , com . orientechnologies . orient . core . db . record . OIdentifiable > event = listIterator . previous ( ) ; switch ( event . getChangeType ( ) ) { case ADD : reverted . remove ( event . getKey ( ) ) ; break ; case REMOVE : reverted . add ( event . getOldValue ( ) ) ; break ; default : throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>change<sp>type<sp>:<sp>" + ( event . getChangeType ( ) ) ) ) ; } } return reverted ; }
|
org . junit . Assert . assertEquals ( trackedMap . returnOriginalState ( firedEvents ) , original )
|
testGetServerBehaviourDelegate_noDelegate ( ) { com . google . cloud . tools . eclipse . appengine . localserver . ui . LocalAppEngineConsole console = new com . google . cloud . tools . eclipse . appengine . localserver . ui . LocalAppEngineConsole . Factory ( null ) . createConsole ( "test" ) ; "<AssertPlaceHolder>" ; } getServerBehaviourDelegate ( ) { return serverBehaviour ; }
|
org . junit . Assert . assertNull ( console . getServerBehaviourDelegate ( ) )
|
typesShouldBeEqual2 ( ) { com . graphhopper . jsprit . core . problem . vehicle . VehicleType one = VehicleTypeImpl . Builder . newInstance ( "type" ) . addCapacityDimension ( 0 , 10 ) . build ( ) ; com . graphhopper . jsprit . core . problem . vehicle . VehicleType two = VehicleTypeImpl . Builder . newInstance ( "type" ) . addCapacityDimension ( 0 , 10 ) . build ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; com . graphhopper . jsprit . core . algorithm . state . StateFactory . StateIdImpl other = ( ( com . graphhopper . jsprit . core . algorithm . state . StateFactory . StateIdImpl ) ( obj ) ) ; if ( ( name ) == null ) { if ( ( other . name ) != null ) return false ; } else if ( ! ( name . equals ( other . name ) ) ) return false ; return true ; }
|
org . junit . Assert . assertTrue ( one . equals ( two ) )
|
readUtf8PageLabelPrefix ( ) { java . lang . String filename = ( com . itextpdf . kernel . pdf . PdfStringTest . sourceFolder ) + "utf-8-page-label-prefix.pdf" ; com . itextpdf . kernel . pdf . PdfDocument pdfDoc = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfReader ( filename ) ) ; java . lang . String [ ] labels = pdfDoc . getPageLabels ( ) ; java . lang . String [ ] expected = new java . lang . String [ ] { "Movies-12" 4 , "B" , "Movies-12" 1 , "Movies-12" 2 , "3" , "4" , "Movies-5" , "Movies-12" 3 , "Movies-12" 0 , "Movies-8" , "Movies-9" , "Movies-10" , "Movies-11" , "Movies-12" } ; pdfDoc . close ( ) ; for ( int i = 0 ; i < ( labels . length ) ; i ++ ) "<AssertPlaceHolder>" ; } close ( ) { pdfDocument . close ( ) ; }
|
org . junit . Assert . assertEquals ( expected [ i ] , labels [ i ] )
|
testWorkflowOutputs ( ) { org . apache . taverna . scufl2 . cwl . TestWorkflowProcess . cwlFile = loadYamlFile ( org . apache . taverna . scufl2 . cwl . TestWorkflowProcess . HELLO_WORLD_CWL ) ; org . apache . taverna . scufl2 . cwl . components . WorkflowProcess workflow = new org . apache . taverna . scufl2 . cwl . components . WorkflowProcess ( org . apache . taverna . scufl2 . cwl . TestWorkflowProcess . cwlFile ) ; workflow . parseOutputs ( ) ; java . util . Map < java . lang . String , org . apache . taverna . scufl2 . api . port . OutputWorkflowPort > expected = new java . util . HashMap ( ) ; org . apache . taverna . scufl2 . api . port . OutputWorkflowPort expectedOutput = new org . apache . taverna . scufl2 . api . port . OutputWorkflowPort ( ) ; expectedOutput . setName ( "output1" ) ; expected . put ( "output1" , expectedOutput ) ; "<AssertPlaceHolder>" ; } getWorkflowOutputs ( ) { return workflowOutputs ; }
|
org . junit . Assert . assertEquals ( expected , workflow . getWorkflowOutputs ( ) )
|
testSecureSharedDurableSubscriber ( ) { org . junit . Assume . assumeFalse ( protocol . equals ( "OPENWIRE" ) ) ; javax . jms . ConnectionFactory connectionFactory = getConnectionFactory ( "b" , "b" ) ; java . lang . String message = "blah" ; java . lang . String messageRecieved = sendAndReceiveTextUsingTopic ( connectionFactory , null , message , "secured_topic_shared_durable" , ( t , s ) -> s . createSharedDurableConsumer ( t , "secured_topic_shared_durable/queue" ) ) ; "<AssertPlaceHolder>" ; try { sendAndReceiveTextUsingTopic ( connectionFactory , null , message , "secured_topic_shared_durable" , ( t , s ) -> s . createSharedDurableConsumer ( t , "secured_topic_shared_durable/non-existant-queue" ) ) ; org . junit . Assert . fail ( "Security<sp>exception<sp>expected,<sp>but<sp>did<sp>not<sp>occur,<sp>excepetion<sp>expected<sp>as<sp>not<sp>permissioned<sp>to<sp>dynamically<sp>create<sp>queue" ) ; } catch ( javax . jms . JMSSecurityException j ) { } try { sendAndReceiveTextUsingTopic ( connectionFactory , null , message , "secured_topic_shared_durable" , ( t , s ) -> s . createSharedDurableConsumer ( t , "secured_topic_shared_durable/queue" , "age<sp><<sp>10" ) ) ; org . junit . Assert . fail ( "Security<sp>exception<sp>expected,<sp>but<sp>did<sp>not<sp>occur,<sp>excepetion<sp>expected<sp>as<sp>not<sp>permissioned<sp>to<sp>dynamically<sp>create<sp>queue" ) ; } catch ( javax . jms . JMSSecurityException j ) { } } createSharedDurableConsumer ( javax . jms . Topic , java . lang . String ) { checkSession ( ) ; try { org . apache . activemq . artemis . jms . client . ActiveMQJMSConsumer consumer = new org . apache . activemq . artemis . jms . client . ActiveMQJMSConsumer ( this , session . createSharedDurableConsumer ( topic , name ) ) ; checkAutoStart ( ) ; return consumer ; } catch ( javax . jms . JMSException e ) { throw org . apache . activemq . artemis . jms . client . JmsExceptionUtils . convertToRuntimeException ( e ) ; } }
|
org . junit . Assert . assertEquals ( message , messageRecieved )
|
removingQueryInTheMiddleKeepsOrder ( ) { org . neo4j . kernel . api . query . ExecutingQuery query1 = createExecutingQuery ( 1 , "query1" ) ; org . neo4j . kernel . api . query . ExecutingQuery query2 = createExecutingQuery ( 2 , "query2" ) ; org . neo4j . kernel . api . query . ExecutingQuery query3 = createExecutingQuery ( 3 , "query3" ) ; org . neo4j . kernel . api . query . ExecutingQuery query4 = createExecutingQuery ( 4 , "query4" ) ; org . neo4j . kernel . api . query . ExecutingQuery query5 = createExecutingQuery ( 5 , "query5" ) ; org . neo4j . kernel . impl . api . ExecutingQueryList list = ExecutingQueryList . EMPTY . push ( query1 ) . push ( query2 ) . push ( query3 ) . push ( query4 ) . push ( query5 ) ; java . util . List < org . neo4j . kernel . api . query . ExecutingQuery > result = list . remove ( query3 ) . queries ( ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } toList ( ) { assertEquals ( 0 , map . toList ( ) . size ( ) ) ; map . putAll ( org . neo4j . kernel . impl . util . collection . LinearProbeLongLongHashMapTest . toMap ( 0 , 1 , 2 , 3 , 4 , 5 ) ) ; assertEquals ( newListWith ( 0 , 1 , 2 , 3 , 4 , 5 ) , map . toList ( ) . sortThis ( ) ) ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( asList ( query5 , query4 , query2 , query1 ) ) )
|
getCurrentTransaction ( ) { "<AssertPlaceHolder>" ; } getCurrentTransaction ( ) { org . junit . Assert . assertThat ( org . slim3 . datastore . GlobalTransaction . getCurrentTransaction ( ) , org . hamcrest . CoreMatchers . is ( gtx ) ) ; }
|
org . junit . Assert . assertThat ( org . slim3 . datastore . GlobalTransaction . getCurrentTransaction ( ) , org . hamcrest . CoreMatchers . is ( gtx ) )
|
testSpaceInWikiTitle ( ) { java . net . URL url ; try { url = new java . net . URL ( "https://fr.wikipedia.org/wiki/Discussion:Histoire<sp>du<sp>Racing<sp>Club<sp>de<sp>Strasbourg" ) ; } catch ( java . net . MalformedURLException e ) { url = null ; } "<AssertPlaceHolder>" ; } toString ( ) { return url ; }
|
org . junit . Assert . assertNull ( url . toString ( ) , null )
|
matchesFilterTest ( ) { org . candlepin . model . EntitlementFilterBuilder filters = org . candlepin . resource . util . EntitlementFinderUtil . createFilter ( "matchesFilterTest" , null ) ; "<AssertPlaceHolder>" ; } hasMatchFilters ( ) { return ! ( matchFilters . isEmpty ( ) ) ; }
|
org . junit . Assert . assertEquals ( true , filters . hasMatchFilters ( ) )
|
lessDataPointsThanSampleSize ( ) { com . addthis . hydra . data . util . KeyPercentileDistribution distribution = new com . addthis . hydra . data . util . KeyPercentileDistribution ( 100 ) . init ( ) ; for ( int i = 0 ; i < 50 ; i ++ ) { distribution . update ( i ) ; } "<AssertPlaceHolder>" ; } getSnapshot ( ) { return sample . getSnapshot ( ) ; }
|
org . junit . Assert . assertEquals ( 50 , distribution . getSnapshot ( ) . size ( ) )
|
testGetWorld ( ) { System . out . println ( "getWorld" ) ; mudmap2 . backend . Layer instance = new mudmap2 . backend . Layer ( mudmap2 . backend . LayerTest . world ) ; mudmap2 . backend . World result = instance . getWorld ( ) ; "<AssertPlaceHolder>" ; } getWorld ( ) { return world ; }
|
org . junit . Assert . assertEquals ( mudmap2 . backend . LayerTest . world , result )
|
testConvertAllWithNoRelations ( ) { java . lang . String name = "first<sp>blood" ; java . lang . String abbrName = "fb" ; org . lnu . is . domain . paper . type . PaperType expected = new org . lnu . is . domain . paper . type . PaperType ( ) ; expected . setName ( name ) ; expected . setAbbrName ( abbrName ) ; org . lnu . is . resource . paper . type . PaperTypeResource source = new org . lnu . is . resource . paper . type . PaperTypeResource ( ) ; source . setName ( name ) ; source . setAbbrName ( abbrName ) ; java . util . List < org . lnu . is . resource . paper . type . PaperTypeResource > sources = java . util . Arrays . asList ( source ) ; java . util . List < org . lnu . is . domain . paper . type . PaperType > expecteds = java . util . Arrays . asList ( expected ) ; java . util . List < org . lnu . is . domain . paper . type . PaperType > 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 )
|
testSimpleIteration ( ) { int numRetries = 5 ; int timeoutScale = 1 ; for ( int numRetry = 0 ; numRetry < numRetries ; numRetry ++ ) { try { org . apache . flink . streaming . api . environment . StreamExecutionEnvironment env = org . apache . flink . streaming . api . environment . StreamExecutionEnvironment . getExecutionEnvironment ( ) ; org . apache . flink . test . streaming . runtime . IterateITCase . iterated = new boolean [ parallelism ] ; org . apache . flink . streaming . api . datastream . DataStream < java . lang . Boolean > source = env . fromCollection ( java . util . Collections . nCopies ( ( ( parallelism ) * 2 ) , false ) ) . map ( org . apache . flink . test . streaming . runtime . IterateITCase . noOpBoolMap ) . name ( "ParallelizeMap" ) ; org . apache . flink . streaming . api . datastream . IterativeStream < java . lang . Boolean > iteration = source . iterate ( ( 3000 * timeoutScale ) ) ; org . apache . flink . streaming . api . datastream . DataStream < java . lang . Boolean > increment = iteration . flatMap ( new org . apache . flink . test . streaming . runtime . IterateITCase . IterationHead ( ) ) . map ( org . apache . flink . test . streaming . runtime . IterateITCase . noOpBoolMap ) ; iteration . map ( org . apache . flink . test . streaming . runtime . IterateITCase . noOpBoolMap ) . addSink ( new org . apache . flink . test . streaming . runtime . util . ReceiveCheckNoOpSink ( ) ) ; iteration . closeWith ( increment ) . addSink ( new org . apache . flink . test . streaming . runtime . util . ReceiveCheckNoOpSink ( ) ) ; env . execute ( ) ; for ( boolean iter : org . apache . flink . test . streaming . runtime . IterateITCase . iterated ) { "<AssertPlaceHolder>" ; } break ; } catch ( java . lang . Throwable t ) { org . apache . flink . test . streaming . runtime . IterateITCase . LOG . info ( ( ( ( ( "Run<sp>" + ( numRetry + 1 ) ) + "/" ) + numRetries ) + "<sp>failed" ) , t ) ; if ( numRetry >= ( numRetries - 1 ) ) { throw t ; } else { timeoutScale *= 2 ; } } } } execute ( ) { return execute ( org . apache . flink . streaming . api . environment . StreamExecutionEnvironment . DEFAULT_JOB_NAME ) ; }
|
org . junit . Assert . assertTrue ( iter )
|
strokeOpacitySetWithNoneStroke ( ) { com . itextpdf . svg . renderers . impl . AbstractSvgNodeRenderer renderer = new com . itextpdf . svg . renderers . impl . CircleSvgNodeRenderer ( ) ; renderer . setAttribute ( SvgConstants . Attributes . STROKE_OPACITY , "0.75" ) ; renderer . setAttribute ( SvgConstants . Attributes . STROKE , SvgConstants . Values . NONE ) ; renderer . draw ( sdc ) ; com . itextpdf . kernel . pdf . PdfResources resources = cv . getResources ( ) ; "<AssertPlaceHolder>" ; } getResourceNames ( ) { java . util . Set < com . itextpdf . kernel . pdf . PdfName > names = new java . util . TreeSet ( ) ; for ( com . itextpdf . kernel . pdf . PdfName resType : getPdfObject ( ) . keySet ( ) ) { names . addAll ( getResourceNames ( resType ) ) ; } return names ; }
|
org . junit . Assert . assertTrue ( resources . getResourceNames ( ) . isEmpty ( ) )
|
deveObterValorTotalBrutoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemProduto produto = new com . fincatto . documentofiscal . nfe310 . classes . nota . NFNotaInfoItemProduto ( ) ; final java . math . BigDecimal valorTotalBruto = new java . math . BigDecimal ( "999999999999.99" ) ; produto . setValorTotalBruto ( valorTotalBruto ) ; "<AssertPlaceHolder>" ; } getValorTotalBruto ( ) { return this . valorTotalBruto ; }
|
org . junit . Assert . assertEquals ( "999999999999.99" , produto . getValorTotalBruto ( ) )
|
withValidCredentialsTest ( ) { final java . lang . String uri = "https://mail.google.com/mail/feed/atom" ; final net . violet . platform . httpclient . ConnectionsManager manager = new net . violet . platform . httpclient . ConnectionsManager ( 1 ) ; final net . violet . platform . httpclient . ConnectionConfiguration configuration = new net . violet . platform . httpclient . ConnectionConfiguration ( uri ) ; configuration . addCredentials ( "vnabaztag" , "violet123" ) ; final net . violet . platform . httpclient . Connection connection = manager . openConnection ( configuration ) ; final byte [ ] content = org . apache . commons . io . IOUtils . toByteArray ( connection . getInputStream ( ) ) ; "<AssertPlaceHolder>" ; } getInputStream ( ) { final java . lang . String encoding = getHeaderValue ( "Content-Encoding" ) ; final java . io . InputStream responseAsStream = this . method . getResponseBodyAsStream ( ) ; if ( ( encoding != null ) && ( encoding . equalsIgnoreCase ( "gzip" ) ) ) { return new java . util . zip . GZIPInputStream ( responseAsStream ) ; } else if ( ( encoding != null ) && ( encoding . equalsIgnoreCase ( "deflate" ) ) ) { return new java . util . zip . InflaterInputStream ( responseAsStream , new java . util . zip . Inflater ( true ) ) ; } else { return responseAsStream ; } }
|
org . junit . Assert . assertTrue ( ( ( content . length ) > 0 ) )
|
test_render ( ) { java . lang . String templateVariable = "Hello<sp>Jinjava!" ; java . util . Map < java . lang . String , java . lang . Object > model = new java . util . HashMap ( ) ; model . put ( "message" , templateVariable ) ; java . lang . String expected = java . lang . String . format ( "<h1>%s</h1>" , templateVariable ) ; java . lang . String actual = new spark . template . jinjava . JinjavaEngine ( ) . render ( new spark . ModelAndView ( model , "template/hello.jin" ) ) ; "<AssertPlaceHolder>" ; } render ( spark . ModelAndView , java . util . Locale ) { java . lang . Object model = modelAndView . getModel ( ) ; if ( model instanceof java . util . Map ) { org . thymeleaf . context . Context context = new org . thymeleaf . context . Context ( locale ) ; context . setVariables ( ( ( java . util . Map < java . lang . String , java . lang . Object > ) ( model ) ) ) ; return templateEngine . process ( modelAndView . getViewName ( ) , context ) ; } else { throw new java . lang . IllegalArgumentException ( "modelAndView.getModel()<sp>must<sp>return<sp>a<sp>java.util.Map" ) ; } }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testConvertAllWhiteSpacesThreeByteSpaceMiddle ( ) { java . lang . String in = "one" + ( " " + "two" ) ; java . lang . String out = org . oscm . converter . WhiteSpaceConverter . replace ( in ) ; "<AssertPlaceHolder>" ; } replace ( java . lang . String ) { java . lang . String result = new java . lang . String ( ) ; if ( value != null ) { for ( int i = 0 ; i < ( value . length ( ) ) ; i ++ ) { char c = value . charAt ( i ) ; if ( java . lang . Character . isWhitespace ( c ) ) { result = result . concat ( "<sp>" ) ; } else { result = result . concat ( java . lang . Character . toString ( c ) ) ; } } } return result ; }
|
org . junit . Assert . assertEquals ( ( "one" + ( "<sp>" + "two" ) ) , out )
|
testUgiGetsCleared ( ) { configure ( processor , 0 ) ; runner . setProperty ( PutHive3Streaming . METASTORE_URI , "thrift://localhost:9083" ) ; runner . setProperty ( PutHive3Streaming . DB_NAME , "default" ) ; runner . setProperty ( PutHive3Streaming . TABLE_NAME , "users" ) ; processor . ugi = mock ( org . apache . hadoop . security . UserGroupInformation . class ) ; runner . run ( ) ; "<AssertPlaceHolder>" ; } run ( ) { try { final org . apache . nifi . remote . client . SiteToSiteClient client = new org . apache . nifi . remote . client . SiteToSiteClient . Builder ( ) . fromConfig ( clientConfig ) . build ( ) ; try { while ( ! ( isStopped ( ) ) ) { final org . apache . nifi . remote . Transaction transaction = client . createTransaction ( TransferDirection . RECEIVE ) ; org . apache . nifi . remote . protocol . DataPacket dataPacket = transaction . receive ( ) ; if ( dataPacket == null ) { transaction . confirm ( ) ; transaction . complete ( ) ; try { java . lang . Thread . sleep ( 1000L ) ; } catch ( java . lang . InterruptedException e ) { } continue ; } final java . util . List < org . apache . nifi . spark . NiFiDataPacket > dataPackets = new java . util . ArrayList ( ) ; do { final java . io . InputStream inStream = dataPacket . getData ( ) ; final byte [ ] data = new byte [ ( ( int ) ( dataPacket . getSize ( ) ) ) ] ; org . apache . nifi . stream . io . StreamUtils . fillBuffer ( inStream , data ) ; final java . util . Map < java . lang . String , java . lang . String > attributes = dataPacket . getAttributes ( ) ; final org . apache . nifi . spark . NiFiDataPacket NiFiDataPacket = new org . apache . nifi . spark . StandardNiFiDataPacket ( data , attributes ) ; dataPackets . add ( NiFiDataPacket ) ; dataPacket = transaction . receive ( ) ; } while ( dataPacket != null ) ; transaction . confirm ( ) ; store ( dataPackets . iterator ( ) ) ; transaction . complete ( ) ; } } finally { try { client . close ( ) ; } catch ( final java . io . IOException ioe ) { reportError ( "Failed<sp>to<sp>close<sp>client" , ioe ) ; } } } catch ( final java . io . IOException ioe ) { restart ( "Failed<sp>to<sp>receive<sp>data<sp>from<sp>NiFi" , ioe ) ; } }
|
org . junit . Assert . assertNull ( processor . ugi )
|
testDoWriteSome ( ) { final com . spotify . heroic . ingestion . CoreIngestionGroup group = setupIngestionGroup ( of ( metric ) , empty ( ) , of ( suggest ) ) ; final java . util . List < eu . toolchain . async . AsyncFuture < com . spotify . heroic . ingestion . Ingestion > > futures = com . google . common . collect . ImmutableList . of ( other , other ) ; doReturn ( rangeSupplier ) . when ( group ) . rangeSupplier ( request ) ; doReturn ( expected ) . when ( async ) . collect ( futures , com . spotify . heroic . ingestion . Ingestion . reduce ( ) ) ; doReturn ( other ) . when ( group ) . doMetricWrite ( eq ( metric ) , eq ( request ) , any ( ) ) ; doReturn ( other ) . when ( group ) . doMetadataWrite ( eq ( metadata ) , eq ( request ) , eq ( range ) , any ( ) ) ; doReturn ( other ) . when ( group ) . doSuggestWrite ( eq ( suggest ) , eq ( request ) , eq ( range ) , any ( ) ) ; "<AssertPlaceHolder>" ; verify ( group ) . rangeSupplier ( request ) ; verify ( group ) . doMetricWrite ( eq ( metric ) , eq ( request ) , any ( ) ) ; verify ( group , never ( ) ) . doMetadataWrite ( eq ( metadata ) , eq ( request ) , eq ( range ) , any ( ) ) ; verify ( group ) . doSuggestWrite ( eq ( suggest ) , eq ( request ) , eq ( range ) , any ( ) ) ; verify ( rangeSupplier , times ( 1 ) ) . get ( ) ; } doWrite ( com . spotify . heroic . ingestion . Ingestion$Request ) { final io . opencensus . trace . Span span = tracer . spanBuilder ( "CoreIngestionGroup.doWrite" ) . startSpan ( ) ; final java . util . List < eu . toolchain . async . AsyncFuture < com . spotify . heroic . ingestion . Ingestion > > futures = new java . util . ArrayList ( ) ; final java . util . function . Supplier < com . spotify . heroic . common . DateRange > range = rangeSupplier ( request ) ; metric . map ( ( m ) -> doMetricWrite ( m , request , span ) ) . ifPresent ( futures :: add ) ; metadata . map ( ( m ) -> doMetadataWrite ( m , request , range . get ( ) , span ) ) . ifPresent ( futures :: add ) ; suggest . map ( ( s ) -> doSuggestWrite ( s , request , range . get ( ) , span ) ) . ifPresent ( futures :: add ) ; return async . collect ( futures , com . spotify . heroic . ingestion . Ingestion . reduce ( ) ) . onFinished ( span :: end ) ; }
|
org . junit . Assert . assertEquals ( expected , group . doWrite ( request ) )
|
putAndCheckSize ( ) { final com . b2international . commons . collect . IntKeySetMultimap < java . lang . String > multimap = new com . b2international . commons . collect . IntKeySetMultimap ( ) ; multimap . put ( 1 , "One_1" ) ; multimap . put ( 2 , "Two_1" ) ; multimap . put ( 2 , "Two_2" ) ; multimap . put ( 2 , "Two_1" ) ; multimap . put ( 3 , "Three_1" ) ; multimap . put ( 3 , "Three_1" ) ; multimap . put ( 3 , "Three_1" ) ; multimap . put ( 3 , "Three_2" ) ; multimap . put ( 3 , "Three_3" ) ; "<AssertPlaceHolder>" ; } size ( ) { return internalIdArray . length ; }
|
org . junit . Assert . assertTrue ( ( ( multimap . size ( ) ) == 3 ) )
|
testBuild ( ) { org . lnu . is . domain . admin . unit . type . AdminUnitType context = new org . lnu . is . domain . admin . unit . type . AdminUnitType ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>AdminUnitType<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . admin . unit . type . AdminUnitType > 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 )
|
testMissingLineFeed ( ) { try ( io . nats . client . NatsTestServer ts = new io . nats . client . NatsTestServer ( false ) ; io . nats . client . impl . NatsConnection nc = ( ( io . nats . client . impl . NatsConnection ) ( io . nats . client . Nats . connect ( ts . getURI ( ) ) ) ) ) { io . nats . client . impl . NatsConnectionReader reader = nc . getReader ( ) ; byte [ ] bytes = "PING\rPONG" . getBytes ( StandardCharsets . US_ASCII ) ; reader . fakeReadForTest ( bytes ) ; reader . gatherOp ( bytes . length ) ; "<AssertPlaceHolder>" ; } } gatherOp ( int ) { try { while ( ( this . bufferPosition ) < maxPos ) { byte b = this . buffer [ this . bufferPosition ] ; ( this . bufferPosition ) ++ ; if ( gotCR ) { if ( b == ( NatsConnection . LF ) ) { this . op = opFor ( opArray , opPos ) ; this . gotCR = false ; this . opPos = 0 ; this . mode = io . nats . client . impl . NatsConnectionReader . Mode . PARSE_PROTO ; break ; } else { throw new java . lang . IllegalStateException ( "Bad<sp>socket<sp>data,<sp>no<sp>LF<sp>after<sp>CR" ) ; } } else if ( ( b == ( io . nats . client . impl . NatsConnectionReader . SPACE ) ) || ( b == ( io . nats . client . impl . NatsConnectionReader . TAB ) ) ) { this . op = opFor ( opArray , opPos ) ; this . opPos = 0 ; if ( ( this . op ) == ( NatsConnection . OP_MSG ) ) { this . msgLinePosition = 0 ; this . mode = io . nats . client . impl . NatsConnectionReader . Mode . GATHER_MSG_PROTO ; } else { this . mode = io . nats . client . impl . NatsConnectionReader . Mode . GATHER_PROTO ; } break ; } else if ( b == ( NatsConnection . CR ) ) { this . gotCR = true ; } else { this . opArray [ opPos ] = ( ( char ) ( b ) ) ; ( this . opPos ) ++ ; } } } catch ( java . lang . ArrayIndexOutOfBoundsException | java . lang . IllegalStateException | java . lang . NumberFormatException | java . lang . NullPointerException ex ) { this . encounteredProtocolError ( ex ) ; } }
|
org . junit . Assert . assertFalse ( true )
|
testLuaError ( ) { final org . luaj . vm2 . LuaError error = new org . luaj . vm2 . LuaError ( "Test" ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return message ; }
|
org . junit . Assert . assertEquals ( "Test" , error . getMessage ( ) )
|
testRenameFileWithMissingSource ( ) { java . net . URI oldUri = java . net . URI . create ( "fileServiceTest/oldNameMissing.xml" ) ; "<AssertPlaceHolder>" ; org . kitodo . production . services . file . FileServiceTest . fileService . renameFile ( oldUri , "newName.xml" ) ; } fileExist ( java . net . URI ) { return fileManagementModule . fileExist ( uri ) ; }
|
org . junit . Assert . assertFalse ( org . kitodo . production . services . file . FileServiceTest . fileService . fileExist ( oldUri ) )
|
testXpath ( ) { org . omg . bpmn . miwg . api . input . AnalysisInput input = new org . omg . bpmn . miwg . api . input . ResourceAnalysisInput ( getClass ( ) , ( ( "/Reference/" + ( param ) ) + ".bpmn" ) ) ; org . omg . bpmn . miwg . api . AnalysisJob job = new org . omg . bpmn . miwg . api . AnalysisJob ( "Reference" , param , org . omg . bpmn . miwg . api . Variant . Reference , input ) ; job . setXpathOnly ( ) ; org . omg . bpmn . miwg . api . AnalysisRun run = org . omg . bpmn . miwg . facade . AnalysisFacade . executeAnalysisJob ( job ) ; org . omg . bpmn . miwg . api . AnalysisOutput result = run . getResult ( org . omg . bpmn . miwg . xpath . XpathAnalysisTool . class ) ; "<AssertPlaceHolder>" ; System . out . println ( ) ; System . out . println ( result ) ; } numFindings ( ) { return numFindings ; }
|
org . junit . Assert . assertEquals ( 0 , result . numFindings ( ) )
|
testGetHBaseConnectionWithNullNamedCluster ( ) { java . lang . String siteConfig = "site" ; java . lang . String defaultConfig = "default" ; org . pentaho . di . core . variables . VariableSpace variableSpace = mock ( org . pentaho . di . core . variables . VariableSpace . class ) ; org . pentaho . di . core . logging . LogChannelInterface logChannelInterface = mock ( org . pentaho . di . core . logging . LogChannelInterface . class ) ; hBaseService = new com . pentaho . big . data . bundles . impl . shim . hbase . HBaseServiceImpl ( null , hadoopConfiguration ) ; try { com . pentaho . big . data . bundles . impl . shim . hbase . HBaseConnectionImpl hhBaseConnection = hBaseService . getHBaseConnection ( variableSpace , siteConfig , defaultConfig , logChannelInterface ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . NullPointerException e ) { org . junit . Assert . fail ( "No<sp>NPE<sp>is<sp>expected<sp>but<sp>it<sp>occurs" ) ; } } getHBaseConnection ( org . pentaho . di . core . variables . VariableSpace , java . lang . String , java . lang . String , org . pentaho . di . core . logging . LogChannelInterface ) { java . util . Properties connProps = new java . util . Properties ( ) ; java . lang . String zooKeeperHost = null ; java . lang . String zooKeeperPort = null ; if ( ( namedCluster ) != null ) { zooKeeperHost = variableSpace . environmentSubstitute ( namedCluster . getZooKeeperHost ( ) ) ; zooKeeperPort = variableSpace . environmentSubstitute ( namedCluster . getZooKeeperPort ( ) ) ; } if ( ! ( org . pentaho . di . core . Const . isEmpty ( zooKeeperHost ) ) ) { connProps . setProperty ( org . pentaho . hbase . shim . spi . HBaseConnection . ZOOKEEPER_QUORUM_KEY , zooKeeperHost ) ; } if ( ! ( org . pentaho . di . core . Const . isEmpty ( zooKeeperPort ) ) ) { connProps . setProperty ( org . pentaho . hbase . shim . spi . HBaseConnection . ZOOKEEPER_PORT_KEY , zooKeeperPort ) ; } if ( ! ( org . pentaho . di . core . Const . isEmpty ( siteConfig ) ) ) { connProps . setProperty ( org . pentaho . hbase . shim . spi . HBaseConnection . SITE_KEY , com . pentaho . big . data . bundles . impl . shim . hbase . FilePathModifierUtil . modifyPathToConfigFileIfNecessary ( siteConfig ) ) ; } if ( ! ( org . pentaho . di . core . Const . isEmpty ( defaultConfig ) ) ) { connProps . setProperty ( org . pentaho . hbase . shim . spi . HBaseConnection . DEFAULTS_KEY , com . pentaho . big . data . bundles . impl . shim . hbase . FilePathModifierUtil . modifyPathToConfigFileIfNecessary ( defaultConfig ) ) ; } connProps . setProperty ( org . pentaho . hbase . shim . spi . HBaseConnection . ACTIVE_SHIM_VERSION , shimVersion ) ; return new com . pentaho . big . data . bundles . impl . shim . hbase . HBaseConnectionImpl ( this , hBaseShim , bytesUtil , connProps , logChannelInterface ) ; }
|
org . junit . Assert . assertNotNull ( hhBaseConnection )
|
pay_notify ( ) { java . lang . String uri = "/api/PayNotify/QH/500006/" ; java . lang . String params = "?order_id=1703163703999689041&app_key=c91a4fd40d51798d70cbf19b3c1bbc6b&product_id=111111111111111&amount=1&app_uid=2846383641&user_id=2846383641&sign_type=md5&gateway_flag=success&sign=4f7d7869c59b6b65cf6377280a21816b&sign_return=2a19db57b1da3021683673bb984fcc5d" ; com . li3huo . sdk . domain . Voucher voucher = new com . li3huo . sdk . domain . Voucher ( ) ; voucher . channelId = com . li3huo . sdk . ChannelCode . qihoo ; voucher . appid = game_id ; v . check_pay_notify ( voucher , getContext ( ( uri + params ) , null ) ) ; logger . debug ( ( "voucher<sp>=<sp>" + ( voucher . toJSONString ( ) ) ) ) ; "<AssertPlaceHolder>" ; } toJSONString ( ) { return com . alibaba . fastjson . JSON . toJSONString ( this ) ; }
|
org . junit . Assert . assertTrue ( ( ( voucher . code ) == 0 ) )
|
testExtractFieldsOfNonStructuredMessage ( ) { java . util . Map < java . lang . String , java . lang . Object > result = syslogCodec . extractFields ( newEvent ( org . graylog2 . inputs . codecs . StructuredSyslogTest . ValidNonStructuredMessage ) , false ) ; "<AssertPlaceHolder>" ; } size ( ) { return 0 ; }
|
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
|
testSerialization ( ) { org . jfree . chart . annotations . CategoryTextAnnotation a1 = new org . jfree . chart . annotations . CategoryTextAnnotation ( "Test" , "Category" , 1.0 ) ; org . jfree . chart . annotations . CategoryTextAnnotation a2 = ( ( org . jfree . chart . annotations . CategoryTextAnnotation ) ( org . jfree . chart . TestUtilities . serialised ( a1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( a1 , a2 )
|
testGetSetChainId ( ) { org . biojava . nbio . structure . ResidueNumber instance = new org . biojava . nbio . structure . ResidueNumber ( "A" , 42 , '<sp>' ) ; java . lang . String expResult = "A" ; java . lang . String result = instance . getChainName ( ) ; "<AssertPlaceHolder>" ; } getChainName ( ) { return chainName ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
panicTest ( ) { java . lang . String path = "target/var/testdb" ; org . neo4j . kernel . impl . AbstractNeo4jTestCase . deleteFileOrDirectory ( new java . io . File ( path ) ) ; org . neo4j . kernel . EmbeddedGraphDatabase graphDb = new org . neo4j . kernel . EmbeddedGraphDatabase ( path ) ; org . neo4j . kernel . impl . transaction . XaDataSourceManager xaDs = graphDb . getConfig ( ) . getTxModule ( ) . getXaDataSourceManager ( ) ; org . neo4j . kernel . impl . event . IllBehavingXaDataSource noob = new org . neo4j . kernel . impl . event . IllBehavingXaDataSource ( ) ; xaDs . registerDataSource ( "noob" , noob , org . neo4j . helpers . UTF8 . encode ( "554342" ) ) ; org . neo4j . kernel . impl . event . TestKernelPanic . Panic panic = new org . neo4j . kernel . impl . event . TestKernelPanic . Panic ( ) ; graphDb . registerKernelEventHandler ( panic ) ; org . neo4j . graphdb . Transaction gdbTx = graphDb . beginTx ( ) ; javax . transaction . TransactionManager txMgr = graphDb . getConfig ( ) . getTxModule ( ) . getTxManager ( ) ; javax . transaction . Transaction tx = txMgr . getTransaction ( ) ; graphDb . createNode ( ) ; tx . enlistResource ( noob . getXaConnection ( ) . getXaResource ( ) ) ; try { gdbTx . success ( ) ; gdbTx . finish ( ) ; org . junit . Assert . fail ( "Should<sp>fail" ) ; } catch ( java . lang . Throwable t ) { for ( int i = 0 ; ( i < 10 ) && ( ( panic . panic ) == false ) ; i ++ ) { java . lang . Thread . sleep ( 1000 ) ; } } finally { graphDb . unregisterKernelEventHandler ( panic ) ; } "<AssertPlaceHolder>" ; graphDb . shutdown ( ) ; } unregisterKernelEventHandler ( org . neo4j . graphdb . event . KernelEventHandler ) { return this . graphDbImpl . unregisterKernelEventHandler ( handler ) ; }
|
org . junit . Assert . assertTrue ( panic . panic )
|
testComputeRoutesWithNextHopIpArpTrue ( ) { java . lang . String c1 = "c1" ; java . lang . String i1 = "i1" ; java . lang . String c2 = "c2" ; java . lang . String i2 = "i2" ; org . batfish . datamodel . Edge e1 = org . batfish . datamodel . Edge . of ( c1 , i1 , c2 , i2 ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , org . batfish . datamodel . IpSpace > > arpReplies = com . google . common . collect . ImmutableMap . of ( c2 , com . google . common . collect . ImmutableMap . of ( i2 , org . batfish . datamodel . ForwardingAnalysisImplTest . P2 . getStartIp ( ) . toIpSpace ( ) ) ) ; org . batfish . datamodel . Topology topology = new org . batfish . datamodel . Topology ( com . google . common . collect . ImmutableSortedSet . of ( e1 ) ) ; java . lang . String v1 = "v1" ; org . batfish . datamodel . AbstractRoute r1 = org . batfish . datamodel . StaticRoute . builder ( ) . setNetwork ( org . batfish . datamodel . ForwardingAnalysisImplTest . P1 ) . setNextHopIp ( org . batfish . datamodel . ForwardingAnalysisImplTest . P2 . getStartIp ( ) ) . setAdministrativeCost ( 1 ) . build ( ) ; org . batfish . datamodel . AbstractRoute r2 = org . batfish . datamodel . StaticRoute . builder ( ) . setNetwork ( org . batfish . datamodel . ForwardingAnalysisImplTest . P1 ) . setNextHopIp ( org . batfish . datamodel . ForwardingAnalysisImplTest . P2 . getEndIp ( ) ) . setAdministrativeCost ( 1 ) . build ( ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . util . Set < org . batfish . datamodel . AbstractRoute > > > > routesWithNextHop = com . google . common . collect . ImmutableMap . of ( c1 , com . google . common . collect . ImmutableMap . of ( v1 , com . google . common . collect . ImmutableMap . of ( i1 , com . google . common . collect . ImmutableSet . of ( r1 , r2 ) ) ) ) ; org . batfish . datamodel . AbstractRoute ifaceRoute = new org . batfish . datamodel . ConnectedRoute ( org . batfish . datamodel . ForwardingAnalysisImplTest . P2 , i1 ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , org . batfish . datamodel . Fib > > fibs = com . google . common . collect . ImmutableMap . of ( c1 , com . google . common . collect . ImmutableMap . of ( v1 , org . batfish . datamodel . MockFib . builder ( ) . setNextHopInterfaces ( com . google . common . collect . ImmutableMap . of ( r1 , com . google . common . collect . ImmutableMap . of ( i1 , com . google . common . collect . ImmutableMap . of ( r1 . getNextHopIp ( ) , com . google . common . collect . ImmutableSet . of ( ifaceRoute ) ) ) , r2 , com . google . common . collect . ImmutableMap . of ( i1 , com . google . common . collect . ImmutableMap . of ( r2 . getNextHopIp ( ) , com . google . common . collect . ImmutableSet . of ( ifaceRoute ) ) ) ) ) . build ( ) ) ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . util . Map < org . batfish . datamodel . Edge , java . util . Set < org . batfish . datamodel . AbstractRoute > > > > result = org . batfish . datamodel . ForwardingAnalysisImpl . computeRoutesWithNextHopIpArpTrue ( fibs , topology , arpReplies , routesWithNextHop ) ; "<AssertPlaceHolder>" ; } of ( java . lang . String , java . lang . String , java . lang . String , java . lang . String ) { return org . batfish . datamodel . Edge . create ( tailNode , tailInterface , headNode , headInterface ) ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . equalTo ( com . google . common . collect . ImmutableMap . of ( c1 , com . google . common . collect . ImmutableMap . of ( v1 , com . google . common . collect . ImmutableMap . of ( e1 , com . google . common . collect . ImmutableSet . of ( r1 ) ) ) ) ) )
|
testAddCourseOfferingToCourseSet ( ) { cmAdmin . createCourseSet ( "cs1" , "course<sp>1" 0 , "course<sp>1" 0 , null , null ) ; cmAdmin . createCanonicalCourse ( "cc1" , "cc<sp>1" , "a<sp>canon<sp>course" ) ; cmAdmin . createAcademicSession ( "as1" , "course<sp>1" 1 , "an<sp>academic<sp>session" , new java . util . Date ( ) , new java . util . Date ( ) ) ; cmAdmin . createCourseOffering ( "co1" , "course<sp>1" , "course" , "open" , "as1" , "cc1" , null , null ) ; cmAdmin . addCourseOfferingToCourseSet ( "cs1" , "co1" ) ; org . sakaiproject . coursemanagement . api . CourseOffering co = cm . getCourseOffering ( "co1" ) ; "<AssertPlaceHolder>" ; } getCourseOfferingsInCourseSet ( java . lang . String ) { throw new org . sakaiproject . coursemanagement . api . exception . IdNotFoundException ( courseSetEid , org . sakaiproject . coursemanagement . api . CourseSet . class . getName ( ) ) ; }
|
org . junit . Assert . assertTrue ( cm . getCourseOfferingsInCourseSet ( "cs1" ) . contains ( co ) )
|
testInitialTabIndex ( ) { org . eclipse . swt . widgets . Control control = new org . eclipse . swt . widgets . Button ( shell , org . eclipse . swt . SWT . PUSH ) ; org . eclipse . swt . internal . widgets . IControlAdapter adapter = org . eclipse . swt . internal . widgets . ControlUtil . getControlAdapter ( control ) ; "<AssertPlaceHolder>" ; } getTabIndex ( ) { return tabIndex ; }
|
org . junit . Assert . assertEquals ( ( - 1 ) , adapter . getTabIndex ( ) )
|
testFindFreePort ( ) { int port = com . github . couchapptakeout . DefaultCouchManager . findFreePort ( ) ; System . out . println ( ( "Port:<sp>" + port ) ) ; "<AssertPlaceHolder>" ; } findFreePort ( ) { java . net . ServerSocket server = new java . net . ServerSocket ( 0 ) ; int port = server . getLocalPort ( ) ; server . close ( ) ; return port ; }
|
org . junit . Assert . assertTrue ( ( port > 0 ) )
|
shouldFailWhenJenkinsBaseNullProvidedToTest ( ) { java . util . Map < java . lang . String , java . lang . Object > result = resource . test ( repository , null , com . nerdwin15 . stash . webhook . rest . JenkinsResourceTest . CLONE_TYPE , null , com . nerdwin15 . stash . webhook . rest . JenkinsResourceTest . IGNORE_CERTS , com . nerdwin15 . stash . webhook . rest . JenkinsResourceTest . OMIT_HASH_CODE , com . nerdwin15 . stash . webhook . rest . JenkinsResourceTest . OMIT_BRANCH_NAME , com . nerdwin15 . stash . webhook . rest . JenkinsResourceTest . OMIT_TARGET_BRANCH ) ; "<AssertPlaceHolder>" ; } test ( com . atlassian . bitbucket . repository . Repository , java . lang . String , java . lang . String , java . lang . String , boolean , boolean , boolean , boolean ) { if ( ( ( jenkinsBase == null ) || ( cloneType == null ) ) || ( ( cloneType . equals ( "custom" ) ) && ( cloneUrl == null ) ) ) { java . util . Map < java . lang . String , java . lang . Object > map = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; map . put ( "successful" , false ) ; map . put ( "message" , "Settings<sp>must<sp>be<sp>configured" ) ; return map ; } permissionService . validateForRepository ( repository , Permission . REPO_ADMIN ) ; com . nerdwin15 . stash . webhook . rest . JenkinsResource . log . debug ( "Triggering<sp>jenkins<sp>notification<sp>for<sp>repository<sp>{}/{}" , repository . getProject ( ) . getKey ( ) , repository . getSlug ( ) ) ; com . atlassian . bitbucket . repository . Branch defaultBranch = refService . getDefaultBranch ( repository ) ; com . nerdwin15 . stash . webhook . NotificationResult result = notifier . notify ( repository , jenkinsBase , ignoreCerts , cloneType , cloneUrl , defaultBranch . getDisplayId ( ) , defaultBranch . getLatestCommit ( ) , defaultBranch . getDisplayId ( ) , omitHashCode , omitBranchName , omitTargetBranch ) ; com . nerdwin15 . stash . webhook . rest . JenkinsResource . log . debug ( "Got<sp>response<sp>from<sp>jenkins:<sp>{}" , result ) ; java . util . Map < java . lang . String , java . lang . Object > map = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; map . put ( "successful" , result . isSuccessful ( ) ) ; map . put ( "url" , result . getUrl ( ) ) ; map . put ( "message" , result . getMessage ( ) ) ; return map ; }
|
org . junit . Assert . assertFalse ( ( ( java . lang . Boolean ) ( result . get ( "successful" ) ) ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.