input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testSerializationSignerLocation ( ) { eu . europa . esig . dss . SignerLocation signerLocation = new eu . europa . esig . dss . SignerLocation ( ) ; signerLocation . setCountry ( "country" ) ; signerLocation . setLocality ( "locality" ) ; java . util . List < java . lang . String > postalAddress = new java . util . ArrayList < java . lang . String > ( ) ; postalAddress . add ( "Postal<sp>address" ) ; signerLocation . setPostalAddress ( postalAddress ) ; signerLocation . setPostalCode ( "postal<sp>code" ) ; signerLocation . setStateOrProvince ( "state" ) ; byte [ ] serialized = eu . europa . esig . dss . SerializationTest . serialize ( signerLocation ) ; eu . europa . esig . dss . SignerLocation unserialized = eu . europa . esig . dss . SerializationTest . unserialize ( serialized , eu . europa . esig . dss . SignerLocation . class ) ; "<AssertPlaceHolder>" ; } unserialize ( byte [ ] , java . lang . Class ) { java . io . ByteArrayInputStream bais = new java . io . ByteArrayInputStream ( b ) ; java . io . ObjectInputStream ois = new java . io . ObjectInputStream ( bais ) ; java . lang . Object o = ois . readObject ( ) ; return clazz . cast ( o ) ; }
|
org . junit . Assert . assertEquals ( signerLocation , unserialized )
|
array_range_projection_with_match ( ) { com . redhat . lightblue . query . Projection p = com . redhat . lightblue . eval . EvalTestContext . projectionFromJson ( "{'field':'field7','range':[1,2],'project':{'field':'elemf3'}}" ) ; com . redhat . lightblue . eval . Projector projector = com . redhat . lightblue . eval . Projector . getInstance ( p , md ) ; com . fasterxml . jackson . databind . JsonNode expectedNode = com . redhat . lightblue . util . JsonUtils . json ( "{'field7':[{'elemf3':4},{'elemf3':5}]}" . replace ( '\'' , '\"' ) ) ; com . redhat . lightblue . util . JsonDoc pdoc = projector . project ( jsonDoc , com . redhat . lightblue . eval . JSON_NODE_FACTORY ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ops [ 0 ] ; }
|
org . junit . Assert . assertEquals ( expectedNode . toString ( ) , pdoc . toString ( ) )
|
testProducesHistoryServerUriForAppId ( ) { final java . lang . String historyAddress = "example.net:424242" ; org . apache . hadoop . yarn . conf . YarnConfiguration conf = new org . apache . hadoop . yarn . conf . YarnConfiguration ( ) ; conf . set ( JHAdminConfig . MR_HISTORY_WEBAPP_ADDRESS , historyAddress ) ; org . apache . hadoop . mapreduce . v2 . hs . webapp . MapReduceTrackingUriPlugin plugin = new org . apache . hadoop . mapreduce . v2 . hs . webapp . MapReduceTrackingUriPlugin ( ) ; plugin . setConf ( conf ) ; org . apache . hadoop . yarn . api . records . ApplicationId id = org . apache . hadoop . yarn . api . records . ApplicationId . newInstance ( 6384623L , 5 ) ; java . lang . String jobSuffix = id . toString ( ) . replaceFirst ( "^application_" , "job_" ) ; java . net . URI expected = new java . net . URI ( ( ( ( "http://" + historyAddress ) + "/jobhistory/job/" ) + jobSuffix ) ) ; java . net . URI actual = plugin . getTrackingUri ( id ) ; "<AssertPlaceHolder>" ; } getTrackingUri ( org . apache . hadoop . yarn . api . records . ApplicationId ) { java . lang . String jobSuffix = id . toString ( ) . replaceFirst ( "^application_" , "job_" ) ; java . lang . String historyServerAddress = org . apache . hadoop . mapreduce . v2 . util . MRWebAppUtil . getJHSWebappURLWithScheme ( getConf ( ) ) ; return new java . net . URI ( ( ( historyServerAddress + "/jobhistory/job/" ) + jobSuffix ) ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
operationLinksOpenedTrue ( ) { final tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionDeviceOperation amqpsSessionDeviceOperation = new tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionDeviceOperation ( mockDeviceClientConfig , mockAmqpsDeviceAuthentication ) ; java . util . ArrayList < tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsDeviceOperations > operationList = new java . util . ArrayList ( ) ; operationList . add ( mockAmqpsDeviceTelemetry ) ; operationList . add ( mockAmqpsDeviceMethods ) ; operationList . add ( mockAmqpsDeviceTwin ) ; mockit . Deencapsulation . setField ( amqpsSessionDeviceOperation , "amqpsDeviceOperationsList" , operationList ) ; new mockit . NonStrictExpectations ( ) { { mockAmqpsDeviceTelemetry . operationLinksOpened ( ) ; result = true ; mockAmqpsDeviceMethods . operationLinksOpened ( ) ; result = true ; mockAmqpsDeviceTwin . operationLinksOpened ( ) ; result = true ; } } ; java . lang . Boolean actualOperationLinkOpened = amqpsSessionDeviceOperation . operationLinksOpened ( ) ; "<AssertPlaceHolder>" ; } operationLinksOpened ( ) { java . lang . Boolean allLinksOpened = true ; for ( Map . Entry < com . microsoft . azure . sdk . iot . device . MessageType . MessageType , com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsDeviceOperations > entry : amqpsDeviceOperationsMap . entrySet ( ) ) { if ( ! ( entry . getValue ( ) . operationLinksOpened ( ) ) ) { allLinksOpened = false ; break ; } } return allLinksOpened ; }
|
org . junit . Assert . assertEquals ( true , actualOperationLinkOpened )
|
testBuildWithParametersAndDisabledDefaultConstraintsWithOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String abbrName = "AN" ; java . lang . String name = "fdsfds" ; org . lnu . is . domain . employee . type . EmployeeType context = new org . lnu . is . domain . employee . type . EmployeeType ( ) ; context . setAbbrName ( abbrName ) ; context . setName ( name ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "abbrName" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . DESC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>EmployeeType<sp>e<sp>WHERE<sp>(<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>AND<sp>e.abbrName<sp>LIKE<sp>CONCAT('%',:abbrName,'%')<sp>)<sp>ORDER<sp>BY<sp>e.abbrName<sp>ASC,<sp>e.name<sp>DESC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . employee . type . EmployeeType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; }
|
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
|
testGetEventRecordsQueue ( ) { com . streamsets . pipeline . stage . processor . aggregation . AggregationConfigBean aggregationConfigBean = new com . streamsets . pipeline . stage . processor . aggregation . AggregationConfigBean ( ) ; aggregationConfigBean . windowType = WindowType . ROLLING ; aggregationConfigBean . timeWindow = TimeWindow . TW_5S ; aggregationConfigBean . timeWindowsToRemember = 1 ; aggregationConfigBean . timeZoneID = "x" ; com . streamsets . pipeline . stage . processor . aggregation . AggregatorConfig aggregatorConfig1 = getAggregatorConfig ( "a" ) ; com . streamsets . pipeline . stage . processor . aggregation . AggregatorConfig aggregatorConfig2 = getAggregatorConfig ( "b" ) ; aggregationConfigBean . aggregatorConfigs = java . util . Arrays . asList ( aggregatorConfig1 , aggregatorConfig2 ) ; aggregationConfigBean . perAggregatorEvents = true ; aggregationConfigBean . allAggregatorsEvent = false ; com . streamsets . pipeline . stage . processor . aggregation . AggregationProcessor aggregationProcessor = new com . streamsets . pipeline . stage . processor . aggregation . AggregationProcessor ( aggregationConfigBean ) ; java . util . concurrent . BlockingQueue < com . streamsets . pipeline . api . EventRecord > eventRecordsQueue = aggregationProcessor . createEventRecordsQueue ( ) ; "<AssertPlaceHolder>" ; } remainingCapacity ( ) { return ( maxSize ) - ( com . streamsets . pipeline . lib . queue . XEvictingQueue . size ( ) ) ; }
|
org . junit . Assert . assertEquals ( ( 1 * 3 ) , eventRecordsQueue . remainingCapacity ( ) )
|
testSQLTypesMapping ( ) { folder . delete ( ) ; final java . sql . Connection con = createConnection ( folder . getRoot ( ) . getAbsolutePath ( ) ) ; final java . sql . Statement st = con . createStatement ( ) ; try { st . executeUpdate ( dropTable ) ; } catch ( final java . lang . Exception e ) { } st . executeUpdate ( createTable ) ; st . executeUpdate ( ( "insert<sp>into<sp>users<sp>(email,<sp>password,<sp>activation_code,<sp>created,<sp>active)<sp>" + "<sp>values<sp>('robert.gates@cold.com',<sp>'******',<sp>'CAS',<sp>'2005-12-09',<sp>'Y')" ) ) ; final java . sql . ResultSet resultSet = st . executeQuery ( "select<sp>U.*,<sp>ROW_NUMBER()<sp>OVER<sp>()<sp>as<sp>rownr<sp>from<sp>users<sp>U" ) ; final java . io . ByteArrayOutputStream outStream = new java . io . ByteArrayOutputStream ( ) ; org . apache . nifi . util . db . JdbcCommon . convertToAvroStream ( resultSet , outStream , false ) ; final byte [ ] serializedBytes = outStream . toByteArray ( ) ; "<AssertPlaceHolder>" ; System . out . println ( ( "Avro<sp>serialized<sp>result<sp>size<sp>in<sp>bytes:<sp>" + ( serializedBytes . length ) ) ) ; st . close ( ) ; con . close ( ) ; final java . io . InputStream instream = new java . io . ByteArrayInputStream ( serializedBytes ) ; final org . apache . avro . io . DatumReader < org . apache . avro . generic . GenericRecord > datumReader = new org . apache . avro . generic . GenericDatumReader ( ) ; try ( final org . apache . avro . file . DataFileStream < org . apache . avro . generic . GenericRecord > dataFileReader = new org . apache . avro . file . DataFileStream ( instream , datumReader ) ) { org . apache . avro . generic . GenericRecord record = null ; while ( dataFileReader . hasNext ( ) ) { record = dataFileReader . next ( record ) ; System . out . println ( record ) ; } } } toByteArray ( ) { final org . apache . nifi . processors . beats . frame . BeatsFrame frame = response . toFrame ( ) ; return encoder . encode ( frame ) ; }
|
org . junit . Assert . assertNotNull ( serializedBytes )
|
testIsGuidedDecisionTablesDirtyWhenItIsNotDirty ( ) { final org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTableView . Presenter presenter = mock ( GuidedDecisionTableView . Presenter . class ) ; final org . drools . workbench . models . guided . dtable . shared . model . GuidedDecisionTable52 model = mock ( org . drools . workbench . models . guided . dtable . shared . model . GuidedDecisionTable52 . class ) ; final java . util . Set < org . drools . workbench . screens . guided . dtable . client . widget . table . GuidedDecisionTableView . Presenter > availableDecisionTables = asSet ( presenter ) ; final int currentHash = 123 ; final int originalHash = 123 ; doReturn ( currentHash ) . when ( this . presenter ) . currentHashCode ( presenter ) ; doReturn ( originalHash ) . when ( this . presenter ) . originalHashCode ( presenter ) ; doReturn ( model ) . when ( presenter ) . getModel ( ) ; doReturn ( availableDecisionTables ) . when ( this . presenter ) . getAvailableDecisionTables ( ) ; final boolean isDirty = this . presenter . isGuidedDecisionTablesDirty ( ) ; "<AssertPlaceHolder>" ; } isGuidedDecisionTablesDirty ( ) { return getAvailableDecisionTables ( ) . stream ( ) . anyMatch ( ( dtPresenter ) -> { final java . lang . Integer originalHashCode = originalHashCode ( dtPresenter ) ; final java . lang . Integer currentHashCode = currentHashCode ( dtPresenter ) ; return isDirty ( originalHashCode , currentHashCode ) ; } ) ; }
|
org . junit . Assert . assertFalse ( isDirty )
|
testNormalizedDN ( ) { java . lang . String expected = "cn=john<sp>q.<sp>doe,<sp>ou=my<sp>dept,<sp>o=my<sp>org,<sp>c=us" ; java . lang . String actual = datawave . security . util . ProxiedEntityUtils . normalizeDN ( "C=US,<sp>O=My<sp>Org,<sp>OU=My<sp>Dept,<sp>CN=John<sp>Q.<sp>Doe" ) ; "<AssertPlaceHolder>" ; } normalizeDN ( java . lang . String ) { java . lang . String normalizedUserName = userName . trim ( ) . toLowerCase ( ) ; try { if ( ( ! ( normalizedUserName . startsWith ( "cn" ) ) ) || ( java . util . regex . Pattern . compile ( ",[^<sp>]" ) . matcher ( normalizedUserName ) . find ( ) ) ) { javax . naming . ldap . LdapName name = new javax . naming . ldap . LdapName ( userName ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; java . util . ArrayList < javax . naming . ldap . Rdn > rdns = new java . util . ArrayList ( name . getRdns ( ) ) ; if ( ( ( rdns . size ( ) ) > 0 ) && ( ! ( rdns . get ( 0 ) . toString ( ) . toLowerCase ( ) . startsWith ( "cn" ) ) ) ) java . util . Collections . reverse ( rdns ) ; for ( javax . naming . ldap . Rdn rdn : rdns ) { if ( ( sb . length ( ) ) > 0 ) sb . append ( ",<sp>" ) ; sb . append ( rdn . toString ( ) ) ; } normalizedUserName = sb . toString ( ) . toLowerCase ( ) ; } } catch ( javax . naming . InvalidNameException e ) { } datawave . security . util . ProxiedEntityUtils . log . trace ( ( ( ( ( "Normalized<sp>[" + userName ) + "]<sp>into<sp>[" ) + normalizedUserName ) + "]" ) ) ; return normalizedUserName ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testSetTypeNameNull ( ) { uit . setTypeName ( null ) ; "<AssertPlaceHolder>" ; } getTypeName ( ) { return typeName ; }
|
org . junit . Assert . assertNull ( uit . getTypeName ( ) )
|
testToAbsolutePerformance ( ) { org . apache . catalina . connector . Request req = new org . apache . tomcat . unittest . TesterRequest ( ) ; org . apache . catalina . connector . Response resp = new org . apache . catalina . connector . Response ( ) ; resp . setRequest ( req ) ; doHomebrew ( resp ) ; doUri ( ) ; final int bestOf = 5 ; final int winTarget = ( bestOf + 1 ) / 2 ; int homebrewWin = 0 ; int count = 0 ; while ( ( count < bestOf ) && ( homebrewWin < winTarget ) ) { long homebrew = doHomebrew ( resp ) ; long uri = doUri ( ) ; log . info ( ( ( ( ( "Current<sp>'home-brew':<sp>" + homebrew ) + "ms,<sp>Using<sp>URI:<sp>" ) + uri ) + "ms" ) ) ; if ( homebrew < uri ) { homebrewWin ++ ; } count ++ ; } "<AssertPlaceHolder>" ; } info ( java . lang . Object ) { log ( Level . INFO , java . lang . String . valueOf ( message ) , null ) ; }
|
org . junit . Assert . assertTrue ( ( homebrewWin == winTarget ) )
|
testInitiatoryImmutable ( ) { org . gedcom4j . model . thirdpartyadapters . FamilyTreeMaker3Adapter a = new org . gedcom4j . model . thirdpartyadapters . FamilyTreeMaker3Adapter ( ) ; java . util . List < org . gedcom4j . model . CustomFact > cfs = a . getInitiatory ( jesse ) ; "<AssertPlaceHolder>" ; cfs . clear ( ) ; } getInitiatory ( org . gedcom4j . model . Individual ) { return i . getCustomFactsWithTag ( "_INIT" ) ; }
|
org . junit . Assert . assertNotNull ( cfs )
|
getDefaultVisibilityForwardsCalls ( ) { org . phenotips . data . permissions . EntityPermissionsManager internal = this . mocker . getInstance ( org . phenotips . data . permissions . EntityPermissionsManager . class ) ; when ( internal . getDefaultVisibility ( ) ) . thenReturn ( this . publicVisibility ) ; org . phenotips . data . permissions . Visibility result = this . mocker . getComponentUnderTest ( ) . getDefaultVisibility ( ) ; "<AssertPlaceHolder>" ; } getDefaultVisibility ( ) { return this . visibilityManager . getDefaultVisibility ( ) ; }
|
org . junit . Assert . assertSame ( this . publicVisibility , result )
|
testLateSchemaWildcard ( ) { org . apache . drill . exec . physical . impl . scan . project . ScanSchemaOrchestrator . ScanOrchestratorBuilder builder = new org . apache . drill . exec . physical . impl . scan . project . ScanSchemaOrchestrator . ScanOrchestratorBuilder ( ) ; builder . setProjection ( org . apache . drill . exec . physical . rowSet . impl . RowSetTestUtils . projectAll ( ) ) ; org . apache . drill . exec . physical . impl . scan . project . ScanSchemaOrchestrator orchestrator = new org . apache . drill . exec . physical . impl . scan . project . ScanSchemaOrchestrator ( fixture . allocator ( ) , builder ) ; org . apache . drill . exec . physical . impl . scan . project . ReaderSchemaOrchestrator reader = orchestrator . startReader ( ) ; org . apache . drill . exec . physical . rowSet . ResultSetLoader loader = reader . makeTableLoader ( null ) ; "<AssertPlaceHolder>" ; reader . startBatch ( ) ; org . apache . drill . exec . physical . rowSet . RowSetLoader writer = loader . writer ( ) ; writer . addColumn ( org . apache . drill . exec . record . metadata . SchemaBuilder . columnSchema ( "a" , MinorType . INT , DataMode . REQUIRED ) ) ; writer . addColumn ( org . apache . drill . exec . record . metadata . SchemaBuilder . columnSchema ( "b" , MinorType . VARCHAR , DataMode . REQUIRED ) ) ; writer . addRow ( 1 , "fred" ) . addRow ( 2 , "wilma" ) ; reader . endBatch ( ) ; org . apache . drill . exec . record . metadata . TupleMetadata tableSchema = new org . apache . drill . exec . record . metadata . SchemaBuilder ( ) . add ( "a" , MinorType . INT ) . add ( "b" , MinorType . VARCHAR ) . buildSchema ( ) ; org . apache . drill . test . rowSet . RowSet . SingleRowSet expected = fixture . rowSetBuilder ( tableSchema ) . addRow ( 1 , "fred" ) . addRow ( 2 , "wilma" ) . build ( ) ; new org . apache . drill . test . rowSet . RowSetComparison ( expected ) . verifyAndClearAll ( fixture . wrap ( orchestrator . output ( ) ) ) ; orchestrator . close ( ) ; } hasSchema ( ) { return ( ( this ) == ( org . apache . drill . exec . physical . impl . scan . project . ScanLevelProjection . ScanProjectionType . SCHEMA_WILDCARD ) ) || ( ( this ) == ( org . apache . drill . exec . physical . impl . scan . project . ScanLevelProjection . ScanProjectionType . STRICT_SCHEMA_WILDCARD ) ) ; }
|
org . junit . Assert . assertFalse ( reader . hasSchema ( ) )
|
canSkipFirstAcceptStreamAndSecondStream ( ) { java . lang . String script = "accept<sp>\'tcp://localhost:8080\'\n" + ( ( ( ( ( ( "accepted\n" + "connected\n" ) + "close\n" ) + "closed\n" ) + "connect<sp>\'tcp://localhost:8080\'\n" ) + "connected\n" ) + "closed\n" ) ; org . kaazing . k3po . lang . internal . parser . ScriptParser parser = new org . kaazing . k3po . lang . internal . parser . ScriptParserImpl ( ) ; org . kaazing . k3po . lang . internal . ast . AstScriptNode scriptAST = parser . parse ( new java . io . ByteArrayInputStream ( script . getBytes ( org . kaazing . k3po . driver . internal . behavior . UTF_8 ) ) ) ; org . kaazing . k3po . lang . internal . ast . AstStreamNode connectOneAST = scriptAST . getStreams ( ) . get ( 1 ) ; org . kaazing . k3po . lang . internal . ast . AstRegion connectedOneAST = connectOneAST . getStreamables ( ) . get ( 0 ) ; org . kaazing . k3po . lang . internal . ast . AstStreamNode connectTwoAST = scriptAST . getStreams ( ) . get ( 2 ) ; org . kaazing . k3po . lang . internal . ast . AstRegion connectedTwoAST = connectTwoAST . getStreamables ( ) . get ( 0 ) ; org . kaazing . k3po . lang . internal . RegionInfo scriptInfo = scriptAST . getRegionInfo ( ) ; org . kaazing . k3po . driver . internal . behavior . ScriptProgress progress = new org . kaazing . k3po . driver . internal . behavior . ScriptProgress ( scriptInfo , script ) ; progress . addScriptFailure ( connectedOneAST . getRegionInfo ( ) ) ; progress . addScriptFailure ( connectedTwoAST . getRegionInfo ( ) ) ; java . lang . String observedScript = progress . getObservedScript ( ) ; java . lang . String expectedScript = "accept<sp>\'tcp://localhost:8080\'\n" + ( ( ( "accepted\n" + "\n" ) + "connect<sp>\'tcp://localhost:8080\'\n" ) + "\n" ) ; "<AssertPlaceHolder>" ; } getObservedScript ( ) { return ( progress ) != null ? progress . getObservedScript ( ) : null ; }
|
org . junit . Assert . assertEquals ( expectedScript , observedScript )
|
testSplitEmpty ( ) { final org . eclipse . kapua . client . gateway . Topic topic = org . eclipse . kapua . client . gateway . Topic . split ( "" ) ; "<AssertPlaceHolder>" ; } split ( java . lang . String ) { if ( path == null ) { return null ; } path = path . replaceAll ( "(^/+|/$)+" , "" ) ; if ( path . isEmpty ( ) ) { return null ; } return new org . eclipse . kapua . client . gateway . Topic ( java . util . Arrays . asList ( path . split ( "\\/+" ) ) ) ; }
|
org . junit . Assert . assertNull ( topic )
|
testIsAggregateNoDistinct ( ) { org . sagebionetworks . table . query . model . QuerySpecification element = new org . sagebionetworks . table . query . TableQueryParser ( "select<sp>*<sp>from<sp>syn123" ) . querySpecification ( ) ; "<AssertPlaceHolder>" ; } isElementAggregate ( ) { return ( setQuantifier ) == ( SetQuantifier . DISTINCT ) ; }
|
org . junit . Assert . assertFalse ( element . isElementAggregate ( ) )
|
shouldExportDateRangeQueryWithAllOptions ( ) { com . couchbase . client . java . search . queries . TermRangeQuery fts = com . couchbase . client . java . search . SearchQuery . termRange ( ) . boost ( 1.5 ) . field ( "field" ) . min ( "lower" , false ) . max ( "upper" , true ) ; com . couchbase . client . java . search . SearchQuery query = new com . couchbase . client . java . search . SearchQuery ( "foo" , fts ) . explain ( ) ; com . couchbase . client . java . document . json . JsonObject expected = com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "max" 0 , com . couchbase . client . java . document . json . JsonObject . create ( ) . put ( "min" , "lower" ) . put ( "inclusive_min" , false ) . put ( "max" , "upper" ) . put ( "inclusive_max" , true ) . put ( "boost" , 1.5 ) . put ( "field" , "field" ) ) . put ( "explain" , true ) ; "<AssertPlaceHolder>" ; } export ( ) { return "INSERT<sp>INTO<sp>" + ( bucket . toString ( ) ) ; }
|
org . junit . Assert . assertEquals ( expected , query . export ( ) )
|
testClear ( ) { chain . addLast ( "A" , new org . apache . mina . core . IoFilterChainTest . EventOrderTestFilter ( 'A' ) ) ; chain . addLast ( "B" , new org . apache . mina . core . IoFilterChainTest . EventOrderTestFilter ( 'A' ) ) ; chain . addLast ( "C" , new org . apache . mina . core . IoFilterChainTest . EventOrderTestFilter ( 'A' ) ) ; chain . addLast ( "D" , new org . apache . mina . core . IoFilterChainTest . EventOrderTestFilter ( 'A' ) ) ; chain . addLast ( "E" , new org . apache . mina . core . IoFilterChainTest . EventOrderTestFilter ( 'A' ) ) ; chain . clear ( ) ; "<AssertPlaceHolder>" ; } getAll ( ) { java . util . List < org . apache . mina . handler . chain . IoHandlerChain . Entry > list = new java . util . ArrayList ( ) ; org . apache . mina . handler . chain . IoHandlerChain . Entry e = head . nextEntry ; while ( e != ( tail ) ) { list . add ( e ) ; e = e . nextEntry ; } return list ; }
|
org . junit . Assert . assertEquals ( 0 , chain . getAll ( ) . size ( ) )
|
testInputStreamToString_withExpected ( ) { java . lang . String expected = "test<sp>data" ; java . io . InputStream anyInputStream = new java . io . ByteArrayInputStream ( expected . getBytes ( StandardCharsets . UTF_8 ) ) ; java . lang . String actual = com . networknt . utility . StringUtils . inputStreamToString ( anyInputStream , StandardCharsets . UTF_8 ) ; "<AssertPlaceHolder>" ; } inputStreamToString ( java . io . InputStream , java . nio . charset . Charset ) { if ( ( inputStream != null ) && ( ( inputStream . available ( ) ) != ( - 1 ) ) ) { java . io . ByteArrayOutputStream result = new java . io . ByteArrayOutputStream ( ) ; byte [ ] buffer = new byte [ 1024 ] ; int length ; while ( ( length = inputStream . read ( buffer ) ) != ( - 1 ) ) { result . write ( buffer , 0 , length ) ; } if ( charset != null ) { return result . toString ( charset . name ( ) ) ; } return result . toString ( StandardCharsets . UTF_8 . name ( ) ) ; } return null ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
shouldBeAbleToUnderstandFields ( ) { java . lang . String content = "<?xml<sp>version=\"1.0\"<sp>encoding=\"UTF-8\"?>" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<sp></items>" 8 + "<sp><created-at>2010-02-09T15:15:46Z</created-at>" ) + "<sp></items>" 7 ) + "<sp></items>" 4 ) + "<sp><updated-at>2010-02-09T15:15:46Z</updated-at>" 2 ) + "<sp><updated-at>2010-02-09T15:15:46Z</updated-at>" 0 ) + "<sp><updated-at>2010-02-09T15:15:46Z</updated-at>" 4 ) + "<sp><updated-at>2010-02-09T15:15:46Z</updated-at>" 5 ) + "<sp><item>" ) + "<sp></items>" 6 ) + "<sp></items>" 2 ) + "<sp><id>784</id>" ) + "<sp><updated-at>2010-02-09T15:15:46Z</updated-at>" 6 ) + "<sp></items>" 5 ) + "<sp><updated-at>2010-02-09T15:15:46Z</updated-at>" ) + "<sp></items>" 9 http : br . com . caelum . restfulie . Resources resources = new br . com . caelum . restbucks . MappingConfig ( ) . getServer ( ) ; br . com . caelum . restbucks . model . Order order = ( ( br . com . caelum . restbucks . model . Order ) ( resources . getDeserializer ( ) . fromXml ( content ) ) ) ; "<AssertPlaceHolder>" ; } getServer ( ) { return server ; }
|
org . junit . Assert . assertTrue ( ( order != null ) )
|
getRunescapeFont ( ) { "<AssertPlaceHolder>" ; } getRunescapeFont ( ) { org . junit . Assert . assertNotNull ( net . runelite . client . ui . FontManager . getRunescapeFont ( ) ) ; }
|
org . junit . Assert . assertNotNull ( net . runelite . client . ui . FontManager . getRunescapeFont ( ) )
|
findAll_BoundaryConditions ( ) { "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( true )
|
testDoesNotAddTagsWhenDisabled ( ) { withAutoTaggerDisabled ( ( ) -> { com . liferay . asset . kernel . model . AssetEntry assetEntry = addFileEntryAssetEntry ( ) ; List < com . liferay . asset . kernel . model . AssetTag > assetTags = assetEntry . getTags ( ) ; "<AssertPlaceHolder>" ; } ) ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( assetTags . isEmpty ( ) )
|
testCreateSetForOriginalKeys ( ) { com . googlecode . concurrenttrees . suffix . ConcurrentSuffixTree < java . lang . Integer > tree = new com . googlecode . concurrenttrees . suffix . ConcurrentSuffixTree < java . lang . Integer > ( getNodeFactory ( ) ) ; "<AssertPlaceHolder>" ; } createSetForOriginalKeys ( ) { return com . googlecode . concurrenttrees . solver . Collections . newSetFromMap ( new java . util . concurrent . ConcurrentHashMap < java . lang . String , java . lang . Boolean > ( ) ) ; }
|
org . junit . Assert . assertTrue ( tree . createSetForOriginalKeys ( ) . getClass ( ) . equals ( com . googlecode . concurrenttrees . suffix . Collections . newSetFromMap ( new java . util . concurrent . ConcurrentHashMap < java . lang . Object , java . lang . Boolean > ( ) ) . getClass ( ) ) )
|
Delete_Where_Matches ( ) { parse ( "DELETE<sp>{<sp>?s<sp>rdf:type<sp>rdfs:Class<sp>}<sp>WHERE<sp>{<sp>?s<sp>?p<sp>?o<sp>}" ) . execute ( ) ; "<AssertPlaceHolder>" ; } exists ( com . mysema . rdfbean . model . ID , com . mysema . rdfbean . model . UID , com . mysema . rdfbean . model . NODE , com . mysema . rdfbean . model . UID , boolean ) { if ( com . mysema . rdfbean . model . MiniConnection . logger . isDebugEnabled ( ) ) { com . mysema . rdfbean . model . MiniConnection . logger . debug ( ( ( ( ( ( ( ( "exists<sp>" + subject ) + "<sp>" ) + predicate ) + "<sp>" ) + object ) + "<sp>" ) + context ) ) ; } return repository . exists ( subject , predicate , object , context ) ; }
|
org . junit . Assert . assertFalse ( connection . exists ( null , null , null , null , false ) )
|
calculateOutermostViewportWithDifferentXYTest ( ) { com . itextpdf . kernel . geom . Rectangle expected = new com . itextpdf . kernel . geom . Rectangle ( 10 , 20 , 600 , 600 ) ; com . itextpdf . svg . renderers . SvgDrawContext context = new com . itextpdf . svg . renderers . SvgDrawContext ( null , null ) ; com . itextpdf . kernel . pdf . PdfDocument document = new com . itextpdf . kernel . pdf . PdfDocument ( new com . itextpdf . kernel . pdf . PdfWriter ( new java . io . ByteArrayOutputStream ( ) , new com . itextpdf . kernel . pdf . WriterProperties ( ) . setCompressionLevel ( 0 ) ) ) ; document . addNewPage ( ) ; com . itextpdf . kernel . pdf . xobject . PdfFormXObject pdfForm = new com . itextpdf . kernel . pdf . xobject . PdfFormXObject ( expected ) ; com . itextpdf . kernel . pdf . canvas . PdfCanvas canvas = new com . itextpdf . kernel . pdf . canvas . PdfCanvas ( pdfForm , document ) ; context . pushCanvas ( canvas ) ; com . itextpdf . svg . renderers . impl . SvgTagSvgNodeRenderer renderer = new com . itextpdf . svg . renderers . impl . SvgTagSvgNodeRenderer ( ) ; com . itextpdf . svg . renderers . impl . PdfRootSvgNodeRenderer root = new com . itextpdf . svg . renderers . impl . PdfRootSvgNodeRenderer ( renderer ) ; com . itextpdf . kernel . geom . Rectangle actual = root . calculateViewPort ( context ) ; "<AssertPlaceHolder>" ; } equalsWithEpsilon ( com . itextpdf . kernel . geom . Rectangle ) { return equalsWithEpsilon ( that , com . itextpdf . kernel . geom . Rectangle . EPS ) ; }
|
org . junit . Assert . assertTrue ( expected . equalsWithEpsilon ( actual ) )
|
shouldConfigureAsMap ( ) { org . apache . camel . dataformat . univocity . UniVocityFixedWidthDataFormat dataFormat = new org . apache . camel . dataformat . univocity . UniVocityFixedWidthDataFormat ( ) . setFieldLengths ( new int [ ] { 1 , 2 , 3 } ) . setAsMap ( true ) ; "<AssertPlaceHolder>" ; } isAsMap ( ) { return asMap ; }
|
org . junit . Assert . assertTrue ( dataFormat . isAsMap ( ) )
|
test ( ) { final java . util . List < nl . bzk . migratiebrp . conversie . model . lo3 . autorisatie . Lo3Autorisatie > autorisaties = subject . read ( nl . bzk . migratiebrp . test . common . autorisatie . CsvAutorisatieReaderTest . class . getResourceAsStream ( "/test.csv" ) ) ; "<AssertPlaceHolder>" ; checkAutorisatie ( autorisaties . get ( 0 ) ) ; checkAutorisatie ( autorisaties . get ( 1 ) ) ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , autorisaties . size ( ) )
|
testGetLastByPatID ( ) { try { org . isf . examination . test . Tests . jpa . beginTransaction ( ) ; org . isf . patient . model . Patient patient = org . isf . examination . test . Tests . testPatient . setup ( false ) ; org . isf . examination . model . PatientExamination lastPatientExamination = org . isf . examination . test . Tests . testPatientExamination . setup ( patient , false ) ; org . isf . examination . test . Tests . jpa . persist ( patient ) ; org . isf . examination . test . Tests . jpa . persist ( lastPatientExamination ) ; org . isf . examination . test . Tests . jpa . commitTransaction ( ) ; org . isf . examination . model . PatientExamination foundExamination = examinationOperations . getLastByPatID ( patient . getCode ( ) ) ; _checkPatientExaminationIntoDb ( foundExamination . getPex_ID ( ) ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } getPex_ID ( ) { return pex_ID ; }
|
org . junit . Assert . assertEquals ( true , false )
|
shouldNotIndicateThatANormalSelectSupportsMulitpleOptions ( ) { org . openqa . selenium . WebElement selectElement = driver . findElement ( org . openqa . selenium . By . name ( "selectomatic" ) ) ; org . openqa . selenium . support . ui . Select select = new org . openqa . selenium . support . ui . Select ( selectElement ) ; "<AssertPlaceHolder>" ; } isMultiple ( ) { java . lang . String multipleValue = select . getAttribute ( "multiple" ) ; boolean multiple = ( "true" . equals ( multipleValue ) ) || ( "multiple" . equals ( multipleValue ) ) ; return multiple ; }
|
org . junit . Assert . assertFalse ( select . isMultiple ( ) )
|
testIsDrawOnChart ( ) { System . out . println ( "isDrawOnChart" ) ; kg . apc . charting . AbstractGraphRow instance = new kg . apc . charting . AbstractGraphRowTest . AbstractGraphRowImpl ( ) ; boolean expResult = true ; boolean result = instance . isDrawOnChart ( ) ; "<AssertPlaceHolder>" ; } isDrawOnChart ( ) { return graphRow . isDrawOnChart ( ) ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
findByBigIntegerTest ( ) { java . util . List < cn . hutool . db . Entity > results = cn . hutool . db . CRUDTest . db . findAll ( cn . hutool . db . Entity . create ( "user" ) . set ( "age" , new java . math . BigInteger ( "12" ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . size ; }
|
org . junit . Assert . assertEquals ( 2 , results . size ( ) )
|
isPopulated ( ) { populate ( ) ; victim . flush ( ) ; org . pdfsam . ui . PreferencesRecentWorkspacesService newVictim = new org . pdfsam . ui . PreferencesRecentWorkspacesService ( ) ; "<AssertPlaceHolder>" ; } getRecentlyUsedWorkspaces ( ) { java . util . List < java . lang . String > values = new java . util . ArrayList ( cache . keySet ( ) ) ; java . util . Collections . reverse ( values ) ; return java . util . Collections . unmodifiableList ( values ) ; }
|
org . junit . Assert . assertEquals ( 5 , newVictim . getRecentlyUsedWorkspaces ( ) . size ( ) )
|
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 . DefineJPEGImage2 ( decoder ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( fixture )
|
testGetQuestionGroupWhenIdIsNotInteger ( ) { when ( httpServletRequest . getParameter ( "questionGroupId" ) ) . thenReturn ( "1A" ) ; java . lang . String view = questionGroupController . getQuestionGroup ( model , httpServletRequest ) ; "<AssertPlaceHolder>" ; verify ( httpServletRequest , times ( 1 ) ) . getParameter ( "questionGroupId" ) ; verify ( questionnaireServiceFacade , times ( 0 ) ) . getQuestionGroupDetail ( org . mockito . Matchers . anyInt ( ) ) ; verify ( model ) . addAttribute ( "error_message_code" , QuestionnaireConstants . INVALID_QUESTION_GROUP_ID ) ; } getQuestionGroup ( org . springframework . ui . ModelMap , javax . servlet . http . HttpServletRequest ) { java . lang . String questionGroupId = httpServletRequest . getParameter ( "questionGroupId" ) ; try { if ( isInvalidNumber ( questionGroupId ) ) { model . addAttribute ( "error_message_code" , QuestionnaireConstants . INVALID_QUESTION_GROUP_ID ) ; } else { org . mifos . platform . questionnaire . service . QuestionGroupDetail questionGroupDetail = questionnaireServiceFacade . getQuestionGroupDetail ( java . lang . Integer . valueOf ( questionGroupId ) ) ; org . mifos . platform . questionnaire . ui . model . QuestionGroupForm questionGroupForm = new org . mifos . platform . questionnaire . ui . model . QuestionGroupForm ( questionGroupDetail ) ; model . addAttribute ( "questionGroupDetail" , questionGroupForm ) ; model . addAttribute ( "eventSources" , getAllQgEventSources ( ) ) ; } } catch ( org . mifos . framework . exceptions . SystemException e ) { model . addAttribute ( "error_message_code" , QuestionnaireConstants . QUESTION_GROUP_NOT_FOUND ) ; } return "viewQuestionGroupDetail" ; }
|
org . junit . Assert . assertThat ( view , org . hamcrest . core . Is . is ( "viewQuestionGroupDetail" ) )
|
testDocListResize ( ) { net . yadan . banana . utils . TextIndex index = new net . yadan . banana . utils . TextIndex ( 4 , 30 ) ; index . getWord2DocList ( ) . setDebug ( DebugLevel . DEBUG_STRUCTURE ) ; int [ ] expected = new int [ 7 ] ; for ( int i = 0 ; i < 7 ; i ++ ) { expected [ i ] = i * i ; index . index ( ( i * i ) , "Hello<sp>world" , SEPS ) ; } int [ ] find = index . find ( "Hello" ) ; "<AssertPlaceHolder>" ; } find ( java . lang . String ) { m_keyBuffer . reset ( ) ; m_keyBuffer . appendChars ( word . toLowerCase ( ) . toCharArray ( ) ) ; int docListRecord = m_word2DocList . findRecord ( m_keyBuffer ) ; if ( docListRecord == ( - 1 ) ) { return new int [ 0 ] ; } else { int size = m_word2DocList . getInt ( docListRecord , net . yadan . banana . utils . TextIndex . DOC_LIST_SIZE_OFFSET ) ; int [ ] res = new int [ size ] ; m_word2DocList . getInts ( docListRecord , net . yadan . banana . utils . TextIndex . DOC_LIST_DATA_OFFSET , res , 0 , size ) ; return res ; } }
|
org . junit . Assert . assertArrayEquals ( expected , find )
|
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . dynamic . data . mapping . model . DDMDataProviderInstanceLink . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . eq ( "dataProviderInstanceLinkId" , com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ) ; java . util . List < com . liferay . dynamic . data . mapping . model . DDMDataProviderInstanceLink > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
|
testGetXStream ( ) { "<AssertPlaceHolder>" ; } getXstream ( ) { return xstream ; }
|
org . junit . Assert . assertNotNull ( converter . getXstream ( ) )
|
applyTest ( ) { java . lang . String [ ] [ ] tests = new java . lang . String [ ] [ ] { new java . lang . String [ ] { "{%<sp>raw<sp>%}{%<sp>endraw<sp>%}" , "" } , new java . lang . String [ ] { "{%<sp>raw<sp>%}{{a|b}}{%<sp>endraw<sp>%}" , "{{a|b}}" } } ; for ( java . lang . String [ ] test : tests ) { liqp . Template template = liqp . Template . parse ( test [ 0 ] ) ; java . lang . String rendered = java . lang . String . valueOf ( template . render ( ) ) ; "<AssertPlaceHolder>" ; } } render ( ) { return render ( new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ) ; }
|
org . junit . Assert . assertThat ( rendered , org . hamcrest . CoreMatchers . is ( test [ 1 ] ) )
|
testIsChangedWhenItemIsNotUpdated ( ) { final java . lang . String uuid = "uuid" ; final org . kie . workbench . common . dmn . client . decision . DecisionNavigatorItem item1 = new org . kie . workbench . common . dmn . client . decision . DecisionNavigatorItem ( uuid , "Node0" , null , null , null ) ; final org . kie . workbench . common . dmn . client . decision . DecisionNavigatorItem item2 = new org . kie . workbench . common . dmn . client . decision . DecisionNavigatorItem ( uuid , "Node0" , null , null , null ) ; final java . util . Map < java . lang . String , org . kie . workbench . common . dmn . client . decision . DecisionNavigatorItem > indexedItems = new java . util . HashMap < java . lang . String , org . kie . workbench . common . dmn . client . decision . DecisionNavigatorItem > ( ) { { put ( uuid , item2 ) ; } } ; doReturn ( indexedItems ) . when ( presenter ) . getIndexedItems ( ) ; final boolean isChanged = presenter . isChanged ( item1 ) ; "<AssertPlaceHolder>" ; } isChanged ( org . kie . workbench . common . dmn . client . decision . DecisionNavigatorItem ) { final org . kie . workbench . common . dmn . client . decision . DecisionNavigatorItem currentItem = getIndexedItems ( ) . get ( item . getUUID ( ) ) ; return ! ( item . equals ( currentItem ) ) ; }
|
org . junit . Assert . assertFalse ( isChanged )
|
testGetBandDataType_uint16 ( ) { product . addBand ( "unsigned" , ProductData . TYPE_UINT16 ) ; final org . esa . beam . dataio . bigtiff . internal . TiffIFD tiffIFD = new org . esa . beam . dataio . bigtiff . internal . TiffIFD ( product ) ; "<AssertPlaceHolder>" ; } getBandDataType ( ) { return maxElemSizeBandDataType ; }
|
org . junit . Assert . assertEquals ( ProductData . TYPE_UINT16 , tiffIFD . getBandDataType ( ) )
|
testOnTimerWithWindow ( ) { final java . lang . String timerId = "my-timer-id" ; final org . apache . beam . sdk . transforms . windowing . IntervalWindow testWindow = new org . apache . beam . sdk . transforms . windowing . IntervalWindow ( new org . joda . time . Instant ( 0 ) , new org . joda . time . Instant ( 15 ) ) ; when ( mockArgumentProvider . window ( ) ) . thenReturn ( testWindow ) ; class SimpleTimerDoFn extends org . apache . beam . sdk . transforms . DoFn < java . lang . String , java . lang . String > { public org . apache . beam . sdk . transforms . windowing . IntervalWindow window = null ; @ org . apache . beam . sdk . transforms . reflect . TimerId ( timerId ) private final org . apache . beam . sdk . state . TimerSpec myTimer = org . apache . beam . sdk . state . TimerSpecs . timer ( TimeDomain . PROCESSING_TIME ) ; @ org . apache . beam . sdk . transforms . reflect . ProcessElement public void process ( org . apache . beam . sdk . transforms . reflect . ProcessContext c ) { } @ org . apache . beam . sdk . transforms . reflect . OnTimer ( timerId ) public void onMyTimer ( org . apache . beam . sdk . transforms . windowing . IntervalWindow w ) { window = w ; } } SimpleTimerDoFn fn = new SimpleTimerDoFn ( ) ; org . apache . beam . sdk . transforms . reflect . DoFnInvoker < java . lang . String , java . lang . String > invoker = org . apache . beam . sdk . transforms . reflect . DoFnInvokers . invokerFor ( fn ) ; invoker . invokeOnTimer ( timerId , mockArgumentProvider ) ; "<AssertPlaceHolder>" ; } equalTo ( T extends java . io . Serializable ) { return org . apache . beam . sdk . testing . SerializableMatchers . fromSupplier ( ( ) -> org . hamcrest . Matchers . equalTo ( expected ) ) ; }
|
org . junit . Assert . assertThat ( fn . window , org . hamcrest . Matchers . equalTo ( testWindow ) )
|
testToString2 ( ) { org . eclipse . kura . core . net . WifiInterfaceConfigImpl config = createConfig ( 2 ) ; config . setHardwareAddress ( org . eclipse . kura . core . net . util . NetworkUtil . macToBytes ( "firmwareVersion" 7 ) ) ; config . setLoopback ( true ) ; config . setPointToPoint ( true ) ; config . setVirtual ( true ) ; config . setSupportsMulticast ( true ) ; config . setUp ( true ) ; config . setMTU ( 42 ) ; config . setUsbDevice ( new org . eclipse . kura . usb . UsbNetDevice ( "vendorId" , "firmwareVersion" 0 , "manufacturerName" , "productName" , "firmwareVersion" 5 , "firmwareVersion" 8 , "firmwareVersion" 6 ) ) ; config . setDriver ( "driverName" ) ; config . setDriverVersion ( "firmwareVersion" 1 ) ; config . setFirmwareVersion ( "firmwareVersion" ) ; config . setState ( NetInterfaceState . ACTIVATED ) ; config . setAutoConnect ( true ) ; config . setCapabilities ( java . util . EnumSet . of ( Capability . WPA , Capability . CIPHER_WEP40 ) ) ; java . lang . String expected = "name=wifiInterface<sp>::<sp>hardwareAddress=12:34:56:78:90:AB<sp>::<sp>loopback=true<sp>::<sp>pointToPoint=true" + ( ( ( ( ( ( "<sp>::<sp>virtual=true<sp>::<sp>supportsMulticast=true<sp>::<sp>up=true<sp>::<sp>mtu=42<sp>::<sp>usbDevice=UsbNetDevice" + "firmwareVersion" 4 ) + "firmwareVersion" 3 ) + "<sp>getUsbDevicePath()=usbDevicePath,<sp>getUsbPort()=usbBusNumber-usbDevicePath]<sp>::<sp>driver=driverName" ) + "firmwareVersion" 2 ) + "<sp>::<sp>autoConnect=true<sp>::<sp>InterfaceAddress=NetConfig:<sp>no<sp>configurations<sp>NetConfig:<sp>no<sp>configurations<sp>" ) + "<sp>::<sp>capabilities=CIPHER_WEP40<sp>WPA<sp>" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( "ComponentConfigurationImpl<sp>[pid=" + ( pid ) ) + ",<sp>definition=" ) + ( definition ) ) + ",<sp>properties=" ) + ( properties ) ) + "]" ; }
|
org . junit . Assert . assertEquals ( expected , config . toString ( ) )
|
getMonth_A$Calendar ( ) { java . lang . Integer expected = 10 ; java . util . Calendar arg0 = java . util . Calendar . getInstance ( ) ; arg0 . set ( Calendar . MONTH , ( expected - 1 ) ) ; java . lang . Integer actual = com . github . seratch . taskun . util . CalendarUtil . getMonth ( arg0 ) ; "<AssertPlaceHolder>" ; } getMonth ( java . util . Calendar ) { java . lang . Integer month = ( calendar . get ( Calendar . MONTH ) ) + 1 ; return month ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testGetRowSubset_withColumnIndexLessThanZero ( ) { final com . valkryst . VTerminal . Tile [ ] rowSubset = StaticGrid . TILE_GRID . getRowSubset ( 0 , ( - 1 ) , 4 ) ; "<AssertPlaceHolder>" ; } getRowSubset ( int , int , int ) { if ( ( columnIndex < 0 ) || ( rowIndex < 0 ) ) { return com . valkryst . VTerminal . TileGrid . EMPTY_ARRAY ; } if ( length < 1 ) { return com . valkryst . VTerminal . TileGrid . EMPTY_ARRAY ; } if ( rowIndex >= ( tiles . length ) ) { return com . valkryst . VTerminal . TileGrid . EMPTY_ARRAY ; } if ( columnIndex >= ( tiles [ 0 ] . length ) ) { return com . valkryst . VTerminal . TileGrid . EMPTY_ARRAY ; } final int endColumn = columnIndex + length ; if ( endColumn > ( tiles [ 0 ] . length ) ) { return java . util . Arrays . copyOfRange ( getRow ( rowIndex ) , columnIndex , tiles [ 0 ] . length ) ; } else { return java . util . Arrays . copyOfRange ( getRow ( rowIndex ) , columnIndex , endColumn ) ; } }
|
org . junit . Assert . assertEquals ( rowSubset . length , 0 )
|
paperInputIsFunctional ( ) { open ( ) ; org . openqa . selenium . WebElement input = findElement ( org . openqa . selenium . By . tagName ( "paper-input" ) ) ; java . lang . String originalValue = input . getAttribute ( "value" ) ; input . sendKeys ( ( ( org . openqa . selenium . Keys . END ) + "bar" ) ) ; java . util . List < org . openqa . selenium . WebElement > updateValueElements = findElements ( org . openqa . selenium . By . className ( "update-value" ) ) ; org . openqa . selenium . WebElement lastUpdateValue = updateValueElements . get ( ( ( updateValueElements . size ( ) ) - 1 ) ) ; "<AssertPlaceHolder>" ; } getText ( ) { return getTextContent ( com . vaadin . flow . dom . Element :: isTextNode ) ; }
|
org . junit . Assert . assertEquals ( ( originalValue + "bar" ) , lastUpdateValue . getText ( ) )
|
shouldNotValidateInstallmentScheduleForTotalAmountLessThanZero ( ) { org . mifos . accounts . loan . util . helpers . RepaymentScheduleInstallment installment = installmentBuilder . withInstallment ( 3 ) . withDueDate ( "30-Nov-2010" ) . withPrincipal ( new org . mifos . framework . util . helpers . Money ( rupeeCurrency , "499.9" ) ) . withInterest ( new org . mifos . framework . util . helpers . Money ( rupeeCurrency , "22.1" ) ) . withFees ( new org . mifos . framework . util . helpers . Money ( rupeeCurrency , "0.0" ) ) . withTotal ( "-499.9" ) . build ( ) ; java . util . List < org . mifos . platform . validations . ErrorEntry > errorEntries = installmentFormatValidator . validateTotalAmountFormat ( installment ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( org . apache . commons . lang . StringUtils . isBlank ( loanAmount ) ) && ( org . apache . commons . lang . StringUtils . isBlank ( businessActivity ) ) ; }
|
org . junit . Assert . assertThat ( errorEntries . isEmpty ( ) , org . hamcrest . core . Is . is ( true ) )
|
createUserName_OnlyId ( ) { java . lang . String userId = "1a2b3c4d" ; uas . setUserId ( userId ) ; java . lang . String userName = ctrl . createUserName ( uas ) ; "<AssertPlaceHolder>" ; } createUserName ( org . oscm . internal . usermanagement . POUserDetails ) { java . lang . String userName = "" ; if ( ! ( org . oscm . string . Strings . isEmpty ( u . getFirstName ( ) ) ) ) { userName = u . getFirstName ( ) . trim ( ) ; } if ( ! ( org . oscm . string . Strings . isEmpty ( u . getLastName ( ) ) ) ) { if ( ui . isNameSequenceReversed ( ) ) { userName = ( ( u . getLastName ( ) . trim ( ) ) + "<sp>" ) + userName ; } else { userName = ( userName + "<sp>" ) + ( u . getLastName ( ) . trim ( ) ) ; } } userName = ( ! ( org . oscm . string . Strings . isEmpty ( userName ) ) ) ? userName . trim ( ) : u . getUserId ( ) ; return userName ; }
|
org . junit . Assert . assertEquals ( userId , userName )
|
testExplicitSourceCodeTypesList ( ) { System . out . println ( "testExplicitSourceCodeTypesList" ) ; java . util . List < java . lang . String > defaultSourceCodeTypesList = java . util . Arrays . asList ( net . sourceforge . pmd . util . database . DBURITest . C_EXPLICIT_SOURCE_CODE_TYPES . split ( "," ) ) ; net . sourceforge . pmd . util . database . DBURI instance = new net . sourceforge . pmd . util . database . DBURI ( net . sourceforge . pmd . util . database . DBURITest . C_TEST_EXPLICIT ) ; java . util . List < java . lang . String > result = instance . getSourceCodeTypesList ( ) ; "<AssertPlaceHolder>" ; } getSourceCodeTypesList ( ) { return sourceCodeTypesList ; }
|
org . junit . Assert . assertEquals ( defaultSourceCodeTypesList , result )
|
testShouldSendAndReceiveTwoHundredMessages ( ) { messageCounter . reset ( ) ; for ( int i = 0 ; i < 200 ; i ++ ) { senderBean . sendToQueue ( "test" , "Hello<sp>world" ) ; } "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
|
org . junit . Assert . assertEquals ( 200 , messageCounter . getValue ( ) )
|
testUnsubscribeAfterLastButBeforeCompletedCalled ( ) { final java . util . concurrent . atomic . AtomicBoolean completed = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; rx . Observable . range ( 1 , 5 ) . lift ( new com . github . davidmoten . rtree . internal . operators . OperatorBoundedPriorityQueue < java . lang . Integer > ( 2 , com . github . davidmoten . internal . operators . OperatorBoundedPriorityQueueTest . integerComparator ) ) . subscribe ( new rx . Subscriber < java . lang . Integer > ( ) { int i = 0 ; @ com . github . davidmoten . internal . operators . Override public void onCompleted ( ) { completed . set ( true ) ; } @ com . github . davidmoten . internal . operators . Override public void onError ( java . lang . Throwable e ) { } @ com . github . davidmoten . internal . operators . Override public void onNext ( java . lang . Integer t ) { ( i ) ++ ; if ( ( i ) == 2 ) unsubscribe ( ) ; } } ) ; "<AssertPlaceHolder>" ; } onNext ( com . github . davidmoten . rtree . Entry ) { collection . add ( t ) ; request ( 1 ) ; }
|
org . junit . Assert . assertFalse ( completed . get ( ) )
|
shouldAllowRemovalIfExistingPropertyWouldHaveDefinition ( ) { javax . jcr . Node a = session . getRootNode ( ) . addNode ( "a" , "nt:unstructured" ) ; a . addMixin ( org . modeshape . jcr . MixinTest . MIXIN_TYPE_B ) ; a . setProperty ( org . modeshape . jcr . MixinTest . PROPERTY_B , true ) ; session . save ( ) ; javax . jcr . Node rootNode = session . getRootNode ( ) ; javax . jcr . Node nodeA = rootNode . getNode ( "a" ) ; nodeA . removeMixin ( org . modeshape . jcr . MixinTest . MIXIN_TYPE_B ) ; session . save ( ) ; rootNode = session . getRootNode ( ) ; nodeA = rootNode . getNode ( "a" ) ; "<AssertPlaceHolder>" ; } getMixinNodeTypes ( ) { return nodeMixinTypes ; }
|
org . junit . Assert . assertThat ( nodeA . getMixinNodeTypes ( ) . length , org . hamcrest . core . Is . is ( 0 ) )
|
shouldSetUpdateDelegate ( ) { org . eclipse . che . ide . api . wizard . Wizard . UpdateDelegate updateDelegate = mock ( Wizard . UpdateDelegate . class ) ; wizardPage . setUpdateDelegate ( updateDelegate ) ; "<AssertPlaceHolder>" ; } setUpdateDelegate ( org . eclipse . che . ide . api . wizard . UpdateDelegate ) { this . delegate = delegate ; for ( org . eclipse . che . ide . api . wizard . WizardPage < T > page : wizardPages . asIterable ( ) ) { page . setUpdateDelegate ( delegate ) ; } }
|
org . junit . Assert . assertEquals ( updateDelegate , wizardPage . updateDelegate )
|
testNonEmptyFolder ( ) { java . lang . String path = pathTo ( "nonemptyFolder" ) ; java . util . Set < org . eclipse . emf . common . util . URI > uris = new org . eclipse . xtext . mwe . PathTraverser ( ) . findAllResourceUris ( path , org . eclipse . xtext . mwe . PathTraverserTest . everythingButDummy ) ; "<AssertPlaceHolder>" ; } size ( ) { return modules . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , uris . size ( ) )
|
testApacheHttpClientFalseIgnoreSSLCertsNotNullSslSocketFactory ( ) { com . aliyuncs . http . clients . HttpClientConfig config = this . getMockHttpClientConfigWithFalseIgnoreSSLCerts ( ) ; com . aliyuncs . http . clients . SSLSocketFactory sslSocketFactory = org . mockito . Mockito . mock ( com . aliyuncs . http . clients . SSLSocketFactory . class ) ; com . aliyuncs . http . clients . HostnameVerifier hostnameVerifier = org . mockito . Mockito . mock ( com . aliyuncs . http . clients . HostnameVerifier . class ) ; org . mockito . Mockito . when ( config . getSslSocketFactory ( ) ) . thenReturn ( sslSocketFactory ) ; org . mockito . Mockito . when ( config . getHostnameVerifier ( ) ) . thenReturn ( hostnameVerifier ) ; com . aliyuncs . http . clients . ApacheHttpClient httpClient = com . aliyuncs . http . clients . ApacheHttpClient . getInstance ( ) ; httpClient . init ( config ) ; "<AssertPlaceHolder>" ; httpClient . close ( ) ; } init ( com . aliyuncs . http . clients . HttpClientConfig ) { if ( ! ( initialized . compareAndSet ( false , true ) ) ) { try { latch . await ( ) ; } catch ( java . lang . InterruptedException e ) { throw new com . aliyuncs . exceptions . ClientException ( "SDK.InitFailed" , "Init<sp>apacheHttpClient<sp>failed" , e ) ; } return ; } final com . aliyuncs . http . clients . HttpClientConfig config = ( config0 != null ) ? config0 : com . aliyuncs . http . clients . HttpClientConfig . getDefault ( ) ; this . clientConfig = config ; org . apache . http . impl . client . HttpClientBuilder builder = initHttpClientBuilder ( ) ; org . apache . http . client . config . RequestConfig defaultConfig = org . apache . http . client . config . RequestConfig . custom ( ) . setConnectTimeout ( ( ( int ) ( config . getConnectionTimeoutMillis ( ) ) ) ) . setSocketTimeout ( ( ( int ) ( config . getReadTimeoutMillis ( ) ) ) ) . setConnectionRequestTimeout ( ( ( int ) ( config . getWriteTimeoutMillis ( ) ) ) ) . build ( ) ; builder . setDefaultRequestConfig ( defaultConfig ) ; initConnectionManager ( ) ; builder . setConnectionManager ( connectionManager ) ; com . aliyuncs . http . clients . ApacheIdleConnectionCleaner . registerConnectionManager ( connectionManager , config . getMaxIdleTimeMillis ( ) ) ; initExecutor ( ) ; if ( ( config . getKeepAliveDurationMillis ( ) ) > 0 ) { builder . setKeepAliveStrategy ( new org . apache . http . conn . ConnectionKeepAliveStrategy ( ) { @ com . aliyuncs . http . clients . Override public long getKeepAliveDuration ( org . apache . http . HttpResponse response , org . apache . http . protocol . HttpContext context ) { long duration = DefaultConnectionKeepAliveStrategy . INSTANCE . getKeepAliveDuration ( response , context ) ; if ( ( duration > 0 ) && ( duration < ( config . getKeepAliveDurationMillis ( ) ) ) ) { return duration ; } else { return config . getKeepAliveDurationMillis ( ) ; } } } ) ; } httpClient = builder . build ( ) ; latch . countDown ( ) ; }
|
org . junit . Assert . assertTrue ( ( httpClient instanceof com . aliyuncs . http . clients . ApacheHttpClient ) )
|
testDefaultFormattedSerializationIsISO ( ) { com . owlike . genson . Genson genson = createFormatterGenson ( ) ; java . time . LocalDate dt = java . time . LocalDate . now ( ) ; java . lang . String formattedValue = DateTimeFormatter . ISO_LOCAL_DATE . format ( dt ) ; "<AssertPlaceHolder>" ; } toJsonQuotedString ( java . lang . String ) { return ( "\"" + string ) + "\"" ; }
|
org . junit . Assert . assertEquals ( toJsonQuotedString ( formattedValue ) , genson . serialize ( dt ) )
|
mkdir ( ) { java . nio . file . Path source = java . nio . file . Paths . get ( ( "target/" + ( org . jooby . filewatcher . FileEventOptions . class . getSimpleName ( ) ) ) ) ; new org . jooby . filewatcher . FileEventOptions ( source , org . jooby . filewatcher . FileEventOptionsTest . MyHandler . class ) ; "<AssertPlaceHolder>" ; } exists ( java . util . function . Predicate ) { try ( java . util . stream . Stream < java . nio . file . Path > walk = org . jooby . funzy . Try . apply ( ( ) -> java . nio . file . Files . walk ( root ) ) . orElse ( java . util . stream . Stream . empty ( ) ) ) { return walk . skip ( 1 ) . anyMatch ( filter ) ; } }
|
org . junit . Assert . assertTrue ( java . nio . file . Files . exists ( source ) )
|
testDerivativeImageTempFile ( ) { java . lang . String pathname = edu . illinois . library . cantaloupe . config . Configuration . getInstance ( ) . getString ( Key . FILESYSTEMCACHE_PATHNAME ) ; edu . illinois . library . cantaloupe . image . Identifier identifier = new edu . illinois . library . cantaloupe . image . Identifier ( "cats_~!@#$%^&*()" ) ; edu . illinois . library . cantaloupe . operation . Crop crop = new edu . illinois . library . cantaloupe . operation . CropToSquare ( ) ; edu . illinois . library . cantaloupe . operation . Scale scale = new edu . illinois . library . cantaloupe . operation . Scale ( ) ; scale . setMode ( Scale . Mode . ASPECT_FIT_INSIDE ) ; scale . setPercent ( 0.905 ) ; edu . illinois . library . cantaloupe . operation . Rotate rotate = new edu . illinois . library . cantaloupe . operation . Rotate ( 10 ) ; edu . illinois . library . cantaloupe . operation . ColorTransform transform = edu . illinois . library . cantaloupe . operation . ColorTransform . BITONAL ; edu . illinois . library . cantaloupe . operation . Encode encode = new edu . illinois . library . cantaloupe . operation . Encode ( edu . illinois . library . cantaloupe . image . Format . TIF ) ; edu . illinois . library . cantaloupe . operation . OperationList ops = new edu . illinois . library . cantaloupe . operation . OperationList ( identifier , crop , scale , rotate , transform , encode ) ; final java . nio . file . Path expected = java . nio . file . Paths . get ( pathname , "image" , edu . illinois . library . cantaloupe . cache . FilesystemCache . FilesystemCache . hashedPathFragment ( identifier . toString ( ) ) , ( ( ops . toFilename ( ) ) + ( edu . illinois . library . cantaloupe . cache . FilesystemCache . FilesystemCache . tempFileSuffix ( ) ) ) ) ; "<AssertPlaceHolder>" ; } derivativeImageTempFile ( edu . illinois . library . cantaloupe . operation . OperationList ) { return edu . illinois . library . cantaloupe . cache . FilesystemCache . rootDerivativeImagePath ( ) . resolve ( edu . illinois . library . cantaloupe . cache . FilesystemCache . hashedPathFragment ( ops . getIdentifier ( ) . toString ( ) ) ) . resolve ( ( ( ops . toFilename ( ) ) + ( edu . illinois . library . cantaloupe . cache . FilesystemCache . tempFileSuffix ( ) ) ) ) ; }
|
org . junit . Assert . assertEquals ( expected , edu . illinois . library . cantaloupe . cache . FilesystemCache . FilesystemCache . derivativeImageTempFile ( ops ) )
|
createTableWithoutThroughput ( ) { try { createTable ( createTableName ( ) , createKeySchema ( ) , null ) ; "<AssertPlaceHolder>" ; } catch ( com . amazonaws . AmazonServiceException ase ) { } } createKeySchema ( ) { return createKeySchema ( createStringKeyElement ( ) , null ) ; }
|
org . junit . Assert . assertTrue ( false )
|
testReceive ( ) { int [ ] packet = getPacketData ( "01" ) ; com . zsmartsystems . zigbee . zcl . clusters . general . DiscoverCommandsGeneratedResponse response = new com . zsmartsystems . zigbee . zcl . clusters . general . DiscoverCommandsGeneratedResponse ( ) ; com . zsmartsystems . zigbee . serialization . DefaultDeserializer deserializer = new com . zsmartsystems . zigbee . serialization . DefaultDeserializer ( packet ) ; com . zsmartsystems . zigbee . zcl . ZclFieldDeserializer fieldDeserializer = new com . zsmartsystems . zigbee . zcl . ZclFieldDeserializer ( deserializer ) ; response . deserialize ( fieldDeserializer ) ; System . out . println ( response ) ; "<AssertPlaceHolder>" ; } getCommandIdentifiers ( ) { return commandIdentifiers ; }
|
org . junit . Assert . assertNull ( response . getCommandIdentifiers ( ) )
|
testCompareDateWithString ( ) { java . lang . String str = ( ( ( ( ( ( "import<sp>" + ( org . drools . modelcompiler . domain . ChildFactWithObject . class . getCanonicalName ( ) ) ) + ";\n" ) + "rule<sp>R<sp>when\n" ) + "\n" ) + "<sp>ChildFactWithObject(<sp>date<sp><<sp>\"10-Jul-1974\"<sp>)\n" ) + "<sp>then\n" ) + "end\n" ; org . kie . api . runtime . KieSession ksession = getKieSession ( str ) ; ksession . insert ( new org . drools . modelcompiler . domain . ChildFactWithObject ( 5 , 1 , new java . lang . Object [ 0 ] ) ) ; "<AssertPlaceHolder>" ; } fireAllRules ( ) { return 0 ; }
|
org . junit . Assert . assertEquals ( 1 , ksession . fireAllRules ( ) )
|
testNoTransaction ( ) { final java . lang . String deploymentUrl = org . jboss . as . test . xts . annotation . client . TransactionalTestCase . DEPLOYMENT_URL ; final org . jboss . as . test . xts . annotation . service . TransactionalService transactionalService = org . jboss . as . test . xts . annotation . client . TransactionalClient . newInstance ( deploymentUrl ) ; final boolean isTransactionActive = transactionalService . isTransactionActive ( ) ; "<AssertPlaceHolder>" ; } isTransactionActive ( ) { return ( transactionSynchronizationRegistry . getTransactionStatus ( ) ) == ( javax . transaction . Status . STATUS_ACTIVE ) ; }
|
org . junit . Assert . assertEquals ( false , isTransactionActive )
|
deleteTrafficScript ( ) { java . lang . Boolean wasDeleted = client . deleteTrafficscript ( fileName ) ; "<AssertPlaceHolder>" ; client . getTraffiscript ( fileName ) ; } deleteTrafficscript ( java . lang . String ) { return deleteItem ( name , ClientConstants . TRAFFICSCRIPT_PATH ) ; }
|
org . junit . Assert . assertTrue ( wasDeleted )
|
testUnregisterAll ( ) { io . atlasmap . core . DefaultAtlasModuleInfoRegistryTest . atlasModuleInfoRegistry . unregisterAll ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return moduleInfos . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , io . atlasmap . core . DefaultAtlasModuleInfoRegistryTest . atlasModuleInfoRegistry . size ( ) )
|
testIncludesRuleWithDFA ( ) { net . sourceforge . pmd . lang . rule . MockRule mock = new net . sourceforge . pmd . lang . rule . MockRule ( "name" , "desc" , "msg" , "rulesetname" ) ; mock . setLanguage ( net . sourceforge . pmd . lang . LanguageRegistry . getLanguage ( DummyLanguageModule . NAME ) ) ; mock . setDfa ( true ) ; net . sourceforge . pmd . RuleSet rs = new net . sourceforge . pmd . RuleSetFactory ( ) . createSingleRuleRuleSet ( mock ) ; "<AssertPlaceHolder>" ; } usesDFA ( net . sourceforge . pmd . lang . Language ) { for ( net . sourceforge . pmd . Rule r : rules ) { if ( ( r . getLanguage ( ) . equals ( language ) ) && ( r . isDfa ( ) ) ) { return true ; } } return false ; }
|
org . junit . Assert . assertTrue ( rs . usesDFA ( net . sourceforge . pmd . lang . LanguageRegistry . getLanguage ( DummyLanguageModule . NAME ) ) )
|
testGetNotFound ( ) { final java . lang . String topic = "topic1" ; final int maxSize = 1024 ; final com . taobao . metamorphosis . cluster . Partition partition = new com . taobao . metamorphosis . cluster . Partition ( "0-0" ) ; final long offset = 12 ; final java . lang . String url = "meta://localhost:0" ; this . producerZooKeeper . publishTopic ( topic , this . consumer ) ; org . easymock . classextension . EasyMock . expectLastCall ( ) ; org . easymock . classextension . EasyMock . expect ( this . remotingClient . isConnected ( url ) ) . andReturn ( true ) ; org . easymock . classextension . EasyMock . expect ( this . producerZooKeeper . selectBroker ( topic , partition ) ) . andReturn ( url ) ; org . easymock . classextension . EasyMock . expect ( this . remotingClient . invokeToGroup ( url , new com . taobao . metamorphosis . network . GetCommand ( topic , this . consumerConfig . getGroup ( ) , partition . getPartition ( ) , offset , maxSize , Integer . MIN_VALUE ) , 10000 , TimeUnit . MILLISECONDS ) ) . andReturn ( new com . taobao . metamorphosis . network . BooleanCommand ( 404 , "not<sp>found" , Integer . MIN_VALUE ) ) ; this . mocksControl . replay ( ) ; com . taobao . gecko . core . util . OpaqueGenerator . resetOpaque ( ) ; "<AssertPlaceHolder>" ; this . mocksControl . verify ( ) ; } get ( java . lang . String , com . taobao . metamorphosis . cluster . Partition , long , int ) { return this . get ( topic , partition , offset , maxSize , com . taobao . metamorphosis . client . consumer . SimpleMessageConsumer . DEFAULT_OP_TIMEOUT , TimeUnit . MILLISECONDS ) ; }
|
org . junit . Assert . assertNull ( this . consumer . get ( topic , partition , offset , maxSize ) )
|
test_param_string_constructor_9 ( ) { org . apache . jena . shared . impl . PrefixMappingImpl prefixes = new org . apache . jena . shared . impl . PrefixMappingImpl ( ) ; prefixes . setNsPrefix ( "ex" , "http://example.org" ) ; org . apache . jena . query . ParameterizedSparqlString query = new org . apache . jena . query . ParameterizedSparqlString ( prefixes ) ; "<AssertPlaceHolder>" ; } getNsPrefixURI ( java . lang . String ) { checkRead ( ) ; return holder . getBaseItem ( ) . getNsPrefixURI ( prefix ) ; }
|
org . junit . Assert . assertEquals ( prefixes . getNsPrefixURI ( "ex" ) , query . getNsPrefixURI ( "ex" ) )
|
service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithNullBody ( ) { final com . azure . common . entities . HttpBinJSON result = createService ( com . azure . common . implementation . RestProxyTests . Service19 . class ) . putWithHeaderApplicationJsonContentTypeAndByteArrayBody ( null ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( "" , result . data )
|
testNoArgsShortName ( ) { org . robovm . rt . DynamicJNITest . called = false ; org . robovm . rt . DynamicJNITest . noArgsShort ( ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( org . robovm . rt . DynamicJNITest . called )
|
testEnumWithJsonValueMethodAnnotation ( ) { final cz . habarta . typescript . generator . Settings settings = cz . habarta . typescript . generator . TestUtils . settings ( ) ; final java . lang . String output = new cz . habarta . typescript . generator . TypeScriptGenerator ( settings ) . generateTypeScript ( cz . habarta . typescript . generator . Input . from ( cz . habarta . typescript . generator . EnumTest . SideWithJsonValueMethodAnnotation . class ) ) ; final java . lang . String expected = ( "\n" + "type<sp>SideWithJsonValueMethodAnnotation<sp>=<sp>\'left-side\'<sp>|<sp>\'right-side\';\n" ) . replace ( "'" , "\"" ) ; "<AssertPlaceHolder>" ; } from ( java . lang . reflect . Type [ ] ) { java . util . Objects . requireNonNull ( types , "types" ) ; final java . util . List < cz . habarta . typescript . generator . parser . SourceType < java . lang . reflect . Type > > sourceTypes = new java . util . ArrayList ( ) ; for ( java . lang . reflect . Type type : types ) { sourceTypes . add ( new cz . habarta . typescript . generator . parser . SourceType ( type ) ) ; } return new cz . habarta . typescript . generator . Input ( sourceTypes ) ; }
|
org . junit . Assert . assertEquals ( expected , output )
|
testRollback ( ) { try { com . cloud . utils . db . Transaction . execute ( new com . cloud . utils . db . TransactionCallback < java . lang . Object > ( ) { @ com . cloud . utils . db . Override public java . lang . Object doInTransaction ( com . cloud . utils . db . TransactionStatus status ) { throw new java . lang . RuntimeException ( "Panic!" ) ; } } ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } verify ( conn ) . setAutoCommit ( false ) ; verify ( conn , times ( 0 ) ) . commit ( ) ; verify ( conn , times ( 1 ) ) . rollback ( ) ; verify ( conn , times ( 1 ) ) . close ( ) ; } getMessage ( ) { return message ; }
|
org . junit . Assert . assertEquals ( "Panic!" , e . getMessage ( ) )
|
loadWithShrinkingResults ( ) { org . review_board . ereviewboard . core . client . PagedLoader < java . lang . String > loader = new org . review_board . ereviewboard . core . client . PagedLoader < java . lang . String > ( 10 , new org . eclipse . core . runtime . NullProgressMonitor ( ) , "" ) { private int callCount ; private int firstCallTotal = 15 ; private int otherCallsTotal = 14 ; @ org . review_board . ereviewboard . core . client . Override protected org . review_board . ereviewboard . core . client . PagedResult < java . lang . String > doLoadInternal ( int start , int maxResults , org . eclipse . core . runtime . IProgressMonitor monitor ) throws org . review_board . ereviewboard . core . exception . ReviewboardException { if ( ( callCount ) == 0 ) { java . util . List < java . lang . String > result = new java . util . ArrayList < java . lang . String > ( ) ; for ( int i = 0 ; i < maxResults ; i ++ ) result . add ( ( ( ( callCount ) + "-" ) + i ) ) ; ( callCount ) ++ ; return org . review_board . ereviewboard . core . client . PagedResult . create ( result , firstCallTotal ) ; } else if ( ( callCount ) == 1 ) { java . util . List < java . lang . String > result = new java . util . ArrayList < java . lang . String > ( ) ; for ( int i = 0 ; i < 4 ; i ++ ) result . add ( ( ( ( callCount ) + "-" ) + i ) ) ; ( callCount ) ++ ; return org . review_board . ereviewboard . core . client . PagedResult . create ( result , otherCallsTotal ) ; } else { return org . review_board . ereviewboard . core . client . PagedResult . create ( java . util . Collections . < java . lang . String > emptyList ( ) , otherCallsTotal ) ; } } } ; loader . setLimit ( 40 ) ; java . util . List < java . lang . String > results = loader . doLoad ( ) ; "<AssertPlaceHolder>" ; } is ( int ) { return ( _errorCode ) == errorCode ; }
|
org . junit . Assert . assertThat ( results . size ( ) , org . hamcrest . CoreMatchers . is ( 14 ) )
|
testDeserializingHiddenAttribute ( ) { ddf . catalog . data . impl . MetacardImpl metacard = new ddf . catalog . data . impl . MetacardImpl ( ) ; metacard . setAttribute ( new ddf . catalog . data . impl . AttributeImpl ( "newName" , "newNameValue" ) ) ; ddf . catalog . data . impl . Serializer < ddf . catalog . data . Metacard > serializer = new ddf . catalog . data . impl . Serializer < ddf . catalog . data . Metacard > ( ) ; serializer . serialize ( metacard , ddf . catalog . data . impl . MetacardImplTest . DEFAULT_SERIALIZATION_FILE_LOCATION ) ; ddf . catalog . data . Metacard readMetacard = serializer . deserialize ( ddf . catalog . data . impl . MetacardImplTest . DEFAULT_SERIALIZATION_FILE_LOCATION ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { if ( org . jvnet . jaxb2_commons . lang . StringUtils . isEmpty ( name ) ) { return null ; } if ( Metacard . ID . equals ( name ) ) { return this . id ; } for ( ddf . catalog . data . Attribute attribute : attributes ) { if ( ( attribute == null ) || ( org . jvnet . jaxb2_commons . lang . StringUtils . isEmpty ( attribute . getName ( ) ) ) ) { continue ; } else if ( name . equals ( attribute . getName ( ) ) ) { return attribute ; } } return null ; }
|
org . junit . Assert . assertEquals ( "newNameValue" , readMetacard . getAttribute ( "newName" ) . getValue ( ) )
|
testSetAllSoLinger ( ) { org . kaazing . mina . netty . socket . nio . DefaultNioSocketChannelIoSessionConfig config = new org . kaazing . mina . netty . socket . nio . DefaultNioSocketChannelIoSessionConfig ( ) ; config . init ( new org . kaazing . mina . netty . socket . nio . NioSocketChannelIoAcceptor ( config ) ) ; config . setSoLinger ( 120 ) ; org . kaazing . mina . netty . socket . nio . NioSocketChannelIoSessionConfig acceptedConfig = new org . kaazing . mina . netty . socket . nio . NioSocketChannelIoSessionConfig ( new org . kaazing . mina . netty . socket . nio . DefaultNioSocketChannelIoSessionConfigTest . DefaultNioSocketChannelConfig ( new java . net . Socket ( ) ) ) ; acceptedConfig . setAll ( config ) ; "<AssertPlaceHolder>" ; } getSoLinger ( ) { return soLinger ; }
|
org . junit . Assert . assertEquals ( config . getSoLinger ( ) , acceptedConfig . getSoLinger ( ) )
|
gcTest ( ) { killMacGc ( ) ; final java . lang . String table = "test_ingest" ; try ( org . apache . accumulo . core . client . AccumuloClient c = org . apache . accumulo . core . client . Accumulo . newClient ( ) . from ( getClientProperties ( ) ) . build ( ) ) { c . tableOperations ( ) . create ( table ) ; c . tableOperations ( ) . setProperty ( table , Property . TABLE_SPLIT_THRESHOLD . getKey ( ) , "5K" ) ; org . apache . accumulo . test . VerifyIngest . VerifyParams params = new org . apache . accumulo . test . VerifyIngest . VerifyParams ( getClientProperties ( ) , table , 10000 ) ; params . cols = 1 ; org . apache . accumulo . test . TestIngest . ingest ( c , cluster . getFileSystem ( ) , params ) ; c . tableOperations ( ) . compact ( table , null , null , true , true ) ; int before = countFiles ( ) ; while ( true ) { sleepUninterruptibly ( 1 , TimeUnit . SECONDS ) ; int more = countFiles ( ) ; if ( more <= before ) break ; before = more ; } getCluster ( ) . start ( ) ; sleepUninterruptibly ( 15 , TimeUnit . SECONDS ) ; int after = countFiles ( ) ; org . apache . accumulo . test . VerifyIngest . verifyIngest ( c , params ) ; "<AssertPlaceHolder>" ; } } verifyIngest ( org . apache . accumulo . core . client . AccumuloClient , org . apache . accumulo . test . VerifyIngest$VerifyParams ) { byte [ ] [ ] bytevals = org . apache . accumulo . test . TestIngest . generateValues ( params . dataSize ) ; org . apache . accumulo . core . security . Authorizations labelAuths = new org . apache . accumulo . core . security . Authorizations ( "saw<sp>" 4 , "saw<sp>" 0 , "<sp>saw<sp>=<sp>{}<sp>expected<sp>=<sp>{}" 8 , "GROUP2" ) ; java . lang . String principal = ClientProperty . AUTH_PRINCIPAL . getValue ( params . clientProps ) ; accumuloClient . securityOperations ( ) . changeUserAuthorizations ( principal , labelAuths ) ; int expectedRow = params . startRow ; int expectedCol = 0 ; int recsRead = 0 ; long bytesRead = 0 ; long t1 = java . lang . System . currentTimeMillis ( ) ; byte [ ] randomValue = new byte [ params . dataSize ] ; java . util . Random random = new java . util . Random ( ) ; org . apache . accumulo . core . data . Key endKey = new org . apache . accumulo . core . data . Key ( new org . apache . hadoop . io . Text ( ( "<sp>saw<sp>=<sp>{}<sp>expected<sp>=<sp>{}" 0 + ( java . lang . String . format ( "%010d" , ( ( params . rows ) + ( params . startRow ) ) ) ) ) ) ) ; int errors = 0 ; while ( expectedRow < ( ( params . rows ) + ( params . startRow ) ) ) { if ( params . useGet ) { org . apache . hadoop . io . Text rowKey = new org . apache . hadoop . io . Text ( ( "<sp>saw<sp>=<sp>{}<sp>expected<sp>=<sp>{}" 0 + ( java . lang . String . format ( "%010d" , ( expectedRow + ( params . startRow ) ) ) ) ) ) ; org . apache . hadoop . io . Text colf = new org . apache . hadoop . io . Text ( params . columnFamily ) ; org . apache . hadoop . io . Text colq = new org . apache . hadoop . io . Text ( ( "<sp>saw<sp>=<sp>{}<sp>expected<sp>=<sp>{}" 2 + ( java . lang . String . format ( "<sp>saw<sp>=<sp>{}<sp>expected<sp>=<sp>{}" 3 , expectedCol ) ) ) ) ; try ( org . apache . accumulo . core . client . Scanner scanner = accumuloClient . createScanner ( "<sp>saw<sp>=<sp>{}<sp>expected<sp>=<sp>{}" 1 , labelAuths ) ) { scanner . setBatchSize ( 1 ) ; org . apache . accumulo . core . data . Key startKey = new org . apache . accumulo . core . data . Key ( rowKey , colf , colq ) ; org . apache . accumulo . core . data . Range range = new org . apache . accumulo . core . data . Range ( startKey , startKey . followingKey ( PartialKey . ROW_COLFAM_COLQUAL ) ) ; scanner . setRange ( range ) ; byte [ ] val = null ; java . util . Iterator < java . util . Map . Entry < org . apache . accumulo . core . data . Key , org . apache . accumulo . core . data . Value > > iter = scanner . iterator ( ) ; if ( iter . hasNext ( ) ) { val = iter . next ( ) . getValue ( ) . get ( ) ; } byte [ ] ev ; if ( ( params . random ) != null ) { ev = org . apache . accumulo . test . TestIngest . genRandomValue ( random , randomValue , params . random , expectedRow , expectedCol ) ; } else { ev = bytevals [ ( expectedCol % ( bytevals . length ) ) ] ; } if ( val == null ) { org . apache . accumulo . test . VerifyIngest . log . error ( "saw<sp>" 2 , rowKey , colf , colq ) ; errors ++ ; } else { recsRead ++ ; bytesRead += val . length ; org . apache . accumulo . core . data . Value value = new org . apache . accumulo . core . data . Value ( val ) ; if ( ( value
|
org . junit . Assert . assertTrue ( ( after < before ) )
|
testNullPairTyped ( ) { final org . apache . commons . lang3 . tuple . ImmutablePair < java . lang . String , java . lang . String > pair = org . apache . commons . lang3 . tuple . ImmutablePair . nullPair ( org . apache . commons . lang3 . tuple . ImmutablePair ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( pair )
|
relativeProperty_Non_NtBase ( ) { org . apache . jackrabbit . oak . plugins . index . lucene . util . IndexDefinitionBuilder defnb = new org . apache . jackrabbit . oak . plugins . index . lucene . util . IndexDefinitionBuilder ( ) ; defnb . indexRule ( "nt:unstructured" ) . property ( "foo" ) . propertyIndex ( ) ; org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexDefinition defn = new org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexDefinition ( root , defnb . build ( ) , "/foo" ) ; org . apache . jackrabbit . oak . plugins . index . lucene . LuceneIndexNode node = createIndexNode ( defn ) ; org . apache . jackrabbit . oak . query . index . FilterImpl filter = createFilter ( "nt:unstructured" ) ; filter . restrictProperty ( "jcr:content/foo" , Operator . EQUAL , org . apache . jackrabbit . oak . plugins . memory . PropertyValues . newString ( "/bar" ) ) ; org . apache . jackrabbit . oak . plugins . index . search . spi . query . FulltextIndexPlanner planner = new org . apache . jackrabbit . oak . plugins . index . search . spi . query . FulltextIndexPlanner ( node , "/foo" , filter , java . util . Collections . < org . apache . jackrabbit . oak . spi . query . QueryIndex . OrderEntry > emptyList ( ) ) ; org . apache . jackrabbit . oak . spi . query . QueryIndex . IndexPlan plan = planner . getPlan ( ) ; "<AssertPlaceHolder>" ; } getPlan ( ) { if ( ( definition ) == null ) { org . apache . jackrabbit . oak . plugins . index . search . spi . query . FulltextIndexPlanner . log . debug ( "Index<sp>{}<sp>not<sp>loaded" , indexPath ) ; return null ; } org . apache . jackrabbit . oak . plugins . index . search . spi . query . IndexPlan . Builder builder = getPlanBuilder ( ) ; if ( definition . isTestMode ( ) ) { if ( builder == null ) { if ( notSupportedFeature ( ) ) { return null ; } java . lang . String msg = java . lang . String . format ( ( "No<sp>plan<sp>found<sp>for<sp>filter<sp>[%s]<sp>" + "while<sp>using<sp>definition<sp>[%s]<sp>and<sp>testMode<sp>is<sp>found<sp>to<sp>be<sp>enabled" ) , filter , definition ) ; throw new java . lang . IllegalStateException ( msg ) ; } else { builder . setEstimatedEntryCount ( 1 ) . setCostPerExecution ( 0.001 ) . setCostPerEntry ( 0.001 ) ; } } return builder != null ? builder . build ( ) : null ; }
|
org . junit . Assert . assertNull ( plan )
|
setsTenantId ( ) { java . lang . String tenantId = org . camunda . bpm . engine . test . api . multitenancy . TenantIdProviderTest . TENANT_ID ; org . camunda . bpm . engine . test . api . multitenancy . StaticTenantIdTestProvider tenantIdProvider = new org . camunda . bpm . engine . test . api . multitenancy . StaticTenantIdTestProvider ( tenantId ) ; org . camunda . bpm . engine . test . api . multitenancy . TenantIdProviderTest . TestTenantIdProvider . delegate = tenantIdProvider ; testRule . deploy ( org . camunda . bpm . model . bpmn . Bpmn . createExecutableProcess ( org . camunda . bpm . engine . test . api . multitenancy . TenantIdProviderTest . PROCESS_DEFINITION_KEY ) . startEvent ( ) . userTask ( ) . done ( ) ) ; engineRule . getRuntimeService ( ) . startProcessInstanceByKey ( org . camunda . bpm . engine . test . api . multitenancy . TenantIdProviderTest . PROCESS_DEFINITION_KEY ) ; org . camunda . bpm . engine . runtime . ProcessInstance processInstance = engineRule . getRuntimeService ( ) . createProcessInstanceQuery ( ) . singleResult ( ) ; "<AssertPlaceHolder>" ; } getTenantId ( ) { return tenantId ; }
|
org . junit . Assert . assertThat ( processInstance . getTenantId ( ) , org . hamcrest . CoreMatchers . is ( tenantId ) )
|
testComplexIfg ( ) { java . lang . String fileTestDataName = ( ( ( ( ( org . jlinda . core . utils . SarUtilsTest . testDataLocation ) + "testdata_ifg_ovsmp_" ) + 1 ) + "_" ) + 1 ) + ".cr8" ; org . jblas . ComplexDoubleMatrix ifgCplx_EXPECTED = readCplxDoubleData ( fileTestDataName , org . jlinda . core . utils . SarUtilsTest . nRows , org . jlinda . core . utils . SarUtilsTest . nCols , ByteOrder . LITTLE_ENDIAN ) ; org . jblas . ComplexDoubleMatrix ifgCplx_ACTUAL = org . jlinda . core . utils . SarUtils . computeIfg ( org . jlinda . core . utils . SarUtilsTest . cplxData , org . jlinda . core . utils . SarUtilsTest . cplxData ) ; "<AssertPlaceHolder>" ; } computeIfg ( org . jblas . ComplexDoubleMatrix , org . jblas . ComplexDoubleMatrix ) { return org . jlinda . core . utils . LinearAlgebraUtils . dotmult ( masterData , slaveData . conj ( ) ) ; }
|
org . junit . Assert . assertEquals ( ifgCplx_EXPECTED , ifgCplx_ACTUAL )
|
testFullDeletion ( ) { com . github . davidmoten . rtree . RTree < java . lang . Object , com . github . davidmoten . rtree . geometry . Rectangle > tree = com . github . davidmoten . rtree . RTree . maxChildren ( 4 ) . create ( ) ; com . github . davidmoten . rtree . Entry < java . lang . Object , com . github . davidmoten . rtree . geometry . Rectangle > entry = com . github . davidmoten . rtree . RTreeTest . e ( 1 ) ; tree = tree . add ( entry ) . add ( entry ) ; tree = tree . delete ( entry , true ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ! ( head . isPresent ( ) ) ; }
|
org . junit . Assert . assertTrue ( tree . isEmpty ( ) )
|
testConcatPutsAllElementsInResult ( ) { com . google . common . collect . ImmutableList < java . lang . String > result = concatable . concat ( java . util . Arrays . asList ( com . google . common . collect . ImmutableList . of ( "1" , "2" ) , com . google . common . collect . ImmutableList . of ( "3" , "4" ) ) ) ; "<AssertPlaceHolder>" ; } of ( java . nio . file . Path , java . nio . file . Path , java . nio . file . Path , com . facebook . buck . io . filesystem . ProjectFilesystemView ) { return new com . facebook . buck . parser . manifest . BuildFileManifestCache ( superRootPath , rootPath , buildFileName , fileSystemView ) ; }
|
org . junit . Assert . assertEquals ( com . google . common . collect . ImmutableList . of ( "1" , "2" , "3" , "4" ) , result )
|
testGetResourcesAsXML ( ) { org . nuxeo . ecm . platform . relations . io . test . TestIORelationAdapter . feedGraph ( "data/initial_statements.xml" , graph ) ; org . nuxeo . ecm . platform . io . api . IOResourceAdapter adapter = ioService . getAdapter ( "all" ) ; "<AssertPlaceHolder>" ; java . util . List < org . nuxeo . ecm . core . api . DocumentRef > sources = java . util . Arrays . asList ( new org . nuxeo . ecm . core . api . DocumentRef [ ] { new org . nuxeo . ecm . core . api . IdRef ( org . nuxeo . ecm . platform . relations . io . test . TestIORelationAdapter . doc1Ref ) } ) ; org . nuxeo . ecm . platform . relations . io . IORelationResources ioRes = ( ( org . nuxeo . ecm . platform . relations . io . IORelationResources ) ( adapter . extractResources ( repoName , sources ) ) ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; adapter . getResourcesAsXML ( out , ioRes ) ; java . io . InputStream actual = new java . io . ByteArrayInputStream ( out . toByteArray ( ) ) ; org . nuxeo . ecm . platform . relations . api . Graph actualGraph = org . nuxeo . ecm . platform . relations . io . test . TestIORelationAdapter . getMemoryGraph ( ) ; actualGraph . read ( actual , null , null ) ; org . nuxeo . ecm . platform . relations . io . test . TestIORelationAdapter . compareGraph ( "data/exported_statements.xml" , actualGraph ) ; } getAdapter ( java . lang . Class ) { if ( adapter . getName ( ) . equals ( org . nuxeo . ecm . platform . login . deputy . management . DeputyManager . class . getName ( ) ) ) { return adapter . cast ( new org . nuxeo . ecm . platform . login . deputy . management . DeputyManagementStorageService ( ) ) ; } return adapter . cast ( this ) ; }
|
org . junit . Assert . assertNotNull ( adapter )
|
deveObterMotivoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . NFProtocoloInfo protocoloInfo = new com . fincatto . documentofiscal . nfe400 . classes . NFProtocoloInfo ( ) ; final java . lang . String motivo = "Autorizado<sp>o<sp>seu<sp>uso" ; protocoloInfo . setMotivo ( motivo ) ; "<AssertPlaceHolder>" ; } getMotivo ( ) { return this . motivo ; }
|
org . junit . Assert . assertEquals ( motivo , protocoloInfo . getMotivo ( ) )
|
testReadHierarchicalFromPojoPath ( ) { org . pm4j . core . pm . impl . pathresolver . Pojo p = org . pm4j . core . pm . impl . pathresolver . Pojo . make ( "head" , "sub" , "subSub" ) ; org . pm4j . common . expr . Expression expr = org . pm4j . core . pm . impl . expr . PathExpressionChain . parse ( "sub.sub.name" ) ; "<AssertPlaceHolder>" ; } exec ( org . pm4j . common . expr . ExprExecCtxt ) { ctxt . setCurrentExpr ( this ) ; java . lang . Object result = execImpl ( ( ( CTXT ) ( ctxt ) ) ) ; ctxt . setCurrentValue ( this , result ) ; return result ; }
|
org . junit . Assert . assertEquals ( "subSub" , expr . exec ( new org . pm4j . common . expr . ExprExecCtxt ( p ) ) )
|
boxingArgument ( ) { java . lang . Long value = 1L ; expect ( mock . oneLongArg ( value ) ) . andReturn ( "test" ) ; replay ( mock ) ; "<AssertPlaceHolder>" ; verify ( mock ) ; } replay ( java . lang . Object [ ] ) { for ( int i = 0 ; i < ( mocks . length ) ; i ++ ) { try { org . easymock . EasyMock . getControl ( mocks [ i ] ) . replay ( ) ; } catch ( java . lang . RuntimeException e ) { throw org . easymock . EasyMock . getRuntimeException ( mocks . length , i , e ) ; } catch ( java . lang . AssertionError e ) { throw org . easymock . EasyMock . getAssertionError ( mocks . length , i , e ) ; } } }
|
org . junit . Assert . assertEquals ( "test" , mock . oneLongArg ( value ) )
|
testPostMessageBoardThreadMessageBoardAttachment ( ) { "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( true )
|
testInvalidURINewFileSystem ( ) { final java . net . URI newRepo = java . net . URI . create ( "git:///repo-name" ) ; try { provider . newFileSystem ( newRepo , org . uberfire . java . nio . fs . jgit . EMPTY_ENV ) ; failBecauseExceptionWasNotThrown ( org . uberfire . java . nio . fs . jgit . IllegalArgumentException . class ) ; } catch ( final java . lang . IllegalArgumentException ex ) { "<AssertPlaceHolder>" . isEqualTo ( "Parameter<sp>named<sp>'uri'<sp>is<sp>invalid,<sp>missing<sp>host<sp>repository!" ) ; } } getMessage ( ) { return message ; }
|
org . junit . Assert . assertThat ( ex . getMessage ( ) )
|
testempty ( ) { io . github . data4all . util . RingBuffer ringBuffer = new io . github . data4all . util . RingBuffer ( 3 ) ; "<AssertPlaceHolder>" ; } get ( int ) { if ( ( this . getSize ( ) ) > 0 ) { return buffer [ position ] ; } return null ; }
|
org . junit . Assert . assertEquals ( null , ringBuffer . get ( 0 ) )
|
testParserMethodFinder ( ) { io . toast . tk . runtime . bean . ActionCommandDescriptor method = blockRunner . findMatchingAction ( "Intgrer<sp>*$flux*" , io . toast . tk . test . runtime . resource . XmlAdapterExample . class ) ; "<AssertPlaceHolder>" ; } findMatchingAction ( java . lang . String , java . lang . Class ) { io . toast . tk . adapter . cache . ToastCache cache = io . toast . tk . adapter . cache . ToastCache . getInstance ( ) ; if ( actionAdapterClass != ( java . lang . Object . class ) ) { final java . util . List < java . lang . reflect . Method > actionMethods = cache . getActionMethodsByClass ( actionAdapterClass ) ; final io . toast . tk . core . annotation . ActionAdapter adapter = actionAdapterClass . getAnnotation ( io . toast . tk . core . annotation . ActionAdapter . class ) ; for ( final java . lang . reflect . Method actionMethod : actionMethods ) { final io . toast . tk . core . annotation . Action mainAction = actionMethod . getAnnotation ( io . toast . tk . core . annotation . Action . class ) ; io . toast . tk . runtime . bean . ActionCommandDescriptor foundMethod = io . toast . tk . runtime . block . TestBlockRunner . matchMethod ( actionImpl , mainAction . action ( ) , actionMethod ) ; if ( foundMethod != null ) { return foundMethod ; } else if ( ( adapter != null ) && ( io . toast . tk . runtime . block . TestBlockRunner . hasMapping ( mainAction , adapter ) ) ) { foundMethod = matchAgainstActionIdMapping ( actionImpl , adapter . name ( ) , actionMethod , mainAction ) ; if ( foundMethod != null ) { return foundMethod ; } } } if ( ( actionAdapterClass . getSuperclass ( ) ) != null ) { return findMatchingAction ( actionImpl , actionAdapterClass . getSuperclass ( ) ) ; } } return null ; }
|
org . junit . Assert . assertNotNull ( method )
|
testIsAuthenticationRequiredWhenSystemConnectionRequiresAuthentication ( ) { policy . setVmConnectionAuthenticationRequired ( true ) ; org . apache . shiro . subject . Subject subject = new org . apache . activemq . shiro . subject . SubjectAdapter ( ) { @ org . apache . activemq . shiro . authc . Override public org . apache . shiro . subject . PrincipalCollection getPrincipals ( ) { return new org . apache . shiro . subject . SimplePrincipalCollection ( "system" , "iniRealm" ) ; } } ; org . apache . activemq . shiro . subject . SubjectConnectionReference sc = new org . apache . activemq . shiro . subject . SubjectConnectionReference ( new org . apache . activemq . broker . ConnectionContext ( ) , new org . apache . activemq . command . ConnectionInfo ( ) , new org . apache . shiro . env . DefaultEnvironment ( ) , subject ) ; "<AssertPlaceHolder>" ; } isAuthenticationRequired ( org . apache . activemq . shiro . subject . SubjectConnectionReference ) { org . apache . shiro . subject . Subject subject = conn . getSubject ( ) ; if ( subject . isAuthenticated ( ) ) { return false ; } if ( isAnonymousAccessAllowed ( ) ) { if ( isAnonymousAccount ( subject ) ) { return false ; } } if ( ! ( isVmConnectionAuthenticationRequired ( ) ) ) { if ( isSystemAccount ( subject ) ) { return false ; } } return true ; }
|
org . junit . Assert . assertTrue ( policy . isAuthenticationRequired ( sc ) )
|
testInt ( ) { org . apache . avro . Schema . Type type = Schema . Type . INT ; org . apache . avro . Schema simple = org . apache . avro . SchemaBuilder . builder ( ) . intType ( ) ; org . apache . avro . Schema expected = primitive ( type , simple ) ; org . apache . avro . Schema built1 = org . apache . avro . SchemaBuilder . builder ( ) . intBuilder ( ) . prop ( "p" , "v" ) . endInt ( ) ; "<AssertPlaceHolder>" ; } prop ( java . lang . String , java . lang . String ) { return prop ( name , com . fasterxml . jackson . databind . node . TextNode . valueOf ( val ) ) ; }
|
org . junit . Assert . assertEquals ( expected , built1 )
|
testThatBackstagePassesQualityIncreasesWhenSellInGreaterThan10 ( ) { int initialQuality = 1 ; int initialSellIn = 20 ; Item sulfuras = new Item ( "Backstage<sp>passes<sp>to<sp>a<sp>TAFKAL80ETC<sp>concert" , initialSellIn , initialQuality ) ; GildedRose sut = new GildedRose ( sulfuras ) ; sut . updateQuality ( ) ; "<AssertPlaceHolder>" ; } getQuality ( ) { return quality ; }
|
org . junit . Assert . assertThat ( sulfuras . getQuality ( ) , org . hamcrest . core . Is . is ( ( initialQuality + 1 ) ) )
|
verifyBuilder ( ) { final java . lang . String expectedCsv = new org . opennms . netmgt . flows . classification . internal . csv . CsvBuilder ( ) . withRule ( new org . opennms . netmgt . flows . classification . persistence . api . RuleBuilder ( ) . withName ( "opennms" 5 ) . withProtocol ( "TCP,UDP" ) . withDstAddress ( "127.0.0.1" ) ) . withRule ( new org . opennms . netmgt . flows . classification . persistence . api . RuleBuilder ( ) . withName ( "opennms" 0 ) . withDstAddress ( "opennms" 2 ) ) . withRule ( new org . opennms . netmgt . flows . classification . persistence . api . RuleBuilder ( ) . withName ( "opennms" ) . withDstPort ( 8980 ) ) . withRule ( new org . opennms . netmgt . flows . classification . persistence . api . RuleBuilder ( ) . withName ( "opennms" 8 ) . withSrcAddress ( "opennms" 3 ) . withSrcPort ( 10000 ) . withDstAddress ( "10.0.0.2" ) . withDstPort ( 8980 ) ) . withRule ( new org . opennms . netmgt . flows . classification . persistence . api . RuleBuilder ( ) . withName ( "opennms" 4 ) . withProtocol ( "opennms" 9 ) . withOmnidirectional ( true ) ) . withRule ( new org . opennms . netmgt . flows . classification . persistence . api . RuleBuilder ( ) . withName ( "xxx" ) . withProtocol ( "tcp,udp" ) . withSrcAddress ( "opennms" 3 ) . withSrcPort ( 10000 ) . withDstAddress ( "10.0.0.2" ) . withDstPort ( 8980 ) . withExporterFilter ( "opennms" 6 ) ) . build ( ) ; final java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; builder . append ( CsvServiceImpl . HEADERS_STRING ) ; builder . append ( "http2;TCP,UDP;;;127.0.0.1;;;false\n" ) ; builder . append ( "google;;;;8.8.8.8;;;false\n" ) ; builder . append ( "opennms" 1 ) ; builder . append ( "opennms-monitor;;10.0.0.1;10000;10.0.0.2;8980;;false\n" ) ; builder . append ( "opennms" 7 ) ; builder . append ( "xxx;tcp,udp;10.0.0.1;10000;10.0.0.2;8980;some-filter-value;false" ) ; final java . lang . String actualCsv = builder . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return java . lang . String . format ( "InterfaceLevelResource[node=%s,<sp>ifName=%s]" , m_node , m_ifName ) ; }
|
org . junit . Assert . assertEquals ( expectedCsv , actualCsv )
|
canCreate ( ) { com . openpojo . reflection . java . packageloader . reader . JarFileReader jarFileReader = com . openpojo . reflection . java . packageloader . reader . JarFileReader . getInstance ( ( ( java . lang . String ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } getInstance ( java . lang . String ) { return new com . openpojo . reflection . java . packageloader . reader . JarFileReader ( jarFilePath ) ; }
|
org . junit . Assert . assertNotNull ( jarFileReader )
|
testAddChildIntLoop ( ) { org . pb . x12 . Loop loop = new org . pb . x12 . Loop ( new org . pb . x12 . Context ( '~' , '*' , ':' ) , "ISA" ) ; org . pb . x12 . Loop gs = new org . pb . x12 . Loop ( new org . pb . x12 . Context ( '~' , '*' , ':' ) , "GS" ) ; org . pb . x12 . Loop st = new org . pb . x12 . Loop ( new org . pb . x12 . Context ( '~' , '*' , ':' ) , "ST" ) ; loop . addChild ( 0 , gs ) ; loop . addChild ( 1 , st ) ; "<AssertPlaceHolder>" ; } getLoop ( int ) { return loops . get ( index ) ; }
|
org . junit . Assert . assertEquals ( "ST" , loop . getLoop ( 1 ) . getName ( ) )
|
test16 ( ) { byte [ ] expected = new byte [ ] { ( ( byte ) ( 0 ) ) } ; java . lang . String str = new java . lang . String ( "" ) ; "<AssertPlaceHolder>" ; } build_lenenc_str ( java . lang . String ) { return com . github . mpjct . jmpjct . mysql . proto . Proto . build_lenenc_str ( str , false ) ; }
|
org . junit . Assert . assertArrayEquals ( expected , com . github . mpjct . jmpjct . mysql . proto . Proto . build_lenenc_str ( str ) )
|
testApplyAclRuleVspCommand ( ) { _resource . configure ( "NuageVspResource" , _hostDetails ) ; net . nuage . vsp . acs . client . api . model . VspNetwork vspNetwork = buildVspNetwork ( ) ; java . util . List < net . nuage . vsp . acs . client . api . model . VspAclRule > vspAclRules = com . google . common . collect . Lists . newArrayList ( buildVspAclRule ( ) ) ; com . cloud . agent . api . element . ApplyAclRuleVspCommand cmd = new com . cloud . agent . api . element . ApplyAclRuleVspCommand ( VspAclRule . ACLType . NetworkACL , vspNetwork , vspAclRules , false ) ; com . cloud . agent . api . Answer applyAclAns = _resource . executeRequest ( cmd ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return this . result ; }
|
org . junit . Assert . assertTrue ( applyAclAns . getResult ( ) )
|
paths_cyclophane_even ( ) { int [ ] [ ] cyclophane_even = org . openscience . cdk . graph . InitialCyclesTest . cyclophane_even ( ) ; org . openscience . cdk . graph . VertexShortCycles vsc = new org . openscience . cdk . graph . VertexShortCycles ( cyclophane_even ) ; int [ ] [ ] paths = vsc . paths ( ) ; int [ ] [ ] expected = new int [ ] [ ] { new int [ ] { 3 , 2 , 1 , 0 , 5 , 4 , 3 } , new int [ ] { 3 , 6 , 7 , 8 , 9 , 10 , 11 , 0 , 1 , 2 , 3 } , new int [ ] { 3 , 6 , 7 , 8 , 9 , 10 , 11 , 0 , 5 , 4 , 3 } } ; "<AssertPlaceHolder>" ; } paths ( ) { int [ ] [ ] paths = new int [ this . paths . size ( ) ] [ 0 ] ; for ( int i = 0 ; i < ( this . paths . size ( ) ) ; i ++ ) paths [ i ] = this . paths . get ( i ) ; return paths ; }
|
org . junit . Assert . assertThat ( paths , org . hamcrest . CoreMatchers . is ( expected ) )
|
testAddressIpv4 ( ) { java . net . InetSocketAddress inetAddress = new java . net . InetSocketAddress ( io . netty . util . NetUtil . LOCALHOST4 , 9999 ) ; byte [ ] bytes = new byte [ 8 ] ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . wrap ( bytes ) ; buffer . put ( inetAddress . getAddress ( ) . getAddress ( ) ) ; buffer . putInt ( inetAddress . getPort ( ) ) ; "<AssertPlaceHolder>" ; } address ( byte [ ] , int , int ) { final int port = io . netty . channel . unix . NativeInetAddress . decodeInt ( addr , ( ( offset + len ) - 4 ) ) ; final java . net . InetAddress address ; try { switch ( len ) { case 8 : byte [ ] ipv4 = new byte [ 4 ] ; java . lang . System . arraycopy ( addr , offset , ipv4 , 0 , 4 ) ; address = java . net . InetAddress . getByAddress ( ipv4 ) ; break ; case 24 : byte [ ] ipv6 = new byte [ 16 ] ; java . lang . System . arraycopy ( addr , offset , ipv6 , 0 , 16 ) ; int scopeId = io . netty . channel . unix . NativeInetAddress . decodeInt ( addr , ( ( offset + len ) - 8 ) ) ; address = java . net . Inet6Address . getByAddress ( null , ipv6 , scopeId ) ; break ; default : throw new java . lang . Error ( ) ; } return new java . net . InetSocketAddress ( address , port ) ; } catch ( java . net . UnknownHostException e ) { throw new java . lang . Error ( "Should<sp>never<sp>happen" , e ) ; } }
|
org . junit . Assert . assertEquals ( inetAddress , address ( buffer . array ( ) , 0 , bytes . length ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.