input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testGetNullSelectorFieldName ( ) { "<AssertPlaceHolder>" ; } getSelectorFieldName ( com . stratio . crossdata . common . statements . structures . Selector ) { if ( null == selector ) { return null ; } if ( selector instanceof com . stratio . crossdata . common . statements . structures . FunctionSelector ) { return com . stratio . connector . elasticsearch . core . engine . utils . SelectorUtils . getFunctionSelectorFieldName ( ( ( com . stratio . crossdata . common . statements . structures . FunctionSelector ) ( selector ) ) ) ; } if ( selector instanceof com . stratio . crossdata . common . statements . structures . AliasSelector ) { return com . stratio . connector . elasticsearch . core . engine . utils . SelectorUtils . getSelectorFieldName ( ( ( com . stratio . crossdata . common . statements . structures . AliasSelector ) ( selector ) ) . getReferencedSelector ( ) ) ; } return selector . getColumnName ( ) . getName ( ) ; }
org . junit . Assert . assertNull ( com . stratio . connector . elasticsearch . core . engine . utils . SelectorUtils . getSelectorFieldName ( null ) )
testAppConfigWithoutComponentScan ( ) { org . springframework . context . annotation . AnnotationConfigApplicationContext ctx = new org . springframework . context . annotation . AnnotationConfigApplicationContext ( org . springframework . issues . AppConfigWithoutComponentScan . class ) ; org . springframework . issues . CustomerDAO dao = ctx . getBean ( org . springframework . issues . CustomerDAO . class ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( dao )
testBackendDomain ( ) { final com . typesafe . config . Config config = com . typesafe . config . ConfigFactory . parseMap ( com . google . common . collect . ImmutableMap . of ( "domain" , "foo" ) ) ; final com . spotify . apollo . environment . ApolloConfig sut = new com . spotify . apollo . environment . ApolloConfig ( config ) ; "<AssertPlaceHolder>" ; } backend ( ) { return com . spotify . apollo . environment . ConfigUtil . either ( com . spotify . apollo . environment . ConfigUtil . either ( com . spotify . apollo . environment . ConfigUtil . optionalString ( apolloNode , "domain" ) , com . spotify . apollo . environment . ConfigUtil . optionalString ( apolloNode , "backend" ) ) , com . spotify . apollo . environment . ConfigUtil . optionalString ( root , "domain" ) ) . orElse ( "" ) ; }
org . junit . Assert . assertThat ( sut . backend ( ) , org . hamcrest . Matchers . is ( "foo" ) )
testShouldBeAbleToEnterTextIntoATextAreaBySettingItsValue ( ) { org . openqa . selenium . qtwebkit . nativetests . WebElement textarea = driver . findElement ( org . openqa . selenium . qtwebkit . nativetests . By . id ( "workingArea" ) ) ; textarea . clear ( ) ; java . lang . String cheesy = "brie<sp>and<sp>cheddar" ; textarea . sendKeys ( cheesy ) ; "<AssertPlaceHolder>" ; } getText ( ) { return stb . getText ( ) ; }
org . junit . Assert . assertThat ( textarea . getText ( ) , org . hamcrest . Matchers . equalTo ( cheesy ) )
testFromJsonMapping ( ) { final io . vertx . core . json . JsonObject data = this . getJson ( "d10047-mapping.json" ) ; final io . vertx . up . aiki . D10047Obj obj = io . vertx . up . aiki . Ux . fromJson ( data , io . vertx . up . aiki . D10047Obj . class , "d10047" ) ; System . out . println ( obj ) ; "<AssertPlaceHolder>" ; } fromJson ( io . vertx . core . json . JsonObject , java . lang . Class , java . lang . String ) { return io . vertx . up . aiki . From . fromJson ( data , clazz , pojo ) ; }
org . junit . Assert . assertNotNull ( obj )
getFalse ( ) { "<AssertPlaceHolder>" ; } getFalse ( ) { org . junit . Assert . assertFalse ( com . gs . collections . impl . block . factory . Functions . getFalse ( ) . valueOf ( true ) ) ; }
org . junit . Assert . assertFalse ( com . gs . collections . impl . block . factory . Functions . getFalse ( ) . valueOf ( true ) )
testValidator_pass_for_file_below_limit ( ) { long now = ( ( java . lang . System . currentTimeMillis ( ) ) - ( com . captaindebug . errortrack . validator . FileAgeValidatorTest . MILLIS_IN_TWO_DAYS ) ) + 1000 ; when ( file . lastModified ( ) ) . thenReturn ( now ) ; "<AssertPlaceHolder>" ; } validate ( T ) { boolean retVal = false ; java . io . File file = ( ( java . io . File ) ( obj ) ) ; if ( fileAgeValidator . validate ( file ) ) { results . addFile ( file . getPath ( ) ) ; checkFile ( file ) ; retVal = true ; } return retVal ; }
org . junit . Assert . assertTrue ( instance . validate ( file ) )
testWithLeafCircular ( ) { org . apache . tools . ant . types . FileSet fs = new org . apache . tools . ant . types . FileSet ( ) ; fs . setDir ( new java . io . File ( "test/buildlist" ) ) ; fs . setIncludes ( "**/build.xml" ) ; buildlist . addFileset ( fs ) ; buildlist . setLeaf ( "F" ) ; buildlist . setOnMissingDescriptor ( "skip" ) ; java . lang . String [ ] files = getFiles ( buildlist ) ; "<AssertPlaceHolder>" ; } getFiles ( org . apache . ivy . ant . IvyBuildList ) { buildlist . setReference ( "ordered.build.files" ) ; buildlist . execute ( ) ; java . lang . Object o = buildlist . getProject ( ) . getReference ( "ordered.build.files" ) ; org . junit . Assert . assertNotNull ( o ) ; org . junit . Assert . assertTrue ( ( o instanceof org . apache . tools . ant . types . Path ) ) ; org . apache . tools . ant . types . Path path = ( ( org . apache . tools . ant . types . Path ) ( o ) ) ; java . lang . String [ ] files = path . list ( ) ; org . junit . Assert . assertNotNull ( files ) ; return files ; }
org . junit . Assert . assertEquals ( 2 , files . length )
testSetValue ( ) { org . kie . workbench . common . forms . fields . shared . fieldTypes . basic . selectors . IntegerSelectorOption opt = new org . kie . workbench . common . forms . fields . shared . fieldTypes . basic . selectors . IntegerSelectorOption ( ) ; opt . setValue ( valueB ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return rootPath ; }
org . junit . Assert . assertSame ( valueB , opt . getValue ( ) )
testParseScriptCfcHarder ( ) { java . lang . String path = "" ; try { path = new java . net . URL ( "file:src/test/resources/cfml/ScriptComponentHarder.cfc" ) . getPath ( ) ; } catch ( java . net . MalformedURLException e ) { e . printStackTrace ( ) ; } cfml . parsing . cfscript . script . CFScriptStatement scriptStatement = null ; try { scriptStatement = fCfmlParser . parseScriptFile ( path ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( ( "whoops!<sp>" + ( e . getMessage ( ) ) ) ) ; } if ( ( fCfmlParser . getMessages ( ) . size ( ) ) > 0 ) { org . junit . Assert . fail ( ( "whoops!<sp>" + ( fCfmlParser . getMessages ( ) ) ) ) ; } System . out . println ( scriptStatement . toString ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return "" ; }
org . junit . Assert . assertNotNull ( scriptStatement )
testClearBitNegativeInside3 ( ) { java . lang . String as = "-18446744073709551615" ; int number = 2 ; java . math . BigInteger aNumber = new java . math . BigInteger ( as ) ; java . math . BigInteger result = aNumber . clearBit ( number ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( getClass ( ) . getName ( ) ) + "[index=" ) + ( currentPosition ) ) + ",<sp>errorIndex=" ) + ( errorIndex ) ) + "]" ; }
org . junit . Assert . assertEquals ( as , result . toString ( ) )
testGetDatastoreProperties ( ) { "<AssertPlaceHolder>" ; } getDatastoreProperties ( ) { return null ; }
org . junit . Assert . assertEquals ( datastore , properties . getDatastoreProperties ( ) )
indentWithCommentsTest ( ) { java . util . List < java . lang . String > lines = java . util . Arrays . asList ( "mir;<sp>mit;<sp>1.50<sp>#<sp>p=0.994,<sp>r=0.658,<sp>tp=775,<sp>tn=1173,<sp>fp=5,<sp>fn=403,<sp>178+1000,<sp>2017-10-23" , "nach;<sp>noch;<sp>1.75<sp>#<sp>p=0.990,<sp>r=0.504,<sp>tp=1009,<sp>tn=1990,<sp>fp=10,<sp>fn=991,<sp>1000+1000,<sp>2017-10-23" ) ; java . lang . String result = org . languagetool . dev . bigdata . ConfusionFileIndenter . indent ( lines ) ; java . lang . String expected = "mir;<sp>mit;<sp>1.50<sp>#<sp>p=0.994,<sp>r=0.658,<sp>tp=775,<sp>tn=1173,<sp>fp=5,<sp>fn=403,<sp>178+1000,<sp>2017-10-23\n" + "nach;<sp>noch;<sp>1.75<sp>#<sp>p=0.990,<sp>r=0.504,<sp>tp=1009,<sp>tn=1990,<sp>fp=10,<sp>fn=991,<sp>1000+1000,<sp>2017-10-23\n" ; "<AssertPlaceHolder>" ; } indent ( java . util . List ) { java . lang . StringBuilder indentedLines = new java . lang . StringBuilder ( ) ; java . util . Set < java . lang . String > alreadyDone = new java . util . HashSet ( ) ; for ( java . lang . String line : lines ) { if ( ( ! ( line . startsWith ( "#" ) ) ) && ( ! ( line . isEmpty ( ) ) ) ) { java . lang . String [ ] parts = line . replaceFirst ( "\\s*#.*" , "" ) . split ( ";\\s*" ) ; java . lang . String key = ( ( parts [ 0 ] ) + ";" ) + ( parts [ 1 ] ) ; if ( alreadyDone . contains ( key ) ) { continue ; } alreadyDone . add ( key ) ; } int commentPos = line . lastIndexOf ( '#' ) ; if ( commentPos <= 0 ) { indentedLines . append ( line ) . append ( "\n" ) ; } else { int endData = commentPos ; while ( java . lang . Character . isWhitespace ( line . charAt ( ( endData - 1 ) ) ) ) { endData -- ; } java . lang . String spaces = org . apache . commons . lang3 . StringUtils . repeat ( "<sp>" , java . lang . Math . max ( 1 , ( 82 - endData ) ) ) ; indentedLines . append ( line , 0 , endData ) . append ( spaces ) . append ( line . substring ( commentPos ) ) . append ( "\n" ) ; } } return indentedLines . toString ( ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( expected ) )
testNNTModelShouldGiveCorrectValue ( ) { java . lang . Object actual = d_pm . getModel ( OddsRatioScalePresentation . PROPERTY_NNT ) . getValue ( ) ; java . lang . Object expected = d_orc . getNumberNeededToTreat ( org . drugis . addis . presentation . OddsRatioScalePresentationTest . convert ( d_criterion . getScale ( ) ) ) ; "<AssertPlaceHolder>" ; } getScale ( ) { return d_scale ; }
org . junit . Assert . assertEquals ( expected , actual )
test_size_5 ( ) { org . trie4j . Trie t = trieWithWords ( "" ) ; "<AssertPlaceHolder>" ; } size ( ) { return orig . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , t . size ( ) )
directExecutorIsUsedByDefaultForDirCacheStores ( ) { com . facebook . buck . artifact_cache . config . ArtifactCacheBuckConfig config = com . facebook . buck . artifact_cache . ArtifactCacheBuckConfigTest . createFromText ( ) ; "<AssertPlaceHolder>" ; } getDirCacheStoreExecutor ( ) { return buckConfig . getEnum ( com . facebook . buck . artifact_cache . config . ArtifactCacheBuckConfig . CACHE_SECTION_NAME , "dir_cache_store_executor" , com . facebook . buck . artifact_cache . config . ArtifactCacheBuckConfig . Executor . class ) . orElse ( com . facebook . buck . artifact_cache . config . ArtifactCacheBuckConfig . Executor . DIRECT ) ; }
org . junit . Assert . assertEquals ( Executor . DIRECT , config . getDirCacheStoreExecutor ( ) )
testHasChangesPhantom ( ) { java . lang . String artistName = "ArtistName" ; org . apache . cayenne . testdo . testmap . Artist artist = ( ( org . apache . cayenne . testdo . testmap . Artist ) ( context . newObject ( "Artist" ) ) ) ; artist . setArtistName ( artistName ) ; context . commitChanges ( ) ; artist . setArtistName ( artistName ) ; "<AssertPlaceHolder>" ; } hasChanges ( ) { return graphManager . hasChanges ( ) ; }
org . junit . Assert . assertTrue ( context . hasChanges ( ) )
testRowKeyWithNoGroup ( ) { measurement . withGroups ( java . util . Collections . emptyList ( ) ) ; java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocate ( 100 ) . put ( org . apache . metron . profiler . hbase . SaltyRowKeyBuilder . getSalt ( measurement . getPeriod ( ) , org . apache . metron . profiler . hbase . SaltyRowKeyBuilderTest . saltDivisor ) ) . put ( measurement . getProfileName ( ) . getBytes ( ) ) . put ( measurement . getEntity ( ) . getBytes ( ) ) . putLong ( 1635701L ) ; buffer . flip ( ) ; final byte [ ] expected = new byte [ buffer . limit ( ) ] ; buffer . get ( expected , 0 , buffer . limit ( ) ) ; byte [ ] actual = rowKeyBuilder . rowKey ( measurement ) ; "<AssertPlaceHolder>" ; } rowKey ( org . apache . storm . tuple . Tuple ) { org . apache . metron . profiler . ProfileMeasurement measurement = ( ( org . apache . metron . profiler . ProfileMeasurement ) ( tuple . getValueByField ( "measurement" ) ) ) ; return rowKeyBuilder . rowKey ( measurement ) ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( expected , actual ) )
testLocalizedTitle ( ) { context . checking ( new org . jmock . Expectations ( ) { { oneOf ( serverConfigurationService ) . getBoolean ( "legacyPageTitleCustom" , true ) ; will ( returnValue ( true ) ) ; one ( activeToolManager ) . getTool ( "toolId" ) ; org . sakaiproject . tool . impl . ToolImpl result = new org . sakaiproject . tool . impl . ToolImpl ( activeToolManager ) ; result . setId ( "toolId" ) ; result . setTitle ( "Tool<sp>Title" ) ; will ( returnValue ( result ) ) ; one ( activeToolManager ) . getLocalizedToolProperty ( "toolId" , "title" ) ; will ( returnValue ( "Localized<sp>Title" ) ) ; } } ) ; page . addTool ( "toolId" ) ; "<AssertPlaceHolder>" ; } getTitle ( ) { return "(title<sp>unknown)" ; }
org . junit . Assert . assertEquals ( "Localized<sp>Title" , page . getTitle ( ) )
testGetAll ( ) { System . out . println ( "test:getAll" ) ; org . glassfish . flashlight . datatree . TreeNode server = setupComplexTree ( ) ; java . util . List < org . glassfish . flashlight . datatree . TreeNode > list = server . getNodes ( "*" , false , true ) ; java . lang . String [ ] expected = new java . lang . String [ 7 ] ; expected [ 0 ] = new java . lang . String ( "server" ) ; expected [ 1 ] = new java . lang . String ( "server.wto" ) ; expected [ 2 ] = new java . lang . String ( "server" 2 ) ; expected [ 3 ] = new java . lang . String ( "server.wto.wtoson.wtosonsdaughter" ) ; expected [ 4 ] = new java . lang . String ( "server" 0 ) ; expected [ 5 ] = new java . lang . String ( "server" 1 ) ; expected [ 6 ] = new java . lang . String ( "server.wto.wtodaughter.wtodaughtersdaughter" ) ; "<AssertPlaceHolder>" ; } size ( ) { return mappings . size ( ) ; }
org . junit . Assert . assertEquals ( expected . length , list . size ( ) )
validateReferenceMappingEnabled ( ) { org . apache . flink . api . java . typeutils . runtime . kryo . KryoSerializer < java . lang . String > serializer = new org . apache . flink . api . java . typeutils . runtime . kryo . KryoSerializer ( java . lang . String . class , new org . apache . flink . api . common . ExecutionConfig ( ) ) ; com . esotericsoftware . kryo . Kryo kryo = serializer . getKryo ( ) ; "<AssertPlaceHolder>" ; } getReferences ( ) { return references ; }
org . junit . Assert . assertTrue ( kryo . getReferences ( ) )
testOrderBy ( ) { try { org . talend . dq . dbms . DbmsLanguage dbms = getMysqlDbmsLanguage ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } orderBy ( ) { return "<sp>ORDER<sp>BY<sp>" ; }
org . junit . Assert . assertNotNull ( dbms . orderBy ( ) )
listIterator ( ) { int sum = 0 ; com . gs . collections . api . list . MutableList < java . lang . Integer > integers = this . newWith ( 1 , 2 , 3 , 4 ) ; for ( java . util . Iterator < java . lang . Integer > iterator = integers . listIterator ( ) ; iterator . hasNext ( ) ; ) { java . lang . Integer each = iterator . next ( ) ; sum += each . intValue ( ) ; } for ( java . util . ListIterator < java . lang . Integer > iterator = integers . listIterator ( 4 ) ; iterator . hasPrevious ( ) ; ) { java . lang . Integer each = iterator . previous ( ) ; sum += each . intValue ( ) ; } "<AssertPlaceHolder>" ; } intValue ( ) { return ( ( int ) ( this . value ) ) ; }
org . junit . Assert . assertEquals ( 20 , sum )
testMarshallGetSessionTimeCommand ( ) { java . lang . String xmlCommand = "<get-session-time<sp>out-identifier=\"session-currenttime\"/>" ; org . drools . core . command . runtime . GetSessionTimeCommand command = marshaller . unmarshall ( xmlCommand , org . drools . core . command . runtime . GetSessionTimeCommand . class ) ; "<AssertPlaceHolder>" ; } marshall ( org . kie . server . router . Configuration ) { java . util . Map < java . lang . String , java . util . List < java . lang . String > > perContainer = configuration . getHostsPerContainer ( ) ; java . util . Map < java . lang . String , java . util . List < java . lang . String > > perServer = configuration . getHostsPerServer ( ) ; java . util . Map < java . lang . String , java . util . List < org . kie . server . router . ContainerInfo > > containerInfo = configuration . getContainerInfosPerContainer ( ) ; org . json . JSONArray servers = new org . json . JSONArray ( ) ; org . json . JSONArray containers = new org . json . JSONArray ( ) ; org . json . JSONArray infos = new org . json . JSONArray ( ) ; org . json . JSONObject config = new org . json . JSONObject ( ) ; for ( java . util . Map . Entry < java . lang . String , java . util . List < java . lang . String > > entry : perContainer . entrySet ( ) ) { org . json . JSONArray array = new org . json . JSONArray ( ) ; entry . getValue ( ) . forEach ( ( url ) -> array . put ( url ) ) ; org . json . JSONObject container = new org . json . JSONObject ( ) ; container . put ( entry . getKey ( ) , array ) ; containers . put ( container ) ; } for ( java . util . Map . Entry < java . lang . String , java . util . List < java . lang . String > > entry : perServer . entrySet ( ) ) { org . json . JSONArray array = new org . json . JSONArray ( ) ; entry . getValue ( ) . forEach ( ( url ) -> array . put ( url ) ) ; org . json . JSONObject server = new org . json . JSONObject ( ) ; server . put ( entry . getKey ( ) , array ) ; servers . put ( server ) ; } java . util . Set < java . lang . String > processed = new java . util . HashSet ( ) ; for ( java . util . Map . Entry < java . lang . String , java . util . List < org . kie . server . router . ContainerInfo > > entry : containerInfo . entrySet ( ) ) { if ( processed . contains ( entry . getKey ( ) ) ) { continue ; } entry . getValue ( ) . forEach ( ( ci ) -> { org . json . JSONObject jsonCI = new org . json . JSONObject ( ) ; processed . add ( ci . getAlias ( ) ) ; processed . add ( ci . getContainerId ( ) ) ; try { jsonCI . put ( "alias" , ci . getAlias ( ) ) ; jsonCI . put ( "containerId" , ci . getContainerId ( ) ) ; jsonCI . put ( "releaseId" , ci . getReleaseId ( ) ) ; infos . put ( jsonCI ) ; } catch ( e ) { org . kie . server . router . repository . e . printStackTrace ( ) ; } } ) ; } config . put ( "containers" , containers ) ; config . put ( "servers" , servers ) ; config . put ( "containerInfo" , infos ) ; return config . toString ( 2 ) ; }
org . junit . Assert . assertEquals ( xmlCommand , marshaller . marshall ( command ) )
testNeq ( ) { org . eclipse . rdf4j . query . parser . sparql . SPARQLParser parser1 = new org . eclipse . rdf4j . query . parser . sparql . SPARQLParser ( ) ; org . eclipse . rdf4j . query . parser . sparql . SPARQLParser parser2 = new org . eclipse . rdf4j . query . parser . sparql . SPARQLParser ( ) ; org . eclipse . rdf4j . query . parser . ParsedQuery pq1 = parser1 . parseQuery ( q9 , null ) ; org . eclipse . rdf4j . query . parser . ParsedQuery pq2 = parser2 . parseQuery ( q8 , null ) ; java . util . List < org . eclipse . rdf4j . query . algebra . TupleExpr > normalize = org . apache . rya . indexing . pcj . matching . QueryVariableNormalizer . getNormalizedIndex ( pq1 . getTupleExpr ( ) , pq2 . getTupleExpr ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ! ( init ) ) { indexCache = org . apache . rya . indexing . pcj . matching . PCJOptimizerUtilities . getValidPCJs ( getIndices ( ) ) ; init = true ; } return indexCache . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( normalize . size ( ) ) == 0 ) )
equalsTest1 ( ) { java . lang . Object obj = null ; niciraActionDeserializerKey = new org . opendaylight . openflowjava . nx . api . NiciraActionDeserializerKey ( org . opendaylight . openflowjava . nx . api . NiciraActionDeserializerKeyTest . VERSION , 10 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == object ) { return true ; } if ( ( object == null ) || ( ( getClass ( ) ) != ( object . getClass ( ) ) ) ) { return false ; } org . opendaylight . openflowplugin . applications . southboundcli . util . OFNode ofNode = ( ( org . opendaylight . openflowplugin . applications . southboundcli . util . OFNode ) ( object ) ) ; return ( nodeId ) != null ? nodeId . equals ( ofNode . nodeId ) : ( ofNode . nodeId ) == null ; }
org . junit . Assert . assertFalse ( niciraActionDeserializerKey . equals ( obj ) )
localDate ( ) { java . time . LocalDate localDate = java . time . LocalDate . of ( 2016 , 2 , 24 ) ; javax . ws . rs . ext . ParamConverter < java . time . LocalDate > converter = ( ( javax . ws . rs . ext . ParamConverter < java . time . LocalDate > ) ( provider . getConverter ( localDate . getClass ( ) , localDate . getClass ( ) , localDate . getClass ( ) . getAnnotations ( ) ) ) ) ; "<AssertPlaceHolder>" ; } fromString ( java . lang . String ) { return null ; }
org . junit . Assert . assertEquals ( localDate , converter . fromString ( converter . toString ( localDate ) ) )
testGetValueServiceID ( ) { javax . slee . management . DeployableUnitID duID = new javax . slee . management . DeployableUnitID ( "url" ) ; propertyEditor . setAsText ( duID . toString ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( duID , propertyEditor . getValue ( ) )
setChargingProfileKind_chargingProfileKindType_chargingProfileKindIsSet ( ) { eu . chargetime . ocpp . model . core . ChargingProfileKindType chargingProfileKindType = eu . chargetime . ocpp . model . core . ChargingProfileKindType . Absolute ; chargingProfile . setChargingProfileKind ( chargingProfileKindType ) ; "<AssertPlaceHolder>" ; } getChargingProfileKind ( ) { return chargingProfileKind ; }
org . junit . Assert . assertThat ( chargingProfile . getChargingProfileKind ( ) , org . hamcrest . CoreMatchers . equalTo ( chargingProfileKindType ) )
testDeleteSecurityRoleTrimParameters ( ) { securityRoleDaoTestHelper . createSecurityRoleEntity ( org . finra . herd . service . SECURITY_ROLE , org . finra . herd . service . DESCRIPTION ) ; org . finra . herd . model . api . xml . SecurityRole securityRole = securityRoleService . deleteSecurityRole ( new org . finra . herd . model . api . xml . SecurityRoleKey ( addWhitespace ( org . finra . herd . service . SECURITY_ROLE ) ) ) ; "<AssertPlaceHolder>" ; } addWhitespace ( java . lang . String ) { return java . lang . String . format ( "<sp>%s<sp>" , string ) ; }
org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . SecurityRole ( SECURITY_ROLE , DESCRIPTION ) , securityRole )
testResultsetStartingPositionStartingAtPageTwo ( ) { int position = ( ( org . mifos . application . servicefacade . SavingsServiceFacadeWebTier ) ( savingsServiceFacade ) ) . resultsetOffset ( 2 , 10 ) ; "<AssertPlaceHolder>" ; } resultsetOffset ( int , int ) { return ( currentPage - 1 ) * itemsPerPage ; }
org . junit . Assert . assertEquals ( 10 , position )
testResetToZeroWhenNoListenerIsRunning ( ) { org . uma . jmetal . util . measure . impl . ListenerTimeMeasure measure = new org . uma . jmetal . util . measure . impl . ListenerTimeMeasure ( ) ; org . uma . jmetal . util . measure . MeasureListener < java . lang . Object > original10ms = new org . uma . jmetal . util . measure . impl . ListenerTimeMeasureTest . FakeListener ( 10 ) ; org . uma . jmetal . util . measure . MeasureListener < java . lang . Object > wrapper10ms = measure . wrapListener ( original10ms ) ; org . uma . jmetal . util . measure . MeasureListener < java . lang . Object > original20ms = new org . uma . jmetal . util . measure . impl . ListenerTimeMeasureTest . FakeListener ( 20 ) ; org . uma . jmetal . util . measure . MeasureListener < java . lang . Object > wrapper20ms = measure . wrapListener ( original20ms ) ; wrapper10ms . measureGenerated ( null ) ; wrapper20ms . measureGenerated ( null ) ; wrapper20ms . measureGenerated ( null ) ; wrapper10ms . measureGenerated ( null ) ; measure . reset ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return null ; }
org . junit . Assert . assertEquals ( 0 , ( ( long ) ( measure . get ( ) ) ) )
testGetDescriptor ( ) { com . eclipsesource . tabris . internal . ui . RemotePage page = new com . eclipsesource . tabris . internal . ui . RemotePage ( ui , uiRenderer , descriptor , mock ( com . eclipsesource . tabris . ui . PageData . class ) ) ; "<AssertPlaceHolder>" ; } getDescriptor ( ) { return descriptor ; }
org . junit . Assert . assertSame ( descriptor , page . getDescriptor ( ) )
testMapCreationWithoutElements ( ) { java . util . Map m = org . mule . runtime . core . privileged . util . MapUtils . mapWithKeysAndValues ( java . util . HashMap . class , ( ( java . util . List ) ( null ) ) , ( ( java . util . List ) ( null ) ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return delegate . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( m . isEmpty ( ) )
addBook ( ) { com . vladmihalcea . flexypool . model . Book book = doInTransaction ( new com . vladmihalcea . flexypool . adaptor . glassfish . AbstractGlassfishIntegrationTest . Callable < com . vladmihalcea . flexypool . model . Book > ( ) { @ com . vladmihalcea . flexypool . adaptor . glassfish . Override public com . vladmihalcea . flexypool . model . Book call ( ) { com . vladmihalcea . flexypool . model . Book book = new com . vladmihalcea . flexypool . model . Book ( ) ; book . setId ( 1L ) ; book . setName ( "High-Performance<sp>Java<sp>Persistence" ) ; getEntityManager ( ) . persist ( book ) ; return book ; } } ) ; javax . management . MBeanInfo connectionLeaseMillisMBean = connectionLeaseMillisMBean ( ) ; "<AssertPlaceHolder>" ; } getEntityManager ( ) { return entityManager ; }
org . junit . Assert . assertNotNull ( connectionLeaseMillisMBean )
testGetConnectionManagerService ( ) { net . holmes . core . common . LocalService < org . fourthline . cling . support . connectionmanager . ConnectionManagerService > connectionManagerService = net . holmes . core . business . streaming . upnp . UpnpUtils . buildConnectionManagerService ( ) ; "<AssertPlaceHolder>" ; } buildConnectionManagerService ( ) { net . holmes . core . business . streaming . upnp . LocalService < org . fourthline . cling . support . connectionmanager . ConnectionManagerService > connectionManagerService = new org . fourthline . cling . binding . annotations . AnnotationLocalServiceBinder ( ) . read ( org . fourthline . cling . support . connectionmanager . ConnectionManagerService . class ) ; connectionManagerService . setManager ( new org . fourthline . cling . model . DefaultServiceManager ( connectionManagerService , org . fourthline . cling . support . connectionmanager . ConnectionManagerService . class ) ) ; return connectionManagerService ; }
org . junit . Assert . assertNotNull ( connectionManagerService )
testCanNotMatch ( ) { createLongerExample ( ) ; uk . gov . dstl . baleen . uima . grammar . DependencyNode node1 = uk . gov . dstl . baleen . uima . grammar . DependencyNode . create ( "_NNP" ) ; uk . gov . dstl . baleen . uima . grammar . DependencyNode node2 = uk . gov . dstl . baleen . uima . grammar . DependencyNode . create ( "_VBD" ) ; uk . gov . dstl . baleen . uima . grammar . DependencyNode node3 = uk . gov . dstl . baleen . uima . grammar . DependencyNode . create ( "_NNP" ) ; uk . gov . dstl . baleen . uima . grammar . DependencyNode node4 = uk . gov . dstl . baleen . uima . grammar . DependencyNode . create ( "_," ) ; uk . gov . dstl . baleen . uima . grammar . DependencyNode node5 = uk . gov . dstl . baleen . uima . grammar . DependencyNode . create ( "_NNP" ) ; uk . gov . dstl . baleen . uima . grammar . DependencyNode node6 = uk . gov . dstl . baleen . uima . grammar . DependencyNode . create ( "_CC" ) ; uk . gov . dstl . baleen . uima . grammar . DependencyNode node7 = uk . gov . dstl . baleen . uima . grammar . DependencyNode . create ( "_NNP" ) ; uk . gov . dstl . baleen . uima . grammar . DependencyNode node8 = uk . gov . dstl . baleen . uima . grammar . DependencyNode . create ( "_NNP" ) ; uk . gov . dstl . baleen . uima . grammar . DependencyNode node9 = uk . gov . dstl . baleen . uima . grammar . DependencyNode . create ( "\\._." ) ; uk . gov . dstl . baleen . uima . grammar . DependencyTree tree = new uk . gov . dstl . baleen . uima . grammar . DependencyTree ( node2 ) ; tree . addDependency ( "nsubj" , node1 ) ; tree . addDependency ( "punct" , node9 ) ; uk . gov . dstl . baleen . uima . grammar . DependencyTree np = tree . addDependency ( "conj" 0 , node3 ) ; np . addDependency ( "punct" , node4 ) ; np . addDependency ( "conj" , node5 ) ; np . addDependency ( "cc" , node6 ) ; np . addDependency ( "conj" , node8 ) . addDependency ( "det" , node7 ) ; java . util . Collection < uk . gov . dstl . baleen . uima . grammar . DependencyMatch > match = graph . match ( tree ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( remainingLength ( ) ) == 0 ; }
org . junit . Assert . assertTrue ( match . isEmpty ( ) )
testForMemoryLeaks ( ) { int n = 1000000 ; int count = rx . Observable . range ( 1 , n ) . compose ( com . github . davidmoten . rx . Transformers . toListWhile ( new rx . functions . Func2 < java . util . List < java . lang . Integer > , java . lang . Integer , java . lang . Boolean > ( ) { @ com . github . davidmoten . rx . internal . operators . Override public com . github . davidmoten . rx . internal . operators . Boolean call ( java . util . List < java . lang . Integer > list , java . lang . Integer t ) { return ( list . size ( ) ) == 0 ; } } ) ) . count ( ) . toBlocking ( ) . single ( ) ; "<AssertPlaceHolder>" ; } count ( ) { java . util . Queue < java . lang . Object > q = queue ; if ( q == null ) { return 0 ; } return q . size ( ) ; }
org . junit . Assert . assertEquals ( n , count )
testOffsetForChildComponentNameWithGraphAndInvalidPrefix_2 ( ) { net . roboconf . tooling . core . autocompletion . Couple couple = prepare ( "app3" , "initial.instances" , 125 ) ; couple . text += "d" ; java . util . List < net . roboconf . tooling . core . autocompletion . ICompletionProposer . RoboconfCompletionProposal > proposals = couple . proposer . findProposals ( couple . text ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . map . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , proposals . size ( ) )
testElse4 ( ) { java . lang . String sql = "SELECT<sp>*<sp>FROM<sp>emp/*BEGIN*/<sp>WHERE<sp>/*IF<sp>false*/aaa--<sp>ELSE<sp>AND<sp>deptno<sp>=<sp>10/*END*//*END*/" ; java . lang . String sql2 = "SELECT<sp>*<sp>FROM<sp>emp<sp>WHERE<sp>deptno<sp>=<sp>10" ; jp . co . future . uroborosql . parser . SqlParser parser = new jp . co . future . uroborosql . parser . SqlParserImpl ( sql ) ; jp . co . future . uroborosql . context . SqlContext ctx = sqlContextFactory . createSqlContext ( ) ; jp . co . future . uroborosql . parser . ContextTransformer transformer = parser . parse ( ) ; transformer . transform ( ctx ) ; System . out . println ( ctx . getExecutableSql ( ) ) ; "<AssertPlaceHolder>" ; } getExecutableSql ( ) { if ( org . apache . commons . lang3 . StringUtils . isEmpty ( executableSqlCache ) ) { if ( ( executableSql . length ( ) ) > 0 ) { executableSqlCache = executableSql . toString ( ) ; if ( executableSqlCache . toUpperCase ( ) . contains ( "WHERE" ) ) { java . lang . StringBuffer buff = new java . lang . StringBuffer ( ) ; java . util . regex . Matcher matcher = jp . co . future . uroborosql . context . SqlContextImpl . WHERE_CLAUSE_PATTERN . matcher ( executableSqlCache ) ; while ( matcher . find ( ) ) { java . lang . String whereClause = matcher . group ( 1 ) ; matcher . appendReplacement ( buff , whereClause ) ; } matcher . appendTail ( buff ) ; executableSqlCache = buff . toString ( ) ; } java . lang . StringBuffer buff = new java . lang . StringBuffer ( ) ; java . util . regex . Matcher removeCommaMatcher = jp . co . future . uroborosql . context . SqlContextImpl . REMOVE_FIRST_COMMA_PATTERN . matcher ( executableSqlCache ) ; while ( removeCommaMatcher . find ( ) ) { java . lang . String clauseWords = removeCommaMatcher . group ( 1 ) ; removeCommaMatcher . appendReplacement ( buff , clauseWords ) ; } removeCommaMatcher . appendTail ( buff ) ; executableSqlCache = buff . toString ( ) ; executableSqlCache = jp . co . future . uroborosql . context . SqlContextImpl . CLEAR_BLANK_PATTERN . matcher ( executableSqlCache ) . replaceAll ( "" ) ; } } return executableSqlCache ; }
org . junit . Assert . assertEquals ( "1" , sql2 , ctx . getExecutableSql ( ) )
test_setRGBLorg_eclipse_swt_graphics_RGB ( ) { org . eclipse . swt . graphics . RGB rgb = new org . eclipse . swt . graphics . RGB ( 255 , 0 , 0 ) ; fontDialog . setRGB ( rgb ) ; org . eclipse . swt . graphics . RGB rgb2 = fontDialog . getRGB ( ) ; "<AssertPlaceHolder>" ; } setRGB ( org . eclipse . swt . opengl . examples . RGB ) { org . eclipse . swt . opengl . examples . Color oldColor = color ; color = new org . eclipse . swt . opengl . examples . Color ( button . getDisplay ( ) , rgb ) ; drawButtonImage ( ) ; button . setImage ( image ) ; if ( oldColor != null ) oldColor . dispose ( ) ; }
org . junit . Assert . assertEquals ( rgb , rgb2 )
shouldStopDownloadingStoredObject ( ) { org . javaswift . joss . model . Container container = account . getContainer ( "x" ) . create ( ) ; org . javaswift . joss . model . StoredObject object = container . getObject ( "y" ) ; object . uploadObject ( new byte [ 100 ] ) ; org . swiftexplorer . gui . util . SwiftOperationStopRequesterImpl stopReq = new org . swiftexplorer . gui . util . SwiftOperationStopRequesterImpl ( ) ; stopReq . stop ( ) ; try { ops . downloadStoredObject ( container , object , tmpFolder . newFile ( ) , stopReq , callback ) ; org . mockito . Mockito . verify ( callback , org . mockito . Mockito . times ( 1 ) ) . onStopped ( ) ; } catch ( java . io . IOException e ) { logger . error ( "Error<sp>occurred<sp>in<sp>shouldStopDownloadingStoredObject" , e ) ; "<AssertPlaceHolder>" ; } } onStopped ( ) { closeOpsDependantDialogs ( ) ; }
org . junit . Assert . assertFalse ( true )
isDoneTest ( ) { org . threadly . concurrent . future . ListenableRunnableFutureInterfaceTest . ExecuteOnGetFutureFactory ff = makeFutureFactory ( ) ; org . threadly . test . concurrent . TestRunnable r = new org . threadly . test . concurrent . TestRunnable ( ) ; java . util . concurrent . RunnableFuture < ? > future = ff . make ( r ) ; future . run ( ) ; "<AssertPlaceHolder>" ; } isDone ( ) { return true ; }
org . junit . Assert . assertTrue ( future . isDone ( ) )
testDeclaredExtensions ( ) { "<AssertPlaceHolder>" ; } getExtensions ( ) { return java . util . Arrays . asList ( org . sonar . plugins . buildbreaker . ForbiddenConfigurationBreaker . class , org . sonar . plugins . buildbreaker . IssuesSeverityBreaker . class , org . sonar . plugins . buildbreaker . QualityGateBreaker . class , org . sonar . api . config . PropertyDefinition . builder ( org . sonar . plugins . buildbreaker . BuildBreakerPlugin . SKIP_KEY ) . name ( "30" 0 ) . description ( ( "30" 5 + "30" 4 ) ) . onQualifiers ( Qualifiers . PROJECT ) . type ( PropertyType . BOOLEAN ) . defaultValue ( "false" ) . build ( ) , org . sonar . api . config . PropertyDefinition . builder ( org . sonar . plugins . buildbreaker . BuildBreakerPlugin . QUERY_MAX_ATTEMPTS_KEY ) . name ( "30" 6 ) . description ( ( ( "The<sp>maximum<sp>number<sp>of<sp>queries<sp>to<sp>the<sp>API<sp>when<sp>waiting<sp>for<sp>report<sp>processing.<sp>The<sp>" + "build<sp>will<sp>break<sp>if<sp>this<sp>is<sp>reached.<br/>" ) + ( org . sonar . plugins . buildbreaker . BuildBreakerPlugin . TOTAL_WAIT_TIME_DESCRIPTION ) ) ) . onQualifiers ( Qualifiers . PROJECT ) . type ( PropertyType . INTEGER ) . defaultValue ( "30" ) . build ( ) , org . sonar . api . config . PropertyDefinition . builder ( org . sonar . plugins . buildbreaker . BuildBreakerPlugin . QUERY_INTERVAL_KEY ) . name ( "30" 3 ) . description ( ( "30" 8 + ( org . sonar . plugins . buildbreaker . BuildBreakerPlugin . TOTAL_WAIT_TIME_DESCRIPTION ) ) ) . onQualifiers ( Qualifiers . PROJECT ) . type ( PropertyType . INTEGER ) . defaultValue ( "30" 7 ) . build ( ) , org . sonar . api . config . PropertyDefinition . builder ( org . sonar . plugins . buildbreaker . BuildBreakerPlugin . FORBIDDEN_CONF_KEY ) . name ( "Forbidden<sp>configuration<sp>parameters" ) . description ( "Comma-separated<sp>list<sp>of<sp><code>key=value</code><sp>pairs<sp>that<sp>should<sp>break<sp>the<sp>build." ) . onQualifiers ( Qualifiers . PROJECT ) . build ( ) , org . sonar . api . config . PropertyDefinition . builder ( org . sonar . plugins . buildbreaker . BuildBreakerPlugin . ALTERNATIVE_SERVER_URL_KEY ) . name ( "Alternative<sp>server<sp>URL" ) . description ( ( "30" 2 + "30" 1 ) ) . onQualifiers ( Qualifiers . PROJECT ) . build ( ) , org . sonar . api . config . PropertyDefinition . builder ( org . sonar . plugins . buildbreaker . BuildBreakerPlugin . ISSUES_SEVERITY_KEY ) . name ( "Issues<sp>severity<sp>failure<sp>level<sp>(preview<sp>analysis)" ) . description ( ( "Fails<sp>the<sp>build<sp>in<sp>preview<sp>analysis<sp>mode<sp>if<sp>the<sp>severity<sp>of<sp>issues<sp>is<sp>equal<sp>to<sp>or<sp>" + "more<sp>severe<sp>than<sp>the<sp>selection." ) ) . onQualifiers ( Qualifiers . PROJECT ) . type ( PropertyType . SINGLE_SELECT_LIST ) . options ( org . sonar . plugins . buildbreaker . BuildBreakerPlugin . DISABLED , Severity . INFO , Severity . MINOR , Severity . MAJOR , Severity . CRITICAL , Severity . BLOCKER ) . defaultValue ( org . sonar . plugins . buildbreaker . BuildBreakerPlugin . DISABLED ) . build ( ) ) ; }
org . junit . Assert . assertEquals ( 9 , new org . sonar . plugins . buildbreaker . BuildBreakerPlugin ( ) . getExtensions ( ) . size ( ) )
testNoNullElementsCollectionEmptyParameterNull ( ) { com . twelvemonkeys . lang . Collection < ? > collection = com . twelvemonkeys . lang . Collections . emptySet ( ) ; "<AssertPlaceHolder>" ; } noNullElements ( T [ ] , java . lang . String ) { com . twelvemonkeys . lang . Validate . noNullElements ( ( pParameter == null ? null : java . util . Arrays . asList ( pParameter ) ) , pParamName ) ; return pParameter ; }
org . junit . Assert . assertSame ( collection , com . twelvemonkeys . lang . Validate . noNullElements ( collection , null ) )
testEmptyURI ( ) { final org . apache . hc . client5 . http . classic . methods . HttpGet httpget = new org . apache . hc . client5 . http . classic . methods . HttpGet ( "" ) ; "<AssertPlaceHolder>" ; } getUri ( ) { return uri ; }
org . junit . Assert . assertEquals ( new java . net . URI ( "/" ) , httpget . getUri ( ) )
executeTest ( ) { final boolean isValid = true ; cn . hutool . core . thread . ThreadUtil . execute ( new java . lang . Runnable ( ) { @ cn . hutool . core . thread . Override public void run ( ) { "<AssertPlaceHolder>" ; } } ) ; } run ( ) { for ( int i = 0 ; i < idCountPerThread ; i ++ ) { long id = snowflake . nextId ( ) ; set . add ( id ) ; } latch . countDown ( ) ; }
org . junit . Assert . assertTrue ( isValid )
testNextTuple ( ) { final int batchSize = 2 + ( this . r . nextInt ( 9 ) ) ; final java . lang . String streamId = backtype . storm . utils . Utils . DEFAULT_STREAM_ID ; final java . lang . String sourceId = "sourceId" ; backtype . storm . generated . Grouping groupingMock = mock ( backtype . storm . generated . Grouping . class ) ; java . util . HashMap < java . lang . String , java . util . Map < java . lang . String , backtype . storm . generated . Grouping > > targets = new java . util . HashMap < java . lang . String , java . util . Map < java . lang . String , backtype . storm . generated . Grouping > > ( ) ; java . util . Map < java . lang . String , backtype . storm . generated . Grouping > receiver = new java . util . HashMap < java . lang . String , backtype . storm . generated . Grouping > ( ) ; receiver . put ( "receiverId" , groupingMock ) ; targets . put ( streamId , receiver ) ; backtype . storm . task . TopologyContext context = mock ( backtype . storm . task . TopologyContext . class ) ; when ( context . getThisComponentId ( ) ) . thenReturn ( sourceId ) ; when ( context . getThisTargets ( ) ) . thenReturn ( targets ) ; when ( context . getComponentOutputFields ( sourceId , streamId ) ) . thenReturn ( new backtype . storm . tuple . Fields ( "dummy" ) ) ; de . hub . cs . dbis . aeolus . testUtils . RandomSpout userSpout = new de . hub . cs . dbis . aeolus . testUtils . RandomSpout ( 1 , 1000 , new java . lang . String [ ] { backtype . storm . utils . Utils . DEFAULT_STREAM_ID } , this . seed ) ; de . hub . cs . dbis . aeolus . batching . api . SpoutOutputBatcher batcher = new de . hub . cs . dbis . aeolus . batching . api . SpoutOutputBatcher ( userSpout , batchSize ) ; de . hub . cs . dbis . aeolus . testUtils . TestSpoutOutputCollector collector = new de . hub . cs . dbis . aeolus . testUtils . TestSpoutOutputCollector ( ) ; batcher . open ( null , context , new backtype . storm . spout . SpoutOutputCollector ( collector ) ) ; batcher . nextTuple ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { return this . batchSize ; }
org . junit . Assert . assertEquals ( 1 , collector . output . get ( Utils . DEFAULT_STREAM_ID ) . size ( ) )
testCall ( ) { final java . lang . Object value = new java . lang . Object ( ) ; @ javax . ejb . TransactionAttribute ( javax . ejb . TransactionAttributeType . NEVER ) class Bean implements java . util . concurrent . Callable < java . lang . Object > { public java . lang . Object call ( ) { return value ; } } org . oscm . test . ejb . DeployedSessionBean bean = new org . oscm . test . ejb . DeployedSessionBean ( tmStub , sessionContext , new Bean ( ) ) ; "<AssertPlaceHolder>" ; } getInterfaceOrClass ( java . lang . Class ) { if ( ! ( type . isInstance ( bean ) ) ) { throw new java . lang . IllegalArgumentException ( ( ( ( bean ) + "<sp>does<sp>not<sp>implement<sp>" ) + type ) ) ; } if ( type . isInterface ( ) ) { return type . cast ( org . oscm . test . ejb . Proxy . newProxyInstance ( bean . getClass ( ) . getClassLoader ( ) , new java . lang . Class [ ] { type } , handler ) ) ; } else { return ( ( T ) ( bean ) ) ; } }
org . junit . Assert . assertSame ( value , bean . getInterfaceOrClass ( java . util . concurrent . Callable . class ) . call ( ) )
blankParamValues ( ) { when ( request . getParameterValues ( "paramName" ) ) . thenReturn ( null ) ; com . psddev . dari . util . StorageItem storageItem = com . psddev . dari . util . StorageItemFilter . getParameter ( request , "paramName" , null ) ; "<AssertPlaceHolder>" ; reset ( request ) ; } getParameter ( javax . servlet . http . HttpServletRequest , java . lang . String , java . lang . String ) { java . util . List < com . psddev . dari . util . StorageItem > storageItems = com . psddev . dari . util . StorageItemFilter . getParameters ( request , parameterName , storageName ) ; return ! ( com . psddev . dari . util . ObjectUtils . isBlank ( storageItems ) ) ? storageItems . get ( 0 ) : null ; }
org . junit . Assert . assertTrue ( ( storageItem == null ) )
testUnmarshalJson ( ) { com . cflint . config . CFLintConfig config = com . cflint . config . ConfigUtils . unmarshalJson ( input1 , com . cflint . config . CFLintConfig . class ) ; "<AssertPlaceHolder>" ; } isInheritParent ( ) { return inheritParent ; }
org . junit . Assert . assertFalse ( config . isInheritParent ( ) )
createBoundedHashSetWithCollectionTest ( ) { java . util . List < java . lang . Integer > list = java . util . Arrays . asList ( 1 , 2 , 3 , 4 , 5 , 6 ) ; com . iota . iri . utils . collections . impl . BoundedHashSet < java . lang . Integer > boundedSet = new com . iota . iri . utils . collections . impl . BoundedHashSet ( list , 4 ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( new java . util . HashSet ( java . util . Arrays . asList ( 1 , 2 , 3 , 4 ) ) , boundedSet )
shouldReturnFalseWhenQueryingIfInfiniteWithFiniteAutomaton ( ) { dk . brics . automaton . Automaton finiteAutomaton = dk . brics . automaton . Automaton . makeChar ( 'a' ) . repeat ( 5 , 5 ) ; com . mifmif . common . regex . Generex generex = new com . mifmif . common . regex . Generex ( finiteAutomaton ) ; boolean infinite = generex . isInfinite ( ) ; "<AssertPlaceHolder>" ; } isInfinite ( ) { return ! ( automaton . isFinite ( ) ) ; }
org . junit . Assert . assertThat ( infinite , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( false ) ) )
testEvaluateIndexingSpecification_SolrClassic ( ) { opts . hbaseIndexerZkHost = null ; opts . hbaseTableName = "mytable" ; opts . hbaseIndexerConfigFile = new java . io . File ( com . google . common . io . Resources . getResource ( getClass ( ) , "user_indexer.xml" ) . toURI ( ) ) ; opts . zkHost = null ; opts . collection = null ; opts . solrHomeDir = new java . io . File ( "." ) ; opts . evaluateIndexingSpecification ( ) ; com . ngdata . hbaseindexer . mr . IndexingSpecification expectedSpec = new com . ngdata . hbaseindexer . mr . IndexingSpecification ( "mytable" , HBaseIndexingOptions . DEFAULT_INDEXER_NAME , com . ngdata . hbaseindexer . conf . DefaultIndexerComponentFactory . class . getName ( ) , com . google . common . io . Resources . toByteArray ( com . google . common . io . Resources . getResource ( getClass ( ) , "user_indexer.xml" ) ) , com . google . common . collect . ImmutableMap . of ( "solr.mode" , "classic" , "solr.home" , opts . solrHomeDir . getAbsolutePath ( ) ) ) ; "<AssertPlaceHolder>" ; } getIndexingSpecification ( ) { if ( ( hbaseIndexingSpecification ) == null ) { throw new java . lang . IllegalStateException ( "Indexing<sp>specification<sp>has<sp>not<sp>yet<sp>been<sp>evaluated" ) ; } return hbaseIndexingSpecification ; }
org . junit . Assert . assertEquals ( expectedSpec , opts . getIndexingSpecification ( ) )
validate_shouldPassIfTheDuplicateCodeIsForATermFromAnotherConceptSource ( ) { org . openmrs . ConceptReferenceTerm term = new org . openmrs . ConceptReferenceTerm ( ) ; term . setName ( "unique<sp>name" ) ; term . setCode ( "2332523" ) ; term . setConceptSource ( org . openmrs . api . context . Context . getConceptService ( ) . getConceptSource ( 1 ) ) ; org . springframework . validation . Errors errors = new org . springframework . validation . BindException ( term , "term" ) ; new org . openmrs . validator . ConceptReferenceTermValidator ( ) . validate ( term , errors ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return erroneous ; }
org . junit . Assert . assertEquals ( false , errors . hasErrors ( ) )
testUpdatePublishInfoById ( ) { long id = randomInsert ( ) ; java . lang . String random = randomString ( ) ; migrationClusterDao . updatePublishInfoById ( id , random ) ; com . ctrip . xpipe . redis . console . model . MigrationClusterTbl byId = migrationClusterDao . getById ( id ) ; "<AssertPlaceHolder>" ; } getPublishInfo ( ) { return publishInfo ; }
org . junit . Assert . assertEquals ( random , byId . getPublishInfo ( ) )
mustNotIdentifyAsPrefixWhenShorter ( ) { com . offbynull . actors . address . Address other = com . offbynull . actors . address . Address . of ( "one" , "two" , "three" ) ; com . offbynull . actors . address . Address fixture = com . offbynull . actors . address . Address . of ( "one" , "two" ) ; "<AssertPlaceHolder>" ; } isPrefixOf ( com . offbynull . actors . address . Address ) { org . apache . commons . lang3 . Validate . notNull ( other ) ; if ( ( other . addressElements . size ( ) ) < ( addressElements . size ( ) ) ) { return false ; } return other . addressElements . subList ( 0 , addressElements . size ( ) ) . equals ( addressElements ) ; }
org . junit . Assert . assertFalse ( other . isPrefixOf ( fixture ) )
testUpdate ( ) { com . jmethods . catatumbo . entities . LongId entity = new com . jmethods . catatumbo . entities . LongId ( ) ; entity . setField1 ( "Test<sp>for<sp>Batch<sp>Update" ) ; entity = com . jmethods . catatumbo . DatastoreBatchTest . em . insert ( entity ) ; entity = com . jmethods . catatumbo . DatastoreBatchTest . em . load ( com . jmethods . catatumbo . entities . LongId . class , entity . getId ( ) ) ; entity . setField1 ( "Updated" ) ; com . jmethods . catatumbo . DatastoreBatch batch = com . jmethods . catatumbo . DatastoreBatchTest . em . newBatch ( ) ; entity = batch . update ( entity ) ; batch . submit ( ) ; com . jmethods . catatumbo . entities . LongId entity2 = com . jmethods . catatumbo . DatastoreBatchTest . em . load ( com . jmethods . catatumbo . entities . LongId . class , entity . getId ( ) ) ; "<AssertPlaceHolder>" ; } getField1 ( ) { return field1 ; }
org . junit . Assert . assertTrue ( "Updated" . equals ( entity2 . getField1 ( ) ) )
testIsLockedAndReadOnly_ForLockOwnerWithNodeLockType ( ) { when ( lockService . getLockStatus ( nodeRef ) ) . thenReturn ( LockStatus . LOCK_OWNER ) ; when ( lockService . getLockType ( nodeRef ) ) . thenReturn ( LockType . NODE_LOCK ) ; boolean returnedVal = org . alfresco . repo . lock . LockUtils . isLockedAndReadOnly ( nodeRef , lockService ) ; "<AssertPlaceHolder>" ; } isLockedAndReadOnly ( org . alfresco . service . cmr . repository . NodeRef , org . alfresco . service . cmr . lock . LockService ) { org . alfresco . service . cmr . lock . LockStatus lockStatus = lockService . getLockStatus ( nodeRef ) ; switch ( lockStatus ) { case NO_LOCK : case LOCK_EXPIRED : return false ; case LOCK_OWNER : return ( lockService . getLockType ( nodeRef ) ) != ( org . alfresco . service . cmr . lock . LockType . WRITE_LOCK ) ; default : return true ; } }
org . junit . Assert . assertEquals ( true , returnedVal )
testExecuteASync ( ) { org . locationtech . udig . project . command . CommandManager manager = new org . locationtech . udig . project . command . CommandManager ( "test" , new org . locationtech . udig . project . internal . commands . DefaultErrorHandler ( ) , new org . locationtech . udig . project . command . CommandListener ( ) { public void commandExecuted ( int commandType ) { } } ) ; final org . locationtech . udig . project . command . CommandManagerTest . Result result = new org . locationtech . udig . project . command . CommandManagerTest . Result ( ) ; manager . aSyncExecute ( new org . locationtech . udig . project . command . Command ( ) { public void run ( org . eclipse . core . runtime . IProgressMonitor monitor ) throws org . locationtech . udig . project . command . Exception { result . ran = true ; } public org . locationtech . udig . project . command . Command copy ( ) { return null ; } public java . lang . String getName ( ) { return null ; } } ) ; synchronized ( this ) { try { for ( int i = 0 ; ( i < 3 ) && ( ! ( result . ran ) ) ; i ++ ) wait ( 1000 ) ; } catch ( java . lang . InterruptedException e ) { } } "<AssertPlaceHolder>" ; } getName ( ) { if ( ( element ) == null ) return "" ; return element . getAttribute ( "name" ) ; }
org . junit . Assert . assertTrue ( result . ran )
testSerialization ( ) { org . jfree . chart . needle . ArrowNeedle n1 = new org . jfree . chart . needle . ArrowNeedle ( false ) ; org . jfree . chart . needle . ArrowNeedle n2 = ( ( org . jfree . chart . needle . ArrowNeedle ) ( org . jfree . chart . TestUtilities . serialised ( n1 ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; mdz . hc . ProcessValue other = ( ( mdz . hc . ProcessValue ) ( obj ) ) ; if ( ( state ) != ( other . state ) ) return false ; if ( ( timestamp ) == null ) { if ( ( other . timestamp ) != null ) return false ; } else if ( ! ( timestamp . equals ( other . timestamp ) ) ) return false ; if ( ( value ) == null ) { if ( ( other . value ) != null ) return false ; } else if ( ! ( value . equals ( other . value ) ) ) return false ; return true ; }
org . junit . Assert . assertTrue ( n1 . equals ( n2 ) )
testGetFieldNotNull ( ) { org . apache . flink . api . java . tuple . Tuple2 < java . lang . String , java . lang . Integer > tuple = new org . apache . flink . api . java . tuple . Tuple2 ( "Test<sp>case" , null ) ; "<AssertPlaceHolder>" ; tuple . getFieldNotNull ( 1 ) ; }
org . junit . Assert . assertEquals ( "Test<sp>case" , tuple . getFieldNotNull ( 0 ) )
testWrongOption ( ) { mFileSystem . createDirectory ( new alluxio . AlluxioURI ( "/testDir" ) ) ; int ret = mFsShell . run ( "test" , "-dfesz" , "/testDir" ) ; "<AssertPlaceHolder>" ; } run ( alluxio . job . JobConfig , int , alluxio . conf . AlluxioConfiguration ) { alluxio . retry . CountingRetry retryPolicy = new alluxio . retry . CountingRetry ( attempts ) ; while ( retryPolicy . attempt ( ) ) { long jobId ; try ( alluxio . client . job . JobMasterClient client = JobMasterClient . Factory . create ( alluxio . worker . job . JobMasterClientContext . newBuilder ( alluxio . ClientContext . create ( alluxioConf ) ) . build ( ) ) ) { jobId = client . run ( config ) ; } catch ( java . lang . Exception e ) { alluxio . client . job . JobGrpcClientUtils . LOG . warn ( "Exception<sp>encountered<sp>when<sp>starting<sp>a<sp>job." , e ) ; continue ; } alluxio . job . wire . JobInfo jobInfo = alluxio . client . job . JobGrpcClientUtils . waitFor ( jobId , alluxioConf ) ; if ( jobInfo == null ) { break ; } if ( ( ( jobInfo . getStatus ( ) ) == ( alluxio . job . wire . Status . COMPLETED ) ) || ( ( jobInfo . getStatus ( ) ) == ( alluxio . job . wire . Status . CANCELED ) ) ) { return ; } alluxio . client . job . JobGrpcClientUtils . LOG . warn ( "Job<sp>{}<sp>failed<sp>to<sp>complete:<sp>{}" , jobId , jobInfo . getErrorMessage ( ) ) ; } throw new java . lang . RuntimeException ( "Failed<sp>to<sp>successfully<sp>complete<sp>the<sp>job." ) ; }
org . junit . Assert . assertEquals ( ( - 1 ) , ret )
testSetCurrentDataTypeRowWhenCurrentUUIDIsNotBlank ( ) { final elemental2 . dom . Element element1 = fakeDataTypeRow ( "uuid1" ) ; final elemental2 . dom . Element element2 = fakeDataTypeRow ( "uuid2" ) ; doReturn ( "" ) . when ( view ) . getCurrentUUID ( ) ; doReturn ( "uuid1" ) . when ( view ) . getPreviousUUID ( ) ; final java . util . Optional < elemental2 . dom . Element > actualElement = view . getCurrentDataTypeRow ( asList ( element1 , element2 ) ) ; "<AssertPlaceHolder>" ; } get ( ) { return extractReturnToLinkFromDefinitions ( ) ; }
org . junit . Assert . assertEquals ( element1 , actualElement . get ( ) )
fromFiles_Collection_null ( ) { try { net . coobird . thumbnailator . Thumbnails . fromFiles ( ( ( java . util . Collection < java . io . File > ) ( null ) ) ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . NullPointerException e ) { "<AssertPlaceHolder>" ; throw e ; } } fromFiles ( java . lang . Iterable ) { net . coobird . thumbnailator . Thumbnails . checkForNull ( files , "Cannot<sp>specify<sp>null<sp>for<sp>input<sp>files." ) ; net . coobird . thumbnailator . Thumbnails . checkForEmpty ( files , "Cannot<sp>specify<sp>an<sp>empty<sp>collection<sp>for<sp>input<sp>files." ) ; return net . coobird . thumbnailator . Thumbnails . Builder . ofFiles ( files ) ; }
org . junit . Assert . assertEquals ( "Cannot<sp>specify<sp>null<sp>for<sp>input<sp>files." , e . getMessage ( ) )
upgradeFundingsToV21Test ( ) { javax . xml . bind . JAXBContext jaxbContext1 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . record . summary_v2 . Fundings . class ) ; javax . xml . bind . JAXBContext jaxbContext2 = javax . xml . bind . JAXBContext . newInstance ( org . orcid . jaxb . model . record . summary_v2 . Fundings . class ) ; javax . xml . bind . Unmarshaller jaxbUnmarshaller = jaxbContext1 . createUnmarshaller ( ) ; java . io . InputStream v20Stream = org . orcid . record_2_0 . ConvertV2ToV2_1Test . class . getClassLoader ( ) . getResourceAsStream ( "test-fundings-2.0.xml" ) ; java . io . InputStream v21Stream = org . orcid . record_2_0 . ConvertV2ToV2_1Test . class . getClassLoader ( ) . getResourceAsStream ( "test-fundings-2.1.xml" ) ; org . orcid . jaxb . model . record . summary_v2 . Fundings v20Fundings = ( ( org . orcid . jaxb . model . record . summary_v2 . Fundings ) ( jaxbUnmarshaller . unmarshal ( v20Stream ) ) ) ; jaxbUnmarshaller = jaxbContext2 . createUnmarshaller ( ) ; org . orcid . jaxb . model . record . summary_v2 . Fundings v21Fundings1 = ( ( org . orcid . jaxb . model . record . summary_v2 . Fundings ) ( jaxbUnmarshaller . unmarshal ( v21Stream ) ) ) ; org . orcid . core . version . V2Convertible result = versionConverterV2_0ToV2_1 . upgrade ( new org . orcid . core . version . V2Convertible ( v20Fundings , "v2.1" ) ) ; org . orcid . jaxb . model . record . summary_v2 . Fundings v21Fundings2 = ( ( org . orcid . jaxb . model . record . summary_v2 . Fundings ) ( result . getObjectToConvert ( ) ) ) ; "<AssertPlaceHolder>" ; } getObjectToConvert ( ) { return objectToConvert ; }
org . junit . Assert . assertEquals ( v21Fundings1 , v21Fundings2 )
executeRequestShouldWork3 ( ) { org . apache . http . client . methods . HttpGet request = new org . apache . http . client . methods . HttpGet ( "http://michael-simons.eu" ) ; org . apache . http . HttpResponse r = org . mockito . Mockito . mock ( org . apache . http . HttpResponse . class , Mockito . RETURNS_DEEP_STUBS ) ; when ( r . getStatusLine ( ) . getStatusCode ( ) ) . thenReturn ( 200 ) ; when ( r . getEntity ( ) . getContentType ( ) ) . thenReturn ( null ) ; when ( r . getEntity ( ) . getContent ( ) ) . thenReturn ( new java . io . ByteArrayInputStream ( "Hallo,<sp>Welt" . getBytes ( ) ) ) ; when ( defaultHttpClient . execute ( request ) ) . thenReturn ( r ) ; ac . simons . oembed . OembedService oembedService = new ac . simons . oembed . OembedService ( defaultHttpClient , null , new java . util . ArrayList ( ) , null ) ; "<AssertPlaceHolder>" ; verify ( defaultHttpClient ) . execute ( request ) ; } executeRequest ( org . apache . http . client . methods . HttpGet ) { java . io . InputStream rv = null ; try { final org . apache . http . HttpResponse httpResponse = this . httpClient . execute ( request ) ; if ( ( httpResponse . getStatusLine ( ) . getStatusCode ( ) ) != ( org . apache . http . HttpStatus . SC_OK ) ) { ac . simons . oembed . OembedService . LOGGER . warn ( "Skipping<sp>'{}',<sp>server<sp>returned<sp>error<sp>{}:<sp>{}" , request . getURI ( ) . toString ( ) , httpResponse . getStatusLine ( ) . getStatusCode ( ) , org . apache . http . util . EntityUtils . toString ( httpResponse . getEntity ( ) ) ) ; } else { rv = httpResponse . getEntity ( ) . getContent ( ) ; } } catch ( java . io . IOException ex ) { ac . simons . oembed . OembedService . LOGGER . warn ( "Skipping<sp>'{}',<sp>could<sp>not<sp>get<sp>a<sp>response:<sp>{}" , request . getURI ( ) . toString ( ) , ex . getMessage ( ) ) ; } return rv ; }
org . junit . Assert . assertNotNull ( oembedService . executeRequest ( request ) )
testDynamicQueryByPrimaryKeyMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . asset . list . model . AssetListEntry . class , _dynamicQueryClassLoader ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . eq ( "assetListEntryId" , com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ) ) ; java . util . List < com . liferay . asset . list . model . AssetListEntry > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
testEnvmapperConsumer ( ) { java . io . File wsdl = getCodegenQEDataFileInput ( "s_envMapper" 5 ) ; testArgs = new java . lang . String [ ] { "s_envMapper" 2 , "s_envMapper" 8 , "-genType" , "Consumer" , "-wsdl" , wsdl . getAbsolutePath ( ) , "s_envMapper" 9 , ( destDir . getAbsolutePath ( ) ) + "/src" , "-dest" , destDir . getAbsolutePath ( ) , "s_envMapper" 4 , "-genType" 1 , "s_envMapper" 3 , "s_envMapper" 0 , "s_envMapper" 7 , destDir . getAbsolutePath ( ) , "-bin" , binDir . getAbsolutePath ( ) , "s_envMapper" 1 , "org.ebayopensource.turmeric.tools.codegen.EnvironmentMapperImpl" , "-adminname" , "-genType" 0 } ; createConsumerPropsFile ( ) ; performDirectCodeGen ( testArgs , binDir ) ; consumerPath = ( destDir . getAbsolutePath ( ) ) + "/src/org/ebayopensource/turmeric/common/v1/services/gen/BaseXyz1Consumer.java" ; consumerFile = new java . io . File ( consumerPath ) ; "<AssertPlaceHolder>" ; try { cls = getClass ( binDir , "s_envMapper" 6 ) ; cls . getDeclaredField ( "s_envMapper" ) ; } catch ( java . net . MalformedURLException e ) { } catch ( java . lang . ClassNotFoundException e ) { } catch ( java . lang . NoSuchFieldException e ) { } } exists ( ) { return legacyPropertiesFile . exists ( ) ; }
org . junit . Assert . assertTrue ( consumerFile . exists ( ) )
shouldPass ( ) { com . qcadoo . model . api . Entity operationalTask = mockOperationalTask ( com . qcadoo . mes . operationalTasks . validators . OperationalTaskValidatorsTest . OTHER_TASK_TYPE , "some<sp>name" , com . qcadoo . mes . operationalTasks . validators . OperationalTaskValidatorsTest . EARLIER_DATE , com . qcadoo . mes . operationalTasks . validators . OperationalTaskValidatorsTest . LATER_DATE ) ; boolean isValid = operationalTaskValidators . onValidate ( operationalTaskDD , operationalTask ) ; "<AssertPlaceHolder>" ; } onValidate ( com . qcadoo . model . api . DataDefinition , com . qcadoo . model . api . Entity ) { return validateDatesOrder ( dataDefinition , timeGapsContext ) ; }
org . junit . Assert . assertTrue ( isValid )
generateDirContent_SnapshotMetadataWith2Versions ( ) { final org . commonjava . indy . content . StoreResource resource = setupSnapshotDirWith2Snapshots ( ) ; final org . commonjava . maven . galley . event . EventMetadata emd = new org . commonjava . maven . galley . event . EventMetadata ( ) ; final java . util . List < org . commonjava . indy . content . StoreResource > result = generator . generateDirectoryContent ( stores . getArtifactStore ( resource . getStoreKey ( ) ) , resource . getPath ( ) , java . util . Collections . < org . commonjava . indy . content . StoreResource > emptyList ( ) , emd ) ; System . out . println ( org . apache . commons . lang . StringUtils . join ( result , "\n" ) ) ; "<AssertPlaceHolder>" ; for ( final org . commonjava . indy . content . StoreResource res : result ) { if ( ! ( ( ( res . getPath ( ) . endsWith ( MavenMetadataMerger . METADATA_MD5_NAME ) ) || ( res . getPath ( ) . endsWith ( MavenMetadataMerger . METADATA_NAME ) ) ) || ( res . getPath ( ) . endsWith ( MavenMetadataMerger . METADATA_SHA_NAME ) ) ) ) { org . junit . Assert . fail ( ( "Invalid<sp>generated<sp>content:<sp>" + res ) ) ; } } } size ( ) { java . util . concurrent . atomic . AtomicInteger counter = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; walkFiles ( ( p ) -> counter . incrementAndGet ( ) ) ; return counter . get ( ) ; }
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . equalTo ( 3 ) )
testEquals_sameFilename ( ) { java . lang . String newFilename = "Filename" ; jobMeta . setFilename ( newFilename ) ; "<AssertPlaceHolder>" ; } testEquals ( java . lang . String , org . pentaho . di . repository . RepositoryDirectoryInterface , org . pentaho . di . repository . ObjectRevision , java . lang . String ) { org . pentaho . di . job . JobMeta jobMeta2 = new org . pentaho . di . job . JobMeta ( ) ; jobMeta2 . setName ( name ) ; jobMeta2 . setRepositoryDirectory ( repDirectory ) ; jobMeta2 . setObjectRevision ( revision ) ; jobMeta2 . setFilename ( filename ) ; return jobMeta . equals ( jobMeta2 ) ; }
org . junit . Assert . assertFalse ( testEquals ( null , null , null , newFilename ) )
testCreateWithNoSupportType ( ) { java . util . Optional < com . gh . mygreen . xlsmapper . fieldaccessor . LabelGetter > labelGetter = getterFactory . create ( com . gh . mygreen . xlsmapper . fieldaccessor . LabelGetterFactoryTest . ByMapField . NoSupportTypeRecord . class , "test" ) ; "<AssertPlaceHolder>" . isEmpty ( ) ; } create ( java . lang . String , java . lang . String ) { com . gh . mygreen . xlsmapper . xml . bind . AnnotationInfo . AttributeInfo attr = new com . gh . mygreen . xlsmapper . xml . bind . AnnotationInfo . AttributeInfo ( ) ; attr . name = name ; attr . value = value ; return attr ; }
org . junit . Assert . assertThat ( labelGetter )
testDefineDataSource ( ) { org . eclipse . birt . data . engine . api . DataEngine testEngine = new org . eclipse . birt . data . engine . impl . DataEngineImpl ( org . eclipse . birt . data . engine . api . DataEngineContext . newInstance ( DataEngineContext . DIRECT_PRESENTATION , null , null , null ) ) ; testEngine . defineDataSource ( this . dataSource ) ; testEngine . defineDataSet ( this . dataSet ) ; org . eclipse . birt . data . engine . api . IPreparedQuery preparedQuery = testEngine . prepare ( newQueryDefn ( ) ) ; org . eclipse . birt . data . engine . api . IQueryResults queryResults = preparedQuery . execute ( null ) ; org . eclipse . birt . data . engine . api . IResultMetaData meta = queryResults . getResultMetaData ( ) ; "<AssertPlaceHolder>" ; testEngine . defineDataSource ( this . dataSource ) ; testEngine . defineDataSet ( this . dataSet ) ; org . eclipse . birt . data . engine . api . IResultIterator ri2 = testEngine . prepare ( newQueryDefn ( ) ) . execute ( null ) . getResultIterator ( ) ; while ( ri2 . next ( ) ) { } ri2 . close ( ) ; org . eclipse . birt . data . engine . api . IResultIterator ri = queryResults . getResultIterator ( ) ; ri . close ( ) ; testEngine . shutdown ( ) ; } getResultMetaData ( ) { return new org . eclipse . birt . report . engine . api . script . instance . InstanceTest . FakeResultMetadata ( ) ; }
org . junit . Assert . assertTrue ( ( meta != null ) )
testOutOfMemory ( ) { java . lang . OutOfMemoryError error = null ; try { java . lang . Object result = nom . tam . util . nom . tam . util . TestArrayFuncs . generateArray ( long . class , new int [ ] { Integer . MAX_VALUE , Integer . MAX_VALUE , Integer . MAX_VALUE } ) ; } catch ( java . lang . OutOfMemoryError error2 ) { error = error2 ; } "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( error )
text ( ) { java . lang . String para = "?signature=d919cc8a6361597afa536e906156262cc9cd93df&timestamp=1433903433&nonce=518016546" ; xmlSb . delete ( 0 , xmlSb . length ( ) ) ; xmlSb . append ( "<xml>" ) ; xmlSb . append ( "<ToUserName><![CDATA[toUser]]></ToUserName>" ) ; xmlSb . append ( "<FromUserName><![CDATA[fromUser]]></FromUserName>" ) ; xmlSb . append ( "<CreateTime>1348831860</CreateTime>" ) ; xmlSb . append ( "<MsgType><![CDATA[text]]></MsgType>" ) ; xmlSb . append ( "<Content><![CDATA[this<sp>is<sp>a<sp>test]]></Content>" ) ; xmlSb . append ( "<MsgId>1234567890123456</MsgId>" ) ; xmlSb . append ( "</xml>" ) ; java . lang . String response = push ( para , xmlSb . toString ( ) ) ; "<AssertPlaceHolder>" ; System . out . println ( response ) ; } toString ( ) { return ( ( ( ( "statDate=" + ( statDate ) ) + ",<sp>targetUser=" ) + ( targetUser ) ) + ",<sp>" ) + ( super . toString ( ) ) ; }
org . junit . Assert . assertNotNull ( response )
shearFollowingTranslate ( ) { g2 . setTransform ( new java . awt . geom . AffineTransform ( ) ) ; g2 . translate ( 10.0 , 20.0 ) ; g2 . shear ( 2.0 , 3.0 ) ; "<AssertPlaceHolder>" ; } getTransform ( ) { return ( ( java . awt . geom . AffineTransform ) ( this . transform . clone ( ) ) ) ; }
org . junit . Assert . assertEquals ( new java . awt . geom . AffineTransform ( 1 , 3 , 2 , 1 , 10 , 20 ) , g2 . getTransform ( ) )
testReadMissingMetadata ( ) { final com . allanbank . mongodb . bson . builder . DocumentBuilder fileResult = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) ; fileResult . addString ( "_id" , "id" ) ; final com . allanbank . mongodb . bson . builder . DocumentBuilder chunkResult = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) ; chunkResult . addBinary ( "data" , new byte [ ] { 1 , 2 , 3 , 4 } ) . add ( GridFs . CHUNK_NUMBER_FIELD , 0 ) ; final com . allanbank . mongodb . MongoDatabase mockDb = createMock ( com . allanbank . mongodb . MongoDatabase . class ) ; final com . allanbank . mongodb . MongoCollection mockFiles = createMock ( com . allanbank . mongodb . MongoCollection . class ) ; final com . allanbank . mongodb . MongoCollection mockChunks = createMock ( com . allanbank . mongodb . MongoCollection . class ) ; final com . allanbank . mongodb . MongoIterator < com . allanbank . mongodb . bson . Document > mockIterator = createMock ( com . allanbank . mongodb . MongoIterator . class ) ; expect ( mockDb . getCollection ( ( "fs" + ( GridFs . FILES_SUFFIX ) ) ) ) . andReturn ( mockFiles ) ; expect ( mockDb . getCollection ( ( "fs" + ( GridFs . CHUNKS_SUFFIX ) ) ) ) . andReturn ( mockChunks ) ; expect ( mockFiles . findOne ( anyObject ( com . allanbank . mongodb . bson . DocumentAssignable . class ) ) ) . andReturn ( fileResult . build ( ) ) ; expect ( mockChunks . find ( anyObject ( com . allanbank . mongodb . builder . Find . class ) ) ) . andReturn ( mockIterator ) ; expect ( mockIterator . iterator ( ) ) . andReturn ( mockIterator ) ; expect ( mockIterator . hasNext ( ) ) . andReturn ( Boolean . TRUE ) ; expect ( mockIterator . next ( ) ) . andReturn ( chunkResult . build ( ) ) ; expect ( mockIterator . hasNext ( ) ) . andReturn ( Boolean . FALSE ) ; mockIterator . close ( ) ; expectLastCall ( ) ; replay ( mockDb , mockFiles , mockChunks , mockIterator ) ; final com . allanbank . mongodb . gridfs . GridFs fs = new com . allanbank . mongodb . gridfs . GridFs ( mockDb ) ; final java . io . ByteArrayOutputStream sink = new java . io . ByteArrayOutputStream ( 4 ) ; fs . read ( "foo" , sink ) ; "<AssertPlaceHolder>" ; verify ( mockDb , mockFiles , mockChunks , mockIterator ) ; } read ( com . allanbank . mongodb . bson . element . ObjectId , java . io . OutputStream ) { final com . allanbank . mongodb . bson . Document fileDoc = myFilesCollection . findOne ( where ( com . allanbank . mongodb . gridfs . GridFs . ID_FIELD ) . equals ( id ) ) ; if ( fileDoc == null ) { throw new java . io . FileNotFoundException ( id . toString ( ) ) ; } doRead ( fileDoc , sink ) ; }
org . junit . Assert . assertArrayEquals ( new byte [ ] { 1 , 2 , 3 , 4 } , sink . toByteArray ( ) )
loadLeftModel ( ) { org . apache . kylin . metadata . model . DataModelDesc model = org . apache . kylin . metadata . model . DataModelManager . getInstance ( getTestConfig ( ) ) . getDataModelDesc ( "ci_left_join_model" ) ; "<AssertPlaceHolder>" ; } getDataModelDesc ( java . lang . String ) { try ( org . apache . kylin . common . util . AutoReadWriteLock . AutoLock lock = modelMapLock . lockForRead ( ) ) { return dataModelDescMap . get ( name ) ; } }
org . junit . Assert . assertNotNull ( model )
testGetFrameworkId_Gets_Value_From_Element ( ) { when ( element . getFrameworkId ( ) ) . thenReturn ( "FRAMEWORK" ) ; mmarquee . automation . uiautomation . IUIAutomation mocked_automation = org . mockito . Mockito . mock ( mmarquee . automation . uiautomation . IUIAutomation . class ) ; mmarquee . automation . UIAutomation instance = new mmarquee . automation . UIAutomation ( mocked_automation ) ; mmarquee . automation . controls . AutomationWindow window = new mmarquee . automation . controls . AutomationWindow ( new mmarquee . automation . controls . ElementBuilder ( element ) . addPattern ( container ) . automation ( instance ) . addPattern ( pattern ) ) ; java . lang . String name = window . getFrameworkId ( ) ; "<AssertPlaceHolder>" ; } getFrameworkId ( ) { return this . element . getFrameworkId ( ) ; }
org . junit . Assert . assertTrue ( name . equals ( "FRAMEWORK" ) )
testStringBytes ( ) { java . lang . Class < com . j256 . ormlite . field . types . StringBytesTypeTest . LocalStringBytes > clazz = com . j256 . ormlite . field . types . StringBytesTypeTest . LocalStringBytes . class ; com . j256 . ormlite . dao . Dao < com . j256 . ormlite . field . types . StringBytesTypeTest . LocalStringBytes , java . lang . Object > dao = createDao ( clazz , true ) ; java . lang . String val = "string<sp>with<sp>ƅ" ; com . j256 . ormlite . field . types . StringBytesTypeTest . LocalStringBytes foo = new com . j256 . ormlite . field . types . StringBytesTypeTest . LocalStringBytes ( ) ; foo . string = val ; "<AssertPlaceHolder>" ; byte [ ] valBytes = val . getBytes ( "Unicode" ) ; testType ( dao , foo , clazz , val , valBytes , valBytes , val , DataType . STRING_BYTES , com . j256 . ormlite . field . types . StringBytesTypeTest . STRING_COLUMN , false , true , true , false , true , false , true , false ) ; } create ( T ) { checkForInitialized ( ) ; if ( data == null ) { return 0 ; } if ( data instanceof com . j256 . ormlite . misc . BaseDaoEnabled ) { @ com . j256 . ormlite . dao . SuppressWarnings ( "unchecked" ) com . j256 . ormlite . misc . BaseDaoEnabled < T , ID > daoEnabled = ( ( com . j256 . ormlite . misc . BaseDaoEnabled < T , ID > ) ( data ) ) ; daoEnabled . setDao ( this ) ; } com . j256 . ormlite . support . DatabaseConnection connection = connectionSource . getReadWriteConnection ( tableInfo . getTableName ( ) ) ; try { return statementExecutor . create ( connection , data , objectCache ) ; } finally { connectionSource . releaseConnection ( connection ) ; } }
org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) )
itShouldNotBeCreatedWhenDefaultStrategyIsNotActiveAndCrucial ( ) { io . datakernel . rpc . client . sender . helper . RpcClientConnectionPoolStub pool = new io . datakernel . rpc . client . sender . helper . RpcClientConnectionPoolStub ( ) ; io . datakernel . rpc . client . sender . helper . RpcSenderStub connection1 = new io . datakernel . rpc . client . sender . helper . RpcSenderStub ( ) ; io . datakernel . rpc . client . sender . helper . RpcSenderStub connection2 = new io . datakernel . rpc . client . sender . helper . RpcSenderStub ( ) ; io . datakernel . rpc . client . sender . helper . RpcSenderStub connection3 = new io . datakernel . rpc . client . sender . helper . RpcSenderStub ( ) ; io . datakernel . rpc . client . sender . RpcStrategySingleServer server1 = io . datakernel . rpc . client . sender . RpcStrategySingleServer . create ( io . datakernel . rpc . client . sender . RpcStrategyTypeDispatchingTest . ADDRESS_1 ) ; io . datakernel . rpc . client . sender . RpcStrategySingleServer server2 = io . datakernel . rpc . client . sender . RpcStrategySingleServer . create ( io . datakernel . rpc . client . sender . RpcStrategyTypeDispatchingTest . ADDRESS_2 ) ; io . datakernel . rpc . client . sender . RpcStrategySingleServer server3 = io . datakernel . rpc . client . sender . RpcStrategySingleServer . create ( io . datakernel . rpc . client . sender . RpcStrategyTypeDispatchingTest . ADDRESS_3 ) ; io . datakernel . rpc . client . sender . RpcStrategySingleServer defaultServer = io . datakernel . rpc . client . sender . RpcStrategySingleServer . create ( io . datakernel . rpc . client . sender . RpcStrategyTypeDispatchingTest . ADDRESS_4 ) ; io . datakernel . rpc . client . sender . RpcStrategy typeDispatchingStrategy = io . datakernel . rpc . client . sender . RpcStrategyTypeDispatching . create ( ) . on ( io . datakernel . rpc . client . sender . RpcStrategyTypeDispatchingTest . RpcMessageDataTypeOne . class , server1 ) . on ( io . datakernel . rpc . client . sender . RpcStrategyTypeDispatchingTest . RpcMessageDataTypeTwo . class , server2 ) . on ( io . datakernel . rpc . client . sender . RpcStrategyTypeDispatchingTest . RpcMessageDataTypeThree . class , server3 ) . onDefault ( defaultServer ) ; pool . put ( io . datakernel . rpc . client . sender . RpcStrategyTypeDispatchingTest . ADDRESS_1 , connection1 ) ; pool . put ( io . datakernel . rpc . client . sender . RpcStrategyTypeDispatchingTest . ADDRESS_2 , connection2 ) ; pool . put ( io . datakernel . rpc . client . sender . RpcStrategyTypeDispatchingTest . ADDRESS_3 , connection3 ) ; "<AssertPlaceHolder>" ; } createSender ( io . datakernel . rpc . client . RpcClientConnectionPool ) { java . util . List < io . datakernel . rpc . client . sender . RpcSender > subSenders = list . listOfSenders ( pool ) ; if ( ( subSenders . size ( ) ) < ( minActiveSubStrategies ) ) return null ; if ( ( subSenders . size ( ) ) == 0 ) return null ; if ( ( subSenders . size ( ) ) == 1 ) return subSenders . get ( 0 ) ; return new io . datakernel . rpc . client . sender . RpcStrategyRoundRobin . Sender ( subSenders ) ; }
org . junit . Assert . assertNull ( typeDispatchingStrategy . createSender ( pool ) )
testFilterNoHostsWhenNoPortsExposed ( ) { "<AssertPlaceHolder>" ; com . vmware . admiral . compute . container . ContainerDescriptionService . ContainerDescription desc = createDescription ( false ) ; createContainer ( desc , initialHostLinks . get ( 0 ) ) ; createContainer ( desc , initialHostLinks . get ( 1 ) ) ; createContainer ( desc , initialHostLinks . get ( 2 ) ) ; filter = new com . vmware . admiral . request . allocation . filter . ExposedPortsHostFilter ( host , desc ) ; java . lang . Throwable e = filter ( initialHostLinks ) ; if ( e != null ) { org . junit . Assert . fail ( ( "Unexpected<sp>exception:<sp>" + e ) ) ; } }
org . junit . Assert . assertEquals ( 3 , initialHostLinks . size ( ) )
testConvertFromAvroLogicalTimeMillis ( ) { org . talend . components . common . config . jdbc . TalendType expectedType = TalendType . INTEGER ; org . apache . avro . Schema fieldSchema = org . talend . daikon . avro . AvroUtils . _logicalTime ( ) ; "<AssertPlaceHolder>" ; } convertFromAvro ( org . apache . avro . Schema ) { org . apache . avro . Schema type = org . talend . daikon . avro . AvroUtils . unwrapIfNullable ( avroType ) ; java . lang . String logicalType = org . talend . daikon . avro . LogicalTypeUtils . getLogicalTypeName ( type ) ; if ( logicalType != null ) { return org . talend . components . common . config . jdbc . TalendType . getTalendByLogicalType ( logicalType ) ; } java . lang . String javaClass = type . getProp ( SchemaConstants . JAVA_CLASS_FLAG ) ; if ( javaClass != null ) { return org . talend . components . common . config . jdbc . TalendType . getTalendByJavaClass ( javaClass ) ; } return org . talend . components . common . config . jdbc . TalendType . getTalendByAvroType ( type . getType ( ) ) ; }
org . junit . Assert . assertEquals ( expectedType , org . talend . components . common . config . jdbc . TalendType . convertFromAvro ( fieldSchema ) )
testMultipleStreamCloseNoError ( ) { com . streamsets . pipeline . lib . io . fileref . ChecksumCalculatingWrapperStream < java . io . InputStream > stream = null ; final java . util . concurrent . atomic . AtomicInteger atomicInteger = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; final com . streamsets . pipeline . lib . generator . StreamCloseEventHandler streamCloseEventHandler = new com . streamsets . pipeline . lib . generator . StreamCloseEventHandler < java . util . Map < java . lang . String , java . lang . Object > > ( ) { @ com . streamsets . pipeline . lib . io . fileref . Override public void handleCloseEvent ( java . util . Map < java . lang . String , java . lang . Object > eventInfo ) { atomicInteger . incrementAndGet ( ) ; } } ; try { stream = new com . streamsets . pipeline . lib . io . fileref . ChecksumCalculatingWrapperStream < java . io . InputStream > ( new java . io . ByteArrayInputStream ( FileRefTestUtil . TEXT . getBytes ( ) ) , HashingUtil . HashType . MD5 , streamCloseEventHandler ) ; stream . read ( new byte [ FileRefTestUtil . TEXT . length ( ) ] ) ; } finally { if ( stream != null ) { stream . close ( ) ; stream . close ( ) ; } } "<AssertPlaceHolder>" ; } get ( ) { return this . root ; }
org . junit . Assert . assertEquals ( 1 , atomicInteger . get ( ) )
test54 ( ) { net . pms . formats . AU aU0 = new net . pms . formats . AU ( ) ; java . lang . String [ ] str_array1 = aU0 . getSupportedExtensions ( ) ; "<AssertPlaceHolder>" ; } getSupportedExtensions ( ) { return new java . lang . String [ ] { "ogg" , "ogm" , "ogv" } ; }
org . junit . Assert . assertNotNull ( str_array1 )
wrappedThrowsWithoutTimeout ( ) { okio . Sink sink = new okio . ForwardingSink ( new okio . Buffer ( ) ) { @ okio . Override public void write ( okio . Buffer source , long byteCount ) throws java . io . IOException { throw new java . io . IOException ( "no<sp>timeout<sp>occurred" ) ; } } ; okio . AsyncTimeout timeout = new okio . AsyncTimeout ( ) ; timeout . timeout ( 250 , TimeUnit . MILLISECONDS ) ; okio . Sink timeoutSink = timeout . sink ( sink ) ; try { timeoutSink . write ( null , 0 ) ; org . junit . Assert . fail ( ) ; } catch ( java . io . IOException expected ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return fMessage ; }
org . junit . Assert . assertEquals ( "no<sp>timeout<sp>occurred" , expected . getMessage ( ) )
testGetContents3 ( ) { nl . siegmann . epublib . domain . Book book = new nl . siegmann . epublib . domain . Book ( ) ; nl . siegmann . epublib . domain . Resource resource1 = new nl . siegmann . epublib . domain . Resource ( "id1" , "Hello,<sp>world<sp>!" . getBytes ( ) , "chapter1.html" , nl . siegmann . epublib . service . MediatypeService . XHTML ) ; book . getSpine ( ) . addResource ( resource1 ) ; nl . siegmann . epublib . domain . Resource resource2 = new nl . siegmann . epublib . domain . Resource ( "id1" , "Hello,<sp>world<sp>!" . getBytes ( ) , "chapter2.html" , nl . siegmann . epublib . service . MediatypeService . XHTML ) ; book . getTableOfContents ( ) . addSection ( resource2 , "My<sp>first<sp>chapter" ) ; book . getGuide ( ) . addReference ( new nl . siegmann . epublib . domain . GuideReference ( resource2 , GuideReference . FOREWORD , "The<sp>Foreword" ) ) ; "<AssertPlaceHolder>" ; } getContents ( ) { java . util . Map < java . lang . String , nl . siegmann . epublib . domain . Resource > result = new java . util . LinkedHashMap < java . lang . String , nl . siegmann . epublib . domain . Resource > ( ) ; nl . siegmann . epublib . domain . Book . addToContentsResult ( getCoverPage ( ) , result ) ; for ( nl . siegmann . epublib . domain . SpineReference spineReference : getSpine ( ) . getSpineReferences ( ) ) { nl . siegmann . epublib . domain . Book . addToContentsResult ( spineReference . getResource ( ) , result ) ; } for ( nl . siegmann . epublib . domain . Resource resource : getTableOfContents ( ) . getAllUniqueResources ( ) ) { nl . siegmann . epublib . domain . Book . addToContentsResult ( resource , result ) ; } for ( nl . siegmann . epublib . domain . GuideReference guideReference : getGuide ( ) . getReferences ( ) ) { nl . siegmann . epublib . domain . Book . addToContentsResult ( guideReference . getResource ( ) , result ) ; } return new java . util . ArrayList < nl . siegmann . epublib . domain . Resource > ( result . values ( ) ) ; }
org . junit . Assert . assertEquals ( 2 , book . getContents ( ) . size ( ) )
testCreateLogicalRouterApiException ( ) { resource . configure ( "NiciraNvpResource" , parameters ) ; when ( nvpApi . createLogicalRouter ( ( ( com . cloud . network . nicira . LogicalRouter ) ( any ( ) ) ) ) ) . thenThrow ( new com . cloud . network . nicira . NiciraNvpApiException ( ) ) ; final com . cloud . legacymodel . communication . command . CreateLogicalRouterCommand clrc = new com . cloud . legacymodel . communication . command . CreateLogicalRouterCommand ( "aaaaa" , 50 , "bbbbb" , "lrouter" , "publiccidr" , "nexthop" , "internalcidr" , "owner" ) ; final com . cloud . legacymodel . communication . answer . CreateLogicalRouterAnswer clra = ( ( com . cloud . legacymodel . communication . answer . CreateLogicalRouterAnswer ) ( resource . executeRequest ( clrc ) ) ) ; "<AssertPlaceHolder>" ; } getResult ( ) { if ( ! ( done ) ) { wait ( ) ; } return result ; }
org . junit . Assert . assertFalse ( clra . getResult ( ) )
testMatch4 ( ) { java . lang . System . setProperty ( "config.file" , "src/test/resources/test.conf" ) ; com . typesafe . config . ConfigFactory . invalidateCaches ( ) ; final com . typesafe . config . Config config = com . typesafe . config . ConfigFactory . load ( ) ; final com . joliciel . talismane . TalismaneSession session = new com . joliciel . talismane . TalismaneSession ( config , "test" ) ; final com . joliciel . talismane . rawText . Sentence sentence = new com . joliciel . talismane . rawText . Sentence ( "Aix-les-Bains" , session ) ; com . joliciel . talismane . tokeniser . TokenSequence tokenSequence = new com . joliciel . talismane . tokeniser . TokenSequence ( sentence , session ) ; tokenSequence . findDefaultTokens ( ) ; com . joliciel . talismane . tokeniser . patterns . TokenPattern tokenPattern = new com . joliciel . talismane . tokeniser . patterns . TokenPattern ( ".+-{(ce|je|la|le|les|leur|lui|moi|nous|toi|tu)[^-]}" , com . joliciel . talismane . tokeniser . Tokeniser . getTokenSeparators ( session ) ) ; java . util . List < com . joliciel . talismane . tokeniser . patterns . TokenPatternMatchSequence > patternMatches = tokenPattern . match ( tokenSequence ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . items . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , patternMatches . size ( ) )
testGetSourceDimensions ( ) { "<AssertPlaceHolder>" ; } getSourceDimensions ( ) { return ( numCol ) - 1 ; }
org . junit . Assert . assertEquals ( transform . getSourceDimensions ( ) , 2 )
testLegacyGetGroupNames ( ) { org . apache . hadoop . mapred . Counters counters = new org . apache . hadoop . mapred . Counters ( ) ; counters . findCounter ( "fs1" , FileSystemCounter . BYTES_READ ) . increment ( 1 ) ; counters . findCounter ( "fs2" , FileSystemCounter . BYTES_READ ) . increment ( 1 ) ; counters . incrCounter ( "group1" , "counter1" , 1 ) ; java . util . HashSet < java . lang . String > groups = new java . util . HashSet < java . lang . String > ( counters . getGroupNames ( ) ) ; java . util . HashSet < java . lang . String > expectedGroups = new java . util . HashSet < java . lang . String > ( ) ; expectedGroups . add ( "group1" ) ; expectedGroups . add ( "FileSystemCounters" ) ; expectedGroups . add ( "org.apache.hadoop.mapreduce.FileSystemCounter" ) ; "<AssertPlaceHolder>" ; } add ( java . util . Collection ) { for ( io . hops . transaction . lock . Lock lock : locks ) { add ( lock ) ; } return this ; }
org . junit . Assert . assertEquals ( expectedGroups , groups )
testDeriveSeverityMid3 ( ) { java . util . Map < java . lang . String , org . hawkular . apm . api . model . analytics . CommunicationSummaryStatistics > nodes = new java . util . HashMap < java . lang . String , org . hawkular . apm . api . model . analytics . CommunicationSummaryStatistics > ( ) ; org . hawkular . apm . api . model . analytics . CommunicationSummaryStatistics css = new org . hawkular . apm . api . model . analytics . CommunicationSummaryStatistics ( ) ; css . setId ( "css1" ) ; css . setAverageDuration ( 597 ) ; nodes . put ( css . getId ( ) , css ) ; long max = 1789 ; org . hawkular . apm . api . services . internal . CommunicationSeverityAnalyser . deriveSeverity ( css , max , nodes ) ; "<AssertPlaceHolder>" ; } getSeverity ( ) { return severity ; }
org . junit . Assert . assertEquals ( 2 , css . getSeverity ( ) )
testGetBackground ( ) { org . eclipse . nebula . widgets . grid . GridItem item = new org . eclipse . nebula . widgets . grid . GridItem ( grid , org . eclipse . swt . SWT . NONE ) ; org . eclipse . swt . graphics . Color background = new org . eclipse . swt . graphics . Color ( display , 0 , 0 , 255 ) ; item . setBackground ( background ) ; "<AssertPlaceHolder>" ; } getBackground ( ) { checkWidget ( ) ; handleVirtual ( ) ; org . eclipse . swt . graphics . Color defaultBackground = getItemData ( ) . defaultBackground ; return defaultBackground == null ? parent . getBackground ( ) : defaultBackground ; }
org . junit . Assert . assertSame ( background , item . getBackground ( ) )
testGid ( ) { java . nio . file . Path file = java . nio . file . Files . createFile ( root . resolve ( "file" ) ) ; java . lang . Integer gid = ( ( java . lang . Integer ) ( java . nio . file . Files . getAttribute ( file , "unix:gid" ) ) ) ; "<AssertPlaceHolder>" ; } resolve ( com . github . sbridges . ephemeralfs . EphemeralFsPath ) { return com . github . sbridges . ephemeralfs . ResolvedPath . resolve ( path , false ) ; }
org . junit . Assert . assertTrue ( ( gid > 0 ) )
testStreamSourceEstimatedSizeBytes ( ) { org . apache . beam . sdk . io . gcp . bigquery . BigQueryStorageStreamSource < com . google . api . services . bigquery . model . TableRow > streamSource = org . apache . beam . sdk . io . gcp . bigquery . BigQueryStorageStreamSource . create ( com . google . cloud . bigquery . storage . v1beta1 . Storage . ReadSession . getDefaultInstance ( ) , com . google . cloud . bigquery . storage . v1beta1 . Storage . Stream . getDefaultInstance ( ) , org . apache . beam . sdk . io . gcp . bigquery . BigQueryIOStorageReadTest . TABLE_SCHEMA , new org . apache . beam . sdk . io . gcp . bigquery . BigQueryIO . TableRowParser ( ) , org . apache . beam . sdk . io . gcp . bigquery . TableRowJsonCoder . of ( ) , new org . apache . beam . sdk . io . gcp . bigquery . FakeBigQueryServices ( ) ) ; "<AssertPlaceHolder>" ; } getEstimatedSizeBytes ( org . apache . beam . sdk . options . PipelineOptions ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( 0 , streamSource . getEstimatedSizeBytes ( options ) )
testNulls ( ) { com . couchbase . jdbc . JDBCTestUtils . setConnection ( null ) ; com . couchbase . jdbc . JDBCTestUtils . deleteDataFromBucket ( "default" ) ; org . json . simple . JSONObject obj = new org . json . simple . JSONObject ( ) ; org . json . simple . JSONObject jsonObjNew = new org . json . simple . JSONObject ( ) ; java . util . HashMap < java . lang . String , java . lang . Object > map = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; map . put ( "name" , null ) ; obj . putAll ( map ) ; org . json . simple . JSONArray expectedArray = new org . json . simple . JSONArray ( ) ; java . util . HashMap < java . lang . String , org . json . simple . JSONObject > objMap = new java . util . HashMap < java . lang . String , org . json . simple . JSONObject > ( ) ; objMap . put ( "1_testNulls" , obj ) ; expectedArray . add ( obj ) ; com . couchbase . jdbc . JDBCTestUtils . insertData ( objMap , "default" ) ; java . lang . Thread . sleep ( 5000 ) ; java . lang . String query = "select<sp>*<sp>from<sp>default" ; com . couchbase . jdbc . JDBCTestUtils . resetConnection ( ) ; try ( java . sql . Connection con = JDBCTestUtils . con ) { try ( java . sql . Statement stmt = con . createStatement ( ) ) { try ( java . sql . ResultSet rs = stmt . executeQuery ( query ) ) { while ( rs . next ( ) ) { com . couchbase . jdbc . CBResultSet cbrs = ( ( com . couchbase . jdbc . CBResultSet ) ( rs ) ) ; java . sql . ResultSetMetaData meta = cbrs . getMetaData ( ) ; com . couchbase . json . SQLJSON jsonVal1 = cbrs . getSQLJSON ( "default" ) ; java . util . Map actualMap = jsonVal1 . getMap ( ) ; if ( actualMap != null ) { jsonObjNew . putAll ( actualMap ) ; } "<AssertPlaceHolder>" ; } } finally { stmt . executeUpdate ( "delete<sp>from<sp>default" ) ; java . lang . Thread . sleep ( 10000 ) ; } } } } getMap ( ) { if ( ( jsonObject ) == null ) { isNull = true ; return null ; } if ( ( jsonObject ) instanceof com . couchbase . jdbc . core . Map ) return ( ( com . couchbase . jdbc . core . Map ) ( jsonObject ) ) ; throw new com . couchbase . jdbc . core . SQLException ( ( ( "Value<sp>" + ( jsonObject ) ) + "<sp>is<sp>not<sp>a<sp>map" ) ) ; }
org . junit . Assert . assertEquals ( obj , jsonObjNew )
deveObterValorSeguroComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProduto produto = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemProduto ( ) ; final java . math . BigDecimal valorSeguro = new java . math . BigDecimal ( "999999999999.99" ) ; produto . setValorSeguro ( valorSeguro ) ; "<AssertPlaceHolder>" ; } getValorSeguro ( ) { return this . valorSeguro ; }
org . junit . Assert . assertEquals ( "999999999999.99" , produto . getValorSeguro ( ) )
testGetResultUrlwAppendableRowSetRequest ( ) { org . sagebionetworks . repo . model . table . AppendableRowSetRequest request = new org . sagebionetworks . repo . model . table . AppendableRowSetRequest ( ) ; request . setEntityId ( tableId ) ; org . sagebionetworks . client . AsynchJobType type = AsynchJobType . TableAppendRowSet ; java . lang . String actual = type . getResultUrl ( token , request ) ; java . lang . String expected = "/entity/0123456/table/append/async/get/abcdefgh" ; "<AssertPlaceHolder>" ; } getResultUrl ( java . lang . String , java . lang . String ) { if ( entityId != null ) { return ( ( ( "/entity/" + entityId ) + ( prefix ) ) + ( org . sagebionetworks . client . SynapseClientImpl . ASYNC_GET ) ) + token ; } return ( ( prefix ) + ( org . sagebionetworks . client . SynapseClientImpl . ASYNC_GET ) ) + token ; }
org . junit . Assert . assertEquals ( actual , expected )
testFindByPrimaryKeyExisting ( ) { com . liferay . dynamic . data . mapping . model . DDMFormInstance newDDMFormInstance = addDDMFormInstance ( ) ; com . liferay . dynamic . data . mapping . model . DDMFormInstance existingDDMFormInstance = _persistence . findByPrimaryKey ( newDDMFormInstance . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingDDMFormInstance , newDDMFormInstance )