input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testTrezorSignatureValidation ( ) { byte [ ] uncompressedNistpKeyFromSSHKeyTrezor = com . trezoragent . utils . IdentityUtils . unframeUncompressedNistpKeyFromSSHKey ( com . trezoragent . utils . ECDSATest . pubKeySSHTrezor ) ; boolean validSignatureTrezor = com . trezoragent . utils . IdentityUtils . isValidSignature ( uncompressedNistpKeyFromSSHKeyTrezor , com . trezoragent . utils . ECDSATest . challengeTrezor , com . trezoragent . utils . IdentityUtils . createDERSignResponse ( com . trezoragent . utils . ECDSATest . signatureTrezor ) ) ; "<AssertPlaceHolder>" ; } createDERSignResponse ( byte [ ] ) { byte [ ] xSign = org . spongycastle . pqc . math . linearalgebra . ByteUtils . subArray ( trezorSign , 0 , 33 ) ; byte [ ] ySign = org . spongycastle . pqc . math . linearalgebra . ByteUtils . subArray ( trezorSign , 33 , trezorSign . length ) ; byte [ ] xFrame = org . spongycastle . pqc . math . linearalgebra . ByteUtils . concatenate ( com . trezoragent . utils . IdentityUtils . OCTET02 , com . trezoragent . utils . AgentUtils . frameArrayWithUnsignedInt ( xSign ) ) ; byte [ ] yFrame = org . spongycastle . pqc . math . linearalgebra . ByteUtils . concatenate ( com . trezoragent . utils . IdentityUtils . OCTET02 , com . trezoragent . utils . AgentUtils . frameArrayWithUnsignedInt ( ySign ) ) ; byte [ ] xyFrame = com . trezoragent . utils . AgentUtils . frameArrayWithUnsignedInt ( xFrame , yFrame ) ; byte [ ] sigBytes = org . spongycastle . pqc . math . linearalgebra . ByteUtils . concatenate ( com . trezoragent . utils . IdentityUtils . OCTET30 , xyFrame ) ; return sigBytes ; }
|
org . junit . Assert . assertTrue ( validSignatureTrezor )
|
testNullArray ( ) { org . apache . commons . net . nntp . Threader t = new org . apache . commons . net . nntp . Threader ( ) ; org . apache . commons . net . nntp . Threadable [ ] messages = null ; "<AssertPlaceHolder>" ; } thread ( java . util . List ) { return thread ( ( ( java . lang . Iterable < ? extends org . apache . commons . net . nntp . Threadable > ) ( messages ) ) ) ; }
|
org . junit . Assert . assertNull ( t . thread ( messages ) )
|
testEnableLogging ( ) { logger . enableLogging ( httpClient , apiKey , deviceId ) ; "<AssertPlaceHolder>" ; } enableLogging ( okhttp3 . OkHttpClient , java . lang . String , java . lang . String ) { this . enabled = true ; this . apiKey = apiKey ; this . httpClient = httpClient ; this . deviceId = deviceId ; return this ; }
|
org . junit . Assert . assertTrue ( logger . enabled )
|
testGetOffset ( ) { org . apache . ambari . server . controller . spi . PageRequest pageRequest = new org . apache . ambari . server . controller . internal . PageRequestImpl ( PageRequest . StartingPoint . Beginning , 20 , 99 , null , null ) ; "<AssertPlaceHolder>" ; } getOffset ( ) { return offset ; }
|
org . junit . Assert . assertEquals ( 99 , pageRequest . getOffset ( ) )
|
givenUserService_whenSearchForUserByAgeRange_thenFound ( ) { expect ( userService . findByAge ( and ( gt ( 10.0 ) , lt ( 100.0 ) ) ) ) . andReturn ( java . util . Collections . emptyList ( ) ) ; replay ( userService ) ; java . util . List < com . baeldung . easymock . User > result = userService . findByAge ( 20 ) ; verify ( userService ) ; "<AssertPlaceHolder>" ; } size ( ) { return elements . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
|
testUnknownAttr ( ) { java . lang . String templates = "t()<sp>::=<sp>\"<x>\"\n" ; org . stringtemplate . v4 . test . ErrorBuffer errors = new org . stringtemplate . v4 . test . ErrorBuffer ( ) ; writeFile ( tmpdir , "t.stg" , templates ) ; org . stringtemplate . v4 . test . STGroup group = new org . stringtemplate . v4 . test . STGroupFile ( ( ( ( tmpdir ) + "/" ) + "t.stg" ) ) ; group . setListener ( errors ) ; org . stringtemplate . v4 . test . ST st = group . getInstanceOf ( "t" ) ; java . lang . String result = st . render ( ) ; java . lang . String expectedError = "context<sp>[/t]<sp>1:1<sp>attribute<sp>x<sp>isn't<sp>defined" + ( newline ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( getClass ( ) . getSimpleName ( ) ) + "{" ) + "self=" ) + ( scope . st ) ) + ",<sp>start=" ) + ( outputStartChar ) ) + ",<sp>stop=" ) + ( outputStopChar ) ) + '}' ; }
|
org . junit . Assert . assertEquals ( expectedError , errors . toString ( ) )
|
testMissingErrorCodeResolution ( ) { this . ex = new com . vmware . xenon . common . LocalizableValidationException ( com . vmware . xenon . common . TestLocalizationUtil . SYSTEM_EX_MESSAGE , "missing.error.code" , com . vmware . xenon . common . TestLocalizationUtil . EX_ARG_VALUE ) ; java . lang . String message = com . vmware . xenon . common . LocalizationUtil . resolveMessage ( this . ex , null ) ; "<AssertPlaceHolder>" ; } resolveMessage ( com . vmware . xenon . common . LocalizableValidationException , com . vmware . xenon . common . Operation ) { java . util . Locale requested ; if ( op == null ) { java . util . logging . Logger . getAnonymousLogger ( ) . fine ( "Request<sp>not<sp>provided<sp>for<sp>localization,<sp>using<sp>default<sp>locale." ) ; requested = com . vmware . xenon . common . LocalizationUtil . DEFAULT_LOCALE ; } else { requested = com . vmware . xenon . common . LocalizationUtil . resolveLocale ( op ) ; } return com . vmware . xenon . common . LocalizationUtil . resolveMessage ( e , requested ) ; }
|
org . junit . Assert . assertEquals ( com . vmware . xenon . common . TestLocalizationUtil . SYSTEM_EX_MESSAGE , message )
|
mergeParentDeclarationsTextDecorationsTest ( ) { java . util . Map < java . lang . String , java . lang . String > styles = new java . util . HashMap ( ) ; java . lang . String styleProperty = "text-decoration" ; styles . put ( styleProperty , "strikethrough" ) ; java . lang . String parentPropValue = "underline" ; java . lang . String parentFontSize = "0" ; java . util . Map < java . lang . String , java . lang . String > expectedStyles = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; expectedStyles . put ( styleProperty , "strikethrough<sp>underline" ) ; com . itextpdf . svg . css . impl . StyleResolverUtil sru = new com . itextpdf . svg . css . impl . StyleResolverUtil ( ) ; sru . mergeParentStyleDeclaration ( styles , styleProperty , parentPropValue , parentFontSize ) ; boolean equal = ( styles . size ( ) ) == ( expectedStyles . size ( ) ) ; for ( Map . Entry < java . lang . String , java . lang . String > kvp : expectedStyles . entrySet ( ) ) { equal &= kvp . getValue ( ) . equals ( styles . get ( kvp . getKey ( ) ) ) ; } "<AssertPlaceHolder>" ; } getKey ( ) { return info . getKey ( ) ; }
|
org . junit . Assert . assertTrue ( equal )
|
testSetValue2Success ( ) { java . lang . String str = "17C" ; triple . setValue2 ( str ) ; "<AssertPlaceHolder>" ; } getValue2 ( ) { return value2 ; }
|
org . junit . Assert . assertEquals ( str , triple . getValue2 ( ) )
|
isEmpty_A$ ( ) { com . m3 . scalaflavor4j . Seq < java . lang . String > seq = com . m3 . scalaflavor4j . Seq . apply ( list ) ; boolean actual = seq . isEmpty ( ) ; boolean expected = false ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( ( resource ) == null ) || ( ( resource . getResource ( ) ) == null ) ; }
|
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) )
|
testDockerFileDir ( ) { java . lang . String [ ] testData = new java . lang . String [ ] { k ( ConfigKey . NAME ) , "image" , k ( ConfigKey . DOCKER_FILE_DIR ) , "dir" } ; io . fabric8 . maven . docker . config . ImageConfiguration config = resolveExternalImageConfig ( testData ) ; "<AssertPlaceHolder>" ; } getBuildConfiguration ( ) { return build ; }
|
org . junit . Assert . assertNotNull ( config . getBuildConfiguration ( ) )
|
annotatedIdFieldShouldExtractValueFromUnderscoreIdField ( ) { org . bson . Document document = new org . bson . Document ( ) . append ( "_id" , "A" ) . append ( "id" , "B" ) ; org . springframework . data . mongodb . core . convert . MappingMongoConverterUnitTests . ClassWithAnnotatedIdField withAnnotatedIdField = converter . read ( org . springframework . data . mongodb . core . convert . MappingMongoConverterUnitTests . ClassWithAnnotatedIdField . class , document ) ; "<AssertPlaceHolder>" ; } read ( java . lang . Class , org . bson . conversions . Bson ) { return ( ( S ) ( person ) ) ; }
|
org . junit . Assert . assertThat ( withAnnotatedIdField . key , is ( "A" ) )
|
shouldRemoveAllValues ( ) { java . lang . String nodeKey = java . util . UUID . randomUUID ( ) . toString ( ) ; addMultiplePropertiesToSameNode ( index , nodeKey , 2 , PropertyType . LONG ) ; index . commit ( ) ; index . remove ( nodeKey ) ; index . commit ( ) ; "<AssertPlaceHolder>" ; } estimateTotalCount ( ) { return writer . numDocs ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , index . estimateTotalCount ( ) )
|
testNonTrivialConstructor ( ) { org . osgi . framework . BundleContext bundleContext = org . mockito . Mockito . mock ( org . osgi . framework . BundleContext . class ) ; net . roboconf . messaging . http . internal . HttpClientFactory factory = new net . roboconf . messaging . http . internal . HttpClientFactory ( bundleContext ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( bundleContext , factory . bundleContext )
|
testRefineToTest ( ) { java . lang . String expected = "project/test" ; org . eclipse . aether . graph . DependencyNode node = parseLiteral ( "gid:aid:ver<sp>test" ) ; node . setRequestContext ( "project" ) ; org . eclipse . aether . graph . DependencyNode refinedNode = transform ( node ) ; "<AssertPlaceHolder>" ; } getRequestContext ( ) { return context ; }
|
org . junit . Assert . assertEquals ( expected , refinedNode . getRequestContext ( ) )
|
testSingleUri ( ) { org . picketlink . config . SecurityConfigurationBuilder configurationBuilder = new org . picketlink . config . SecurityConfigurationBuilder ( ) ; org . picketlink . config . HttpSecurityBuilder builder = configurationBuilder . http ( ) ; builder . forPath ( "/*" ) . authenticateWith ( ) . form ( ) . loginPage ( "/login.html" ) . errorPage ( "/error.html" ) . authorizeWith ( ) . role ( "Role<sp>A" , "Role<sp>B" ) . group ( "Group<sp>A" , "Group<sp>B" ) . realm ( "Realm<sp>A" , "Realm<sp>B" ) . expression ( "#{identity.isLoggedIn()}" ) ; org . picketlink . config . http . HttpSecurityConfiguration configuration = builder . build ( ) . getHttpSecurityConfiguration ( ) ; "<AssertPlaceHolder>" ; } getPaths ( ) { return unmodifiableMap ( this . uriConfiguration ) ; }
|
org . junit . Assert . assertEquals ( 1 , configuration . getPaths ( ) . size ( ) )
|
testNullRecord ( ) { com . streamsets . pipeline . stage . processor . fieldtypeconverter . WholeTypeConverterConfig converterConfig = new com . streamsets . pipeline . stage . processor . fieldtypeconverter . WholeTypeConverterConfig ( ) ; converterConfig . sourceType = Field . Type . STRING ; converterConfig . targetType = Field . Type . BOOLEAN ; converterConfig . dataLocale = "en" ; com . streamsets . pipeline . sdk . ProcessorRunner runner = new com . streamsets . pipeline . sdk . ProcessorRunner . Builder ( com . streamsets . pipeline . stage . processor . fieldtypeconverter . FieldTypeConverterDProcessor . class ) . addConfiguration ( "convertBy" , ConvertBy . BY_TYPE ) . addConfiguration ( "wholeTypeConverterConfigs" , com . google . common . collect . ImmutableList . of ( converterConfig ) ) . addOutputLane ( "a" ) . build ( ) ; runner . runInit ( ) ; try { com . streamsets . pipeline . api . Record record = com . streamsets . pipeline . sdk . RecordCreator . create ( "s" , "s:1" ) ; com . streamsets . pipeline . sdk . StageRunner . Output output = runner . runProcess ( com . google . common . collect . ImmutableList . of ( record ) ) ; "<AssertPlaceHolder>" ; } finally { runner . runDestroy ( ) ; } } getRecords ( ) { if ( ( onRecordErrorException ) != null ) { throw onRecordErrorException ; } return records ; }
|
org . junit . Assert . assertEquals ( 1 , output . getRecords ( ) . get ( "a" ) . size ( ) )
|
testCanSetupCepOperatorsWhenItIsEnabledAndEditingPatternIsNotNull ( ) { when ( plugin . editingPattern ( ) ) . thenReturn ( pattern52 ) ; when ( pattern52 . getFactType ( ) ) . thenReturn ( "factType" ) ; page . enableCepOperators ( ) ; "<AssertPlaceHolder>" ; } canSetupCepOperators ( ) { return ( isCepOperatorsEnabled ( ) ) && ( ( editingPattern ( ) ) != null ) ; }
|
org . junit . Assert . assertTrue ( page . canSetupCepOperators ( ) )
|
shouldMapInternalReferencePropertiesToPublicUris ( ) { when ( mockNamespacedProperty . getNamespaceURI ( ) ) . thenReturn ( "info:xyz#" ) ; when ( mockNamespacedProperty . getLocalName ( ) ) . thenReturn ( getReferencePropertyName ( "some_reference" ) ) ; when ( mockNamespacedProperty . getType ( ) ) . thenReturn ( javax . jcr . PropertyType . REFERENCE ) ; when ( mockNamespacedProperty . getName ( ) ) . thenReturn ( ( "xyz:" + ( getReferencePropertyName ( "some_reference" ) ) ) ) ; final org . apache . jena . rdf . model . Property property = testObj . convert ( mockNamespacedProperty ) ; assert property != null ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { final java . util . regex . Matcher matcher = org . fcrepo . http . commons . domain . Range . rangePattern . matcher ( source ) ; if ( ! ( matcher . matches ( ) ) ) { return new org . fcrepo . http . commons . domain . Range ( ) ; } final java . lang . String from = matcher . group ( 1 ) ; final java . lang . String to = matcher . group ( 2 ) ; final long start ; if ( from . equals ( "" ) ) { start = 0 ; } else { start = java . lang . Long . parseLong ( from ) ; } final long end ; if ( to . equals ( "" ) ) { end = - 1 ; } else { end = java . lang . Long . parseLong ( to ) ; } return new org . fcrepo . http . commons . domain . Range ( start , end ) ; }
|
org . junit . Assert . assertEquals ( "some_reference" , property . getLocalName ( ) )
|
testCatchException_ObjExc_noExceptionThrown ( ) { com . googlecode . catchexception . throwable . CatchThrowable . catchThrowable ( list :: size , com . googlecode . catchexception . throwable . IndexOutOfBoundsException . class ) ; "<AssertPlaceHolder>" ; } caughtThrowable ( ) { return com . googlecode . catchexception . throwable . ThrowableHolder . get ( ) ; }
|
org . junit . Assert . assertNull ( com . googlecode . catchexception . throwable . CatchThrowable . caughtThrowable ( ) )
|
testObtainsClientIpFromRemoteAddressWithoutHeaders ( ) { com . eclipsesource . tabris . tracking . TrackingInfo info = com . eclipsesource . tabris . tracking . internal . TrackingInfoFactory . createInfo ( ui . getDisplay ( ) ) ; java . lang . String ip = info . getClientIp ( ) ; "<AssertPlaceHolder>" ; } getClientIp ( ) { return clientIp ; }
|
org . junit . Assert . assertNull ( ip )
|
testReverseArray ( ) { org . stringtemplate . v4 . ST e = new org . stringtemplate . v4 . ST ( "<reverse(names);<sp>separator=\",<sp>\">" ) ; e . add ( "names" , new java . lang . String [ ] { "Ter" , "Tom" , "Sriram" } ) ; java . lang . String expecting = "Sriram,<sp>Tom,<sp>Ter" ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
|
org . junit . Assert . assertEquals ( expecting , e . render ( ) )
|
copyBBForEmptyString ( ) { org . slim3 . util . BeanUtilTest . SrcBB src = new org . slim3 . util . BeanUtilTest . SrcBB ( ) ; src . aaa = "" ; org . slim3 . util . BeanUtilTest . DestBB dest = new org . slim3 . util . BeanUtilTest . DestBB ( ) ; dest . aaa = "111" ; org . slim3 . util . BeanUtil . copy ( src , dest ) ; "<AssertPlaceHolder>" ; } copy ( java . lang . Object , java . lang . Object ) { org . slim3 . util . BeanUtil . copy ( src , dest , org . slim3 . util . BeanUtil . DEFAULT_OPTIONS ) ; }
|
org . junit . Assert . assertThat ( dest . aaa , org . hamcrest . CoreMatchers . is ( "" ) )
|
getVosCount ( ) { System . out . println ( ( ( cz . metacentrum . perun . core . entry . VosManagerEntryIntegrationTest . CLASS_NAME ) + "getVosCount" ) ) ; final cz . metacentrum . perun . core . api . Vo createdVo = vosManagerEntry . createVo ( sess , myVo ) ; int count = vosManagerEntry . getVosCount ( sess ) ; "<AssertPlaceHolder>" ; } getVosCount ( cz . metacentrum . perun . core . api . PerunSession ) { return getVosManagerImpl ( ) . getVosCount ( sess ) ; }
|
org . junit . Assert . assertTrue ( ( count > 0 ) )
|
testSize ( ) { org . antlr . misc . IntervalSet s = org . antlr . misc . IntervalSet . of ( 20 , 30 ) ; s . add ( 50 , 55 ) ; s . add ( 5 , 19 ) ; java . lang . String expecting = "32" ; java . lang . String result = java . lang . String . valueOf ( s . size ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return p ; }
|
org . junit . Assert . assertEquals ( result , expecting )
|
testSlicing ( ) { org . nd4j . linalg . api . ndarray . INDArray arange = org . nd4j . linalg . factory . Nd4j . arange ( 1 , 17 ) . reshape ( 4 , 4 ) ; org . nd4j . linalg . api . ndarray . INDArray slice1Assert = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 2 , 6 , 10 , 14 } ) ; org . nd4j . linalg . api . ndarray . INDArray slice1Test = arange . slice ( 1 ) ; "<AssertPlaceHolder>" ; } slice ( long ) { org . nd4j . linalg . factory . Nd4j . getCompressor ( ) . autoDecompress ( this ) ; long slices = slices ( ) ; if ( slice >= slices ) throw new java . lang . IllegalArgumentException ( ( "Illegal<sp>slice<sp>" + slice ) ) ; if ( ( jvmShapeInfo . rank ) == 0 ) { throw new java . lang . IllegalArgumentException ( "Can't<sp>slice<sp>a<sp>0-d<sp>NDArray" ) ; } if ( slice < 0 ) slice += rank ( ) ; org . nd4j . linalg . api . ndarray . INDArrayIndex [ ] indexes = new org . nd4j . linalg . api . ndarray . INDArrayIndex [ rank ( ) ] ; indexes [ 0 ] = org . nd4j . linalg . api . ndarray . NDArrayIndex . point ( slice ) ; for ( int i = 1 ; i < ( rank ( ) ) ; i ++ ) { indexes [ i ] = org . nd4j . linalg . api . ndarray . NDArrayIndex . all ( ) ; } return get ( indexes ) ; }
|
org . junit . Assert . assertEquals ( slice1Assert , slice1Test )
|
checkWithNegatedTag ( ) { boolean execute = evaluatorUnderTest . shouldRunScenarioWithTags ( "@a<sp>@b<sp>!@c" , abcScenarioTags ) ; "<AssertPlaceHolder>" ; } shouldRunScenarioWithTags ( java . lang . String , java . util . List ) { java . lang . String [ ] expressions = tagExpression . split ( "\\|" ) ; for ( java . lang . String expression : expressions ) { if ( checkSimpleExpression ( expression , scenarioTags ) ) { return true ; } } return false ; }
|
org . junit . Assert . assertFalse ( execute )
|
should_be_equal_when_having_1_value ( ) { fr . norad . visuwall . api . domain . quality . QualityMeasure qm1 = new fr . norad . visuwall . api . domain . quality . QualityMeasure ( ) ; qm1 . setName ( "name" ) ; fr . norad . visuwall . api . domain . quality . QualityMeasure qm2 = new fr . norad . visuwall . api . domain . quality . QualityMeasure ( ) ; qm2 . setName ( "name" ) ; "<AssertPlaceHolder>" ; } setName ( java . lang . String ) { this . name = name ; }
|
org . junit . Assert . assertEquals ( qm1 , qm2 )
|
testCalculateNextTherapyAdministrationTimeSimple3xDstGap ( ) { final com . marand . thinkmed . medications . dto . ConstantSimpleTherapyDto therapy = getSimpleConstantTherapy3X500mg ( null ) ; final java . util . List < com . marand . maf . core . data . object . HourMinuteDto > doseTimes = new java . util . ArrayList ( ) ; doseTimes . add ( new com . marand . maf . core . data . object . HourMinuteDto ( 2 , 30 ) ) ; doseTimes . add ( new com . marand . maf . core . data . object . HourMinuteDto ( 13 , 0 ) ) ; doseTimes . add ( new com . marand . maf . core . data . object . HourMinuteDto ( 20 , 0 ) ) ; therapy . setDoseTimes ( doseTimes ) ; final org . joda . time . DateTime nextTherapyAdministrationTime = administrationTaskCreator . calculateNextTherapyAdministrationTime ( therapy , true , new org . joda . time . DateTime ( 2017 , 3 , 26 , 1 , 0 ) ) ; "<AssertPlaceHolder>" ; } setDoseTimes ( java . util . List ) { this . doseTimes = doseTimes ; }
|
org . junit . Assert . assertEquals ( new org . joda . time . DateTime ( 2017 , 3 , 26 , 3 , 0 ) , nextTherapyAdministrationTime )
|
testHeaderJoinMSJ ( ) { long start = java . lang . System . currentTimeMillis ( ) ; com . splicemachine . derby . impl . sql . actions . index . ResultSet rs = methodWatcher . executeQuery ( com . splicemachine . derby . impl . sql . actions . index . IndexIT . HEADER_JOIN ) ; java . lang . String duration = com . splicemachine . homeless . TestUtils . getDuration ( start , java . lang . System . currentTimeMillis ( ) ) ; int cnt = resultSetSize ( rs ) ; System . out . println ( ( ( ( "Rows<sp>returned:<sp>" + cnt ) + "<sp>in<sp>" ) + duration ) ) ; "<AssertPlaceHolder>" ; } println ( java . lang . String ) { System . err . println ( text ) ; System . err . flush ( ) ; }
|
org . junit . Assert . assertTrue ( ( cnt == 1 ) )
|
testLatencyBoundedBatchingSingleMessage ( ) { final java . util . concurrent . LinkedBlockingQueue < com . spotify . google . cloud . pubsub . client . PublisherTest . Request > t = new java . util . concurrent . LinkedBlockingQueue ( ) ; topics . put ( "t" , t ) ; final com . spotify . google . cloud . pubsub . client . Message m = com . spotify . google . cloud . pubsub . client . Message . of ( "1" ) ; publisher . publish ( "t" , m ) ; final com . spotify . google . cloud . pubsub . client . PublisherTest . Request request = t . take ( ) ; "<AssertPlaceHolder>" ; } publish ( java . util . List , java . lang . String ) { com . spotify . google . cloud . pubsub . client . Topic . validateCanonicalTopic ( canonicalTopic ) ; return publish0 ( messages , canonicalTopic ) ; }
|
org . junit . Assert . assertThat ( request . messages . size ( ) , org . hamcrest . Matchers . is ( 1 ) )
|
testObjectFieldNotForeign ( ) { java . lang . reflect . Field [ ] fields = com . j256 . ormlite . field . FieldTypeTest . ObjectFieldNotForeign . class . getDeclaredFields ( ) ; "<AssertPlaceHolder>" ; java . lang . reflect . Field fooField = fields [ 0 ] ; com . j256 . ormlite . field . FieldType . createFieldType ( databaseType , com . j256 . ormlite . field . FieldTypeTest . ObjectFieldNotForeign . class . getSimpleName ( ) , fooField , com . j256 . ormlite . field . FieldTypeTest . ObjectFieldNotForeign . class ) ; }
|
org . junit . Assert . assertTrue ( ( ( fields . length ) >= 1 ) )
|
testClose ( ) { com . stratio . crossdata . common . security . ICredentials iCredentials = mock ( com . stratio . crossdata . common . security . ICredentials . class ) ; com . stratio . crossdata . common . data . ClusterName clusterName = new com . stratio . crossdata . common . data . ClusterName ( com . stratio . connector . deep . connection . DeepContextConnectorTest . CLUSTER_NAME ) ; java . util . Map < java . lang . String , java . lang . String > options = new java . util . HashMap ( ) ; com . stratio . crossdata . common . connector . ConnectorClusterConfig config = new com . stratio . crossdata . common . connector . ConnectorClusterConfig ( clusterName , options , options ) ; config . setDataStoreName ( new com . stratio . crossdata . common . data . DataStoreName ( com . stratio . connector . deep . connection . DeepContextConnectorTest . DATASTORE_NAME ) ) ; com . stratio . connector . deep . connection . DeepConnectionHandler connectionHandler = mock ( com . stratio . connector . deep . connection . DeepConnectionHandler . class ) ; org . mockito . internal . util . reflection . Whitebox . setInternalState ( com . stratio . connector . deep . connection . DeepContextConnectorTest . deepConnector , "connectionHandler" , connectionHandler ) ; com . stratio . connector . deep . connection . DeepContextConnectorTest . deepConnector . connect ( iCredentials , config ) ; connectionHandler . closeConnection ( clusterName . getName ( ) ) ; com . stratio . connector . deep . connection . DeepConnection conn = ( ( com . stratio . connector . deep . connection . DeepConnection ) ( connectionHandler . getConnection ( clusterName . getName ( ) ) ) ) ; "<AssertPlaceHolder>" ; } connect ( com . stratio . crossdata . common . security . ICredentials , com . stratio . crossdata . common . connector . ConnectorClusterConfig ) { java . lang . String extractorImplClassName = deepConfigurationBuilder . getImplementationClass ( config . getDataStoreName ( ) . getName ( ) ) ; config . getClusterOptions ( ) . put ( DeepConnectorConstants . EXTRACTOR_IMPL_CLASS , extractorImplClassName ) ; if ( ( extractorImplClassName != null ) && ( extractorImplClassName . equals ( ExtractorConstants . HDFS ) ) ) { config . getClusterOptions ( ) . put ( ExtractorConstants . FS_FILE_PATH , deepConfigurationBuilder . getHDFSFilePath ( ) ) ; } connectionHandler . createConnection ( credentials , config ) ; }
|
org . junit . Assert . assertNull ( conn )
|
getSoortNlReisdocumentTestNotExist ( ) { final java . lang . String snrCode = "XY" ; org . mockito . Mockito . doThrow ( new java . lang . IllegalArgumentException ( nl . bzk . migratiebrp . ggo . viewer . service . impl . Lo3StamtabelServiceTest . MELDING_STRING ) ) . when ( dynamischeStamtabelRepository ) . getSoortNederlandsReisdocumentByCode ( snrCode ) ; final java . lang . String resultSnr = lo3StamtabelService . getSoortNlReisdocument ( snrCode ) ; "<AssertPlaceHolder>" ; } getSoortNederlandsReisdocumentByCode ( java . lang . String ) { return soortNederlandsReisdocumentRepository . findByKey ( code ) ; }
|
org . junit . Assert . assertEquals ( "XY" , resultSnr )
|
testUpdate ( ) { com . ebay . pulsar . analytics . dao . model . DBDataSource datasource = new com . ebay . pulsar . analytics . dao . model . DBDataSource ( ) ; datasource . setName ( com . ebay . pulsar . analytics . metricstore . db . BaseDBServiceTest . uttestdatasource1 ) ; final com . ebay . pulsar . analytics . dao . model . DBDataSource datasourceCondition = new com . ebay . pulsar . analytics . dao . model . DBDataSource ( ) ; datasourceCondition . setName ( com . ebay . pulsar . analytics . metricstore . db . BaseDBServiceTest . uttestdatasource1 ) ; datasourceCondition . setCreateTime ( new java . util . Date ( ) ) ; com . ebay . pulsar . analytics . dao . RDBMS db = org . mockito . Mockito . mock ( com . ebay . pulsar . analytics . dao . RDBMS . class ) ; when ( db . query ( org . mockito . Matchers . anyString ( ) , org . mockito . Matchers . eq ( com . google . common . collect . ImmutableMap . of ( "name" , com . ebay . pulsar . analytics . metricstore . db . BaseDBServiceTest . uttestdatasource1 ) ) , org . mockito . Matchers . eq ( ( - 1 ) ) , org . mockito . Matchers . any ( com . ebay . pulsar . analytics . dao . mapper . DBDataSourceMapper . class ) ) ) . thenReturn ( com . google . common . collect . Lists . < com . ebay . pulsar . analytics . dao . model . DBDataSource > newArrayList ( datasourceCondition ) ) ; when ( db . update ( org . mockito . Mockito . anyString ( ) , org . mockito . Matchers . anyMap ( ) ) ) . thenReturn ( 1 ) ; com . ebay . pulsar . analytics . dao . service . DBDataSourceService datasourceService = new com . ebay . pulsar . analytics . dao . service . DBDataSourceService ( ) ; com . ebay . pulsar . analytics . metricstore . db . ReflectFieldUtil . setField ( com . ebay . pulsar . analytics . dao . service . BaseDBService . class , datasourceService , "db" , db ) ; java . lang . String newConfig = "testConfig" ; datasource . setProperties ( newConfig ) ; long id = datasourceService . updateById ( datasourceCondition ) ; "<AssertPlaceHolder>" ; } setProperties ( java . util . Properties ) { this . properties = properties ; }
|
org . junit . Assert . assertTrue ( ( id == 1 ) )
|
testTrimJustOneWSInSubtemplates ( ) { org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroup ( ) ; group . defineTemplate ( "test" , "names" , "<names:{n<sp>|<sp><n><sp>}>!" ) ; org . stringtemplate . v4 . ST st = group . getInstanceOf ( "test" ) ; st . add ( "names" , "Ter" ) ; st . add ( "names" , "Tom" ) ; st . add ( "names" , "Sumana" ) ; java . lang . String expected = "<sp>Ter<sp>Tom<sp>Sumana<sp>!" ; java . lang . String result = st . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
testDataHeaderAcceptsDot ( ) { com . dumbster . smtp . Request request = com . dumbster . smtp . Request . createRequest ( SmtpState . DATA_HDR , "." ) ; "<AssertPlaceHolder>" ; } getClientAction ( ) { return clientAction ; }
|
org . junit . Assert . assertEquals ( "." , request . getClientAction ( ) . toString ( ) )
|
queryMetadataTest ( ) { final org . apache . rya . indexing . pcj . fluo . app . query . FluoQueryMetadataDAO dao = new org . apache . rya . indexing . pcj . fluo . app . query . FluoQueryMetadataDAO ( ) ; final java . lang . String queryId = org . apache . rya . indexing . pcj . fluo . app . NodeType . generateNewFluoIdForType ( NodeType . QUERY ) ; final org . apache . rya . indexing . pcj . fluo . app . query . QueryMetadata . Builder builder = org . apache . rya . indexing . pcj . fluo . app . query . QueryMetadata . builder ( queryId ) ; builder . setQueryType ( QueryType . PROJECTION ) ; builder . setVarOrder ( new org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ( "y;s;d" ) ) ; builder . setSparql ( "sparql<sp>string" ) ; builder . setChildNodeId ( "childNodeId" ) ; builder . setExportStrategies ( new java . util . HashSet ( java . util . Arrays . asList ( ExportStrategy . KAFKA ) ) ) ; final org . apache . rya . indexing . pcj . fluo . app . query . QueryMetadata originalMetadata = builder . build ( ) ; try ( org . apache . fluo . api . client . FluoClient fluoClient = org . apache . fluo . api . client . FluoFactory . newClient ( super . getFluoConfiguration ( ) ) ) { try ( org . apache . fluo . api . client . Transaction tx = fluoClient . newTransaction ( ) ) { dao . write ( tx , originalMetadata ) ; tx . commit ( ) ; } org . apache . rya . indexing . pcj . fluo . app . query . QueryMetadata storedMetdata = null ; try ( org . apache . fluo . api . client . Snapshot sx = fluoClient . newSnapshot ( ) ) { storedMetdata = dao . readQueryMetadata ( sx , queryId ) ; } "<AssertPlaceHolder>" ; } } readQueryMetadata ( org . apache . fluo . api . client . SnapshotBase , java . lang . String ) { return readQueryMetadataBuilder ( sx , nodeId ) . build ( ) ; }
|
org . junit . Assert . assertEquals ( originalMetadata , storedMetdata )
|
testSimple6 ( ) { org . apache . catalina . ssi . SSIExternalResolver r = new org . apache . catalina . ssi . TestExpressionParseTree . TesterSSIExternalResolver ( ) ; r . setVariableValue ( "QUERY_STRING" , "a" ) ; org . apache . catalina . ssi . SSIMediator mediator = new org . apache . catalina . ssi . SSIMediator ( r , org . apache . catalina . ssi . TestExpressionParseTree . LAST_MODIFIED ) ; org . apache . catalina . ssi . ExpressionParseTree ept = new org . apache . catalina . ssi . ExpressionParseTree ( "$QUERY_STRING<sp>=<sp>b" , mediator ) ; "<AssertPlaceHolder>" ; } evaluateTree ( ) { return root . evaluate ( ) ; }
|
org . junit . Assert . assertFalse ( ept . evaluateTree ( ) )
|
testSkipUnmappedProperty ( ) { nl . _42 . jarb . utils . bean . PropertyReference propertyReference = new nl . _42 . jarb . utils . bean . PropertyReference ( nl . _42 . jarb . constraint . domain . Wine . class , "unknownProperty" ) ; nl . _42 . jarb . constraint . metadata . PropertyConstraintDescription unknownPropertyDescription = new nl . _42 . jarb . constraint . metadata . PropertyConstraintDescription ( propertyReference , java . lang . String . class ) ; enhancer . enhance ( unknownPropertyDescription ) ; "<AssertPlaceHolder>" ; } getMaximumLength ( ) { return maximumLength ; }
|
org . junit . Assert . assertNull ( unknownPropertyDescription . getMaximumLength ( ) )
|
testChannelRead0 ( ) { io . netty . channel . embedded . EmbeddedChannel embeddedChannel = new io . netty . channel . embedded . EmbeddedChannel ( NettyRPCChannelHandler . INSTANCE ) ; final java . util . concurrent . atomic . AtomicReference < io . netty . channel . Channel > channelReference = new java . util . concurrent . atomic . AtomicReference ( ) ; com . liferay . portal . fabric . netty . rpc . RPCSerializable rpcSerializable = new com . liferay . portal . fabric . netty . rpc . RPCSerializable ( java . lang . System . currentTimeMillis ( ) ) { @ com . liferay . portal . fabric . netty . rpc . handlers . Override public void execute ( io . netty . channel . Channel channel ) { channelReference . set ( channel ) ; } private static final long serialVersionUID = 1L ; } ; embeddedChannel . writeInbound ( rpcSerializable ) ; "<AssertPlaceHolder>" ; } get ( ) { return _byteBuffer . get ( ) ; }
|
org . junit . Assert . assertSame ( embeddedChannel , channelReference . get ( ) )
|
testFindBillingsAndDemographicsById ( ) { "<AssertPlaceHolder>" ; } findBillingsAndDemographicsById ( java . lang . Integer ) { java . lang . String sql = "FROM<sp>BillingONCHeader1<sp>b,<sp>Demographic<sp>d<sp>WHERE<sp>b.id<sp>=<sp>:id<sp>AND<sp>b.demographicNo<sp>=<sp>d.DemographicNo" ; javax . persistence . Query query = entityManager . createQuery ( sql ) ; query . setParameter ( "id" , id ) ; return query . getResultList ( ) ; }
|
org . junit . Assert . assertNotNull ( dao . findBillingsAndDemographicsById ( 100 ) )
|
should_return_null_when_trying_to_convert_a_null_value ( ) { final org . bonitasoft . engine . identity . CustomUserInfoValue value = org . bonitasoft . engine . service . ModelConvertor . convert ( ( ( org . bonitasoft . engine . identity . model . SCustomUserInfoValue ) ( null ) ) ) ; "<AssertPlaceHolder>" . isNull ( ) ; } convert ( org . bonitasoft . engine . identity . model . SCustomUserInfoDefinition ) { final org . bonitasoft . engine . identity . impl . CustomUserInfoDefinitionImpl definition = new org . bonitasoft . engine . identity . impl . CustomUserInfoDefinitionImpl ( ) ; definition . setId ( sDefinition . getId ( ) ) ; definition . setName ( sDefinition . getName ( ) ) ; definition . setDescription ( sDefinition . getDescription ( ) ) ; return definition ; }
|
org . junit . Assert . assertThat ( value )
|
addOneFilterToEffect ( ) { bogdan . imagefilters . effect . filter . Filter filter = mock ( bogdan . imagefilters . effect . filter . Filter . class ) ; effect . addFilter ( filter ) ; "<AssertPlaceHolder>" ; } getNumberFilters ( ) { return this . filters . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , effect . getNumberFilters ( ) )
|
assertHashCodeSameAsLiteral ( ) { javax . inject . Named a1 = org . apache . deltaspike . core . util . metadata . AnnotationInstanceProvider . of ( javax . inject . Named . class ) ; javax . inject . Named a2 = new org . apache . deltaspike . core . api . literal . NamedLiteral ( ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return ( sessionId ) != null ? sessionId . hashCode ( ) : 0 ; }
|
org . junit . Assert . assertThat ( a2 . hashCode ( ) , org . hamcrest . CoreMatchers . is ( a1 . hashCode ( ) ) )
|
getNaamgebruikTestNotExist ( ) { final java . lang . String naamgebruikCode = "Blaat" ; final java . lang . String resultWgg = brpStamtabelService . getNaamgebruik ( naamgebruikCode ) ; "<AssertPlaceHolder>" ; } getNaamgebruik ( java . lang . Object ) { return getElementCodeNaam ( nl . bzk . algemeenbrp . dal . domein . brp . enums . Naamgebruik . parseCode ( ( ( java . lang . String ) ( value ) ) ) ) ; }
|
org . junit . Assert . assertEquals ( resultWgg , naamgebruikCode )
|
testGetUserRolesOnThesaurus ( ) { java . util . List < fr . mcc . ginco . beans . UserRole > actualResponse1 = userRoleDAO . getUserRolesOnThesaurus ( "http://thesaurus1" ) ; "<AssertPlaceHolder>" ; } getUserRolesOnThesaurus ( java . lang . String ) { org . hibernate . Criteria criteria = getCurrentSession ( ) . createCriteria ( fr . mcc . ginco . beans . UserRole . class ) ; criteria . add ( org . hibernate . criterion . Restrictions . eq ( fr . mcc . ginco . dao . hibernate . UserRoleDAO . THESAURUS_IDENTIFIER , thesaurusId ) ) ; return criteria . list ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , actualResponse1 . size ( ) )
|
testSendsCommandNoPending ( ) { mHelper . registerEventListener ( mActivity , mActivity ) ; com . whiterabbit . postman . SimpleServerCommand command = new com . whiterabbit . postman . SimpleServerCommand ( true , com . whiterabbit . postman . ServerInteractionHelperTest . RESULT_MESSAGE ) ; command . setIgnorePending ( true ) ; try { mHelper . sendCommand ( mActivity , command , com . whiterabbit . postman . ServerInteractionHelperTest . COMMAND_REQUEST ) ; } catch ( com . whiterabbit . postman . exceptions . SendingCommandException e ) { org . junit . Assert . fail ( "sending<sp>command<sp>exception" ) ; } "<AssertPlaceHolder>" ; shortcutIntentService ( ) ; } isRequestAlreadyPending ( java . lang . String ) { java . lang . Boolean pending = mPendingRequests . get ( requestId ) ; if ( pending == null ) { return false ; } else { return pending ; } }
|
org . junit . Assert . assertFalse ( mHelper . isRequestAlreadyPending ( com . whiterabbit . postman . ServerInteractionHelperTest . COMMAND_REQUEST ) )
|
lastsave ( ) { long saved = jedis . lastsave ( ) ; "<AssertPlaceHolder>" ; } lastsave ( ) { long saved = jedis . lastsave ( ) ; org . junit . Assert . assertTrue ( ( saved > 0 ) ) ; }
|
org . junit . Assert . assertTrue ( ( saved > 0 ) )
|
cascadeFromGenericMethodUsingTypeParameterOfSameNameAsTypeParameterFromBaseClass ( mockit . CascadingWithGenericsTest$D ) { mockit . CascadingWithGenericsTest . Bar cascaded = mock . doSomething ( ) ; "<AssertPlaceHolder>" ; } doSomething ( ) { return 1 ; }
|
org . junit . Assert . assertNotNull ( cascaded )
|
canCRUDDomain ( ) { com . microsoft . azure . management . appservice . AppServiceDomain domain = appServiceManager . domains ( ) . define ( com . microsoft . azure . management . appservice . DomainsTests . DOMAIN_NAME ) . withExistingResourceGroup ( com . microsoft . azure . management . appservice . RG_NAME ) . defineRegistrantContact ( ) . withFirstName ( "Jianghao" ) . withLastName ( "Lu" ) . withEmail ( "jianghlu@microsoft.com" ) . withAddressLine1 ( "1<sp>Microsoft<sp>Way" ) . withCity ( "Seattle" ) . withStateOrProvince ( "WA" ) . withCountry ( CountryIsoCode . UNITED_STATES ) . withPostalCode ( "98101" ) . withPhoneCountryCode ( CountryPhoneCode . UNITED_STATES ) . withPhoneNumber ( "4258828080" ) . attach ( ) . withDomainPrivacyEnabled ( true ) . withAutoRenewEnabled ( true ) . create ( ) ; "<AssertPlaceHolder>" ; domain . update ( ) . withAutoRenewEnabled ( false ) . apply ( ) ; } create ( ) { createAsync ( ) . toBlocking ( ) . subscribe ( ) ; return this ; }
|
org . junit . Assert . assertNotNull ( domain )
|
decode ( ) { final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( encoded ) ; final com . flagstone . transform . coder . SWFDecoder decoder = new com . flagstone . transform . coder . SWFDecoder ( stream ) ; fixture = new com . flagstone . transform . image . DefineImage ( decoder ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( fixture )
|
testExecuteInSequence ( ) { boolean b = bupc . executeInSequence ( ) ; "<AssertPlaceHolder>" ; } executeInSequence ( ) { return true ; }
|
org . junit . Assert . assertFalse ( b )
|
promoteScopeToTenantNotFoundTest ( ) { org . kaaproject . kaa . common . dto . ApplicationDto application = createApplication ( tenantAdminDto ) ; this . loginTenantDeveloper ( tenantDeveloperUser ) ; org . kaaproject . kaa . common . dto . ctl . CTLSchemaDto saved = this . createCTLSchema ( this . ctlRandomFieldType ( ) , org . kaaproject . kaa . server . control . CTL_DEFAULT_NAMESPACE , 1 , tenantDeveloperDto . getTenantId ( ) , null , null , null ) ; final org . kaaproject . kaa . common . dto . ctl . CtlSchemaMetaInfoDto metaInfo2 = saved . getMetaInfo ( ) ; "<AssertPlaceHolder>" ; metaInfo2 . setApplicationId ( application . getId ( ) ) ; this . checkRestErrorStatusCode ( new org . kaaproject . kaa . server . control . TestRestCall ( ) { @ org . kaaproject . kaa . server . control . Override public void executeRestCall ( ) throws org . kaaproject . kaa . server . control . Exception { client . promoteScopeToTenant ( metaInfo2 . getApplicationId ( ) , metaInfo2 . getFqn ( ) ) ; } } , HttpStatus . NOT_FOUND ) ; } getApplicationId ( ) { return applicationId ; }
|
org . junit . Assert . assertNull ( metaInfo2 . getApplicationId ( ) )
|
testUnionAll ( ) { try { org . talend . dq . dbms . DbmsLanguage dbms = getMysqlDbmsLanguage ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } unionAll ( ) { return ( union ( ) ) + ( all ( ) ) ; }
|
org . junit . Assert . assertNotNull ( dbms . unionAll ( ) )
|
getAggrandizeElements ( ) { java . util . List < java . lang . Integer > a = new java . util . ArrayList ( ) ; a . add ( 3 ) ; a . add ( 7 ) ; a . add ( 6 ) ; a . add ( 8 ) ; a . add ( 9 ) ; java . util . List < java . lang . Integer > b = new java . util . ArrayList ( ) ; b . add ( 3 ) ; b . add ( 7 ) ; b . add ( 6 ) ; java . util . List < java . lang . Integer > list = cn . itweet . common . utils . CommonUtils . getAggrandizeElements ( a , b ) ; System . out . println ( list . toString ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( "CategoriesDto{" + "id=" ) + ( id ) ) + ",<sp>name='" ) + ( name ) ) + '\'' ) + ",<sp>count='" ) + ( count ) ) + '\'' ) + '}' ; }
|
org . junit . Assert . assertEquals ( 2 , list . size ( ) )
|
testGetDatefromLongFormat ( ) { java . lang . String DateToFormat ; java . util . Date expResult ; System . out . println ( "getDatefromLongFormat" ) ; expResult = getDateExpected ( 2012 , 1 , 1 , 0 , 0 , 0 ) ; DateToFormat = "20120101000000" ; OpenRate . utils . ConversionUtilsTest . instance . setInputDateFormat ( "yyyyMMddHHmmss" ) ; java . util . Date result = OpenRate . utils . ConversionUtilsTest . instance . getDatefromLongFormat ( DateToFormat ) ; "<AssertPlaceHolder>" ; } getDatefromLongFormat ( java . lang . String ) { java . util . Date tmpDate = sdfIn . parse ( DateToFormat ) ; return tmpDate ; }
|
org . junit . Assert . assertTrue ( ( ( expResult . compareTo ( result ) ) == 0 ) )
|
testGetOutputFileName ( ) { com . bixly . pastevid . recorders . VideoRecorderTest . log ( "getOutputFileName" ) ; com . bixly . pastevid . recorders . Recorder recorder = new com . bixly . pastevid . recorders . Recorder ( null ) ; com . bixly . pastevid . recorders . VideoRecorder instance = new com . bixly . pastevid . recorders . VideoRecorder ( recorder ) ; instance . record ( ) ; java . lang . String result = instance . getOutputFileName ( ) ; "<AssertPlaceHolder>" ; instance . stop ( ) ; } getOutputFileName ( ) { return this . outputMovieFilename ; }
|
org . junit . Assert . assertNotNull ( result )
|
testShellStrings3 ( ) { java . lang . String QUOTED = "echo<sp>\"*.c\"<sp>|<sp>sed<sp>s/[a-z]/[A-Z]/g" ; java . lang . String text = ( "echo<sp>'" + QUOTED ) + "\'\n" ; org . eclipse . jface . text . IDocument document = createDocument ( text ) ; java . util . List < org . eclipse . cdt . autotools . ui . editors . parser . Token > tokens = tokenize ( document , false ) ; checkNoErrors ( ) ; "<AssertPlaceHolder>" ; checkToken ( tokens . get ( 0 ) , document , ITokenConstants . WORD , "echo" ) ; checkToken ( tokens . get ( 1 ) , document , ITokenConstants . SH_STRING_SINGLE , QUOTED , ( ( QUOTED . length ( ) ) + 2 ) ) ; checkToken ( tokens . get ( 2 ) , document , ITokenConstants . EOL , "\n" ) ; } size ( ) { return fSize ; }
|
org . junit . Assert . assertEquals ( 3 , tokens . size ( ) )
|
test200b ( ) { org . apache . commons . jexl3 . JexlContext jc = new org . apache . commons . jexl3 . MapContext ( ) ; org . apache . commons . jexl3 . JexlEngine jexl = new org . apache . commons . jexl3 . JexlBuilder ( ) . create ( ) ; org . apache . commons . jexl3 . JexlScript e = jexl . createScript ( "var<sp>x<sp>=<sp>0;<sp>var<sp>f<sp>=<sp>(y)->{<sp>x<sp>=<sp>y;<sp>};<sp>f(42);<sp>x" ) ; java . lang . Object r = e . execute ( jc ) ; "<AssertPlaceHolder>" ; } execute ( java . lang . Object [ ] ) { java . lang . Class < ? > [ ] clazz = new java . lang . Class < ? > [ args . length ] ; for ( int a = 0 ; a < ( args . length ) ; ++ a ) { clazz [ a ] = ( ( args [ a ] ) != null ) ? args [ a ] . getClass ( ) : org . apache . commons . jexl3 . Void . class ; } return clazz ; }
|
org . junit . Assert . assertEquals ( 0 , r )
|
testNull ( ) { java . lang . Object result = io . webfolder . ui4j . test . JavaScriptEngineTest . page . executeScript ( "null" ) ; "<AssertPlaceHolder>" ; } executeScript ( java . lang . String ) { java . lang . Object result = engine . executeScript ( script ) ; return result ; }
|
org . junit . Assert . assertNull ( result )
|
testSerializationSizeInBytes ( ) { final org . roaringbitmap . longlong . Roaring64NavigableMap map = newDefaultCtor ( ) ; map . addLong ( 123 ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; try ( java . io . DataOutputStream oos = new java . io . DataOutputStream ( baos ) ) { map . serialize ( oos ) ; } "<AssertPlaceHolder>" ; } serializedSizeInBytes ( ) { long nbBytes = 0L ; nbBytes += 1 ; nbBytes += 4 ; for ( java . util . Map . Entry < java . lang . Integer , org . roaringbitmap . BitmapDataProvider > entry : highToBitmap . entrySet ( ) ) { nbBytes += 4 ; nbBytes += entry . getValue ( ) . serializedSizeInBytes ( ) ; } return nbBytes ; }
|
org . junit . Assert . assertEquals ( baos . toByteArray ( ) . length , map . serializedSizeInBytes ( ) )
|
should_return_this ( ) { org . fest . assertions . api . IntegerAssert returned = assertions . isLessThan ( expected ) ; "<AssertPlaceHolder>" ; } isLessThan ( byte ) { bytes . assertLessThan ( description , actual , expected ) ; return this ; }
|
org . junit . Assert . assertSame ( assertions , returned )
|
testWriteNotificationSettings ( ) { java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; com . ibm . ws . jmx . connector . datatypes . NotificationSettings settings = new com . ibm . ws . jmx . connector . datatypes . NotificationSettings ( ) ; java . lang . StringBuilder str = new java . lang . StringBuilder ( ) ; settings . deliveryInterval = com . ibm . ws . jmx . connector . converter . JSONConverterTest . TEST_NOTIFICATION_SETTING_DELIVERY_INTERVAL ; settings . inboxExpiry = com . ibm . ws . jmx . connector . converter . JSONConverterTest . TEST_NOTIFICATION_SETTING_INBOX_EXPIRY ; str . append ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . OPEN_JSON ) ; str . append ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . encloseString ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . N_DELIVERYINTERVAL , settings . deliveryInterval ) ) ; str . append ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . COMMA ) ; str . append ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . encloseString ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . N_INBOXEXPIRY , settings . inboxExpiry ) ) ; str . append ( com . ibm . ws . jmx . connector . converter . JSONConverterTest . CLOSE_JSON ) ; try { converter . writeNotificationSettings ( out , settings ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( ( "Exception<sp>encountered<sp>" + e ) ) ; } } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( 128 ) ; sb . append ( getClass ( ) . getSimpleName ( ) ) ; sb . append ( '@' ) . append ( java . lang . Integer . toHexString ( hashCode ( ) ) ) ; sb . append ( "<sp>writing=" ) . append ( this . writing ) ; sb . append ( "<sp>closed=" ) . append ( this . closed ) ; sb . append ( "<sp>bufferedCount=" ) . append ( this . bufferedCount ) ; sb . append ( "<sp>bytesWritten=" ) . append ( this . bytesWritten ) ; sb . append ( "<sp>error=" ) . append ( this . error ) ; if ( null != ( this . output ) ) { sb . append ( "<sp>outindex=" ) . append ( this . outputIndex ) ; for ( int i = 0 ; i < ( this . output . length ) ; i ++ ) { sb . append ( "\r\n\t" ) . append ( this . output [ i ] ) ; } } return sb . toString ( ) ; }
|
org . junit . Assert . assertEquals ( out . toString ( ) , str . toString ( ) )
|
testBadRealm_PreHashedServer ( ) { java . util . Map < java . lang . String , java . lang . Object > serverProps = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; serverProps . put ( org . wildfly . security . sasl . digest . DigestTest . REALM_PROPERTY , "TestRealm" ) ; serverProps . put ( org . wildfly . security . sasl . digest . DigestTest . PRE_DIGESTED_PROPERTY , "true" ) ; javax . security . sasl . SaslServer server = new org . wildfly . security . sasl . test . SaslServerBuilder ( org . wildfly . security . sasl . digest . DigestServerFactory . class , org . wildfly . security . sasl . digest . DigestTest . DIGEST ) . setUserName ( "George" ) . setPassword ( DigestPassword . ALGORITHM_DIGEST_MD5 , getDigestKeySpec ( "George" , "gpwd" , "TestRealm" ) ) . setProperties ( serverProps ) . setProtocol ( "TestProtocol" ) . setServerName ( "TestServer" ) . build ( ) ; javax . security . auth . callback . CallbackHandler clientCallback = org . wildfly . security . sasl . digest . DigestCallbackHandlerUtils . createClearPwdClientCallbackHandler ( "George" , "gpwd" , "BadRealm" ) ; javax . security . sasl . SaslClient client = javax . security . sasl . Sasl . createSaslClient ( new java . lang . String [ ] { org . wildfly . security . sasl . digest . DigestTest . DIGEST } , "George" , "TestProtocol" , "TestServer" , java . util . Collections . < java . lang . String , java . lang . Object > emptyMap ( ) , clientCallback ) ; "<AssertPlaceHolder>" ; byte [ ] message = server . evaluateResponse ( new byte [ 0 ] ) ; org . wildfly . security . sasl . digest . DigestTest . log . debug ( ( "Challenge:" + ( new java . lang . String ( message , java . nio . charset . StandardCharsets . ISO_8859_1 ) ) ) ) ; message = client . evaluateChallenge ( message ) ; org . wildfly . security . sasl . digest . DigestTest . log . debug ( ( "Client<sp>response:" + ( new java . lang . String ( message , java . nio . charset . StandardCharsets . ISO_8859_1 ) ) ) ) ; try { server . evaluateResponse ( message ) ; org . junit . Assert . fail ( "Expection<sp>exception<sp>not<sp>thrown." ) ; } catch ( java . io . IOException e ) { } } hasInitialResponse ( ) { return delegate . hasInitialResponse ( ) ; }
|
org . junit . Assert . assertFalse ( client . hasInitialResponse ( ) )
|
testCombination3 ( ) { final de . ovgu . featureide . fm . core . base . IFeatureModel fm = loadXML ( ( "<alt<sp>name=\"S\">" + ( ( ( "<feature<sp>name=\"A\"/>" + "<feature<sp>name=\"B\"/>" ) + "<feature<sp>name=\"C\"/>" ) + "</alt>" ) ) ) ; final de . ovgu . featureide . fm . core . configuration . Configuration c = new de . ovgu . featureide . fm . core . configuration . Configuration ( fm ) ; "<AssertPlaceHolder>" ; } number ( ) { return number ( 250 , false ) ; }
|
org . junit . Assert . assertEquals ( 3 , c . number ( ) )
|
shouldCreateClientWhenDefaultAddrProvider ( ) { com . google . code . ssm . providers . CacheConfiguration conf = new com . google . code . ssm . providers . CacheConfiguration ( ) ; conf . setConsistentHashing ( false ) ; com . google . code . ssm . config . AddressProvider addrsProvider = new com . google . code . ssm . config . DefaultAddressProvider ( "127.0.0.1:11211" ) ; factory . setConfiguration ( conf ) ; factory . setAddressProvider ( addrsProvider ) ; factory . afterPropertiesSet ( ) ; com . google . code . ssm . Cache cache = factory . createCache ( ) ; "<AssertPlaceHolder>" ; verify ( cacheClientFactory ) . create ( addrsProvider . getAddresses ( ) , conf ) ; } createCache ( ) { if ( ( cache ) != null ) { throw new java . lang . IllegalStateException ( java . lang . String . format ( "This<sp>factory<sp>has<sp>already<sp>created<sp>memcached<sp>client<sp>for<sp>cache<sp>%s" , cacheName ) ) ; } if ( isCacheDisabled ( ) ) { com . google . code . ssm . CacheFactory . LOGGER . warn ( "Cache<sp>{}<sp>is<sp>disabled" , cacheName ) ; cache = ( ( com . google . code . ssm . Cache ) ( java . lang . reflect . Proxy . newProxyInstance ( com . google . code . ssm . Cache . class . getClassLoader ( ) , new java . lang . Class [ ] { com . google . code . ssm . Cache . class } , new com . google . code . ssm . DisabledCacheInvocationHandler ( cacheName , cacheAliases ) ) ) ) ; return cache ; } if ( ( configuration ) == null ) { throw new java . lang . RuntimeException ( java . lang . String . format ( "The<sp>MemcachedConnectionBean<sp>for<sp>cache<sp>%s<sp>must<sp>be<sp>defined!" , cacheName ) ) ; } java . util . List < java . net . InetSocketAddress > addrs = addressProvider . getAddresses ( ) ; cache = new com . google . code . ssm . CacheImpl ( cacheName , cacheAliases , createClient ( addrs ) , defaultSerializationType , jsonTranscoder , javaTranscoder , customTranscoder , new com . google . code . ssm . CacheProperties ( configuration . isUseNameAsKeyPrefix ( ) , configuration . getKeyPrefixSeparator ( ) ) ) ; return cache ; }
|
org . junit . Assert . assertNotNull ( cache )
|
addedTSLIsValid ( ) { org . digidoc4j . TSLCertificateSource source = this . configuration . getTSL ( ) ; this . addCertificateToTSL ( java . nio . file . Paths . get ( "src/test/resources/testFiles/certs/Juur-SK.pem.crt" ) , source ) ; this . addCertificateToTSL ( java . nio . file . Paths . get ( "src/test/resources/testFiles/certs/EE_Certification_Centre_Root_CA.pem.crt" ) , source ) ; this . addCertificateToTSL ( java . nio . file . Paths . get ( "src/test/resources/testFiles/certs/ESTEID-SK_2011.pem.crt" ) , source ) ; this . addCertificateToTSL ( java . nio . file . Paths . get ( "src/test/resources/testFiles/certs/SK_OCSP_RESPONDER_2011.pem.cer" ) , source ) ; this . addCertificateToTSL ( java . nio . file . Paths . get ( "src/test/resources/testFiles/certs/SK_TSA.pem.crt" ) , source ) ; org . digidoc4j . Container container = org . digidoc4j . ContainerOpener . open ( "src/test/resources/testFiles/valid-containers/test.asice" , this . configuration ) ; "<AssertPlaceHolder>" ; } validate ( ) { java . util . ArrayList errs = new java . util . ArrayList ( ) ; org . digidoc4j . ddoc . DigiDocException ex = null ; java . security . cert . X509Certificate cert = getRespondersCertificate ( ) ; if ( cert == null ) ex = validateRespondersCertificate ( cert ) ; if ( ex != null ) errs . add ( ex ) ; java . util . ArrayList e = null ; if ( ( m_certRefs ) != null ) { e = m_certRefs . validate ( ) ; if ( ! ( e . isEmpty ( ) ) ) errs . addAll ( e ) ; } if ( ( m_revRefs ) != null ) { e = m_revRefs . validate ( ) ; if ( ! ( e . isEmpty ( ) ) ) errs . addAll ( e ) ; } return errs ; }
|
org . junit . Assert . assertTrue ( container . validate ( ) . isValid ( ) )
|
testGetCurrentPageId ( ) { createRootPage ( "foo" ) ; com . eclipsesource . tabris . internal . ui . PageDescriptor page = createPage ( "bar" ) ; com . eclipsesource . tabris . internal . ui . RemoteUI remoteUI = mock ( com . eclipsesource . tabris . internal . ui . RemoteUI . class ) ; when ( remoteUI . getPageParent ( ) ) . thenReturn ( shell ) ; com . eclipsesource . tabris . internal . ui . Controller controller = new com . eclipsesource . tabris . internal . ui . Controller ( remoteUI , uiDescriptor ) ; controller . createRootPages ( ui ) ; controller . showPage ( ui , page , mock ( com . eclipsesource . tabris . ui . PageData . class ) ) ; java . lang . String currentPageId = controller . getCurrentPageId ( ) ; "<AssertPlaceHolder>" ; } getCurrentPageId ( ) { if ( ( currentFlow ) != null ) { return currentFlow . getCurrentRenderer ( ) . getDescriptor ( ) . getId ( ) ; } return null ; }
|
org . junit . Assert . assertEquals ( "bar" , currentPageId )
|
containsErrorWhenNoErrorButGroupAndFormatBlocks ( ) { org . xwiki . rendering . internal . transformation . macro . MacroErrorManager errorManager = new org . xwiki . rendering . internal . transformation . macro . MacroErrorManager ( this . componentManager . getInstance ( org . xwiki . rendering . util . ErrorBlockGenerator . class ) ) ; org . xwiki . rendering . block . XDOM xdom = new org . xwiki . rendering . block . XDOM ( java . util . Arrays . asList ( new org . xwiki . rendering . block . GroupBlock ( java . util . Arrays . asList ( new org . xwiki . rendering . block . FormatBlock ( java . util . Arrays . asList ( new org . xwiki . rendering . block . WordBlock ( "test" ) ) , org . xwiki . rendering . listener . Format . BOLD ) ) ) ) ) ; "<AssertPlaceHolder>" ; } containsError ( org . xwiki . rendering . block . XDOM ) { boolean foundError = false ; java . util . List < org . xwiki . rendering . block . Block > groupAndFormatBlocks = xdom . getBlocks ( new org . xwiki . rendering . block . match . OrBlockMatcher ( new org . xwiki . rendering . block . match . ClassBlockMatcher ( org . xwiki . rendering . block . GroupBlock . class ) , new org . xwiki . rendering . block . match . ClassBlockMatcher ( org . xwiki . rendering . block . FormatBlock . class ) ) , Block . Axes . DESCENDANT ) ; for ( org . xwiki . rendering . block . Block block : groupAndFormatBlocks ) { java . lang . String classParameter = block . getParameters ( ) . get ( ErrorBlockGenerator . CLASS_ATTRIBUTE_NAME ) ; if ( ( classParameter != null ) && ( classParameter . contains ( ErrorBlockGenerator . CLASS_ATTRIBUTE_MESSAGE_VALUE ) ) ) { foundError = true ; break ; } } return foundError ; }
|
org . junit . Assert . assertFalse ( errorManager . containsError ( xdom ) )
|
testShouldCreateNewPreviewOnUpdateAndCheckInWithContent ( ) { java . util . concurrent . atomic . AtomicInteger count = com . liferay . document . library . service . test . PDFProcessorTest . registerPDFProcessorMessageListener ( com . liferay . document . library . service . test . PDFProcessorTest . EventType . GENERATE_NEW ) ; com . liferay . portal . kernel . repository . model . FileEntry fileEntry = com . liferay . document . library . kernel . service . DLAppServiceUtil . addFileEntry ( _serviceContext . getScopeGroupId ( ) , DLFolderConstants . DEFAULT_PARENT_FOLDER_ID , ( ( com . liferay . portal . kernel . util . StringUtil . randomString ( ) ) + ".pdf" ) , ContentTypes . APPLICATION_PDF , com . liferay . portal . kernel . util . StringUtil . randomString ( ) , com . liferay . portal . kernel . util . StringUtil . randomString ( ) , com . liferay . portal . kernel . util . StringUtil . randomString ( ) , com . liferay . portal . kernel . util . FileUtil . getBytes ( getClass ( ) , "dependencies/test.pdf" ) , _serviceContext ) ; byte [ ] bytes = com . liferay . portal . kernel . util . FileUtil . getBytes ( getClass ( ) , "dependencies/test.pdf" ) ; java . io . InputStream inputStream = new java . io . ByteArrayInputStream ( bytes ) ; com . liferay . document . library . kernel . service . DLAppServiceUtil . updateFileEntryAndCheckIn ( fileEntry . getFileEntryId ( ) , ( ( com . liferay . portal . kernel . util . StringUtil . randomString ( ) ) + ".pdf" ) , ContentTypes . APPLICATION_PDF , com . liferay . portal . kernel . util . StringUtil . randomString ( ) , com . liferay . portal . kernel . util . StringUtil . randomString ( ) , com . liferay . portal . kernel . util . StringUtil . randomString ( ) , DLVersionNumberIncrease . MAJOR , inputStream , bytes . length , _serviceContext ) ; "<AssertPlaceHolder>" ; } get ( ) { return _byteBuffer . get ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , count . get ( ) )
|
collate ( ) { final java . util . List < java . lang . Integer > result = org . apache . commons . collections4 . FluentIterable . of ( iterableOdd ) . collate ( iterableEven ) . toList ( ) ; final java . util . List < java . lang . Integer > combinedList = new java . util . ArrayList ( ) ; org . apache . commons . collections4 . CollectionUtils . addAll ( combinedList , iterableOdd ) ; org . apache . commons . collections4 . CollectionUtils . addAll ( combinedList , iterableEven ) ; java . util . Collections . sort ( combinedList ) ; "<AssertPlaceHolder>" ; try { org . apache . commons . collections4 . FluentIterable . of ( iterableOdd ) . collate ( null ) . toList ( ) ; org . junit . Assert . fail ( "expecting<sp>NullPointerException" ) ; } catch ( final java . lang . NullPointerException npe ) { } } addAll ( java . util . Collection , java . lang . Iterable ) { if ( iterable instanceof java . util . Collection < ? > ) { return collection . addAll ( ( ( java . util . Collection < ? extends C > ) ( iterable ) ) ) ; } return org . apache . commons . collections4 . CollectionUtils . addAll ( collection , iterable . iterator ( ) ) ; }
|
org . junit . Assert . assertEquals ( combinedList , result )
|
getSubscriptionDetails_SubscriptionManagerPermissions ( ) { createdSubscription = createSubscription ( ) ; createdSubscription = org . oscm . ws . SubscriptionServiceWSTest . subscrServiceForSubManager . subscribeToService ( createdSubscription , org . oscm . ws . SubscriptionServiceWSTest . freeService , org . oscm . ws . SubscriptionServiceWSTest . usageLicences , null , null , new java . util . ArrayList < org . oscm . vo . VOUda > ( ) ) ; java . lang . String subId = createdSubscription . getSubscriptionId ( ) ; org . oscm . vo . VOSubscription subDetails = org . oscm . ws . SubscriptionServiceWSTest . subscrServiceForSubManager . getSubscriptionDetails ( subId ) ; "<AssertPlaceHolder>" ; } getSubscriptionId ( ) { return subscriptionId ; }
|
org . junit . Assert . assertEquals ( createdSubscription . getSubscriptionId ( ) , subDetails . getSubscriptionId ( ) )
|
testLearningStd ( ) { org . slc . sli . domain . Entity ls = helper . generateLearningStandard ( ) ; "<AssertPlaceHolder>" ; } canAccess ( org . slc . sli . domain . Entity ) { return canAccess ( entity , true ) ; }
|
org . junit . Assert . assertTrue ( validator . canAccess ( ls ) )
|
shouldFindAllWithIds ( ) { repository . save ( person ) ; final java . lang . Iterable < com . github . jloisel . reactive . repository . couchbase . it . Person > findAll = repository . findAll ( com . google . common . collect . ImmutableList . of ( person . getId ( ) ) ) ; "<AssertPlaceHolder>" ; } findAll ( java . lang . Iterable ) { return blocking ( async . findAll ( ids ) . toList ( ) ) . single ( ) ; }
|
org . junit . Assert . assertEquals ( com . google . common . collect . ImmutableList . of ( person ) , findAll )
|
optionalBeanLookup ( ) { org . apache . deltaspike . test . core . api . provider . NoBean result = org . apache . deltaspike . core . api . provider . BeanProvider . getContextualReference ( org . apache . deltaspike . test . core . api . provider . NoBean . class , true ) ; "<AssertPlaceHolder>" ; } getContextualReference ( java . lang . Class , java . lang . annotation . Annotation [ ] ) { return org . apache . deltaspike . core . api . provider . BeanProvider . getContextualReference ( type , false , qualifiers ) ; }
|
org . junit . Assert . assertNull ( result )
|
testConvertWithNoRelations ( ) { java . util . Date begDate = new java . util . Date ( ) ; java . util . Date endDate = new java . util . Date ( ) ; java . lang . Long id = 1L ; java . lang . String identifier = "identifier" ; java . lang . String identifier1 = "identifier1" ; java . lang . String identifier2 = "identifier2" ; java . lang . String identifier3 = "identifier3" ; java . lang . String name = "name1" ; org . lnu . is . domain . admin . unit . AdminUnit expected = new org . lnu . is . domain . admin . unit . AdminUnit ( ) ; expected . setBegDate ( begDate ) ; expected . setEndDate ( endDate ) ; expected . setId ( id ) ; expected . setIdentifier ( identifier ) ; expected . setIdentifier1 ( identifier1 ) ; expected . setIdentifier2 ( identifier2 ) ; expected . setIdentifier3 ( identifier3 ) ; expected . setName ( name ) ; org . lnu . is . resource . adminunit . AdminUnitResource source = new org . lnu . is . resource . adminunit . AdminUnitResource ( ) ; source . setBegDate ( begDate ) ; source . setEndDate ( endDate ) ; source . setId ( id ) ; source . setIdentifier ( identifier ) ; source . setIdentifier1 ( identifier1 ) ; source . setIdentifier2 ( identifier2 ) ; source . setIdentifier3 ( identifier3 ) ; source . setName ( name ) ; org . lnu . is . domain . admin . unit . AdminUnit actual = unit . convert ( source ) ; "<AssertPlaceHolder>" ; } convert ( org . lnu . is . domain . admin . unit . AdminUnit ) { return convert ( source , new org . lnu . is . resource . adminunit . AdminUnitResource ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
root_help_nested ( ) { com . asakusafw . utils . jcommander . JCommanderWrapper < java . util . function . Supplier < java . lang . String > > commander = new com . asakusafw . utils . jcommander . JCommanderWrapper ( "PG" , new com . asakusafw . utils . jcommander . JCommanderWrapperTest . Cmd ( "R" ) ) ; commander . addGroup ( "g" , new com . asakusafw . utils . jcommander . JCommanderWrapperTest . Cmd ( "G" ) , ( g ) -> { g . addCommand ( "a" , new com . asakusafw . utils . jcommander . Cmd ( "OK" ) ) ; } ) ; java . util . Optional < java . lang . String > result = commander . parse ( "-h" ) . map ( Supplier :: get ) ; "<AssertPlaceHolder>" ; } is ( java . lang . String ) { com . asakusafw . dmdl . java . util . JavaName jn = com . asakusafw . dmdl . java . util . JavaName . of ( new com . asakusafw . dmdl . model . AstSimpleName ( null , name ) ) ; jn . addFirst ( "is" ) ; java . lang . Object result = invoke ( jn . toMemberName ( ) ) ; return ( ( java . lang . Boolean ) ( result ) ) ; }
|
org . junit . Assert . assertThat ( result , is ( java . util . Optional . empty ( ) ) )
|
testCellarEventFeatureInstall ( ) { installCellar ( ) ; java . lang . Thread . sleep ( org . apache . karaf . cellar . itests . DEFAULT_TIMEOUT ) ; org . apache . karaf . cellar . core . ClusterManager clusterManager = getOsgiService ( org . apache . karaf . cellar . core . ClusterManager . class ) ; "<AssertPlaceHolder>" ; System . err . println ( executeCommand ( "features:install<sp>cellar-event" ) ) ; } getOsgiService ( java . lang . Class ) { return getOsgiService ( type , null , org . apache . karaf . cellar . itests . CellarTestSupport . SERVICE_TIMEOUT ) ; }
|
org . junit . Assert . assertNotNull ( clusterManager )
|
testRestTransportClientHttp2 ( io . vertx . core . Vertx , org . apache . servicecomb . foundation . vertx . VertxUtils ) { boolean status = true ; org . mockito . Mockito . when ( invocation . getEndpoint ( ) ) . thenReturn ( endPoint ) ; org . mockito . Mockito . when ( invocation . isSync ( ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( endPoint . getAddress ( ) ) . thenReturn ( uriEndpointObject ) ; org . mockito . Mockito . when ( uriEndpointObject . isHttp2Enabled ( ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( invocation . getOperationMeta ( ) ) . thenReturn ( operationMeta ) ; org . mockito . Mockito . when ( operationMeta . getExtData ( RestConst . SWAGGER_REST_OPERATION ) ) . thenReturn ( operationMeta ) ; org . mockito . Mockito . when ( httpClientWithContext . getHttpClient ( ) ) . thenReturn ( httpClient ) ; org . mockito . Mockito . when ( httpClient . getOptions ( ) ) . thenReturn ( httpClientOptions ) ; instance . init ( vertx ) ; java . lang . reflect . Field clientMgrHttp2Field = instance . getClass ( ) . getDeclaredField ( "clientMgrHttp2" ) ; clientMgrHttp2Field . setAccessible ( true ) ; org . apache . servicecomb . foundation . vertx . client . ClientPoolManager < org . apache . servicecomb . foundation . vertx . client . http . HttpClientWithContext > client = new org . apache . servicecomb . foundation . vertx . client . ClientPoolManager < org . apache . servicecomb . foundation . vertx . client . http . HttpClientWithContext > ( vertx , null ) { @ mockit . Mock public org . apache . servicecomb . foundation . vertx . client . http . HttpClientWithContext findClientPool ( boolean sync ) { return httpClientWithContext ; } } ; clientMgrHttp2Field . set ( instance , client ) ; try { instance . send ( invocation , asyncResp ) ; } catch ( java . lang . Exception e ) { status = false ; } "<AssertPlaceHolder>" ; } send ( org . apache . servicecomb . foundation . vertx . client . tcp . AbstractTcpClientPackage , org . apache . servicecomb . foundation . vertx . client . tcp . TcpResponseCallback ) { requestMap . put ( tcpClientPackage . getMsgId ( ) , new org . apache . servicecomb . foundation . vertx . client . tcp . TcpRequest ( tcpClientPackage . getMsRequestTimeout ( ) , callback ) ) ; if ( writeToBufferQueue ( tcpClientPackage ) ) { return ; } context . runOnContext ( ( v ) -> { if ( ! ( writeToBufferQueue ( tcpClientPackage ) ) ) { packageQueue . add ( tcpClientPackage ) ; } if ( Status . DISCONNECTED . equals ( status ) ) { connect ( ) ; } } ) ; }
|
org . junit . Assert . assertTrue ( status )
|
testAnnotationAndShadowClassRetentionPolicy ( ) { final spoon . Launcher launcher = new spoon . Launcher ( ) ; launcher . addInputResource ( "./src/test/java/spoon/test/annotation/testclasses/shadow" ) ; spoon . reflect . CtModel model = launcher . buildModel ( ) ; spoon . reflect . declaration . CtClass < ? > dumbKlass = model . getElements ( new spoon . reflect . visitor . filter . NamedElementFilter ( spoon . reflect . declaration . CtClass . class , "DumbKlass" ) ) . get ( 0 ) ; spoon . reflect . declaration . CtMethod < ? > fooMethod = dumbKlass . getMethodsByName ( "fooClass" ) . get ( 0 ) ; final spoon . reflect . factory . Factory shadowFactory = spoon . testing . utils . ModelUtils . createFactory ( ) ; spoon . reflect . declaration . CtType < ? > shadowDumbKlass = shadowFactory . Type ( ) . get ( spoon . test . annotation . testclasses . shadow . DumbKlass . class ) ; spoon . reflect . declaration . CtMethod < ? > shadowFooMethod = shadowDumbKlass . getMethodsByName ( "fooClass" ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getAnnotations ( ) { if ( ( this ) instanceof spoon . reflect . declaration . CtShadowable ) { spoon . reflect . declaration . CtShadowable shadowable = ( ( spoon . reflect . declaration . CtShadowable ) ( this ) ) ; if ( shadowable . isShadow ( ) ) { spoon . Launcher . LOGGER . debug ( ( "Some<sp>annotations<sp>might<sp>be<sp>unreachable<sp>from<sp>the<sp>shadow<sp>element:<sp>" + ( this . getShortRepresentation ( ) ) ) ) ; } } return spoon . support . reflect . declaration . CtElementImpl . unmodifiableList ( annotations ) ; }
|
org . junit . Assert . assertEquals ( 0 , shadowFooMethod . getAnnotations ( ) . size ( ) )
|
testCompareByTimestamp ( ) { org . joda . time . Instant firstTimestamp = new org . joda . time . Instant ( 100 ) ; org . joda . time . Instant secondTimestamp = new org . joda . time . Instant ( 200 ) ; org . apache . beam . runners . core . StateNamespace namespace = org . apache . beam . runners . core . StateNamespaces . global ( ) ; org . apache . beam . runners . core . TimerInternals . TimerData firstTimer = org . apache . beam . runners . core . TimerInternals . TimerData . of ( namespace , firstTimestamp , TimeDomain . EVENT_TIME ) ; org . apache . beam . runners . core . TimerInternals . TimerData secondTimer = org . apache . beam . runners . core . TimerInternals . TimerData . of ( namespace , secondTimestamp , TimeDomain . EVENT_TIME ) ; "<AssertPlaceHolder>" ; } lessThan ( T extends org . apache . beam . sdk . transforms . Comparable ) { return org . apache . beam . sdk . transforms . Filter . by ( ( ( org . apache . beam . sdk . transforms . ProcessFunction < T , java . lang . Boolean > ) ( ( input ) -> ( input . compareTo ( value ) ) < 0 ) ) ) . described ( java . lang . String . format ( "x<sp><<sp>%s" , value ) ) ; }
|
org . junit . Assert . assertThat ( firstTimer , org . hamcrest . Matchers . lessThan ( secondTimer ) )
|
testZoomIn ( ) { org . eclipse . gef . cloudio . internal . ui . TagCloud cloud = new org . eclipse . gef . cloudio . internal . ui . TagCloud ( composite , org . eclipse . swt . SWT . NONE ) ; cloud . setWords ( java . util . Arrays . asList ( getWord ( ) ) , null ) ; double zoom = cloud . getZoom ( ) ; cloud . zoomIn ( ) ; "<AssertPlaceHolder>" ; } getZoom ( ) { checkWidget ( ) ; return currentZoom ; }
|
org . junit . Assert . assertTrue ( ( ( cloud . getZoom ( ) ) > zoom ) )
|
testGetGraphDisplayPanel ( ) { System . out . println ( "getGraphDisplayPanel" ) ; kg . apc . jmeter . vizualizers . JCompositeRowsSelectorPanel instance = new kg . apc . jmeter . vizualizers . JCompositeRowsSelectorPanel ( new kg . apc . jmeter . vizualizers . CompositeModel ( ) , new kg . apc . jmeter . vizualizers . CompositeGraphGui ( ) ) ; javax . swing . JPanel result = instance . getGraphDisplayPanel ( ) ; "<AssertPlaceHolder>" ; } getGraphDisplayPanel ( ) { return jPanelGraphPreview ; }
|
org . junit . Assert . assertNotNull ( result )
|
testSuccess ( ) { int exitCode = executeAsFile ( new java . lang . String [ ] { org . jboss . as . test . integration . management . cli . FileArgumentTestCase . SET_PROP_COMMAND } , true ) ; if ( exitCode == 0 ) { executeAsFile ( new java . lang . String [ ] { org . jboss . as . test . integration . management . cli . FileArgumentTestCase . REMOVE_PROP_COMMAND } , true ) ; } "<AssertPlaceHolder>" ; } executeAsFile ( java . lang . String [ ] , boolean ) { createFile ( cmd ) ; return execute ( org . jboss . as . test . integration . management . cli . FileArgumentTestCase . TMP_FILE , logFailure ) ; }
|
org . junit . Assert . assertEquals ( 0 , exitCode )
|
testInsertGetCmdlet ( ) { org . smartdata . model . CmdletInfo cmdlet1 = new org . smartdata . model . CmdletInfo ( 0 , 1 , org . smartdata . model . CmdletState . EXECUTING , "test" , 123123333L , 232444444L ) ; org . smartdata . model . CmdletInfo cmdlet2 = new org . smartdata . model . CmdletInfo ( 1 , 78 , org . smartdata . model . CmdletState . PAUSED , "tt" , 123178333L , 232444994L ) ; cmdletDao . insert ( new org . smartdata . model . CmdletInfo [ ] { cmdlet1 , cmdlet2 } ) ; java . util . List < org . smartdata . model . CmdletInfo > cmdlets = cmdletDao . getAll ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
|
org . junit . Assert . assertTrue ( ( ( cmdlets . size ( ) ) == 2 ) )
|
testGetSubjectMatterExpertByKey ( ) { org . finra . herd . model . api . xml . SubjectMatterExpertKey subjectMatterExpertKey = new org . finra . herd . model . api . xml . SubjectMatterExpertKey ( org . finra . herd . dao . AbstractDaoTest . USER_ID ) ; org . finra . herd . model . api . xml . SubjectMatterExpertContactDetails subjectMatterExpertContactDetails = new org . finra . herd . model . api . xml . SubjectMatterExpertContactDetails ( org . finra . herd . dao . AbstractDaoTest . USER_FULL_NAME , org . finra . herd . dao . AbstractDaoTest . USER_JOB_TITLE , org . finra . herd . dao . AbstractDaoTest . USER_EMAIL_ADDRESS , org . finra . herd . dao . AbstractDaoTest . USER_TELEPHONE_NUMBER ) ; when ( configurationHelper . getProperty ( ConfigurationValue . LDAP_URL ) ) . thenReturn ( org . finra . herd . dao . AbstractDaoTest . LDAP_URL ) ; when ( configurationHelper . getProperty ( ConfigurationValue . LDAP_BASE ) ) . thenReturn ( org . finra . herd . dao . AbstractDaoTest . LDAP_BASE ) ; when ( configurationHelper . getProperty ( ConfigurationValue . LDAP_USER_DN ) ) . thenReturn ( org . finra . herd . dao . AbstractDaoTest . LDAP_USER_DN ) ; when ( configurationHelper . getProperty ( ConfigurationValue . CREDSTASH_HERD_ENCRYPTION_CONTEXT ) ) . thenReturn ( org . finra . herd . dao . AbstractDaoTest . CREDSTASH_ENCRYPTION_CONTEXT ) ; when ( configurationHelper . getProperty ( ConfigurationValue . LDAP_USER_CREDENTIAL_NAME ) ) . thenReturn ( org . finra . herd . dao . AbstractDaoTest . USER_CREDENTIAL_NAME ) ; when ( credStashHelper . getCredentialFromCredStash ( org . finra . herd . dao . AbstractDaoTest . CREDSTASH_ENCRYPTION_CONTEXT , org . finra . herd . dao . AbstractDaoTest . USER_CREDENTIAL_NAME ) ) . thenReturn ( org . finra . herd . dao . AbstractDaoTest . PASSWORD ) ; when ( configurationHelper . getProperty ( ConfigurationValue . LDAP_ATTRIBUTE_USER_ID ) ) . thenReturn ( org . finra . herd . dao . AbstractDaoTest . LDAP_ATTRIBUTE_USER_ID ) ; when ( configurationHelper . getProperty ( ConfigurationValue . LDAP_ATTRIBUTE_USER_FULL_NAME ) ) . thenReturn ( org . finra . herd . dao . AbstractDaoTest . LDAP_ATTRIBUTE_USER_FULL_NAME ) ; when ( configurationHelper . getProperty ( ConfigurationValue . LDAP_ATTRIBUTE_USER_JOB_TITLE ) ) . thenReturn ( org . finra . herd . dao . AbstractDaoTest . LDAP_ATTRIBUTE_USER_JOB_TITLE ) ; when ( configurationHelper . getProperty ( ConfigurationValue . LDAP_ATTRIBUTE_USER_EMAIL_ADDRESS ) ) . thenReturn ( org . finra . herd . dao . AbstractDaoTest . LDAP_ATTRIBUTE_USER_EMAIL_ADDRESS ) ; when ( configurationHelper . getProperty ( ConfigurationValue . LDAP_ATTRIBUTE_USER_TELEPHONE_NUMBER ) ) . thenReturn ( org . finra . herd . dao . AbstractDaoTest . LDAP_ATTRIBUTE_USER_TELEPHONE_NUMBER ) ; when ( ldapOperations . search ( any ( org . springframework . ldap . core . LdapTemplate . class ) , any ( org . springframework . ldap . query . LdapQuery . class ) , any ( SubjectMatterExpertDaoImpl . SubjectMatterExpertContactDetailsMapper . class ) ) ) . thenReturn ( java . util . Collections . singletonList ( subjectMatterExpertContactDetails ) ) ; org . finra . herd . model . api . xml . SubjectMatterExpertContactDetails result = subjectMatterExpertDaoImpl . getSubjectMatterExpertByKey ( subjectMatterExpertKey ) ; "<AssertPlaceHolder>" ; verify ( configurationHelper ) . getProperty ( ConfigurationValue . LDAP_URL ) ; verify ( configurationHelper ) . getProperty ( ConfigurationValue . LDAP_BASE ) ; verify ( configurationHelper ) . getProperty ( ConfigurationValue . LDAP_USER_DN ) ; verify ( configurationHelper ) . getProperty ( ConfigurationValue . CREDSTASH_HERD_ENCRYPTION_CONTEXT ) ; verify ( configurationHelper ) . getProperty ( ConfigurationValue . LDAP_USER_CREDENTIAL_NAME ) ; verify ( credStashHelper ) . getCredentialFromCredStash ( org . finra . herd . dao . AbstractDaoTest . CREDSTASH_ENCRYPTION_CONTEXT , org . finra . herd . dao . AbstractDaoTest . USER_CREDENTIAL_NAME ) ; verify ( configurationHelper ) . getProperty ( ConfigurationValue . LDAP_ATTRIBUTE_USER_ID ) ; verify ( configurationHelper ) . getProperty ( ConfigurationValue . LDAP_ATTRIBUTE_USER_FULL_NAME ) ; verify ( configurationHelper ) . getProperty ( ConfigurationValue . LDAP_ATTRIBUTE_USER_JOB_TITLE ) ; verify ( configurationHelper ) . getProperty ( ConfigurationValue . LDAP_ATTRIBUTE_USER_EMAIL_ADDRESS ) ; verify ( configurationHelper ) . getProperty ( ConfigurationValue . LDAP_ATTRIBUTE_USER_TELEPHONE_NUMBER ) ; verify ( ldapOperations ) . search ( any ( org . springframework . ldap . core . LdapTemplate . class ) , any ( org . springframework . ldap . query . LdapQuery . class ) , any ( SubjectMatterExpertDaoImpl . SubjectMatterExpertContactDetailsMapper . class ) ) ; verifyNoMoreInteractionsHelper ( ) ; } getSubjectMatterExpertByKey ( org . finra . herd . model . api . xml . SubjectMatterExpertKey ) { final java . lang . String ldapUrl = configurationHelper . getProperty ( ConfigurationValue . LDAP_URL ) ; final java . lang . String ldapBase = configurationHelper . getProperty ( ConfigurationValue . LDAP_BASE ) ; final java . lang . String ldapUserDn = configurationHelper . getProperty ( ConfigurationValue . LDAP_USER_DN ) ; final java . lang . String credStashEncryptionContext = configurationHelper . getProperty ( ConfigurationValue . CREDSTASH_HERD_ENCRYPTION_CONTEXT ) ; final java . lang . String ldapUserCredentialName = configurationHelper . getProperty ( ConfigurationValue . LDAP_USER_CREDENTIAL_NAME ) ; org . finra . herd . dao . impl . SubjectMatterExpertDaoImpl . LOGGER . info ( "Creating<sp>LDAP<sp>context<sp>source<sp>using<sp>the<sp>following<sp>parameters:<sp>{}=\"{}\"<sp>{}=\"{}\"<sp>{}=\"{}\"<sp>{}=\"{}\"<sp>{}=\"{}\"..." , ConfigurationValue . LDAP_URL . getKey ( ) , ldapUrl , ConfigurationValue . LDAP_BASE . getKey ( ) , ldapBase , ConfigurationValue . LDAP_USER_DN . getKey ( ) , ldapUserDn , ConfigurationValue . CREDSTASH_HERD_ENCRYPTION_CONTEXT . getKey ( ) , credStashEncryptionContext , ConfigurationValue . LDAP_USER_CREDENTIAL_NAME . getKey ( ) , ldapUserCredentialName ) ; java . lang . String ldapUserPassword ; try { ldapUserPassword = credStashHelper . getCredentialFromCredStash ( credStashEncryptionContext , ldapUserCredentialName ) ; } catch ( org . finra . herd . dao . exception . CredStashGetCredentialFailedException e ) { throw new java . lang . IllegalStateException ( e ) ; } org . springframework . ldap . core . support . LdapContextSource contextSource = new org . springframework . ldap . core . support . LdapContextSource ( ) ; contextSource . setUrl ( ldapUrl ) ; contextSource . setBase ( ldapBase ) ; contextSource . setUserDn ( ldapUserDn )
|
org . junit . Assert . assertEquals ( subjectMatterExpertContactDetails , result )
|
testSetName ( ) { java . lang . String name = "name" ; org . owasp . dependencycheck . xml . pom . Model instance = new org . owasp . dependencycheck . xml . pom . Model ( ) ; instance . setName ( name ) ; "<AssertPlaceHolder>" ; } getName ( ) { return "test-project" ; }
|
org . junit . Assert . assertEquals ( "name" , instance . getName ( ) )
|
testCoverageHashLength ( ) { com . github . davidmoten . geo . Coverage coverage = new com . github . davidmoten . geo . Coverage ( com . google . common . collect . Sets . < java . lang . String > newHashSet ( ) , 1.0 ) ; "<AssertPlaceHolder>" ; System . out . println ( coverage ) ; } getHashLength ( ) { if ( ( hashes . size ( ) ) == 0 ) return 0 ; else return hashes . iterator ( ) . next ( ) . length ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , coverage . getHashLength ( ) )
|
getExpiryTimeMissingNode ( ) { org . talend . esb . servicelocator . client . internal . NodePath expiryPath = endpointNode . child ( org . talend . esb . servicelocator . client . internal . zk . EndpointNodeImpl . TIMETOLIVE ) ; expect ( backend . nodeExists ( expiryPath ) ) . andReturn ( false ) ; replay ( backend ) ; java . util . Date answer = endpointNode . getExpiryTime ( ) ; "<AssertPlaceHolder>" ; verify ( backend ) ; } getExpiryTime ( ) { org . talend . esb . servicelocator . client . internal . NodePath expNodePath = child ( org . talend . esb . servicelocator . client . internal . zk . EndpointNodeImpl . TIMETOLIVE ) ; if ( ! ( zkBackend . nodeExists ( expNodePath ) ) ) { return null ; } byte [ ] content = zkBackend . getContent ( expNodePath ) ; java . lang . String strTime = new java . lang . String ( content , org . talend . esb . servicelocator . client . internal . zk . EndpointNodeImpl . UTF8 ) ; return new java . util . Date ( java . lang . Long . valueOf ( strTime ) ) ; }
|
org . junit . Assert . assertNull ( answer )
|
existingDocumentFromUITemplateProviderSpecifiedRestrictionExistsOnParentSpace ( ) { org . xwiki . model . reference . DocumentReference documentReference = new org . xwiki . model . reference . DocumentReference ( "WebHome" 2 , java . util . Arrays . asList ( "WebHome" 0 ) , "WebHome" ) ; com . xpn . xwiki . doc . XWikiDocument document = mock ( com . xpn . xwiki . doc . XWikiDocument . class ) ; when ( document . getDocumentReference ( ) ) . thenReturn ( documentReference ) ; when ( document . isNew ( ) ) . thenReturn ( false ) ; context . setDoc ( document ) ; java . lang . String templateProviderFullName = "WebHome" 3 ; java . lang . String spaceReferenceString = "X.Y.Z" ; when ( mockRequest . getParameter ( "WebHome" 4 ) ) . thenReturn ( spaceReferenceString ) ; when ( mockRequest . getParameter ( "name" ) ) . thenReturn ( "W" ) ; when ( mockRequest . getParameter ( "templateprovider" ) ) . thenReturn ( templateProviderFullName ) ; mockExistingTemplateProviders ( templateProviderFullName , new org . xwiki . model . reference . DocumentReference ( "WebHome" 2 , java . util . Arrays . asList ( "XWiki" ) , "MyTemplateProvider" ) , java . util . Arrays . asList ( "X" ) ) ; java . lang . String result = action . render ( context ) ; "<AssertPlaceHolder>" ; verify ( mockURLFactory ) . createURL ( "X.Y.Z.W" , "WebHome" , "edit" , "WebHome" 1 , null , "WebHome" 2 , context ) ; } render ( com . xpn . xwiki . XWikiContext ) { com . xpn . xwiki . web . XWikiRequest request = context . getRequest ( ) ; java . lang . String path = request . getRequestURI ( ) ; java . lang . String filename = com . xpn . xwiki . util . Util . decodeURI ( path . substring ( ( ( path . lastIndexOf ( "/" ) ) + 1 ) ) , context ) ; try { ( ( com . xpn . xwiki . plugin . charts . ChartingPluginApi ) ( context . getWiki ( ) . getPluginApi ( "charting" , context ) ) ) . outputFile ( filename , context ) ; } catch ( java . io . IOException e ) { throw new com . xpn . xwiki . XWikiException ( com . xpn . xwiki . XWikiException . MODULE_XWIKI_APP , com . xpn . xwiki . XWikiException . ERROR_XWIKI_APP_SEND_RESPONSE_EXCEPTION , "Exception<sp>while<sp>sending<sp>response" , e ) ; } return null ; }
|
org . junit . Assert . assertNull ( result )
|
shouldPersist ( ) { nativeCommands . set ( org . springframework . data . redis . connection . lettuce . KEY_1 , org . springframework . data . redis . connection . lettuce . VALUE_1 , SetArgs . Builder . ex ( 10 ) ) ; reactor . test . StepVerifier . create ( connection . keyCommands ( ) . persist ( org . springframework . data . redis . connection . lettuce . KEY_1_BBUFFER ) ) . expectNext ( true ) . expectComplete ( ) . verify ( ) ; "<AssertPlaceHolder>" ; } ttl ( java . lang . String ) { return ttl ( serialize ( key ) ) ; }
|
org . junit . Assert . assertThat ( nativeCommands . ttl ( org . springframework . data . redis . connection . lettuce . KEY_1 ) , is ( ( - 1L ) ) )
|
testSubtemplateSeparator ( ) { org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroup ( ) ; group . defineTemplate ( "test" , "name,sep" , "hi<sp><name;<sp>separator={<sep><sp>_}>!" ) ; org . stringtemplate . v4 . ST st = group . getInstanceOf ( "test" ) ; st . add ( "sep" , "," ) ; st . add ( "name" , "Ter" ) ; st . add ( "name" , "Tom" ) ; st . add ( "name" , "Sumana" ) ; java . lang . String expected = "hi<sp>Ter,<sp>_Tom,<sp>_Sumana!" ; java . lang . String result = st . render ( ) ; "<AssertPlaceHolder>" ; } render ( ) { return render ( java . util . Locale . getDefault ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
testLineBreaks ( ) { java . lang . String script = "1\\n2" ; java . lang . String response = doRestCall ( script , javax . ws . rs . core . Response . Status . OK ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( response . contains ( "2" ) )
|
test_RegisterHandler_NonNull_Null ( ) { final com . b2international . snowowl . eventbus . IEventBus actual = bus . registerHandler ( com . b2international . snowowl . internal . eventbus . ADDRESS , null ) ; "<AssertPlaceHolder>" ; } registerHandler ( java . lang . String , com . b2international . snowowl . eventbus . IHandler ) { if ( isActive ( ) ) { registerHandler ( address , handler , false , false ) ; } return this ; }
|
org . junit . Assert . assertEquals ( bus , actual )
|
testOptionsOptions ( ) { org . apache . empire . commons . Options options = new org . apache . empire . commons . Options ( ) ; options . add ( new java . lang . Object ( ) , "text" , true ) ; org . apache . empire . commons . Options options2 = new org . apache . empire . commons . Options ( options ) ; "<AssertPlaceHolder>" ; } size ( ) { return list . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , options2 . size ( ) )
|
permissions ( ) { "<AssertPlaceHolder>" ; } permissions ( ) { org . junit . Assert . assertThat ( facebook . permissions ( ) , org . hamcrest . CoreMatchers . instanceOf ( facebook4j . PermissionMethods . class ) ) ; }
|
org . junit . Assert . assertThat ( facebook . permissions ( ) , org . hamcrest . CoreMatchers . instanceOf ( facebook4j . PermissionMethods . class ) )
|
noDataSent ( ) { byte [ ] output = rule . getOutput ( ) ; rule . after ( ) ; "<AssertPlaceHolder>" ; } after ( ) { com . hotels . bdp . circustrain . common . test . junit . rules . ServerSocketRule . LOG . info ( "Socket<sp>closing,<sp>handled<sp>{}<sp>requests" , requests ) ; try { serverSocketChannel . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } }
|
org . junit . Assert . assertThat ( output , org . hamcrest . CoreMatchers . is ( new byte [ 0 ] ) )
|
testList ( ) { com . google . common . reflect . TypeToken < java . util . List < java . lang . Long > > type = new com . google . common . reflect . TypeToken < java . util . List < java . lang . Long > > ( ) { } ; java . io . PipedOutputStream os = new java . io . PipedOutputStream ( ) ; java . io . PipedInputStream is = new java . io . PipedInputStream ( os ) ; java . util . List < java . lang . Long > writeValue = com . google . common . collect . ImmutableList . of ( 1L , 10L , 100L , 1000L ) ; io . cdap . cdap . common . io . DatumWriter < java . util . List < java . lang . Long > > writer = getWriter ( type ) ; writer . encode ( writeValue , new io . cdap . cdap . common . io . BinaryEncoder ( os ) ) ; io . cdap . cdap . internal . io . ReflectionDatumReader < java . util . List < java . lang . Long > > reader = new io . cdap . cdap . internal . io . ReflectionDatumReader ( getSchema ( type ) , type ) ; java . util . List < java . lang . Long > value = reader . read ( new io . cdap . cdap . common . io . BinaryDecoder ( is ) , getSchema ( type ) ) ; "<AssertPlaceHolder>" ; } getSchema ( io . cdap . cdap . api . dataset . DatasetProperties ) { return io . cdap . cdap . api . dataset . table . TableProperties . getSchema ( props . getProperties ( ) ) ; }
|
org . junit . Assert . assertEquals ( writeValue , value )
|
testExtensionsValidatorCorrect ( ) { com . ibm . ws . microprofile . openapi . impl . validation . ExtensionValidator validator = com . ibm . ws . microprofile . openapi . impl . validation . ExtensionValidator . getInstance ( ) ; com . ibm . ws . microprofile . openapi . test . utils . TestValidationHelper vh = new com . ibm . ws . microprofile . openapi . test . utils . TestValidationHelper ( ) ; java . lang . String extension = "x-testExtensionValue" ; validator . validate ( vh , context , extension , null ) ; "<AssertPlaceHolder>" ; } getEventsSize ( ) { return result . getEvents ( ) . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , vh . getEventsSize ( ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.