input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testYangIIToBindingAwareIIListWildcarded ( ) { final org . opendaylight . yangtools . yang . binding . InstanceIdentifier < ? > instanceIdentifier = registry . fromYangInstanceIdentifier ( org . opendaylight . mdsal . binding . dom . codec . test . InstanceIdentifierSerializeDeserializeTest . BI_TOP_LEVEL_LIST_PATH ) ; "<AssertPlaceHolder>" ; } fromYangInstanceIdentifier ( org . opendaylight . yangtools . yang . data . api . YangInstanceIdentifier ) { return codecContext . getInstanceIdentifierCodec ( ) . deserialize ( dom ) ; }
org . junit . Assert . assertNull ( instanceIdentifier )
serializeReplyWithJoynrApplicationExceptionWithoutMessage ( ) { joynr . exceptions . ApplicationException error = new joynr . exceptions . ApplicationException ( joynr . tests . testTypes . TestEnum . TWO ) ; joynr . Reply reply = new joynr . Reply ( java . util . UUID . randomUUID ( ) . toString ( ) , error ) ; java . lang . String writeValueAsString = objectMapper . writeValueAsString ( reply ) ; System . out . println ( writeValueAsString ) ; joynr . Reply receivedReply = objectMapper . readValue ( writeValueAsString , joynr . Reply . class ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "TestSuiteResult<sp>[" + "name=" ) + ( this . name ) ) + ",<sp>" ) + "time=" ) + ( this . time ) ) + ",<sp>" ) + "tests=" ) + ( this . tests ) ) + ",<sp>" ) + "errors=" ) + ( this . errors ) ) + ",<sp>" ) + "skipped=" ) + ( this . skipped ) ) + ",<sp>" ) + "failures=" ) + ( this . failures ) ) + ",<sp>" ) + "testCaseResults=" ) + ( java . util . Arrays . toString ( this . testCaseResults ) ) ) + "]" ; }
org . junit . Assert . assertEquals ( reply , receivedReply )
scheduledExecutorService_default ( ) { io . grpc . inprocess . InProcessServerBuilder builder = io . grpc . inprocess . InProcessServerBuilder . forName ( "foo" ) ; io . grpc . inprocess . InProcessServer server = com . google . common . collect . Iterables . getOnlyElement ( builder . buildTransportServers ( new java . util . ArrayList < io . grpc . ServerStreamTracer . Factory > ( ) ) ) ; io . grpc . internal . ObjectPool < java . util . concurrent . ScheduledExecutorService > scheduledExecutorServicePool = server . getScheduledExecutorServicePool ( ) ; io . grpc . internal . ObjectPool < java . util . concurrent . ScheduledExecutorService > expectedPool = io . grpc . internal . SharedResourcePool . forResource ( io . grpc . inprocess . TIMER_SERVICE ) ; java . util . concurrent . ScheduledExecutorService expected = expectedPool . getObject ( ) ; java . util . concurrent . ScheduledExecutorService actual = scheduledExecutorServicePool . getObject ( ) ; "<AssertPlaceHolder>" ; expectedPool . returnObject ( expected ) ; scheduledExecutorServicePool . returnObject ( actual ) ; } getObject ( ) { return object ; }
org . junit . Assert . assertSame ( expected , actual )
should_traverse_forks ( ) { T int k = 4 ; java . util . List < au . edu . wehi . idsv . DirectedEvidence > input = new java . util . ArrayList < au . edu . wehi . idsv . DirectedEvidence > ( ) ; input . add ( SCE ( au . edu . wehi . idsv . debruijn . positional . FWD , withSequence ( "AAAATTGGCCAGC" , Read ( 0 , 1 , "4M9S" ) ) ) ) ; input . add ( SCE ( au . edu . wehi . idsv . debruijn . positional . FWD , withSequence ( "AAAATTGGCCAGT" , Read ( 0 , 1 , "4M9S" ) ) ) ) ; input . add ( SCE ( au . edu . wehi . idsv . debruijn . positional . FWD , withSequence ( "AAAATTGGCCATAA" , Read ( 0 , 1 , "4M10S" ) ) ) ) ; java . util . List < au . edu . wehi . idsv . debruijn . positional . KmerPathNode > result = go ( input , k , 200 , 200 , 1 ) ; result = com . google . common . collect . Lists . newArrayList ( new au . edu . wehi . idsv . debruijn . positional . PathSimplificationIterator ( result . iterator ( ) , 100 , 100 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return kmers . size ( ) ; }
org . junit . Assert . assertEquals ( 4 , result . size ( ) )
testDivision1 ( ) { java . math . BigDecimal bigDecimal = new java . math . BigDecimal ( 2 ) ; com . liferay . dynamic . data . mapping . expression . internal . DDMExpressionImpl < java . math . BigDecimal > ddmExpression = createDDMExpression ( "6<sp>/<sp>3" ) ; "<AssertPlaceHolder>" ; } setScale ( java . lang . String ) { model . setScale ( scale ) ; }
org . junit . Assert . assertEquals ( bigDecimal . setScale ( 2 ) , ddmExpression . evaluate ( ) )
testAjaxOnBlur ( ) { browser . get ( contextPath . toExternalForm ( ) ) ; autocompleteInput . sendKeys ( "t" ) ; waitGui ( ) . withMessage ( "suggestion<sp>list<sp>is<sp>visible" ) . until ( ) . element ( suggestionList ) . is ( ) . visible ( ) ; autocompleteItem . click ( ) ; org . jboss . arquillian . warp . Warp . initiate ( new org . jboss . arquillian . warp . Activity ( ) { @ org . richfaces . component . autocomplete . Override public void perform ( ) { guardAjax ( body ) . click ( ) ; } } ) . inspect ( new org . jboss . arquillian . warp . Inspection ( ) { private static final long serialVersionUID = 1L ; @ javax . inject . Inject org . richfaces . component . autocomplete . AutocompleteBean bean ; @ org . jboss . arquillian . warp . jsf . AfterPhase ( org . jboss . arquillian . warp . jsf . Phase . INVOKE_APPLICATION ) public void verify_bean_executed ( ) { "<AssertPlaceHolder>" ; } } ) ; } isListenerInvoked ( ) { return listenerInvoked ; }
org . junit . Assert . assertTrue ( bean . isListenerInvoked ( ) )
readByte_skip_nodelim ( ) { java . io . InputStream origin = bytes ( "Hello,<sp>world!" ) ; java . io . InputStream testee = new com . asakusafw . runtime . directio . util . DelimiterRangeInputStream ( origin , '|' , 100 , true ) ; "<AssertPlaceHolder>" ; } readBytes ( java . io . InputStream ) { java . io . ByteArrayOutputStream output = new java . io . ByteArrayOutputStream ( ) ; while ( true ) { int c = in . read ( ) ; if ( c < 0 ) { break ; } output . write ( c ) ; } return new java . lang . String ( output . toByteArray ( ) , java . nio . charset . StandardCharsets . US_ASCII ) ; }
org . junit . Assert . assertThat ( readBytes ( testee ) , is ( "" ) )
costPerEntry ( ) { builder . setProperty ( FulltextIndexConstants . COMPAT_MODE , 2 ) ; org . apache . jackrabbit . oak . plugins . index . search . IndexDefinition defn = new org . apache . jackrabbit . oak . plugins . index . search . IndexDefinition ( root , builder . getNodeState ( ) , "/foo" ) ; "<AssertPlaceHolder>" ; } getCostPerEntry ( ) { return costPerEntry ; }
org . junit . Assert . assertEquals ( 1.0 , defn . getCostPerEntry ( ) , 0.0 )
testUpdateApplicationPriority ( ) { org . apache . hadoop . yarn . client . cli . ApplicationCLI cli = createAndGetAppCLI ( ) ; org . apache . hadoop . yarn . api . records . ApplicationId applicationId = org . apache . hadoop . yarn . api . records . ApplicationId . newInstance ( 1234 , 6 ) ; org . apache . hadoop . yarn . api . records . ApplicationReport appReport = org . apache . hadoop . yarn . api . records . ApplicationReport . newInstance ( applicationId , org . apache . hadoop . yarn . api . records . ApplicationAttemptId . newInstance ( applicationId , 1 ) , "user" , "url" 1 , "appname" , "host" , 124 , null , YarnApplicationState . RUNNING , "diagnostics" , "url" , 0 , 0 , FinalApplicationStatus . UNDEFINED , null , "N/A" , 0.53789F , "url" 0 , null ) ; when ( client . getApplicationReport ( any ( org . apache . hadoop . yarn . api . records . ApplicationId . class ) ) ) . thenReturn ( appReport ) ; int result = cli . run ( new java . lang . String [ ] { "application" , "-appId" , applicationId . toString ( ) , "-updatePriority" , "1" } ) ; "<AssertPlaceHolder>" ; verify ( client ) . updateApplicationPriority ( any ( org . apache . hadoop . yarn . api . records . ApplicationId . class ) , any ( org . apache . hadoop . yarn . api . records . Priority . class ) ) ; } toString ( ) { if ( ( json ) == null ) { return "Test<sp>codec<sp>" + ( id ) ; } else { return json . toString ( ) ; } }
org . junit . Assert . assertEquals ( result , 0 )
setErrorTextWithNoCauseException ( ) { java . lang . Exception e = new org . pentaho . di . core . exception . KettleException ( "kettleMessage" ) ; java . lang . StringBuilder text = new java . lang . StringBuilder ( ) ; java . lang . StringBuilder details = new java . lang . StringBuilder ( ) ; org . pentaho . di . ui . core . dialog . ErrorDialog dialog = mock ( org . pentaho . di . ui . core . dialog . ErrorDialog . class ) ; doCallRealMethod ( ) . when ( dialog ) . handleException ( anyString ( ) , any ( org . pentaho . di . ui . core . dialog . Exception . class ) , any ( org . pentaho . di . ui . core . dialog . StringBuilder . class ) , any ( org . pentaho . di . ui . core . dialog . StringBuilder . class ) ) ; dialog . handleException ( "argMessage" , e , text , details ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( name ) + ":" ) + ( getTypeDesc ( ) ) ; }
org . junit . Assert . assertEquals ( text . toString ( ) , e . getMessage ( ) . toString ( ) )
characterUnicodeLinebreak ( ) { org . apache . pdfbox . pdmodel . interactive . form . PlainText text = new org . apache . pdfbox . pdmodel . interactive . form . PlainText ( "linebreak
linebreak" ) ; "<AssertPlaceHolder>" ; } getParagraphs ( ) { return paragraphs ; }
org . junit . Assert . assertEquals ( 2 , text . getParagraphs ( ) . size ( ) )
testCreateNodeWithField ( ) { try ( com . syncleus . ferma . tx . Tx tx = tx ( ) ) { com . gentics . mesh . core . rest . node . NodeResponse response = createNodeWithField ( ) ; com . gentics . mesh . core . rest . node . field . impl . BooleanFieldImpl field = response . getFields ( ) . getBooleanField ( com . gentics . mesh . core . field . bool . BooleanFieldEndpointTest . FIELD_NAME ) ; "<AssertPlaceHolder>" ; } } getValue ( ) { return value ; }
org . junit . Assert . assertTrue ( field . getValue ( ) )
resetPropertyValueOnResourceForContextShouldThrowExceptionWhenResourceUpdatePermissionIsMissing ( ) { java . lang . String resourceGroupName = "resourceGroupName" ; java . lang . String releaseName = "releaseName" ; java . lang . String contextName = "contextName" ; java . lang . String propertyName = "propertyName" ; java . lang . String propertyValue = "propertyValue" ; java . lang . String typeName = "resourceGroupTypeName" ; ch . puzzle . itc . mobiliar . business . property . boundary . List < ch . puzzle . itc . mobiliar . business . property . boundary . ResourceEditProperty > properties = new ch . puzzle . itc . mobiliar . business . property . boundary . ArrayList ( ) ; properties . add ( new ch . puzzle . itc . mobiliar . builders . ResourceEditPropertyBuilder ( ) . withDisplayAndTechKeyName ( propertyName ) . withValue ( propertyValue ) . build ( ) ) ; ch . puzzle . itc . mobiliar . business . environment . entity . ContextEntity contextMock = mock ( ch . puzzle . itc . mobiliar . business . environment . entity . ContextEntity . class ) ; ch . puzzle . itc . mobiliar . business . property . boundary . ResourceEntity resource = createWithIdNameAndTypeName ( 1 , resourceGroupName , typeName ) ; when ( resourceLocatorMock . getResourceByGroupNameAndRelease ( resourceGroupName , releaseName ) ) . thenReturn ( resource ) ; when ( contextLocatorMock . getContextByName ( contextName ) ) . thenReturn ( contextMock ) ; when ( propertyValueServiceMock . decryptProperties ( anyList ( ) ) ) . thenReturn ( properties ) ; when ( permissionBoundaryMock . hasPermission ( Permission . RESOURCE , contextMock , Action . UPDATE , null , null ) ) . thenReturn ( false ) ; when ( permissionBoundaryMock . hasPermission ( Permission . RESOURCE_PROPERTY_DECRYPT , contextMock , Action . ALL , resource , null ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; editor . resetPropertyValueOnResourceForContext ( resourceGroupName , releaseName , contextName , propertyName ) ; } isEmpty ( ) { if ( ( ( asProperties ) != null ) && ( ! ( asProperties . isEmpty ( ) ) ) ) { return false ; } if ( ( ( nodeProperties ) != null ) && ( ! ( nodeProperties . isEmpty ( ) ) ) ) { return false ; } if ( ( ( consumerUnit ) != null ) && ( ! ( consumerUnit . isEmpty ( ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( properties . isEmpty ( ) )
apply_A$Collection ( ) { com . m3 . scalaflavor4j . List < java . lang . Integer > list_ = new com . m3 . scalaflavor4j . ArrayList < java . lang . Integer > ( ) ; list_ . add ( 1 ) ; list_ . add ( 2 ) ; list_ . add ( 3 ) ; com . m3 . scalaflavor4j . IndexedSeq < java . lang . Integer > actual = com . m3 . scalaflavor4j . IndexedSeq . apply ( list_ ) ; "<AssertPlaceHolder>" ; } size ( ) { return 0 ; }
org . junit . Assert . assertThat ( actual . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 3 ) ) )
shouldJSONSerialiseAndDeserialise ( ) { final uk . gov . gchq . gaffer . operation . impl . output . ToVertices op = new uk . gov . gchq . gaffer . operation . impl . output . ToVertices . Builder ( ) . input ( new uk . gov . gchq . gaffer . operation . data . EntitySeed ( "2" ) ) . edgeVertices ( EdgeVertices . BOTH ) . useMatchedVertex ( ToVertices . UseMatchedVertex . OPPOSITE ) . build ( ) ; byte [ ] json = uk . gov . gchq . gaffer . jsonserialisation . JSONSerialiser . serialise ( op , true ) ; final uk . gov . gchq . gaffer . operation . impl . output . ToVertices deserialisedOp = uk . gov . gchq . gaffer . jsonserialisation . JSONSerialiser . deserialise ( json , uk . gov . gchq . gaffer . operation . impl . output . ToVertices . class ) ; "<AssertPlaceHolder>" ; } deserialise ( java . lang . String , java . lang . Class ) { try { return uk . gov . gchq . gaffer . jsonserialisation . JSONSerialiser . getInstance ( ) . mapper . readValue ( json , clazz ) ; } catch ( final java . io . IOException e ) { throw new uk . gov . gchq . gaffer . exception . SerialisationException ( e . getMessage ( ) , e ) ; } }
org . junit . Assert . assertNotNull ( deserialisedOp )
testUpdateTrustBundleSigningCertificate_bundleDoesntExist_assertException ( ) { boolean exceptionOccured = false ; try { org . nhindirect . config . store . TrustBundleAnchor anchor = new org . nhindirect . config . store . TrustBundleAnchor ( ) ; anchor . setData ( loadCertificateData ( "secureHealthEmailCACert.der" ) ) ; tbDao . updateTrustBundleSigningCertificate ( 1234 , anchor . toCertificate ( ) ) ; } catch ( org . nhindirect . config . store . ConfigurationStoreException ex ) { exceptionOccured = true ; } "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( exceptionOccured )
testEncodeDynamoDBHyphen ( ) { System . out . println ( ( ( com . telefonica . iot . cygnus . utils . CommonUtilsForTests . getTestTraceHead ( "[NGSICharsets.encodeDynamoDB]" ) ) + "--------<sp>Hyphen<sp>is<sp>not<sp>encoded" ) ) ; java . lang . String in = "-" ; java . lang . String expected = "-" ; java . lang . String out = com . telefonica . iot . cygnus . utils . NGSICharsets . encodeDynamoDB ( in ) ; try { "<AssertPlaceHolder>" ; System . out . println ( ( ( ( ( com . telefonica . iot . cygnus . utils . CommonUtilsForTests . getTestTraceHead ( "[NGSICharsets.encodeDynamoDB]" ) ) + "-<sp>OK<sp>-<sp>'" ) + in ) + "'<sp>has<sp>not<sp>been<sp>encoded" ) ) ; } catch ( java . lang . AssertionError e ) { System . out . println ( ( ( ( ( ( ( com . telefonica . iot . cygnus . utils . CommonUtilsForTests . getTestTraceHead ( "[NGSICharsets.encodeDynamoDB]" ) ) + "-<sp>FAIL<sp>-<sp>'" ) + in ) + "'<sp>has<sp>been<sp>encoded<sp>as<sp>'" ) + out ) + "'" ) ) ; throw e ; } encodeDynamoDB ( java . lang . String ) { java . lang . String out = "" ; for ( int i = 0 ; i < ( in . length ( ) ) ; i ++ ) { char c = in . charAt ( i ) ; int code = c ; if ( ( code >= 65 ) && ( code <= 90 ) ) { out += c ; } else if ( ( code >= 97 ) && ( code <= 119 ) ) { out += c ; } else if ( c == 'x' ) { java . lang . String next4 ; if ( ( i + 4 ) < ( in . length ( ) ) ) { next4 = in . substring ( ( i + 1 ) , ( i + 5 ) ) ; } else { next4 = "WXYZ" ; } if ( next4 . matches ( "^[0-9a-fA-F]{4}$" ) ) { out += "xx" ; } else { out += c ; } } else if ( ( code == 121 ) || ( code == 122 ) ) { out += c ; } else if ( ( code >= 48 ) && ( code <= 57 ) ) { out += c ; } else if ( c == '_' ) { out += c ; } else if ( c == '-' ) { out += c ; } else if ( c == '.' ) { out += c ; } else if ( c == '=' ) { out += "xffff" ; } else { java . lang . String hex = java . lang . Integer . toHexString ( code ) ; out += "x" + ( ( "0000" + hex ) . substring ( hex . length ( ) ) ) ; } } return out ; }
org . junit . Assert . assertEquals ( expected , out )
getPeriodDescription ( ) { java . text . DateFormat df = new java . text . SimpleDateFormat ( "GMT+0" 4 ) ; java . text . DateFormat df2 = new java . text . SimpleDateFormat ( "GMT+0" 8 ) ; df . setTimeZone ( java . util . TimeZone . getTimeZone ( "GMT+0" ) ) ; df2 . setTimeZone ( java . util . TimeZone . getTimeZone ( "GMT+0" ) ) ; org . geotoolkit . temporal . util . PeriodUtilities instance = new org . geotoolkit . temporal . util . PeriodUtilities ( df ) ; java . util . SortedSet < java . util . Date > dates ; instance = new org . geotoolkit . temporal . util . PeriodUtilities ( df2 ) ; dates = new java . util . TreeSet ( ) ; dates . add ( df2 . parse ( "GMT+0" 9 ) ) ; dates . add ( df2 . parse ( "2004-03-04T00:00:02.500Z" ) ) ; dates . add ( df2 . parse ( "2004-01-28T05:00:00Z" 6 ) ) ; dates . add ( df2 . parse ( "GMT+0" 6 ) ) ; expResult = "GMT+0" 2 ; result = instance . getDatesRespresentation ( dates ) ; "<AssertPlaceHolder>" ; } getDatesRespresentation ( java . util . SortedSet ) { if ( ( dates . comparator ( ) ) != null ) { throw new java . lang . IllegalArgumentException ( "Dates<sp>should<sp>be<sp>sorted<sp>naturaly<sp>without<sp>any<sp>custom<sp>comparator." ) ; } if ( dates . isEmpty ( ) ) { return "" ; } final java . lang . StringBuffer response = new java . lang . StringBuffer ( ) ; java . util . Date first = dates . first ( ) ; java . util . Date previousDate = first ; long previousGap = 0 ; long gap = 0 ; int nbDataInGap = 0 ; for ( java . util . Date d : dates ) { previousGap = gap ; gap = ( d . getTime ( ) ) - ( previousDate . getTime ( ) ) ; if ( previousGap != gap ) { if ( nbDataInGap >= 2 ) { final java . lang . String firstDate = dateFormat . format ( first ) ; if ( ( response . indexOf ( ( firstDate + ',' ) ) ) != ( - 1 ) ) { final int pos = response . indexOf ( firstDate ) ; response . delete ( pos , ( ( pos + ( firstDate . length ( ) ) ) + 1 ) ) ; } response . append ( getPeriodDescription ( dates . subSet ( first , d ) , previousGap ) ) . append ( ',' ) ; nbDataInGap = 1 ; } else { if ( nbDataInGap > 0 ) { dateFormat . format ( previousDate , response , new java . text . FieldPosition ( 0 ) ) . append ( ',' ) ; nbDataInGap = 1 ; } } first = previousDate ; } else { nbDataInGap ++ ; } previousDate = d ; } if ( nbDataInGap > 0 ) { if ( nbDataInGap >= 2 ) { final java . lang . String firstDate = dateFormat . format ( first ) ; if ( ( response . indexOf ( ( firstDate + ',' ) ) ) != ( - 1 ) ) { final int pos = response . indexOf ( firstDate ) ; response . delete ( pos , ( ( pos + ( firstDate . length ( ) ) ) + 1 ) ) ; } response . append ( getPeriodDescription ( dates . tailSet ( first ) , gap ) ) ; nbDataInGap = 1 ; } else { if ( nbDataInGap > 0 ) { dateFormat . format ( previousDate , response , new java . text . FieldPosition ( 0 ) ) ; nbDataInGap = 1 ; } } } return response . toString ( ) ; }
org . junit . Assert . assertEquals ( expResult , result )
reexportDependencies ( ) { java . lang . StringBuffer message = new java . lang . StringBuffer ( ) ; int nb = 0 ; for ( final org . osgi . framework . Bundle current : org . eclipse . papyrus . bundles . tests . BundleTestsUtils . getPapyrusBundles ( ) ) { final java . lang . String value = current . getHeaders ( ) . get ( BundleTestsUtils . REQUIRE_BUNDLE ) ; if ( value == null ) { continue ; } final java . lang . String [ ] bundles = value . split ( "," ) ; java . lang . StringBuffer localMessage = new java . lang . StringBuffer ( ) ; for ( final java . lang . String bundle : bundles ) { if ( bundle . contains ( "visibility:=reexport" ) ) { nb ++ ; if ( ( localMessage . length ( ) ) == 0 ) { localMessage . append ( org . eclipse . osgi . util . NLS . bind ( "{0}<sp>re-exports:" , current . getSymbolicName ( ) ) ) ; } if ( bundle . contains ( ";" ) ) { localMessage . append ( org . eclipse . osgi . util . NLS . bind ( "\n<sp>-<sp>{0}" , bundle . substring ( 0 , bundle . indexOf ( ";" ) ) ) ) ; } else { localMessage . append ( org . eclipse . osgi . util . NLS . bind ( "\n<sp>-<sp>{0}" , bundle ) ) ; } } } if ( ( localMessage . length ( ) ) != 0 ) { message . append ( localMessage ) ; message . append ( "\n" ) ; } } java . lang . StringBuffer errorMessage = new java . lang . StringBuffer ( ) ; errorMessage . append ( nb ) ; errorMessage . append ( "<sp>problems!" ) ; errorMessage . append ( message ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( eIsProxy ( ) ) return super . toString ( ) ; java . lang . StringBuffer result = new java . lang . StringBuffer ( super . toString ( ) ) ; result . append ( "<sp>(type:<sp>" ) ; result . append ( type ) ; result . append ( ",<sp>name:<sp>" ) ; result . append ( name ) ; result . append ( ')' ) ; return result . toString ( ) ; }
org . junit . Assert . assertTrue ( errorMessage . toString ( ) , ( nb == 0 ) )
testTransformJavaToXML ( ) { org . switchyard . quickstarts . transform . json . Order testOrder = new org . switchyard . quickstarts . transform . json . Order ( ) . setOrderId ( "PO-19838-XYZ" ) . setItemId ( "BUTTER" ) . setQuantity ( 100 ) ; java . lang . String result = submitOrder . expectedOutputType ( org . switchyard . quickstarts . transform . json . JsonTransformationTest . TO_TYPE ) . sendInOut ( testOrder ) . getContent ( java . lang . String . class ) ; org . codehaus . jackson . map . ObjectMapper mapper = new org . codehaus . jackson . map . ObjectMapper ( ) ; org . switchyard . quickstarts . transform . json . OrderAck expected = mapper . readValue ( _testKit . readResourceString ( ORDER_ACK_JSON ) , org . switchyard . quickstarts . transform . json . OrderAck . class ) ; org . switchyard . quickstarts . transform . json . OrderAck returned = mapper . readValue ( result , org . switchyard . quickstarts . transform . json . OrderAck . class ) ; "<AssertPlaceHolder>" ; } setQuantity ( int ) { this . quantity = value ; }
org . junit . Assert . assertEquals ( expected , returned )
providesHeaderNamesAsArray ( ) { java . util . Set < java . lang . String > nettyHeaders = new io . netty . handler . codec . http . DefaultHttpHeaders ( ) . add ( HttpHeaderNames . CONTENT_LENGTH , 10 ) . names ( ) ; java . lang . String [ ] namesArray = nettyHeaders . toArray ( new java . lang . String [ 0 ] ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( "Swapped(" + ( buf ) ) + ')' ; }
org . junit . Assert . assertArrayEquals ( namesArray , new java . lang . String [ ] { HttpHeaderNames . CONTENT_LENGTH . toString ( ) } )
parseWriteConfig ( ) { final java . lang . String [ ] args = new java . lang . String [ ] { "-m" , "export" , "-d" , "/tmp/rdf" , "-w" , "target/sample.yml" , "-r" , "http://localhost:8080/rest/1" } ; final org . fcrepo . importexport . common . Config config = parser . parseConfiguration ( args ) ; "<AssertPlaceHolder>" ; } getWriteConfig ( ) { return writeConfig ; }
org . junit . Assert . assertEquals ( new java . io . File ( "target/sample.yml" ) , config . getWriteConfig ( ) )
testStepWithListOfDos ( ) { java . net . URI resource = getClass ( ) . getResource ( "/corrupted/step_with_list_of_do_flow.sl" ) . toURI ( ) ; io . cloudslang . lang . compiler . modeller . result . ExecutableModellingResult result = compiler . preCompileSource ( io . cloudslang . lang . compiler . SlangSource . fromFile ( resource ) ) ; "<AssertPlaceHolder>" ; exception . expect ( io . cloudslang . lang . compiler . RuntimeException . class ) ; exception . expectMessage ( ( "Step:<sp>step1<sp>syntax<sp>is<sp>illegal.\n" + ( ( "Below<sp>step<sp>name,<sp>there<sp>should<sp>be<sp>a<sp>map<sp>of<sp>values<sp>in<sp>the<sp>format:\n" + "do:\n" ) + "\top_name:" ) ) ) ; throw result . getErrors ( ) . get ( 0 ) ; } getErrors ( ) { return errors ; }
org . junit . Assert . assertTrue ( ( ( result . getErrors ( ) . size ( ) ) > 0 ) )
endsWithOtherFs ( ) { final java . nio . file . FileSystem otherFs = org . jboss . shrinkwrap . api . nio2 . file . ShrinkWrapFileSystems . newFileSystem ( org . jboss . shrinkwrap . api . ShrinkWrap . create ( org . jboss . shrinkwrap . api . GenericArchive . class ) ) ; final java . nio . file . Path otherPath = otherFs . getPath ( "/otherpath" ) ; final boolean endsWith = fileSystem . getPath ( "/toplevel/second/third" ) . endsWith ( otherPath ) ; "<AssertPlaceHolder>" ; } endsWith ( java . lang . String ) { return false ; }
org . junit . Assert . assertFalse ( endsWith )
createBillingDataForOrganization_FreeOfChargeDeactivatedBeforePeriod ( ) { pmh . setType ( PriceModelType . FREE_OF_CHARGE ) ; long billingPeriodStart = org . oscm . test . DateTimeHandling . calculateMillis ( "2013-03-01<sp>00:00:00" ) ; long billingPeriodEnd = org . oscm . test . DateTimeHandling . calculateMillis ( "2013-04-01<sp>00:00:00" ) ; org . oscm . domobjects . SubscriptionHistory sh = new org . oscm . domobjects . SubscriptionHistory ( ) ; sh . setModdate ( org . oscm . test . DateTimeHandling . calculateDate ( "2013-02-28<sp>23:59:59" ) ) ; sh . setObjKey ( 1 ) ; sh . setOrganizationObjKey ( 1 ) ; sh . getDataContainer ( ) . setStatus ( SubscriptionStatus . DEACTIVATED ) ; org . oscm . billingservice . business . model . billingresult . BillingDetailsType doc = createBillingDataForOrganization ( 1 , 1 , billingPeriodStart , billingPeriodEnd , 0 , new org . oscm . domobjects . BillingResult ( ) , true , java . util . Arrays . asList ( sh ) , "EUR" ) ; "<AssertPlaceHolder>" ; } createBillingDataForOrganization ( long , long , long , long , long , org . oscm . domobjects . BillingResult , boolean , java . util . List , java . lang . String ) { org . oscm . billingservice . service . model . BillingInput . Builder billingInput = new org . oscm . billingservice . service . model . BillingInput . Builder ( ) ; billingInput . setOrganizationKey ( organizationKey ) ; billingInput . setSubscriptionKey ( subscriptionKey ) ; billingInput . setBillingPeriodStart ( startOfPeriod ) ; billingInput . setBillingPeriodEnd ( endOfPeriod ) ; billingInput . setCutOffDate ( cutOffDate ) ; billingInput . setStoreBillingResult ( storeResultXML ) ; billingInput . setSubscriptionHistoryEntries ( subHistEntries ) ; billingInput . setCurrencyIsoCode ( currency ) ; return bb . createBillingDataForOrganization ( billingInput . build ( ) , billingResult ) ; }
org . junit . Assert . assertNull ( doc )
testFindByTenantIdAndBundleAlias ( ) { java . util . UUID tenantId = java . util . UUID . fromString ( "2b7e4c90-2dfe-11e7-94aa-f7f6dbfb4833" ) ; java . util . List < org . thingsboard . server . common . data . widget . WidgetType > widgetTypes = widgetTypeDao . findWidgetTypesByTenantIdAndBundleAlias ( tenantId , "BUNDLE_ALIAS_1" ) ; "<AssertPlaceHolder>" ; } findWidgetTypesByTenantIdAndBundleAlias ( java . util . UUID , java . lang . String ) { return org . thingsboard . server . dao . DaoUtil . convertDataList ( widgetTypeRepository . findByTenantIdAndBundleAlias ( org . thingsboard . server . common . data . UUIDConverter . fromTimeUUID ( tenantId ) , bundleAlias ) ) ; }
org . junit . Assert . assertEquals ( 3 , widgetTypes . size ( ) )
testMarkSupported ( ) { com . liferay . portal . kernel . io . unsync . UnsyncStringReader unsyncStringReader = new com . liferay . portal . kernel . io . unsync . UnsyncStringReader ( "abc" ) ; "<AssertPlaceHolder>" ; } markSupported ( ) { return false ; }
org . junit . Assert . assertTrue ( unsyncStringReader . markSupported ( ) )
testEvaluateTwoIndexVarInstantiate1 ( ) { final org . eclipse . rdf4j . model . IRI superclass = org . apache . rya . indexing . external . AccumuloConstantPcjIT . VF . createIRI ( "o" 4 ) ; final org . eclipse . rdf4j . model . IRI superclass2 = org . apache . rya . indexing . external . AccumuloConstantPcjIT . VF . createIRI ( "uri:superclass2" ) ; conn . add ( subclass , RDF . TYPE , superclass ) ; conn . add ( subclass2 , RDF . TYPE , superclass2 ) ; conn . add ( obj , RDFS . LABEL , org . apache . rya . indexing . external . AccumuloConstantPcjIT . VF . createLiteral ( "label" ) ) ; conn . add ( obj2 , RDFS . LABEL , org . apache . rya . indexing . external . AccumuloConstantPcjIT . VF . createLiteral ( "label2" ) ) ; conn . add ( obj , RDFS . LABEL , org . apache . rya . indexing . external . AccumuloConstantPcjIT . VF . createLiteral ( "label" ) ) ; conn . add ( obj2 , RDFS . LABEL , org . apache . rya . indexing . external . AccumuloConstantPcjIT . VF . createLiteral ( "label2" ) ) ; final java . lang . String indexSparqlString = "" + ( ( ( ( "label2" 0 + "o" 7 ) + "o" 8 ) + "<sp>?pig<sp><http://www.w3.org/2000/01/rdf-schema#label><sp>?duck<sp>" ) + "label2" 2 ) ; final java . lang . String indexSparqlString2 = "" + ( ( ( ( ( "label2" 1 + "o" 7 ) + "<sp>?e<sp><uri:talksTo><sp>?o<sp>.<sp>" ) + "o" 1 ) + "<sp>?c<sp>a<sp>?f<sp>.<sp>" ) + "label2" 2 ) ; final java . lang . String queryString = "" + ( ( ( ( ( ( ( "o" 9 + "o" 7 ) + "o" 3 ) + "<sp><uri:entity><sp><http://www.w3.org/2000/01/rdf-schema#label><sp>?l.<sp>" ) + "o" 5 ) + "o" 1 ) + "<sp>?c<sp>a<sp>?f<sp>.<sp>" ) + "label2" 2 ) ; org . apache . rya . indexing . external . PcjIntegrationTestingUtil . createAndPopulatePcj ( conn , accCon , ( ( tablename ) + 1 ) , indexSparqlString , new java . lang . String [ ] { "dog" , "o" 0 , "label2" 4 } , com . google . common . base . Optional . absent ( ) ) ; org . apache . rya . indexing . external . PcjIntegrationTestingUtil . createAndPopulatePcj ( conn , accCon , ( ( tablename ) + 2 ) , indexSparqlString2 , new java . lang . String [ ] { "o" , "label2" 5 , "label2" 3 , "o" 6 , "o" 2 } , com . google . common . base . Optional . absent ( ) ) ; final org . apache . rya . indexing . external . AccumuloConstantPcjIT . CountingResultHandler crh1 = new org . apache . rya . indexing . external . AccumuloConstantPcjIT . CountingResultHandler ( ) ; final org . apache . rya . indexing . external . AccumuloConstantPcjIT . CountingResultHandler crh2 = new org . apache . rya . indexing . external . AccumuloConstantPcjIT . CountingResultHandler ( ) ; conn . prepareTupleQuery ( QueryLanguage . SPARQL , queryString ) . evaluate ( crh1 ) ; org . apache . rya . indexing . external . PcjIntegrationTestingUtil . deleteCoreRyaTables ( accCon , prefix ) ; pcjConn . prepareTupleQuery ( QueryLanguage . SPARQL , queryString ) . evaluate ( crh2 ) ; "<AssertPlaceHolder>" ; } getCount ( ) { return count ; }
org . junit . Assert . assertEquals ( crh1 . getCount ( ) , crh2 . getCount ( ) )
testBatchLoadItemListOnNull ( ) { final software . amazon . awssdk . services . dynamodb . datamodeling . DynamoDbTableMapper < software . amazon . awssdk . services . dynamodb . mapper . TableMapperIntegrationTest . KeyAndDateValue , java . lang . String , ? > mapper = util . newTableMapper ( software . amazon . awssdk . services . dynamodb . mapper . TableMapperIntegrationTest . KeyAndDateValue . class ) ; "<AssertPlaceHolder>" ; } batchLoad ( java . lang . Iterable ) { final java . util . Map < java . lang . String , java . util . List < java . lang . Object > > results = mapper . batchLoad ( itemsToGet ) ; if ( results . isEmpty ( ) ) { return java . util . Collections . < T > emptyList ( ) ; } return ( ( java . util . List < T > ) ( results . get ( mapper . getTableName ( model . targetType ( ) , config ) ) ) ) ; }
org . junit . Assert . assertEquals ( 0 , mapper . batchLoad ( ( ( java . util . List < software . amazon . awssdk . services . dynamodb . mapper . TableMapperIntegrationTest . KeyAndDateValue > ) ( null ) ) ) . size ( ) )
should_generated_hash_code ( ) { int hashCode = sonar . hashCode ( ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return com . google . common . base . Objects . hashCode ( description , domain , key , name ) ; }
org . junit . Assert . assertFalse ( ( hashCode == 0 ) )
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; primaryKeys . add ( pk1 ) ; primaryKeys . add ( pk2 ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . LayoutSetVersion > layoutSetVersions = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( layoutSetVersions . isEmpty ( ) )
testGetReportToChain ( ) { com . ibm . sbt . services . client . base . datahandlers . EntityList < com . ibm . sbt . services . client . connections . profiles . Profile > profileEntries = profileService . getReportingChain ( com . ibm . sbt . test . lib . TestEnvironment . getCurrentUserEmail ( ) ) ; if ( ( profileEntries != null ) && ( ! ( profileEntries . isEmpty ( ) ) ) ) { for ( com . ibm . sbt . services . client . connections . profiles . Profile profile : profileEntries ) { "<AssertPlaceHolder>" ; } } } getName ( ) { return this . name ( ) ; }
org . junit . Assert . assertNotNull ( profile . getName ( ) )
parse ( ) { net . openhft . chronicle . wire . IntConverter bic = new net . openhft . chronicle . wire . WordsIntConverter ( ) ; for ( int l : new int [ ] { Integer . MIN_VALUE , - 1 , 0 , 1 , Integer . MAX_VALUE } ) { java . lang . String text = bic . asString ( l ) ; System . out . println ( text ) ; "<AssertPlaceHolder>" ; } } parse ( java . lang . CharSequence ) { long v = 0 ; for ( int i = 0 ; i < ( text . length ( ) ) ; i ++ ) v = ( v << 7 ) + ( text . charAt ( i ) ) ; return v ; }
org . junit . Assert . assertEquals ( l , bic . parse ( text ) )
hasNineSeconds ( ) { "<AssertPlaceHolder>" ; } seconds ( ) { return ( totalTimeInSeconds ) % 60 ; }
org . junit . Assert . assertEquals ( 9 , time . seconds ( ) )
testDecimalRoundingMetaData ( ) { org . apache . hadoop . hive . ql . udf . generic . GenericUDFRound udf = new org . apache . hadoop . hive . ql . udf . generic . GenericUDFRound ( ) ; org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspector [ ] inputOIs = new org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspector [ ] { org . apache . hadoop . hive . serde2 . objectinspector . primitive . PrimitiveObjectInspectorFactory . getPrimitiveWritableObjectInspector ( org . apache . hadoop . hive . serde2 . typeinfo . TypeInfoFactory . getDecimalTypeInfo ( 7 , 3 ) ) , org . apache . hadoop . hive . serde2 . objectinspector . primitive . PrimitiveObjectInspectorFactory . getPrimitiveWritableConstantObjectInspector ( TypeInfoFactory . intTypeInfo , new org . apache . hadoop . io . IntWritable ( 2 ) ) } ; org . apache . hadoop . hive . serde2 . objectinspector . PrimitiveObjectInspector outputOI = ( ( org . apache . hadoop . hive . serde2 . objectinspector . PrimitiveObjectInspector ) ( udf . initialize ( inputOIs ) ) ) ; org . apache . hadoop . hive . serde2 . typeinfo . DecimalTypeInfo outputTypeInfo = ( ( org . apache . hadoop . hive . serde2 . typeinfo . DecimalTypeInfo ) ( outputOI . getTypeInfo ( ) ) ) ; "<AssertPlaceHolder>" ; } getDecimalTypeInfo ( int , int ) { java . lang . String fullName = org . apache . hadoop . hive . serde2 . typeinfo . DecimalTypeInfo . getQualifiedName ( precision , scale ) ; return ( ( org . apache . hadoop . hive . serde2 . typeinfo . DecimalTypeInfo ) ( org . apache . hadoop . hive . serde2 . typeinfo . TypeInfoFactory . getPrimitiveTypeInfo ( fullName ) ) ) ; }
org . junit . Assert . assertEquals ( org . apache . hadoop . hive . serde2 . typeinfo . TypeInfoFactory . getDecimalTypeInfo ( 7 , 2 ) , outputTypeInfo )
northSouthEdgesComeFromBothSidesDontCross ( ) { getSouthernNorthSouthGraphEdgesFromEastAndWestNoCrossings ( ) ; int crossingCount = initCounterForLayerWithIndexAndCountInLayer ( 1 ) ; "<AssertPlaceHolder>" ; } initCounterForLayerWithIndexAndCountInLayer ( int ) { setUpIds ( ) ; int numPorts = 0 ; for ( org . eclipse . elk . alg . layered . graph . Layer l : getGraph ( ) ) { for ( org . eclipse . elk . alg . layered . graph . LNode lNode : l ) { numPorts += lNode . getPorts ( ) . size ( ) ; } } org . eclipse . elk . alg . layered . p3order . counting . CrossingsCounter counter = new org . eclipse . elk . alg . layered . p3order . counting . CrossingsCounter ( new int [ numPorts ] ) ; return counter . countNorthSouthPortCrossingsInLayer ( getGraph ( ) . toNodeArray ( ) [ layerIndex ] ) ; }
org . junit . Assert . assertThat ( crossingCount , org . hamcrest . CoreMatchers . is ( 0 ) )
testGetVisualTextWidth_withMarkup ( ) { org . eclipse . swt . widgets . TreeItem item = new org . eclipse . swt . widgets . TreeItem ( tree , org . eclipse . swt . SWT . NONE ) ; item . setText ( "<b>foo</b>" ) ; int width1 = tree . getVisualTextWidth ( item , 0 ) ; item . clearPreferredWidthBuffers ( false ) ; tree . setData ( RWT . MARKUP_ENABLED , Boolean . TRUE ) ; int width2 = tree . getVisualTextWidth ( item , 0 ) ; "<AssertPlaceHolder>" ; } getVisualTextWidth ( org . eclipse . swt . widgets . TreeItem , int ) { int result = 0 ; if ( ( index == 0 ) && ( ( getColumnCount ( ) ) == 0 ) ) { result = ( getStringExtent ( item . getFont ( ) , item . getText ( 0 ) ) . x ) + ( org . eclipse . swt . widgets . Tree . TEXT_MARGIN . width ) ; } else if ( ( index >= 0 ) && ( index < ( getColumnCount ( ) ) ) ) { result = ( getTextWidth ( index ) ) - ( getIndentionOffset ( item ) ) ; result = java . lang . Math . max ( 0 , result ) ; } return result ; }
org . junit . Assert . assertTrue ( ( width1 > width2 ) )
fetchesFilesThatAreMissingFromUrlStoreCache ( ) { final java . lang . String testProjectName = "123abc" ; final java . lang . String testUrl = ( "http://localhost:" + ( mockServerRule . getPort ( ) ) ) + "/123abc" ; final java . lang . String oldTestPath = "testPath" ; final java . lang . String newTestPath = "missingPath" ; mockServerClient . when ( request ( ) . withMethod ( "GET" ) . withPath ( "/123abc" ) ) . respond ( response ( ) . withStatusCode ( 200 ) . withBody ( "content" ) ) ; final org . jmock . Mockery context = new org . jmock . Mockery ( ) ; final uk . ac . ic . wlgitbridge . bridge . db . DBStore dbStore = context . mock ( uk . ac . ic . wlgitbridge . bridge . db . DBStore . class ) ; context . checking ( new org . jmock . Expectations ( ) { { oneOf ( dbStore ) . getPathForURLInProject ( testProjectName , testUrl ) ; will ( returnValue ( oldTestPath ) ) ; oneOf ( dbStore ) . addURLIndexForProject ( testProjectName , testUrl , oldTestPath ) ; } } ) ; uk . ac . ic . wlgitbridge . bridge . resource . ResourceCache resources = new uk . ac . ic . wlgitbridge . bridge . resource . UrlResourceCache ( dbStore ) ; org . junit . rules . TemporaryFolder repositoryFolder = new org . junit . rules . TemporaryFolder ( ) ; repositoryFolder . create ( ) ; java . lang . String repoStorePath = repositoryFolder . getRoot ( ) . getAbsolutePath ( ) ; uk . ac . ic . wlgitbridge . bridge . repo . RepoStore repoStore = new uk . ac . ic . wlgitbridge . bridge . repo . FSGitRepoStore ( repoStorePath , java . util . Optional . empty ( ) ) ; uk . ac . ic . wlgitbridge . bridge . repo . ProjectRepo repo = repoStore . initRepo ( "repo" ) ; java . util . Map < java . lang . String , uk . ac . ic . wlgitbridge . data . filestore . RawFile > fileTable = repo . getDirectory ( ) . getFileTable ( ) ; java . util . Map < java . lang . String , byte [ ] > fetchedUrls = new java . util . HashMap ( ) ; resources . get ( testProjectName , testUrl , newTestPath , fileTable , fetchedUrls , java . util . Optional . empty ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return getContents ( ) . length ; }
org . junit . Assert . assertEquals ( 0 , fetchedUrls . size ( ) )
test ( ) { initGraph ( ) ; greycat . Tasks . newTask ( ) . then ( greycat . internal . task . CoreActions . inject ( "uselessPayload" ) ) . thenDo ( new greycat . ActionFunction ( ) { @ greycatTest . internal . task . Override public void eval ( greycat . TaskContext ctx ) { "<AssertPlaceHolder>" ; } } ) . execute ( graph , null ) ; removeGraph ( ) ; } resultAsStrings ( ) { return ( ( greycat . internal . task . TaskResult < java . lang . String > ) ( _result ) ) ; }
org . junit . Assert . assertEquals ( ctx . resultAsStrings ( ) . get ( 0 ) , "uselessPayload" )
testOrOnEmptyOptional ( ) { boolean value = com . annimon . stream . OptionalBoolean . empty ( ) . or ( new com . annimon . stream . function . Supplier < com . annimon . stream . OptionalBoolean > ( ) { @ com . annimon . stream . Override public com . annimon . stream . OptionalBoolean get ( ) { return com . annimon . stream . OptionalBoolean . of ( false ) ; } } ) . getAsBoolean ( ) ; "<AssertPlaceHolder>" ; } getAsBoolean ( ) { return orElseThrow ( ) ; }
org . junit . Assert . assertFalse ( value )
setDefaultPortAsPortOption2 ( ) { java . net . URI webserviceURI = new java . net . URI ( ( ( ( ( "coap://" + ( de . uzl . itm . ncoap . communication . codec . AllowDefaultOptionValues . HOST ) ) + ":" ) + ( de . uzl . itm . ncoap . message . options . OptionValue . URI_PORT_DEFAULT ) ) + "/registry" ) ) ; de . uzl . itm . ncoap . message . CoapRequest coapRequest = new de . uzl . itm . ncoap . message . CoapRequest ( de . uzl . itm . ncoap . message . MessageType . CON , de . uzl . itm . ncoap . message . MessageCode . POST , webserviceURI , false ) ; coapRequest . addOption ( Option . URI_PORT , new de . uzl . itm . ncoap . message . options . UintOptionValue ( de . uzl . itm . ncoap . message . options . Option . URI_PORT , de . uzl . itm . ncoap . message . options . OptionValue . ENCODED_URI_PORT_DEFAULT , false ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( false )
testInputStream ( ) { com . facebook . imagepipeline . image . EncodedImage encodedImage = new com . facebook . imagepipeline . image . EncodedImage ( mInputStreamSupplier ) ; "<AssertPlaceHolder>" ; } getInputStream ( ) { if ( ( mInputStreamSupplier ) != null ) { return mInputStreamSupplier . get ( ) ; } com . facebook . common . references . CloseableReference < com . facebook . common . memory . PooledByteBuffer > pooledByteBufferRef = com . facebook . common . references . CloseableReference . cloneOrNull ( mPooledByteBufferRef ) ; if ( pooledByteBufferRef != null ) { try { return new com . facebook . common . memory . PooledByteBufferInputStream ( pooledByteBufferRef . get ( ) ) ; } finally { com . facebook . common . references . CloseableReference . closeSafely ( pooledByteBufferRef ) ; } } return null ; }
org . junit . Assert . assertSame ( encodedImage . getInputStream ( ) , mInputStreamSupplier . get ( ) )
getPatients_shouldNotGetPatientByNonexistingShortNameParts_SignatureNo1 ( ) { java . util . List < org . openmrs . Patient > patients = dao . getPatients ( "xy<sp>yz<sp>za" , 0 , 11 ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , patients . size ( ) )
loginServerCredential_passes ( ) { final java . security . cert . X509Certificate [ ] certChain = new java . security . cert . X509Certificate [ ] { cert } ; mock . checking ( new org . jmock . Expectations ( ) { { one ( collectiveAuthenticationPlugin ) . isCollectiveCertificateChain ( certChain ) ; will ( returnValue ( true ) ) ; one ( collectiveAuthenticationPlugin ) . authenticateCertificateChain ( certChain , true ) ; one ( cert ) . getSubjectX500Principal ( ) ; will ( returnValue ( new javax . security . auth . x500 . X500Principal ( "cn=server,dc=com.ibm.ws.collective" ) ) ) ; allowing ( credentialsService ) . setCredentials ( with ( any ( javax . security . auth . Subject . class ) ) ) ; } } ) ; javax . security . auth . callback . CallbackHandler callbackHandler = new com . ibm . ws . security . authentication . jaas . modules . CertificateLoginModuleTest . CallbackHandlerDouble ( certChain ) ; com . ibm . ws . security . authentication . jaas . modules . CertificateLoginModule module = new com . ibm . ws . security . authentication . jaas . modules . CertificateLoginModule ( ) ; java . util . Map < java . lang . String , java . lang . Object > sharedState = createSharedState ( ) ; module . initialize ( null , callbackHandler , sharedState , null ) ; "<AssertPlaceHolder>" ; module . temporarySubject . toString ( ) ; } login ( ) { javax . security . auth . Subject basicAuthSubject = com . ibm . ws . security . client . internal . jaas . JAASClientService . getClientAuthenticationService ( ) . authenticate ( callbackHandler , subject ) ; setUpSubject ( basicAuthSubject ) ; setAlreadyProcessed ( ) ; return true ; }
org . junit . Assert . assertTrue ( module . login ( ) )
testListProductAttributeSets ( ) { try { java . util . List < com . magento . api . CatalogProductAttributeSetEntity > catalogProductAttributeSetEntities = runFlowAndGetPayload ( "list-product-attribute-sets" ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( org . mule . modules . tests . ConnectorTestUtils . getStackTrace ( e ) ) ; } }
org . junit . Assert . assertNotNull ( catalogProductAttributeSetEntities )
testGetSetName ( ) { java . lang . String testName = "testName" ; userDefinedItem . setName ( testName ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( testName , userDefinedItem . getName ( ) )
testOAuth20AutoDetect ( ) { setAuthType ( AuthType . AUTO_DETECT ) ; boolean result = checkExpected ( "Authentication_API_OAuth20MainWindow" , "Successfully<sp>logged<sp>in" ) ; "<AssertPlaceHolder>" ; } getExpectedErrorMsg ( ) { return expectedErrorMsg ; }
org . junit . Assert . assertTrue ( getExpectedErrorMsg ( ) , result )
testNativeAppWall ( ) { com . xrtb . common . HttpPostGet http = new com . xrtb . common . HttpPostGet ( ) ; java . lang . String bid = java . nio . charset . Charset . defaultCharset ( ) . decode ( java . nio . ByteBuffer . wrap ( java . nio . file . Files . readAllBytes ( java . nio . file . Paths . get ( "assets" 5 ) ) ) ) . toString ( ) ; java . lang . String s = null ; long time = 0 ; map = DbTools . mapper . readValue ( bid , java . util . Map . class ) ; list = ( ( java . util . List ) ( map . get ( "imp" ) ) ) ; sub = ( ( java . util . Map ) ( list . get ( 0 ) ) ) ; sub = ( ( java . util . Map ) ( sub . get ( "XTIME:<sp>" 8 ) ) ) ; sub . put ( "ben:payday" 8 , 4 ) ; s = DbTools . mapper . writer ( ) . withDefaultPrettyPrinter ( ) . writeValueAsString ( map ) ; try { time = java . lang . System . currentTimeMillis ( ) ; s = http . sendPost ( ( ( "assets" 1 + ( Config . testHost ) ) + "/rtb/bids/nexage" ) , s ) ; time = ( java . lang . System . currentTimeMillis ( ) ) - time ; xtime = http . getHeader ( "assets" 9 ) ; } catch ( java . lang . Exception error ) { org . junit . Assert . fail ( ( "Can't<sp>connect<sp>to<sp>test<sp>host:<sp>" + ( Config . testHost ) ) ) ; } "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . toString ( ) ) ; } } getHeader ( java . lang . String ) { if ( ( http ) == null ) return null ; return http . getHeaderField ( name ) ; }
org . junit . Assert . assertNull ( s )
testFakeStrategy ( ) { fr . inria . main . evolution . AstorMain main1 = new fr . inria . main . evolution . AstorMain ( ) ; java . lang . String dep = ( new java . io . File ( "30" 1 ) . getAbsolutePath ( ) ) + ( java . io . File . pathSeparator ) ; java . io . File out = new java . io . File ( fr . inria . astor . core . setup . ConfigurationProperties . getProperty ( "workingDirectory" ) ) ; java . lang . String [ ] args = new java . lang . String [ ] { "custom" 8 , dep , "/target/classes" 0 , "custom" , "custom" 1 , "org.apache.commons.math.analysis.solvers.BisectionSolverTest" , "custom" 7 , new java . io . File ( "30" 4 ) . getAbsolutePath ( ) , "-package" , "/target/classes" 1 , "custom" 9 , "7" , "/target/classes" 2 , "/target/classes" 5 , "-out" , out . getAbsolutePath ( ) , "custom" 2 , "/target/classes" 3 , "30" 3 , "/target/classes" 7 , "custom" 5 , "/target/classes" 9 , "-stopfirst" , "/target/classes" 4 , "-maxtime" , "30" , "custom" 4 , fr . inria . astor . test . repair . evaluation . extensionpoints . deep . support . FakeCustomEngine . class . getName ( ) , ExtensionPoints . REPAIR_OPERATORS . argument ( ) , fr . inria . astor . approaches . jgenprog . operators . RemoveOp . class . getCanonicalName ( ) } ; System . out . println ( java . util . Arrays . toString ( args ) ) ; main1 . execute ( args ) ; java . util . List < fr . inria . astor . core . entities . ProgramVariant > solutions = main1 . getEngine ( ) . getSolutions ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { for ( java . lang . CharSequence part : parts ) { if ( ( part . length ( ) ) > 0 ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( solutions . isEmpty ( ) )
testEncodeCertificate_BodySignature ( ) { de . persosim . simulator . crypto . certificates . CardVerifiableCertificate cvCertDETESTeID00004 = new de . persosim . simulator . crypto . certificates . CardVerifiableCertificate ( cvCertDETESTeID00004Tlv ) ; de . persosim . simulator . crypto . certificates . CertificateBody body = cvCertDETESTeID00004 . getBody ( ) ; byte [ ] signature = cvCertDETESTeID00004 . getSignature ( ) ; de . persosim . simulator . tlv . ConstructedTlvDataObject encoding = de . persosim . simulator . crypto . certificates . CertificateUtils . encodeCertificate ( body , signature ) ; "<AssertPlaceHolder>" ; } encodeCertificate ( de . persosim . simulator . crypto . certificates . CertificateBody , byte [ ] ) { de . persosim . simulator . protocols . ta . CertificateRole certificateRole = body . getCertificateRole ( ) ; return de . persosim . simulator . crypto . certificates . CertificateUtils . encodeCertificate ( body . getCertificateProfileIdentifier ( ) , body . getCertificationAuthorityReference ( ) , body . getPublicKey ( ) . toTlvDataObject ( certificateRole . includeConditionalElementsInKeyEncoding ( ) ) , body . getCertificateHolderReference ( ) , body . getCertificateHolderAuthorizationTemplate ( ) , body . getCertificateEffectiveDate ( ) , body . getCertificateExpirationDate ( ) , body . getExtensionRepresentation ( ) , signature ) ; }
org . junit . Assert . assertEquals ( cvCertDETESTeID00004Tlv , encoding )
whenJarMemberWithHashInManifestIsQueriedThenCacheCorrectlyObtainsIt ( ) { com . facebook . buck . io . filesystem . ProjectFilesystem filesystem = new com . facebook . buck . io . filesystem . impl . FakeProjectFilesystem ( ) ; com . facebook . buck . util . cache . impl . DefaultFileHashCache cache = com . facebook . buck . util . cache . impl . DefaultFileHashCache . createDefaultFileHashCache ( filesystem , fileHashCacheMode ) ; java . nio . file . Path abiJarPath = java . nio . file . Paths . get ( "test-abi.jar" ) ; java . nio . file . Path memberPath = java . nio . file . Paths . get ( "SomeClass.class" ) ; java . lang . String memberContents = "Some<sp>contents" ; try ( com . facebook . buck . util . zip . CustomJarOutputStream jar = com . facebook . buck . util . zip . ZipOutputStreams . newJarOutputStream ( filesystem . newFileOutputStream ( abiJarPath ) ) ) { jar . setEntryHashingEnabled ( true ) ; jar . writeEntry ( memberPath . toString ( ) , new java . io . ByteArrayInputStream ( memberContents . getBytes ( StandardCharsets . UTF_8 ) ) ) ; } com . google . common . hash . HashCode actual = cache . get ( com . facebook . buck . core . io . ArchiveMemberPath . of ( abiJarPath , memberPath ) ) ; com . google . common . hash . HashCode expected = com . google . common . hash . Hashing . murmur3_128 ( ) . hashString ( memberContents , StandardCharsets . UTF_8 ) ; "<AssertPlaceHolder>" ; } of ( com . facebook . buck . core . files . FileTree , java . lang . String ) { return new com . facebook . buck . core . files . FileTreeFileNameIterator ( fileTree , fileName ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testGetDataExceptions ( ) { org . easymock . EasyMock . expect ( uploadResource . getSize ( ) ) . andStubReturn ( ( ( long ) ( Long . MAX_VALUE ) ) ) ; org . easymock . EasyMock . expect ( uploadResource . getInputStream ( ) ) . andStubAnswer ( org . richfaces . request . UploadedFile25Test . INPUT_STREAM_SUPPLIER ) ; environment . getControl ( ) . replay ( ) ; try { uploadedFile . getData ( ) ; org . junit . Assert . fail ( ) ; } catch ( org . richfaces . exception . FileUploadException e ) { } environment . getControl ( ) . reset ( ) ; org . easymock . EasyMock . expect ( uploadResource . getSize ( ) ) . andStubReturn ( 1L ) ; org . easymock . EasyMock . expect ( uploadResource . getInputStream ( ) ) . andStubThrow ( new java . io . IOException ( "No<sp>stream<sp>available" ) ) ; environment . getControl ( ) . replay ( ) ; try { uploadedFile . getData ( ) ; org . junit . Assert . fail ( ) ; } catch ( org . richfaces . exception . FileUploadException e ) { "<AssertPlaceHolder>" ; } } getCause ( ) { return this . cause ; }
org . junit . Assert . assertTrue ( ( ( e . getCause ( ) ) instanceof java . io . IOException ) )
renderShouldWorkForRich ( ) { final ac . simons . oembed . DefaultOembedResponseRenderer renderer = new ac . simons . oembed . DefaultOembedResponseRenderer ( ) ; ac . simons . oembed . OembedResponse response ; response = new ac . simons . oembed . OembedResponse ( ) ; response . setType ( "rich" ) ; response . setHtml ( "<html<sp>/>" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( "<html<sp>/>" , renderer . render ( response , null ) )
testGetFactoryNoCreate ( ) { final java . lang . String pid = "a.b~name" ; final org . osgi . service . cm . ConfigurationAdmin ca = mock ( org . osgi . service . cm . ConfigurationAdmin . class ) ; when ( ca . listConfigurations ( getFilterString ( pid ) ) ) . thenReturn ( null ) ; "<AssertPlaceHolder>" ; verify ( ca ) . listConfigurations ( getFilterString ( pid ) ) ; verifyNoMoreInteractions ( ca ) ; } getOrCreateConfiguration ( org . osgi . service . cm . ConfigurationAdmin , java . lang . String , boolean ) { final java . lang . String filter = ( ( ( "(" + ( org . osgi . framework . Constants . SERVICE_PID ) ) + "=" ) + ( org . apache . felix . configurator . impl . ConfigUtil . encode ( pid ) ) ) + ")" ; final org . osgi . service . cm . Configuration [ ] configs = ca . listConfigurations ( filter ) ; if ( ( configs != null ) && ( ( configs . length ) > 0 ) ) { return configs [ 0 ] ; } if ( ! createIfNeeded ) { return null ; } final int pos = pid . indexOf ( '~' ) ; if ( pos != ( - 1 ) ) { final java . lang . String factoryPid = pid . substring ( 0 , pos ) ; final java . lang . String alias = pid . substring ( ( pos + 1 ) ) ; return ca . getFactoryConfiguration ( factoryPid , alias , "?" ) ; } else { return ca . getConfiguration ( pid , "?" ) ; } }
org . junit . Assert . assertNull ( org . apache . felix . configurator . impl . ConfigUtil . getOrCreateConfiguration ( ca , pid , false ) )
assertUpdate ( ) { io . elasticjob . cloud . reg . zookeeper . ZookeeperRegistryCenterModifyTest . zkRegCenter . persist ( "/update" , "before_update" ) ; io . elasticjob . cloud . reg . zookeeper . ZookeeperRegistryCenterModifyTest . zkRegCenter . update ( "/update" , "after_update" ) ; "<AssertPlaceHolder>" ; } getDirectly ( java . lang . String ) { try { return new java . lang . String ( client . getData ( ) . forPath ( key ) , com . google . common . base . Charsets . UTF_8 ) ; } catch ( final java . lang . Exception ex ) { io . elasticjob . cloud . reg . exception . RegExceptionHandler . handleException ( ex ) ; return null ; } }
org . junit . Assert . assertThat ( io . elasticjob . cloud . reg . zookeeper . ZookeeperRegistryCenterModifyTest . zkRegCenter . getDirectly ( "/update" ) , org . hamcrest . CoreMatchers . is ( "after_update" ) )
constructorWithNullValueShouldNotThrows ( ) { com . gisgraphy . fulltext . solrResponseDtoBuilder builder = new com . gisgraphy . fulltext . solrResponseDtoBuilder ( ) ; "<AssertPlaceHolder>" ; } build ( org . apache . solr . client . solrj . response . QueryResponse ) { com . gisgraphy . fulltext . FulltextResultsDto fulltextResultDto = new com . gisgraphy . fulltext . FulltextResultsDto ( ) ; fulltextResultDto . results = com . gisgraphy . fulltext . SolrUnmarshaller . unmarshall ( response ) ; fulltextResultDto . QTime = response . getQTime ( ) ; fulltextResultDto . numFound = response . getResults ( ) . getNumFound ( ) ; fulltextResultDto . maxScore = response . getResults ( ) . getMaxScore ( ) ; fulltextResultDto . resultsSize = ( ( fulltextResultDto . results ) == null ) ? 0 : fulltextResultDto . results . size ( ) ; org . apache . solr . client . solrj . response . SpellCheckResponse spellCheckResponse = response . getSpellCheckResponse ( ) ; if ( spellCheckResponse != null ) { java . util . Map < java . lang . String , org . apache . solr . client . solrj . response . SpellCheckResponse . Suggestion > suggestionMapInternal = spellCheckResponse . getSuggestionMap ( ) ; if ( suggestionMapInternal != null ) { for ( java . lang . String key : suggestionMapInternal . keySet ( ) ) { org . apache . solr . client . solrj . response . SpellCheckResponse . Suggestion suggestion = suggestionMapInternal . get ( key ) ; fulltextResultDto . suggestionMap . put ( key , suggestion . getAlternatives ( ) ) ; } } if ( ( spellCheckResponse . getCollatedResult ( ) ) != null ) { fulltextResultDto . collatedResult = spellCheckResponse . getCollatedResult ( ) . trim ( ) ; } java . util . List < org . apache . solr . client . solrj . response . SpellCheckResponse . Suggestion > suggestions = spellCheckResponse . getSuggestions ( ) ; if ( ( suggestions . size ( ) ) != 0 ) { java . lang . StringBuffer sb = new java . lang . StringBuffer ( ) ; for ( org . apache . solr . client . solrj . response . SpellCheckResponse . Suggestion suggestion : suggestions ) { sb . append ( suggestion . getSuggestions ( ) . get ( 0 ) ) . append ( "<sp>" ) ; } fulltextResultDto . spellCheckProposal = sb . toString ( ) . trim ( ) ; } } return fulltextResultDto ; }
org . junit . Assert . assertNotNull ( builder . build ( null ) )
testGetResults ( ) { java . time . ZonedDateTime entryFilledTime = java . time . ZonedDateTime . of ( 2017 , 2 , 8 , 6 , 18 , 20 , 0 , java . time . ZoneId . systemDefault ( ) ) ; java . time . ZonedDateTime exitFilledTime = java . time . ZonedDateTime . of ( 2017 , 2 , 8 , 7 , 18 , 20 , 0 , java . time . ZoneId . systemDefault ( ) ) ; testRoundTrip . direction = LONG ; testRoundTrip . entry = mockEntryOrder ; testRoundTrip . exit = mockExitOrder ; com . sumzerotrading . data . Ticker ticker = new com . sumzerotrading . data . StockTicker ( "QQQ" ) ; int size = 200 ; double entryPrice = 100.23 ; double exitPrice = 100.51 ; when ( mockEntryOrder . getOrderFilledTime ( ) ) . thenReturn ( entryFilledTime ) ; when ( mockEntryOrder . getTicker ( ) ) . thenReturn ( ticker ) ; when ( mockEntryOrder . getSize ( ) ) . thenReturn ( size ) ; when ( mockEntryOrder . getFilledPrice ( ) ) . thenReturn ( entryPrice ) ; when ( mockExitOrder . getOrderFilledTime ( ) ) . thenReturn ( exitFilledTime ) ; when ( mockExitOrder . getFilledPrice ( ) ) . thenReturn ( exitPrice ) ; java . lang . String expectedString = "2017-02-08T06:18:20,LONG,QQQ,200,100.23,0,2017-02-08T07:18:20,100.51,0" ; "<AssertPlaceHolder>" ; } getResults ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( entry . getOrderFilledTime ( ) . format ( DateTimeFormatter . ISO_LOCAL_DATE_TIME ) ) . append ( "," ) . append ( direction ) . append ( "," ) . append ( entry . getTicker ( ) . getSymbol ( ) ) . append ( "," ) . append ( entry . getSize ( ) ) . append ( "," ) . append ( entry . getFilledPrice ( ) ) . append ( "," ) . append ( 0 ) . append ( "," ) . append ( exit . getOrderFilledTime ( ) . format ( DateTimeFormatter . ISO_LOCAL_DATE_TIME ) ) . append ( "," ) . append ( exit . getFilledPrice ( ) ) . append ( "," ) . append ( 0 ) ; return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( expectedString , testRoundTrip . getResults ( ) )
testTransferAppend ( ) { final ch . cyberduck . core . Local local = new ch . cyberduck . core . Local ( java . lang . System . getProperty ( "java.io.tmpdir" ) , java . util . UUID . randomUUID ( ) . toString ( ) ) ; final byte [ ] content = new byte [ 32770 ] ; new java . util . Random ( ) . nextBytes ( content ) ; final java . io . OutputStream out = local . getOutputStream ( false ) ; org . apache . commons . io . IOUtils . write ( content , out ) ; out . close ( ) ; final ch . cyberduck . core . Path test = new ch . cyberduck . core . Path ( new ch . cyberduck . core . sftp . SFTPHomeDirectoryService ( session ) . find ( ) , java . util . UUID . randomUUID ( ) . toString ( ) , java . util . EnumSet . of ( Path . Type . file ) ) ; { final ch . cyberduck . core . transfer . TransferStatus status = new ch . cyberduck . core . transfer . TransferStatus ( ) . length ( ( ( content . length ) / 2 ) ) ; new ch . cyberduck . core . shared . DefaultUploadFeature < java . lang . Void > ( new ch . cyberduck . core . sftp . SFTPWriteFeature ( session ) ) . upload ( test , local , new ch . cyberduck . core . io . BandwidthThrottle ( ch . cyberduck . core . io . BandwidthThrottle . UNLIMITED ) , new ch . cyberduck . core . io . DisabledStreamListener ( ) , status , new ch . cyberduck . core . DisabledConnectionCallback ( ) ) ; } { final ch . cyberduck . core . transfer . TransferStatus status = new ch . cyberduck . core . transfer . TransferStatus ( ) . length ( ( ( content . length ) / 2 ) ) . skip ( ( ( content . length ) / 2 ) ) . append ( true ) ; new ch . cyberduck . core . shared . DefaultUploadFeature < java . lang . Void > ( new ch . cyberduck . core . sftp . SFTPWriteFeature ( session ) ) . upload ( test , local , new ch . cyberduck . core . io . BandwidthThrottle ( ch . cyberduck . core . io . BandwidthThrottle . UNLIMITED ) , new ch . cyberduck . core . io . DisabledStreamListener ( ) , status , new ch . cyberduck . core . DisabledConnectionCallback ( ) ) ; } final byte [ ] buffer = new byte [ content . length ] ; final ch . cyberduck . core . features . Read read = session . getFeature ( ch . cyberduck . core . features . Read . class ) ; final java . io . InputStream in = read . read ( test , new ch . cyberduck . core . transfer . TransferStatus ( ) . length ( content . length ) , new ch . cyberduck . core . DisabledConnectionCallback ( ) ) ; org . apache . commons . io . IOUtils . readFully ( in , buffer ) ; in . close ( ) ; "<AssertPlaceHolder>" ; final ch . cyberduck . core . features . Delete delete = session . getFeature ( ch . cyberduck . core . features . Delete . class ) ; delete . delete ( java . util . Collections . singletonList ( test ) , new ch . cyberduck . core . DisabledLoginCallback ( ) , new ch . cyberduck . core . features . Delete . DisabledCallback ( ) ) ; local . delete ( ) ; } close ( ) { try { super . close ( ) ; } finally { release ( resolved ) ; } }
org . junit . Assert . assertArrayEquals ( content , buffer )
testMagicVisitorSubclass ( ) { java . util . List < com . ning . atlas . tree . Pancake > rs = com . ning . atlas . tree . Trees . visit ( root , new java . util . ArrayList < com . ning . atlas . tree . Pancake > ( ) , new com . ning . atlas . tree . MagicVisitor < com . ning . atlas . tree . Waffle , java . util . List < com . ning . atlas . tree . Pancake > > ( ) { @ com . ning . atlas . tree . SuppressWarnings ( "unused" ) public java . util . List < com . ning . atlas . tree . Pancake > enter ( com . ning . atlas . tree . Pancake pancake , java . util . List < com . ning . atlas . tree . Pancake > baton ) { baton . add ( pancake ) ; return baton ; } } ) ; "<AssertPlaceHolder>" ; } add ( java . lang . String ) { com . ning . atlas . ListenerThing . calls . add ( word ) ; return com . google . common . util . concurrent . Futures . immediateFuture ( word ) ; }
org . junit . Assert . assertThat ( rs . size ( ) , org . hamcrest . CoreMatchers . equalTo ( 3 ) )
testProvideMdcx ( ) { final int transactionId = 12345 ; final org . restcomm . media . core . control . mgcp . util . collections . Parameters < org . restcomm . media . core . control . mgcp . message . MgcpParameterType > parameters = new org . restcomm . media . core . control . mgcp . util . collections . Parameters ( ) ; final org . restcomm . media . core . control . mgcp . endpoint . MgcpEndpointManager endpointManager = mock ( org . restcomm . media . core . control . mgcp . endpoint . MgcpEndpointManager . class ) ; final org . restcomm . media . core . control . mgcp . pkg . MgcpPackageManager packageManager = mock ( org . restcomm . media . core . control . mgcp . pkg . MgcpPackageManager . class ) ; final org . restcomm . media . core . control . mgcp . call . MgcpCallManager callManager = mock ( org . restcomm . media . core . control . mgcp . call . MgcpCallManager . class ) ; final org . restcomm . media . core . control . mgcp . pkg . MgcpSignalProvider signalProvider = mock ( org . restcomm . media . core . control . mgcp . pkg . MgcpSignalProvider . class ) ; final org . restcomm . media . core . control . mgcp . command . MgcpCommandProvider commandProvider = new org . restcomm . media . core . control . mgcp . command . MgcpCommandProvider ( endpointManager , packageManager , signalProvider , callManager ) ; org . restcomm . media . core . control . mgcp . command . MgcpCommand command = commandProvider . provide ( MgcpRequestType . MDCX , transactionId , parameters ) ; "<AssertPlaceHolder>" ; } provide ( org . restcomm . media . core . control . mgcp . message . MgcpRequestType , int , org . restcomm . media . core . control . mgcp . util . collections . Parameters ) { switch ( type ) { case CRCX : return new org . restcomm . media . core . control . mgcp . command . CreateConnectionCommand ( transactionId , parameters , this . endpointManager ) ; case MDCX : return new org . restcomm . media . core . control . mgcp . command . ModifyConnectionCommand ( transactionId , parameters , this . endpointManager ) ; case DLCX : return new org . restcomm . media . core . control . mgcp . command . DeleteConnectionCommand ( transactionId , parameters , this . endpointManager ) ; case RQNT : return new org . restcomm . media . core . control . mgcp . command . RequestNotificationCommand ( transactionId , parameters , this . endpointManager , this . packageManager , this . signalProvider ) ; case AUCX : return new org . restcomm . media . core . control . mgcp . command . AuditConnectionCommand ( transactionId , parameters , this . endpointManager ) ; case AUEP : return new org . restcomm . media . core . control . mgcp . command . AuditEndpointCommand ( transactionId , parameters , this . endpointManager ) ; default : throw new java . lang . IllegalArgumentException ( ( "Unsupported<sp>command<sp>type<sp>" + ( type . name ( ) ) ) ) ; } }
org . junit . Assert . assertTrue ( ( command instanceof org . restcomm . media . core . control . mgcp . command . ModifyConnectionCommand ) )
testGetFirstName_1 ( ) { org . jinstagram . entity . users . basicinfo . UserInfoData fixture = new org . jinstagram . entity . users . basicinfo . UserInfoData ( ) ; fixture . setUsername ( "" ) ; fixture . setFullName ( "" ) ; fixture . setProfilePicture ( "" ) ; fixture . setId ( "" ) ; fixture . setLast_name ( "" ) ; fixture . setCounts ( new org . jinstagram . entity . users . basicinfo . Counts ( ) ) ; fixture . setFirstName ( "" ) ; fixture . setBio ( "" ) ; fixture . setWebsite ( "" ) ; java . lang . String result = fixture . getFirstName ( ) ; "<AssertPlaceHolder>" ; } getFirstName ( ) { return firstName ; }
org . junit . Assert . assertEquals ( "" , result )
testMakeLambdasWithString ( ) { ast . Expression expr = new ast . Application ( new ast . Variable ( "x" ) , new ast . Variable ( "y" ) ) ; ast . Lambda reference = new ast . Lambda ( "x" , new ast . Lambda ( "y" , new ast . Lambda ( "z" , expr ) ) ) ; ast . Lambda toTest = ast . Lambda . makeLambdas ( expr , "x" , "y" , "z" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( reference , toTest )
testSetAuthenticationTokenFactory ( ) { org . apache . activemq . shiro . authc . AuthenticationTokenFactory factory = new org . apache . activemq . shiro . authc . AuthenticationTokenFactory ( ) { @ org . apache . activemq . shiro . authc . Override public org . apache . shiro . authc . AuthenticationToken getAuthenticationToken ( org . apache . activemq . shiro . subject . SubjectConnectionReference ref ) throws org . apache . activemq . shiro . authc . Exception { return null ; } } ; filter . setAuthenticationTokenFactory ( factory ) ; "<AssertPlaceHolder>" ; } getAuthenticationTokenFactory ( ) { return authenticationTokenFactory ; }
org . junit . Assert . assertSame ( factory , filter . getAuthenticationTokenFactory ( ) )
getsEndpointFromRegion ( ) { when ( com . amazonaws . regions . RegionUtils . getRegion ( TEST_REGION ) ) . thenReturn ( region ) ; when ( region . getServiceEndpoint ( ServiceAbbreviations . Dynamodb ) ) . thenReturn ( TEST_ENDPOINT ) ; conf . set ( DynamoDBConstants . REGION , TEST_REGION ) ; "<AssertPlaceHolder>" ; verify ( region ) . getServiceEndpoint ( ServiceAbbreviations . Dynamodb ) ; } getDynamoDBEndpoint ( org . apache . hadoop . conf . Configuration , java . lang . String ) { java . lang . String endpoint = org . apache . hadoop . dynamodb . DynamoDBUtil . getValueFromConf ( conf , DynamoDBConstants . ENDPOINT ) ; if ( com . google . common . base . Strings . isNullOrEmpty ( endpoint ) ) { if ( com . google . common . base . Strings . isNullOrEmpty ( region ) ) { region = org . apache . hadoop . dynamodb . DynamoDBUtil . getValueFromConf ( conf , DynamoDBConstants . REGION ) ; } if ( com . google . common . base . Strings . isNullOrEmpty ( region ) ) { region = org . apache . hadoop . dynamodb . DynamoDBUtil . getValueFromConf ( conf , DynamoDBConstants . REGION_ID ) ; } if ( com . google . common . base . Strings . isNullOrEmpty ( region ) ) { try { region = com . amazonaws . util . EC2MetadataUtils . getEC2InstanceRegion ( ) ; } catch ( java . lang . Exception e ) { org . apache . hadoop . dynamodb . DynamoDBUtil . log . warn ( java . lang . String . format ( ( "Exception<sp>when<sp>attempting<sp>to<sp>get<sp>AWS<sp>region<sp>information.<sp>Will<sp>" + ( "ignore<sp>and<sp>default<sp>" + "to<sp>%s" ) ) , DynamoDBConstants . DEFAULT_AWS_REGION ) , e ) ; } } if ( com . google . common . base . Strings . isNullOrEmpty ( region ) ) { region = DynamoDBConstants . DEFAULT_AWS_REGION ; } endpoint = com . amazonaws . regions . RegionUtils . getRegion ( region ) . getServiceEndpoint ( ServiceAbbreviations . Dynamodb ) ; } org . apache . hadoop . dynamodb . DynamoDBUtil . log . info ( ( "Using<sp>endpoint<sp>for<sp>DynamoDB:<sp>" + endpoint ) ) ; return endpoint ; }
org . junit . Assert . assertEquals ( TEST_ENDPOINT , org . apache . hadoop . dynamodb . DynamoDBUtil . getDynamoDBEndpoint ( conf , null ) )
testSendNotificationWithAppKeyWithSpecialCharacter4 ( ) { int erroCode = ErrorCodeEnum . NOERROR . value ( ) ; java . lang . String msgTitle = "jpush" ; java . lang . String msgContent = "jpush~" ; cn . jpush . api . MessageResult result = jpush . sendNotificationWithAppKey ( sendNo , msgTitle , msgContent ) ; "<AssertPlaceHolder>" ; } getErrcode ( ) { return errcode ; }
org . junit . Assert . assertEquals ( erroCode , result . getErrcode ( ) )
testFailNotOnSlave ( ) { try ( java . sql . Connection connection = getNewConnection ( "&retriesAllDown=6&connectTimeout=1000&socketTimeout=1000" , true ) ) { java . sql . Statement stmt = connection . createStatement ( ) ; int masterServerId = getServerId ( connection ) ; stopProxy ( masterServerId ) ; try { stmt . execute ( "SELECT<sp>1" ) ; org . junit . Assert . fail ( ) ; } catch ( java . sql . SQLException e ) { } "<AssertPlaceHolder>" ; } } isReadOnly ( ) { return false ; }
org . junit . Assert . assertFalse ( connection . isReadOnly ( ) )
testUpdateJobDefinition ( ) { java . lang . String namespace = NAMESPACE ; java . lang . String jobName = JOB_NAME ; java . lang . String activitiJobXml = getActivitiJobXml ( org . finra . herd . rest . NAMESPACE , org . finra . herd . rest . JOB_NAME ) ; org . finra . herd . model . api . xml . JobDefinitionUpdateRequest request = new org . finra . herd . model . api . xml . JobDefinitionUpdateRequest ( null , activitiJobXml , null , null ) ; org . finra . herd . model . api . xml . JobDefinition jobDefinition = getJobDefinition ( org . finra . herd . rest . NAMESPACE , org . finra . herd . rest . JOB_NAME ) ; when ( jobDefinitionService . updateJobDefinition ( namespace , jobName , request , true ) ) . thenReturn ( jobDefinition ) ; org . finra . herd . model . api . xml . JobDefinition resultJobDefinition = jobDefinitionRestController . updateJobDefinition ( namespace , jobName , new org . finra . herd . model . api . xml . JobDefinitionUpdateRequest ( null , activitiJobXml , null , null ) ) ; verify ( jobDefinitionService ) . updateJobDefinition ( namespace , jobName , request , true ) ; verifyNoMoreInteractions ( jobDefinitionService ) ; "<AssertPlaceHolder>" ; } updateJobDefinition ( java . lang . String , java . lang . String , org . finra . herd . model . api . xml . JobDefinitionUpdateRequest , boolean ) { java . lang . String namespaceLocal = alternateKeyHelper . validateStringParameter ( "namespace" , namespace ) ; java . lang . String jobNameLocal = alternateKeyHelper . validateStringParameter ( "job<sp>name" , jobName ) ; org . springframework . util . Assert . hasText ( request . getActivitiJobXml ( ) , "An<sp>Activiti<sp>job<sp>XML<sp>must<sp>be<sp>specified." ) ; request . setActivitiJobXml ( request . getActivitiJobXml ( ) . trim ( ) ) ; validateJobDefinition ( namespaceLocal , jobNameLocal , request . getActivitiJobXml ( ) , request . getParameters ( ) , request . getS3PropertiesLocation ( ) ) ; if ( enforceAsync ) { assertFirstTaskIsAsync ( activitiHelper . constructBpmnModelFromXmlAndValidate ( request . getActivitiJobXml ( ) ) ) ; } org . finra . herd . model . jpa . NamespaceEntity namespaceEntity = namespaceDaoHelper . getNamespaceEntity ( namespaceLocal ) ; org . finra . herd . model . jpa . JobDefinitionEntity jobDefinitionEntity = jobDefinitionDaoHelper . getJobDefinitionEntity ( namespaceLocal , jobNameLocal ) ; org . activiti . engine . repository . ProcessDefinition processDefinition = createProcessDefinition ( namespaceLocal , jobNameLocal , request . getActivitiJobXml ( ) ) ; jobDefinitionEntity = createOrUpdateJobDefinitionEntity ( jobDefinitionEntity , namespaceEntity , jobNameLocal , request . getDescription ( ) , processDefinition . getId ( ) , request . getParameters ( ) , request . getS3PropertiesLocation ( ) ) ; jobDefinitionEntity = jobDefinitionDao . saveAndRefresh ( jobDefinitionEntity ) ; return createJobDefinitionFromEntity ( jobDefinitionEntity ) ; }
org . junit . Assert . assertEquals ( jobDefinition , resultJobDefinition )
basicUuidComperisonTest ( ) { java . util . Random r = new java . util . Random ( java . lang . System . currentTimeMillis ( ) ) ; for ( int i = 0 ; i < 100000 ; i ++ ) { long ts = ( java . lang . System . currentTimeMillis ( ) ) + ( ( ( ( ( 1000 * 60 ) * 60 ) * 24 ) * 365 ) * 10 ) ; long before = ( ( long ) ( ( java . lang . Math . random ( ) ) * ts ) ) ; long after = ( ( long ) ( ( java . lang . Math . random ( ) ) * ts ) ) ; if ( before > after ) { long tmp = after ; after = before ; before = tmp ; } java . lang . String beforeStr = org . thingsboard . server . common . data . UUIDConverter . fromTimeUUID ( com . datastax . driver . core . utils . UUIDs . startOf ( before ) ) ; java . lang . String afterStr = org . thingsboard . server . common . data . UUIDConverter . fromTimeUUID ( com . datastax . driver . core . utils . UUIDs . startOf ( after ) ) ; if ( ( afterStr . compareTo ( beforeStr ) ) < 0 ) { System . out . println ( ( ( ( "Before:<sp>" + before ) + "<sp>|<sp>" ) + beforeStr ) ) ; System . out . println ( ( ( ( "After:<sp>" + after ) + "<sp>|<sp>" ) + afterStr ) ) ; } "<AssertPlaceHolder>" ; } } compareTo ( org . thingsboard . server . service . telemetry . TsData ) { return java . lang . Long . compare ( ts , o . ts ) ; }
org . junit . Assert . assertTrue ( ( ( afterStr . compareTo ( beforeStr ) ) >= 0 ) )
testToDoubleArrayForRandomArray ( ) { int size = getArrayLength ( ) ; double [ ] primitive = new double [ size ] ; java . lang . Double [ ] object = new java . lang . Double [ size ] ; for ( int i = 0 ; i < size ; i ++ ) { double value = cz . zcu . kiv . jop . util . ArrayUtilsTest . rand . nextDouble ( ) ; primitive [ i ] = value ; object [ i ] = new java . lang . Double ( value ) ; } "<AssertPlaceHolder>" ; } toObjectArray ( boolean [ ] ) { if ( array == null ) { return null ; } if ( ( array . length ) == 0 ) { return cz . zcu . kiv . jop . util . ArrayUtils . EMPTY_BOOLEAN_OBJECT_ARRAY ; } java . lang . Boolean [ ] retArray = new java . lang . Boolean [ array . length ] ; for ( int i = 0 ; i < ( array . length ) ; i ++ ) { retArray [ i ] = new java . lang . Boolean ( array [ i ] ) ; } return retArray ; }
org . junit . Assert . assertArrayEquals ( object , cz . zcu . kiv . jop . util . ArrayUtils . toObjectArray ( primitive ) )
testSaveListOfTZipOutputStreamStringCsvConfigCsvListHandlerOfTString ( ) { final java . io . File file = tempFolder . newFile ( "test.zip" ) ; final java . util . zip . ZipOutputStream zip = new java . util . zip . ZipOutputStream ( new java . io . FileOutputStream ( file ) ) ; try { com . orangesignal . csv . Csv . save ( com . orangesignal . csv . CsvTest . data , zip , com . orangesignal . csv . CsvTest . encoding , com . orangesignal . csv . CsvTest . cfg , new com . orangesignal . csv . handlers . StringArrayListHandler ( ) , "test.csv" ) ; } finally { com . orangesignal . csv . Csv . closeQuietly ( zip ) ; } final java . util . zip . ZipFile zipFile = new java . util . zip . ZipFile ( file ) ; try { final java . util . List < java . lang . String [ ] > list = com . orangesignal . csv . Csv . load ( zipFile , com . orangesignal . csv . CsvTest . encoding , com . orangesignal . csv . CsvTest . cfg , new com . orangesignal . csv . handlers . StringArrayListHandler ( ) ) ; "<AssertPlaceHolder>" ; } finally { zipFile . close ( ) ; } } size ( ) { return headers . size ( ) ; }
org . junit . Assert . assertThat ( list . size ( ) , org . hamcrest . core . Is . is ( 2 ) )
getNodeForEmptyCircleTest ( ) { org . kaaproject . kaa . server . hash . ConsistentHashResolver consistentHashResolver = new org . kaaproject . kaa . server . hash . ConsistentHashResolver ( new java . util . ArrayList < org . kaaproject . kaa . server . common . zk . gen . OperationsNodeInfo > ( ) , 5 ) ; org . kaaproject . kaa . server . common . zk . gen . OperationsNodeInfo info = consistentHashResolver . getNode ( "userId" ) ; "<AssertPlaceHolder>" ; } getNode ( java . lang . String ) { if ( user == null ) { throw new java . lang . RuntimeException ( "user<sp>id<sp>is<sp>null" ) ; } return getNearest ( hash ( user ) ) ; }
org . junit . Assert . assertNull ( info )
testGetIdField ( ) { org . slc . sli . aggregation . mapreduce . map . key . TenantAndIdEmittableKey key = new org . slc . sli . aggregation . mapreduce . map . key . TenantAndIdEmittableKey ( "meta.data.tenantId" , "test.id.key.field" ) ; "<AssertPlaceHolder>" ; } getIdField ( ) { return super . getFieldName ( ) ; }
org . junit . Assert . assertEquals ( key . getIdField ( ) . toString ( ) , "test.id.key.field" )
getCustomers_noCustomers ( ) { java . util . List < org . oscm . internal . vo . VOOrganization > emptyList = new java . util . ArrayList < org . oscm . internal . vo . VOOrganization > ( ) ; given ( exportBillingService . accountService . getMyCustomers ( ) ) . willReturn ( emptyList ) ; java . util . List < org . oscm . internal . billingdataexport . POOrganization > customers = exportBillingService . getCustomers ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( customers . size ( ) , 0 )
testIsCrawable ( ) { try { java . net . URL url = new java . net . URL ( "http://jcertif.com/lab/2014/05/04/il-etait-une-fois-le-lab.html" ) ; "<AssertPlaceHolder>" ; } catch ( java . net . MalformedURLException ex ) { java . util . logging . Logger . getLogger ( com . jcertif . offlinebox . web . crawling . CrawlingStrategyTest . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; org . junit . Assert . fail ( "Failed<sp>to<sp>instanciate<sp>the<sp>url<sp>tou<sp>test." ) ; } } isCrawable ( java . net . URL , int ) { if ( ( ( ( url != null ) && ( ! ( visitedUrls . contains ( url ) ) ) ) && ( isCrawlingAllowed ( url ) ) ) && ( depth < ( crawlerMaxDepth ) ) ) { visitedUrls . add ( url ) ; if ( url . getPath ( ) . endsWith ( "/" ) ) { try { visitedUrls . add ( new java . net . URL ( url . toString ( ) . substring ( 0 , ( ( url . toString ( ) . length ( ) ) - 1 ) ) ) ) ; } catch ( java . net . MalformedURLException ex ) { java . util . logging . Logger . getLogger ( com . jcertif . offlinebox . web . crawling . CrawlingStrategy . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } } return true ; } return false ; }
org . junit . Assert . assertTrue ( strategy . isCrawable ( url , 2 ) )
testMultilineBuildLogFailureReaderSuccessful ( ) { hudson . model . FreeStyleProject project = j . createFreeStyleProject ( ) ; project . getBuildersList ( ) . add ( new com . sonyericsson . jenkins . plugins . bfa . test . utils . PrintToLogBuilder ( com . sonyericsson . jenkins . plugins . bfa . model . indication . MultilineBuildLogIndicationTest . TEST_STRING ) ) ; hudson . model . FreeStyleBuild build = j . buildAndAssertSuccess ( project ) ; com . sonyericsson . jenkins . plugins . bfa . model . indication . MultilineBuildLogIndication indication = new com . sonyericsson . jenkins . plugins . bfa . model . indication . MultilineBuildLogIndication ( "teststring.*here" ) ; com . sonyericsson . jenkins . plugins . bfa . model . MultilineBuildLogFailureReader reader = new com . sonyericsson . jenkins . plugins . bfa . model . MultilineBuildLogFailureReader ( indication ) ; com . sonyericsson . jenkins . plugins . bfa . model . indication . FoundIndication found = reader . scan ( build , System . out ) ; "<AssertPlaceHolder>" ; } scan ( hudson . model . Run , java . io . PrintStream ) { com . sonyericsson . jenkins . plugins . bfa . model . indication . FoundIndication foundIndication = null ; java . lang . String currentFile = build . getLogFile ( ) . getName ( ) ; java . io . BufferedReader reader = null ; long start = java . lang . System . currentTimeMillis ( ) ; try { reader = new java . io . BufferedReader ( build . getLogReader ( ) ) ; foundIndication = scanMultiLineOneFile ( build , reader , currentFile ) ; } catch ( java . io . IOException ioe ) { com . sonyericsson . jenkins . plugins . bfa . model . MultilineBuildLogFailureReader . logger . log ( Level . SEVERE , "[BFA]<sp>I/O<sp>problems<sp>during<sp>indication<sp>analysis:<sp>" , ioe ) ; buildLog . println ( "[BFA]<sp>I/O<sp>problems<sp>during<sp>indication<sp>analysis." ) ; } catch ( java . lang . Exception e ) { com . sonyericsson . jenkins . plugins . bfa . model . MultilineBuildLogFailureReader . logger . log ( Level . SEVERE , "[BFA]<sp>Could<sp>not<sp>open<sp>reader<sp>for<sp>indication:<sp>" , e ) ; buildLog . println ( "[BFA]<sp>Could<sp>not<sp>open<sp>reader<sp>for<sp>indication." ) ; } finally { if ( reader != null ) { try { reader . close ( ) ; } catch ( java . io . IOException e ) { com . sonyericsson . jenkins . plugins . bfa . model . MultilineBuildLogFailureReader . logger . log ( Level . WARNING , "Failed<sp>to<sp>close<sp>the<sp>reader.<sp>" , e ) ; } } if ( com . sonyericsson . jenkins . plugins . bfa . model . MultilineBuildLogFailureReader . logger . isLoggable ( Level . FINER ) ) { com . sonyericsson . jenkins . plugins . bfa . model . MultilineBuildLogFailureReader . logger . log ( Level . FINER , "[BFA]<sp>[{0}]<sp>-<sp>[{1}]<sp>{2}ms" , new java . lang . Object [ ] { build . getFullDisplayName ( ) , indication . toString ( ) , java . lang . String . valueOf ( ( ( java . lang . System . currentTimeMillis ( ) ) - start ) ) } ) ; } } return foundIndication ; }
org . junit . Assert . assertNotNull ( found )
testGetOutputSize ( ) { com . facebook . buck . io . filesystem . impl . FakeProjectFilesystem filesystem = new com . facebook . buck . io . filesystem . impl . FakeProjectFilesystem ( ) ; com . facebook . buck . core . build . engine . buildinfo . BuildInfoRecorder buildInfoRecorder = com . facebook . buck . core . build . engine . buildinfo . BuildInfoRecorderTest . createBuildInfoRecorder ( filesystem ) ; byte [ ] contents = "contents" . getBytes ( ) ; java . nio . file . Path file = java . nio . file . Paths . get ( "file" ) ; filesystem . writeBytesToPath ( contents , file ) ; buildInfoRecorder . recordArtifact ( file ) ; java . nio . file . Path dir = java . nio . file . Paths . get ( "dir" ) ; filesystem . mkdirs ( dir ) ; filesystem . writeBytesToPath ( contents , dir . resolve ( "file1" ) ) ; filesystem . writeBytesToPath ( contents , dir . resolve ( "file2" ) ) ; buildInfoRecorder . recordArtifact ( dir ) ; "<AssertPlaceHolder>" ; } getOutputSize ( ) { long size = 0 ; for ( java . nio . file . Path path : getRecordedDirsAndFiles ( ) ) { if ( projectFilesystem . isFile ( path ) ) { size += projectFilesystem . getFileSize ( path ) ; } } return size ; }
org . junit . Assert . assertEquals ( ( 3 * ( contents . length ) ) , buildInfoRecorder . getOutputSize ( ) )
testGetId ( ) { java . lang . String [ ] ids = new java . lang . String [ ] { "1-2" , "abc" } ; for ( java . lang . String id : ids ) { org . rioproject . impl . watch . Watch watch = construct1 ( id ) ; "<AssertPlaceHolder>" ; org . rioproject . impl . watch . Utils . close ( watch . getWatchDataSource ( ) ) ; } } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( id , watch . getId ( ) )
testEdgeIdJsonSerialization ( ) { final org . batfish . datamodel . ospf . OspfNeighborConfigId r1i13 = new org . batfish . datamodel . ospf . OspfNeighborConfigId ( "r1" , org . batfish . datamodel . Configuration . DEFAULT_VRF_NAME , "1" , "i13" ) ; final org . batfish . datamodel . ospf . OspfNeighborConfigId r3i31 = new org . batfish . datamodel . ospf . OspfNeighborConfigId ( "r3" , org . batfish . datamodel . Configuration . DEFAULT_VRF_NAME , "1" , "i31" ) ; org . batfish . datamodel . ospf . OspfTopology . EdgeId edge = org . batfish . datamodel . ospf . OspfTopology . makeEdge ( r1i13 , r3i31 ) ; "<AssertPlaceHolder>" ; } clone ( java . lang . Object , java . lang . Class ) { return org . batfish . common . util . BatfishObjectMapper . MAPPER . readValue ( org . batfish . common . util . BatfishObjectMapper . WRITER . writeValueAsBytes ( o ) , clazz ) ; }
org . junit . Assert . assertThat ( org . batfish . common . util . BatfishObjectMapper . clone ( edge , org . batfish . datamodel . ospf . OspfTopology . EdgeId . class ) , org . hamcrest . Matchers . equalTo ( edge ) )
test ( ) { cn . bc . spider . parser . FreeMarkerTemplateParser c = new cn . bc . spider . parser . FreeMarkerTemplateParser ( "${name}" ) ; java . util . Map < java . lang . String , java . lang . Object > params = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; params . put ( "name" , "dragon" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . Object ) { throw new cn . bc . core . exception . CoreException ( "not<sp>implements<sp>methods:<sp>cn.bc.spider.parser.JSONConfigParser.parse" ) ; }
org . junit . Assert . assertEquals ( "dragon" , c . parse ( params ) )
testSetAndGetIntPropertyWithValidInt ( ) { int expectedValue = 5 ; configurator . setIntProperty ( propertyName , expectedValue ) ; "<AssertPlaceHolder>" ; } getIntProperty ( java . lang . String ) { return java . lang . Integer . decode ( list . getProperty ( name ) ) ; }
org . junit . Assert . assertEquals ( configurator . getIntProperty ( propertyName ) , expectedValue )
testGetType ( ) { org . jacorb . notification . interfaces . Message _event = factory_ . newMessage ( testPerson_ ) ; "<AssertPlaceHolder>" ; } getType ( ) { return org . jacorb . notification . interfaces . Message . TYPE_ANY ; }
org . junit . Assert . assertTrue ( ( ( _event . getType ( ) ) == ( org . jacorb . notification . interfaces . Message . TYPE_ANY ) ) )
testGetDeploymentJpeResourceData ( ) { org . camunda . bpm . engine . rest . Resource resource = org . camunda . bpm . engine . rest . helper . MockProvider . createMockDeploymentJpeResource ( ) ; org . camunda . bpm . engine . rest . List < org . camunda . bpm . engine . rest . Resource > resources = new org . camunda . bpm . engine . rest . ArrayList < org . camunda . bpm . engine . rest . Resource > ( ) ; resources . add ( resource ) ; java . io . InputStream input = new java . io . ByteArrayInputStream ( createMockDeploymentResourceByteData ( ) ) ; when ( mockRepositoryService . getDeploymentResources ( eq ( org . camunda . bpm . engine . rest . EXAMPLE_DEPLOYMENT_ID ) ) ) . thenReturn ( resources ) ; when ( mockRepositoryService . getResourceAsStreamById ( eq ( org . camunda . bpm . engine . rest . EXAMPLE_DEPLOYMENT_ID ) , eq ( org . camunda . bpm . engine . rest . EXAMPLE_DEPLOYMENT_JPE_RESOURCE_ID ) ) ) . thenReturn ( input ) ; io . restassured . response . Response response = io . restassured . RestAssured . given ( ) . pathParam ( "id" , org . camunda . bpm . engine . rest . EXAMPLE_DEPLOYMENT_ID ) . pathParam ( "resourceId" , org . camunda . bpm . engine . rest . EXAMPLE_DEPLOYMENT_JPE_RESOURCE_ID ) . then ( ) . expect ( ) . statusCode ( Status . OK . getStatusCode ( ) ) . contentType ( "image/jpeg" ) . header ( "Content-Disposition" , ( "attachment;<sp>filename=" + ( org . camunda . bpm . engine . rest . helper . MockProvider . EXAMPLE_DEPLOYMENT_JPE_RESOURCE_NAME ) ) ) . when ( ) . get ( org . camunda . bpm . engine . rest . DeploymentRestServiceInteractionTest . SINGLE_RESOURCE_DATA_URL ) ; java . lang . String responseContent = response . asString ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { org . camunda . bpm . engine . rest . hal . cache . HalResourceCacheEntry cacheEntry = cache . get ( id ) ; if ( cacheEntry != null ) { if ( expired ( cacheEntry ) ) { remove ( cacheEntry . getId ( ) ) ; return null ; } else { return cacheEntry . getResource ( ) ; } } else { return null ; } }
org . junit . Assert . assertNotNull ( responseContent )
testRowVectorGemm ( ) { org . nd4j . linalg . api . ndarray . INDArray linspace = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 4 , 4 , DataType . DOUBLE ) . reshape ( 1 , 4 ) ; org . nd4j . linalg . api . ndarray . INDArray other = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 16 , 16 , DataType . DOUBLE ) . reshape ( 4 , 4 ) ; org . nd4j . linalg . api . ndarray . INDArray result = linspace . mmul ( other ) ; org . nd4j . linalg . api . ndarray . INDArray assertion = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 90 , 100 , 110 , 120 } ) . reshape ( 4 , 1 ) ; "<AssertPlaceHolder>" ; } reshape ( char , int [ ] ) { return null ; }
org . junit . Assert . assertEquals ( assertion , result )
testVerifyAccessPublicResource ( ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; conf . setBoolean ( YarnConfiguration . SHARED_CACHE_ENABLED , true ) ; org . apache . hadoop . yarn . api . records . LocalResource resource = mock ( org . apache . hadoop . yarn . api . records . LocalResource . class ) ; when ( resource . getVisibility ( ) ) . thenReturn ( LocalResourceVisibility . PUBLIC ) ; org . apache . hadoop . fs . Path localPath = mock ( org . apache . hadoop . fs . Path . class ) ; when ( localPath . getName ( ) ) . thenReturn ( "foo.jar" ) ; java . lang . String user = "joe" ; org . apache . hadoop . yarn . server . api . SCMUploaderProtocol scmClient = mock ( org . apache . hadoop . yarn . server . api . SCMUploaderProtocol . class ) ; org . apache . hadoop . fs . FileSystem fs = mock ( org . apache . hadoop . fs . FileSystem . class ) ; org . apache . hadoop . fs . FileSystem localFs = org . apache . hadoop . fs . FileSystem . getLocal ( conf ) ; org . apache . hadoop . yarn . server . nodemanager . containermanager . localizer . sharedcache . SharedCacheUploader spied = createSpiedUploader ( resource , localPath , user , conf , scmClient , fs , localFs ) ; "<AssertPlaceHolder>" ; } verifyAccess ( ) { if ( ( resource . getVisibility ( ) ) == ( org . apache . hadoop . yarn . api . records . LocalResourceVisibility . PUBLIC ) ) { return true ; } final org . apache . hadoop . fs . Path remotePath ; try { remotePath = resource . getResource ( ) . toPath ( ) ; } catch ( java . net . URISyntaxException e ) { throw new java . io . IOException ( "Invalid<sp>resource" , e ) ; } org . apache . hadoop . fs . FileSystem remoteFs = remotePath . getFileSystem ( conf ) ; org . apache . hadoop . fs . FileStatus status = remoteFs . getFileStatus ( remotePath ) ; if ( ( status . getModificationTime ( ) ) != ( resource . getTimestamp ( ) ) ) { org . apache . hadoop . yarn . server . nodemanager . containermanager . localizer . sharedcache . SharedCacheUploader . LOG . warn ( ( ( "The<sp>remote<sp>file<sp>" + remotePath ) + "<sp>has<sp>changed<sp>since<sp>it's<sp>localized;<sp>will<sp>not<sp>consider<sp>it<sp>for<sp>upload" ) ) ; return false ; } if ( status . getOwner ( ) . equals ( user ) ) { return true ; } return fileIsPublic ( remotePath , remoteFs , status ) ; }
org . junit . Assert . assertTrue ( spied . verifyAccess ( ) )
split_string_to_map ( ) { java . lang . String str = "firstName:John<sp>,<sp>lastName:Doe,<sp>age:56,<sp>address:1234<sp>Elm<sp>Street" ; java . util . Map < java . lang . String , java . lang . String > demographics = com . google . common . base . Splitter . on ( "," ) . trimResults ( ) . withKeyValueSeparator ( ":" ) . split ( str ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 4 , demographics . size ( ) )
testCanCallGetWindowHandlesAfterClosingAWindow ( ) { org . junit . Assume . assumeFalse ( ( ( ( org . openqa . selenium . testing . drivers . Browser . detect ( ) ) == ( org . openqa . selenium . testing . drivers . Browser . opera ) ) && ( org . openqa . selenium . testing . TestUtilities . getEffectivePlatform ( ) . is ( Platform . WINDOWS ) ) ) ) ; driver . get ( pages . xhtmlTestPage ) ; java . lang . Boolean isIEDriver = org . openqa . selenium . testing . TestUtilities . isInternetExplorer ( driver ) ; java . lang . Boolean isIE6 = org . openqa . selenium . testing . TestUtilities . isIe6 ( driver ) ; java . lang . String currentHandle = driver . getWindowHandle ( ) ; java . util . Set < java . lang . String > currentWindowHandles = driver . getWindowHandles ( ) ; driver . findElement ( org . openqa . selenium . By . name ( "windowThree" ) ) . click ( ) ; wait . until ( org . openqa . selenium . WaitingConditions . newWindowIsOpened ( currentWindowHandles ) ) ; driver . switchTo ( ) . window ( "result" ) ; int allWindowHandles = driver . getWindowHandles ( ) . size ( ) ; try { wait . until ( org . openqa . selenium . support . ui . ExpectedConditions . presenceOfElementLocated ( org . openqa . selenium . By . id ( "close" ) ) ) . click ( ) ; if ( isIEDriver && ( ! isIE6 ) ) { org . openqa . selenium . Alert alert = wait . until ( alertIsPresent ( ) ) ; alert . accept ( ) ; } java . util . Set < java . lang . String > allHandles = wait . until ( org . openqa . selenium . WaitingConditions . windowHandleCountToBe ( ( allWindowHandles - 1 ) ) ) ; "<AssertPlaceHolder>" ; } finally { driver . switchTo ( ) . window ( currentHandle ) ; } } size ( ) { java . lang . Object response = executeMethod . execute ( DriverCommand . GET_LOCAL_STORAGE_SIZE , null ) ; return java . lang . Integer . parseInt ( response . toString ( ) ) ; }
org . junit . Assert . assertEquals ( currentWindowHandles . size ( ) , allHandles . size ( ) )
oneElt_01 ( ) { java . util . List < java . lang . String > x = java . util . Arrays . asList ( "a" , "b" , "c" ) ; "<AssertPlaceHolder>" ; } oneElt ( java . util . Collection ) { return org . apache . jena . atlas . iterator . Iter . first ( collection . iterator ( ) ) ; }
org . junit . Assert . assertEquals ( "a" , oneElt ( x ) )
testChainWithSettingsMissingSecret ( ) { settings . remove ( org . sagebionetworks . aws . AbstractSynapseCredentialProvider . ORG_SAGEBIONETWORKS_STACK_IAM_ID ) ; when ( mockPropertyProvider . getMavenSettingsProperties ( ) ) . thenReturn ( settings ) ; when ( mockPropertyProvider . getSystemProperties ( ) ) . thenReturn ( null ) ; org . sagebionetworks . aws . SynapseCredentialProviderChain chain = createChain ( ) ; com . amazonaws . auth . AWSCredentials creds = chain . getCredentials ( ) ; "<AssertPlaceHolder>" ; verify ( mockDefaultProvider , times ( 1 ) ) . getCredentials ( ) ; } getCredentials ( ) { try { java . util . Properties properties = getProperties ( ) ; if ( properties != null ) { java . lang . String accessKey = com . amazonaws . util . StringUtils . trim ( properties . getProperty ( org . sagebionetworks . aws . AbstractSynapseCredentialProvider . ORG_SAGEBIONETWORKS_STACK_IAM_ID ) ) ; java . lang . String secretKey = com . amazonaws . util . StringUtils . trim ( properties . getProperty ( org . sagebionetworks . aws . AbstractSynapseCredentialProvider . ORG_SAGEBIONETWORKS_STACK_IAM_KEY ) ) ; if ( ( accessKey != null ) && ( secretKey != null ) ) { return new com . amazonaws . auth . BasicAWSCredentials ( accessKey , secretKey ) ; } } throw new java . lang . IllegalStateException ( org . sagebionetworks . aws . AbstractSynapseCredentialProvider . AWS_CREDENTIALS_WERE_NOT_FOUND ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( e ) ; } }
org . junit . Assert . assertNotNull ( creds )
specimen_can_be_transformed ( ) { final component . behaviours . TestTransformerSpecimen . Order overridingInstance = new component . behaviours . TestTransformerSpecimen . Order ( ) ; com . flextrade . jfixture . JFixture fixture = new com . flextrade . jfixture . JFixture ( ) ; fixture . behaviours ( ) . add ( new com . flextrade . jfixture . behaviours . intercept . TransformingBehaviour < component . behaviours . TestTransformerSpecimen . Order > ( component . behaviours . TestTransformerSpecimen . Order . class , new com . flextrade . jfixture . utility . Transformer < component . behaviours . TestTransformerSpecimen . Order > ( ) { @ component . behaviours . Override public component . behaviours . TestTransformerSpecimen . Order intercept ( component . behaviours . TestTransformerSpecimen . Order instance ) { return overridingInstance ; } } ) ) ; component . behaviours . TestTransformerSpecimen . Order order = fixture . create ( component . behaviours . TestTransformerSpecimen . Order . class ) ; "<AssertPlaceHolder>" ; } create ( java . lang . reflect . Type ) { return ( ( T ) ( this . create ( ( ( java . lang . Object ) ( type ) ) ) ) ) ; }
org . junit . Assert . assertSame ( overridingInstance , order )
construction ( ) { java . lang . reflect . Field table = com . gs . collections . impl . set . mutable . primitive . BooleanHashSet . class . getDeclaredField ( "state" ) ; table . setAccessible ( true ) ; "<AssertPlaceHolder>" ; } get ( int ) { return this . delegate . get ( index ) ; }
org . junit . Assert . assertEquals ( 0 , table . get ( new com . gs . collections . impl . set . mutable . primitive . BooleanHashSet ( ) ) )
testAddInvalidBaseCalendar ( ) { org . libreplan . ws . calendars . api . BaseCalendarDTO bc1 = new org . libreplan . ws . calendars . api . BaseCalendarDTO ( getUniqueName ( ) , getUniqueName ( ) , null , calendarExceptions , new java . util . ArrayList ( ) ) ; org . libreplan . ws . calendars . api . BaseCalendarListDTO baseCalendars = createBaseCalendarListDTO ( bc1 ) ; java . util . List < org . libreplan . ws . common . api . InstanceConstraintViolationsDTO > instanceConstraintViolationsList = calendarService . addBaseCalendars ( baseCalendars ) . instanceConstraintViolationsList ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( "Task:<sp>" + ( getDuration ( ) ) ) + "<sp>(" ) + ( earliestStart ) ) + "," ) + ( earliestFinish ) ) + ")<sp>(" ) + ( latestStart ) ) + "," ) + ( latestFinish ) ) + ")" ; }
org . junit . Assert . assertTrue ( instanceConstraintViolationsList . toString ( ) , ( ( instanceConstraintViolationsList . size ( ) ) == 1 ) )
testMapping ( ) { com . mycompany . dto . Source s = new com . mycompany . dto . Source ( ) ; s . setTest ( "5" ) ; com . mycompany . entities . Target t = SourceTargetMapper . MAPPER . toTarget ( s ) ; "<AssertPlaceHolder>" ; } getTesting ( ) { return testing ; }
org . junit . Assert . assertEquals ( 5 , ( ( long ) ( t . getTesting ( ) ) ) )
emptyIteratorAlwaysReturnsFalse ( ) { final org . apache . kafka . streams . state . internals . CompositeReadOnlyWindowStore < java . lang . Object , java . lang . Object > store = new org . apache . kafka . streams . state . internals . CompositeReadOnlyWindowStore ( new org . apache . kafka . test . StateStoreProviderStub ( false ) , org . apache . kafka . streams . state . QueryableStoreTypes . windowStore ( ) , "foo" ) ; final org . apache . kafka . streams . state . WindowStoreIterator < java . lang . Object > windowStoreIterator = store . fetch ( "key" , ofEpochMilli ( 1 ) , ofEpochMilli ( 10 ) ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return false ; }
org . junit . Assert . assertFalse ( windowStoreIterator . hasNext ( ) )
shouldParseComplexLiteralText2 ( ) { java . lang . String scriptFragment = "\"POST<sp>/index.html<sp>HTTP/1.1\\r\\nHost:<sp>localhost:8000\\r\\nUser-Agent:<sp>" + ( ( "Mozilla/5.0<sp>(Macintosh;<sp>Intel<sp>Mac<sp>OS<sp>X<sp>10.6;<sp>rv:8.0)<sp>Gecko/20100101<sp>Firefox/8.0\\r\\n" + "Accept:<sp>text/html,<sp>application/xhtml+xml,<sp>application/xml;q=0.9,*/*;q=0.8\\r\\n" ) + "Content-Length:<sp>43\\r\\n\\r\\nfirst_name=John&last_name=Doe&action=Submit\\r\\n\\r\\n\"" ) ; org . kaazing . k3po . lang . internal . parser . ScriptParserImpl parser = new org . kaazing . k3po . lang . internal . parser . ScriptParserImpl ( ) ; org . kaazing . k3po . lang . internal . ast . value . AstLiteralTextValue actual = parser . parseWithStrategy ( scriptFragment , org . kaazing . k3po . lang . internal . parser . ScriptParseStrategy . LITERAL_TEXT_VALUE ) ; org . kaazing . k3po . lang . internal . ast . value . AstLiteralTextValue expected = new org . kaazing . k3po . lang . internal . ast . value . AstLiteralTextValue ( ( "POST<sp>/index.html<sp>HTTP/1.1\r\nHost:<sp>" + ( ( ( "localhost:8000\r\nUser-Agent:<sp>Mozilla/5.0<sp>(Macintosh;<sp>Intel<sp>Mac<sp>OS<sp>X<sp>10.6;<sp>rv:8.0)<sp>" + "Gecko/20100101<sp>Firefox/8.0\r\nAccept:<sp>text/html,<sp>application/xhtml+xml,<sp>" ) + "application/xml;q=0.9,*/*;q=0.8\r\nContent-Length:<sp>43\r\n\r\nfirst_name=John" ) + "&last_name=Doe&action=Submit\r\n\r\n" ) ) ) ; "<AssertPlaceHolder>" ; } parseWithStrategy ( java . lang . String , org . kaazing . k3po . lang . internal . parser . ScriptParseStrategy ) { return parseWithStrategy ( new java . io . ByteArrayInputStream ( input . getBytes ( org . kaazing . k3po . lang . internal . parser . UTF_8 ) ) , strategy ) ; }
org . junit . Assert . assertEquals ( expected , actual )
isSameCause_singleArtifact_withBaseVersion_true ( ) { org . jenkinsci . plugins . pipeline . maven . MavenArtifact firstArtifact = new org . jenkinsci . plugins . pipeline . maven . MavenArtifact ( "com.example:my-jar:jar:1.0-20100529-1213-1" ) ; firstArtifact . setBaseVersion ( "1.0-SNAPSHOT" ) ; org . jenkinsci . plugins . pipeline . maven . MavenArtifact secondArtifact = new org . jenkinsci . plugins . pipeline . maven . MavenArtifact ( "com.example:my-jar:jar:1.0-20100529-1213-1" ) ; secondArtifact . setBaseVersion ( "1.0-SNAPSHOT" ) ; java . util . List < org . jenkinsci . plugins . pipeline . maven . MavenArtifact > matchingArtifacts = org . jenkinsci . plugins . pipeline . maven . cause . MavenDependencyCauseHelper . isSameCause ( new org . jenkinsci . plugins . pipeline . maven . cause . MavenDependencyCauseHelperTest . MavenDependencyTestCause ( firstArtifact ) , new org . jenkinsci . plugins . pipeline . maven . cause . MavenDependencyCauseHelperTest . MavenDependencyTestCause ( secondArtifact ) ) ; "<AssertPlaceHolder>" ; } isSameCause ( org . jenkinsci . plugins . pipeline . maven . cause . MavenDependencyCause , hudson . model . Cause ) { if ( ! ( oldMavenCause instanceof org . jenkinsci . plugins . pipeline . maven . cause . MavenDependencyCause ) ) { return java . util . Collections . emptyList ( ) ; } java . util . List < org . jenkinsci . plugins . pipeline . maven . MavenArtifact > newCauseArtifacts = com . google . common . base . Preconditions . checkNotNull ( newMavenCause . getMavenArtifacts ( ) , "newMavenCause.mavenArtifacts<sp>should<sp>not<sp>be<sp>null" ) ; java . util . List < org . jenkinsci . plugins . pipeline . maven . MavenArtifact > oldCauseArtifacts = com . google . common . base . Preconditions . checkNotNull ( ( ( org . jenkinsci . plugins . pipeline . maven . cause . MavenDependencyCause ) ( oldMavenCause ) ) . getMavenArtifacts ( ) , "oldMavenCause.mavenArtifacts<sp>should<sp>not<sp>be<sp>null" ) ; java . util . List < org . jenkinsci . plugins . pipeline . maven . MavenArtifact > matchingArtifacts = new java . util . ArrayList ( ) ; for ( org . jenkinsci . plugins . pipeline . maven . MavenArtifact newCauseArtifact : newCauseArtifacts ) { if ( ( newCauseArtifact . isSnapshot ( ) ) && ( newCauseArtifact . getVersion ( ) . contains ( "SNAPSHOT" ) ) ) { } else { for ( org . jenkinsci . plugins . pipeline . maven . MavenArtifact oldCauseArtifact : oldCauseArtifacts ) { if ( ( ( ( ( ( java . util . Objects . equals ( newCauseArtifact . getGroupId ( ) , oldCauseArtifact . getGroupId ( ) ) ) && ( java . util . Objects . equals ( newCauseArtifact . getArtifactId ( ) , oldCauseArtifact . getArtifactId ( ) ) ) ) && ( java . util . Objects . equals ( newCauseArtifact . getVersion ( ) , oldCauseArtifact . getVersion ( ) ) ) ) && ( java . util . Objects . equals ( newCauseArtifact . getBaseVersion ( ) , oldCauseArtifact . getBaseVersion ( ) ) ) ) && ( java . util . Objects . equals ( newCauseArtifact . getClassifier ( ) , oldCauseArtifact . getClassifier ( ) ) ) ) && ( java . util . Objects . equals ( newCauseArtifact . getType ( ) , oldCauseArtifact . getType ( ) ) ) ) { matchingArtifacts . add ( newCauseArtifact ) ; } } } } return matchingArtifacts ; }
org . junit . Assert . assertThat ( matchingArtifacts . isEmpty ( ) , org . hamcrest . Matchers . is ( false ) )
testGetParameters ( ) { org . lnu . is . domain . employee . type . EmployeeType entity = new org . lnu . is . domain . employee . type . EmployeeType ( ) ; java . lang . String name = "first<sp>blood" ; java . lang . String abbrName = "fb" ; entity . setName ( name ) ; entity . setAbbrName ( abbrName ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "name" , name ) ; expected . put ( "abbrName" , abbrName ) ; expected . put ( "status" , RowStatus . ACTIVE ) ; expected . put ( "userGroups" , groups ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
testFullyQualifiedException ( ) { spoon . reflect . factory . Factory factory = spoon . testing . utils . ModelUtils . createFactory ( ) ; spoon . reflect . declaration . CtClass < ? > clazz = factory . Code ( ) . createCodeSnippetStatement ( ( "" + ( ( ( "class<sp>X<sp>{" + "public<sp>void<sp>foo()<sp>{" ) + "<sp>try{}catch(java.lang.RuntimeException<sp>e){}" ) + "}};" ) ) ) . compile ( ) ; spoon . reflect . code . CtTry tryStmt = clazz . getElements ( new spoon . reflect . visitor . filter . TypeFilter ( spoon . reflect . code . CtTry . class ) ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getCatchers ( ) { return catchers ; }
org . junit . Assert . assertEquals ( 1 , tryStmt . getCatchers ( ) . size ( ) )
drupalServicesClient_attachFile_filesAttached ( ) { dk . i2m . converge . plugins . drupalclient . DrupalServicesClient client = new dk . i2m . converge . plugins . drupalclient . DrupalServicesClient ( dk . i2m . converge . plugins . drupalclient . DrupalServicesClientIT . DRUPAL_URL , dk . i2m . converge . plugins . drupalclient . DrupalServicesClientIT . SERVICE_END_POINT , dk . i2m . converge . plugins . drupalclient . DrupalServicesClientIT . DRUPAL_UID , dk . i2m . converge . plugins . drupalclient . DrupalServicesClientIT . DRUPAL_PWD ) ; client . login ( ) ; java . util . List < org . apache . http . NameValuePair > params = new java . util . ArrayList < org . apache . http . NameValuePair > ( ) ; java . util . Calendar publishOn = java . util . Calendar . getInstance ( ) ; publishOn . add ( Calendar . HOUR_OF_DAY , 6 ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "type" , "123457" 8 ) ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "123457" 7 , dk . i2m . converge . plugins . drupalclient . DrupalServicesClientIT . DRUPAL_DATE_FORMAT . format ( java . util . Calendar . getInstance ( ) . getTime ( ) ) ) ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "title" , "123457" 5 ) ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "123457" 9 , "123457" 2 ) ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "body[und][0][summary]" , "field_newsitem[und][0][value]" 1 ) ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "field_newsitem[und][0][value]" 5 , "123457" 0 ) ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "field_newsitem[und][0][value]" 4 , "full_html" ) ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "publish_on" , dk . i2m . converge . plugins . drupalclient . DrupalServicesClientIT . DRUPAL_DATE_FORMAT . format ( publishOn . getTime ( ) ) ) ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "field_newsitem[und][0][value]" 0 , "Mr.<sp>Integration<sp>Tester" ) ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "field_newsitem[und][0][value]" , "123457" ) ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "123457" 4 , "123457" 6 ) ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "123457" 3 , "2" ) ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "field_newsitem[und][0][value]" 3 , "123457" 6 ) ) ; params . add ( new org . apache . http . message . BasicNameValuePair ( "field_placement_position[und][0][value]" , "2" ) ) ; org . apache . http . client . entity . UrlEncodedFormEntity entity = new org . apache . http . client . entity . UrlEncodedFormEntity ( params , java . nio . charset . Charset . defaultCharset ( ) ) ; dk . i2m . converge . plugins . drupalclient . NodeInfo nodeInfo = client . createNode ( entity ) ; java . util . List < dk . i2m . converge . plugins . drupalclient . FileInfo > files = new java . util . ArrayList < dk . i2m . converge . plugins . drupalclient . FileInfo > ( ) ; java . net . URL url = getClass ( ) . getClassLoader ( ) . getResource ( "field_newsitem[und][0][value]" 6 ) ; java . io . File attachment = org . apache . commons . io . FileUtils . toFile ( url ) ; dk . i2m . converge . plugins . drupalclient . FileInfo fileInfo = new dk . i2m . converge . plugins . drupalclient . FileInfo ( attachment , "field_newsitem[und][0][value]" 2 ) ; files . add ( fileInfo ) ; client . attachFile ( nodeInfo . getId ( ) , "123457" 1 , files ) ; java . util . List < dk . i2m . converge . plugins . drupalclient . DrupalFile > nodeFiles = client . getNodeFiles ( nodeInfo . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( 1 , nodeFiles . size ( ) )
testDeleteValues ( ) { cPropManager . addKey ( platformType , "something" , "A<sp>thing" ) ; flushSession ( ) ; cPropManager . setValue ( platform . getEntityId ( ) , platformType . getId ( ) , "something" , "nothing" ) ; cPropManager . deleteValues ( platform . getEntityId ( ) . getType ( ) , platform . getEntityId ( ) . getID ( ) ) ; "<AssertPlaceHolder>" ; } getEntries ( org . hyperic . hq . appdef . shared . AppdefEntityID ) { return cPropDAO . getEntries ( aID , "propkey" ) ; }
org . junit . Assert . assertTrue ( cPropManager . getEntries ( platform . getEntityId ( ) ) . isEmpty ( ) )
test ( ) { com . buschmais . xo . api . XOManager xoManager = getXOManager ( ) ; xoManager . currentTransaction ( ) . begin ( ) ; com . buschmais . xo . neo4j . test . issues . not_a_proxy . composite . A a = xoManager . create ( com . buschmais . xo . neo4j . test . issues . not_a_proxy . composite . A . class ) ; com . buschmais . xo . neo4j . test . issues . not_a_proxy . composite . C c = xoManager . create ( com . buschmais . xo . neo4j . test . issues . not_a_proxy . composite . C . class ) ; a . getB ( ) . add ( c ) ; xoManager . currentTransaction ( ) . commit ( ) ; xoManager . currentTransaction ( ) . begin ( ) ; "<AssertPlaceHolder>" ; xoManager . currentTransaction ( ) . commit ( ) ; } equals ( java . lang . Object ) { return ( obj != null ) && ( id . equals ( ( ( com . buschmais . xo . impl . cache . TransactionalCache . CacheKey ) ( obj ) ) . id ) ) ; }
org . junit . Assert . assertThat ( a . equals ( a . getB ( ) ) , org . hamcrest . Matchers . is ( false ) )