input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
getAppStreamV2 ( ) { java . util . List < com . podio . stream . StreamObjectV2 > objects = getAPI ( ) . getAppStream ( 1 , 3 , 2 ) ; "<AssertPlaceHolder>" ; } getAppStream ( int , java . lang . Integer , java . lang . Integer ) { return getStreamV2 ( ( ( "/stream/app/" + appId ) + "/" ) , limit , offset , null , null ) ; } | org . junit . Assert . assertEquals ( objects . size ( ) , 3 ) |
testError ( ) { boolean wasFound = false ; for ( org . openl . message . OpenLMessage message : getCompiledOpenClass ( ) . getMessages ( ) ) { if ( ( message . getSeverity ( ) ) == ( org . openl . message . Severity . ERROR ) ) { if ( message . getSummary ( ) . equals ( "Field<sp>[field1]<sp>has<sp>been<sp>already<sp>defined<sp>in<sp>class<sp>\"ParentType\"<sp>with<sp>another<sp>type" ) ) { wasFound = true ; } } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( arg0 instanceof org . openl . rules . ui . benchmark . BenchmarkOrder ) { org . openl . rules . ui . benchmark . BenchmarkOrder bo = ( ( org . openl . rules . ui . benchmark . BenchmarkOrder ) ( arg0 ) ) ; return ( bo . info . drunsunitsec ( ) ) == ( info . drunsunitsec ( ) ) ; } return false ; } | org . junit . Assert . assertTrue ( wasFound ) |
lotsOfInsertsWithTxsThatStayOpen ( ) { createPageFileAndIndex ( ( ( short ) ( 200 ) ) ) ; org . fusesource . hawtdb . internal . index . BTreeIndex < java . lang . String , java . lang . Long > index = ( ( org . fusesource . hawtdb . internal . index . BTreeIndex < java . lang . String , java . lang . Long > ) ( this . index ) ) ; for ( int i = 0 ; i < ( 1000 * 5 ) ; i ++ ) { pf . tx ( ) . read ( 0 , new org . fusesource . hawtbuf . Buffer ( 1024 ) ) ; index . put ( key ( i ) , ( ( long ) ( i ) ) ) ; tx . commit ( ) ; "<AssertPlaceHolder>" ; tx . commit ( ) ; } } get ( Key ) { return root ( ) . get ( this , key ) ; } | org . junit . Assert . assertEquals ( new java . lang . Long ( i ) , index . get ( key ( i ) ) ) |
testInsertBefore ( ) { java . lang . String expectedJavascript = "$('div').insertBefore('<div>a<div>');" ; java . lang . String generatedJavascript = new org . odlabs . wiquery . core . javascript . JsStatement ( ) . $ ( null , "div" ) . chain ( org . odlabs . wiquery . core . javascript . helper . ManipulatingHelper . insertBefore ( "<div>a<div>" ) ) . render ( ) . toString ( ) ; org . odlabs . wiquery . core . javascript . helper . ManipulatingHelperTestCase . log . info ( expectedJavascript ) ; org . odlabs . wiquery . core . javascript . helper . ManipulatingHelperTestCase . log . info ( generatedJavascript ) ; "<AssertPlaceHolder>" ; } toString ( ) { return super . toString ( ) . toLowerCase ( ) ; } | org . junit . Assert . assertEquals ( generatedJavascript , expectedJavascript ) |
testConvertAll ( ) { java . lang . Long id = 1L ; java . lang . String abbrName = "abbr<sp>Name" ; java . lang . String name = "n<sp>a<sp>m<sp>e" ; org . lnu . is . domain . admin . unit . type . AdminUnitType source = new org . lnu . is . domain . admin . unit . type . AdminUnitType ( ) ; source . setId ( id ) ; source . setAbbrName ( abbrName ) ; source . setName ( name ) ; java . util . List < org . lnu . is . domain . admin . unit . type . AdminUnitType > sources = java . util . Arrays . asList ( source ) ; org . lnu . is . resource . adminunit . type . AdminUnitTypeResource expected = new org . lnu . is . resource . adminunit . type . AdminUnitTypeResource ( ) ; expected . setId ( id ) ; expected . setAbbrName ( abbrName ) ; expected . setName ( name ) ; java . util . List < org . lnu . is . resource . adminunit . type . AdminUnitTypeResource > expecteds = java . util . Arrays . asList ( expected ) ; java . util . List < org . lnu . is . resource . adminunit . type . AdminUnitTypeResource > actuals = unit . convertAll ( sources ) ; "<AssertPlaceHolder>" ; } convertAll ( java . util . List ) { return convertAll ( sources , new java . util . ArrayList < TARGET > ( sources . size ( ) ) ) ; } | org . junit . Assert . assertEquals ( expecteds , actuals ) |
findAllTenantsTest ( ) { org . kaaproject . kaa . common . dto . TenantDto tenantDto = generateTenantDto ( ) ; java . util . List < org . kaaproject . kaa . common . dto . TenantDto > saved = new java . util . ArrayList ( 1 ) ; saved . add ( tenantDto ) ; java . util . List < org . kaaproject . kaa . common . dto . TenantDto > tenants = userService . findAllTenants ( ) ; "<AssertPlaceHolder>" ; } findAllTenants ( ) { return convertDtoList ( tenantDao . find ( ) ) ; } | org . junit . Assert . assertEquals ( saved , tenants ) |
test_getPathInWorkspace_macosx_edge_case ( ) { java . lang . String workspace = "/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven" ; java . lang . String absolutePath = "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" ; java . lang . String actual = org . jenkinsci . plugins . pipeline . maven . util . XmlUtils . getPathInWorkspace ( absolutePath , new hudson . FilePath ( new java . io . File ( workspace ) ) ) ; java . lang . String expected = "pom.xml" ; "<AssertPlaceHolder>" ; } getPathInWorkspace ( java . lang . String , hudson . FilePath ) { boolean windows = org . jenkinsci . plugins . pipeline . maven . util . FileUtils . isWindows ( workspace ) ; final java . lang . String workspaceRemote = workspace . getRemote ( ) ; java . lang . String sanitizedAbsoluteFilePath ; java . lang . String sanitizedWorkspaceRemote ; if ( windows ) { sanitizedWorkspaceRemote = workspaceRemote . replace ( '/' , '\\' ) ; sanitizedAbsoluteFilePath = absoluteFilePath . replace ( '/' , '\\' ) ; } else if ( ( workspaceRemote . startsWith ( "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 2 ) ) && ( absoluteFilePath . startsWith ( "/private/var/" ) ) ) { sanitizedWorkspaceRemote = workspaceRemote ; sanitizedAbsoluteFilePath = absoluteFilePath . substring ( "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 1.le ngth ( ) ) ; } else { sanitizedAbsoluteFilePath = absoluteFilePath ; sanitizedWorkspaceRemote = workspaceRemote ; } if ( org . apache . commons . lang . StringUtils . startsWithIgnoreCase ( sanitizedAbsoluteFilePath , sanitizedWorkspaceRemote ) ) { } else if ( ( sanitizedWorkspaceRemote . contains ( "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 ) ) && ( sanitizedAbsoluteFilePath . contains ( "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 ) ) ) { sanitizedAbsoluteFilePath = "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 + ( org . apache . commons . lang . StringUtils . substringAfter ( sanitizedAbsoluteFilePath , "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 ) ) ; sanitizedWorkspaceRemote = "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 + ( org . apache . commons . lang . StringUtils . substringAfter ( sanitizedWorkspaceRemote , "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 ) ) ; } else if ( ( sanitizedWorkspaceRemote . endsWith ( "/workspace" ) ) && ( sanitizedAbsoluteFilePath . contains ( "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 ) ) ) { sanitizedAbsoluteFilePath = "workspace/" + ( org . apache . commons . lang . StringUtils . substringAfter ( sanitizedAbsoluteFilePath , "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 5 ) ) ; sanitizedWorkspaceRemote = "workspace/" ; } else { throw new java . lang . IllegalArgumentException ( ( ( ( ( "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 0 + absoluteFilePath ) + "'<sp>relatively<sp>to<sp>'" ) + ( workspace . getRemote ( ) ) ) + "'" ) ) ; } java . lang . String relativePath = org . apache . commons . lang . StringUtils . removeStartIgnoreCase ( sanitizedAbsoluteFilePath , sanitizedWorkspaceRemote ) ; java . lang . String fileSeparator = ( windows ) ? "\\" : "/private/var/folders/lq/50t8n2nx7l316pwm8gc_2rt40000gn/T/jenkinsTests.tmp/jenkins3845105900446934883test/workspace/build-on-master-with-tool-provided-maven/pom.xml" 4 ; if ( relativePath . startsWith ( fileSeparator ) ) { relativePath = relativePath . substring ( fileSeparator . length ( ) ) ; } org . jenkinsci . plugins . pipeline . maven . util . XmlUtils . LOGGER . log ( Level . FINEST , "getPathInWorkspace({0},<sp>{1}:<sp>{2}" , new java . lang . Object [ ] { absoluteFilePath , workspaceRemote , relativePath } ) ; return relativePath ; } | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) ) |
testEmptyGeometryRendering ( ) { org . geotools . map . MapContent mc = new org . geotools . map . MapContent ( ) ; org . geotools . styling . StyleBuilder sb = new org . geotools . styling . StyleBuilder ( ) ; org . geotools . styling . Style style = sb . createStyle ( sb . createPolygonSymbolizer ( ) ) ; org . geotools . map . Layer layer = new org . geotools . map . FeatureLayer ( dataStore . getFeatureSource ( "empty-geom-rendering" ) , style ) ; mc . addLayer ( layer ) ; org . geotools . renderer . lite . StreamingRenderer sr = new org . geotools . renderer . lite . StreamingRenderer ( ) ; sr . setMapContent ( mc ) ; java . awt . image . BufferedImage img = new java . awt . image . BufferedImage ( 40 , 40 , java . awt . image . BufferedImage . TYPE_INT_ARGB ) ; java . awt . Graphics2D graphics = img . createGraphics ( ) ; java . awt . Rectangle paintArea = new java . awt . Rectangle ( 40 , 40 ) ; double minx = - 8929252.1 ; double maxx = - 8708634.6 ; double miny = - 491855.7 ; double maxy = - 271204.3 ; org . geotools . geometry . jts . ReferencedEnvelope referencedEnvelope = new org . geotools . geometry . jts . ReferencedEnvelope ( new java . awt . geom . Rectangle2D . Double ( minx , miny , ( maxx - minx ) , ( maxy - miny ) ) , org . geotools . referencing . CRS . decode ( "EPSG:3857" ) ) ; sr . addRenderListener ( new org . geotools . renderer . RenderListener ( ) { public void featureRenderer ( org . opengis . feature . simple . SimpleFeature feature ) { } public void errorOccurred ( java . lang . Exception e ) { ( errors ) ++ ; } } ) ; errors = 0 ; sr . paint ( graphics , paintArea , referencedEnvelope ) ; mc . dispose ( ) ; "<AssertPlaceHolder>" ; } dispose ( ) { } | org . junit . Assert . assertTrue ( ( ( errors ) == 0 ) ) |
findUserByName ( ) { com . apress . demo . User user = userRepository . findByUserName ( "Robert" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( user ) |
testEqualsWithEqualInstances ( ) { edu . illinois . library . cantaloupe . image . Info info2 = edu . illinois . library . cantaloupe . image . Info . builder ( ) . withIdentifier ( new edu . illinois . library . cantaloupe . image . Identifier ( "cats" ) ) . withSize ( 100 , 80 ) . withTileSize ( 50 , 40 ) . withOrientation ( Orientation . ROTATE_270 ) . withNumResolutions ( 3 ) . withFormat ( Format . JPG ) . build ( ) ; "<AssertPlaceHolder>" ; } equals ( org . libjpegturbo . turbojpeg . TJScalingFactor ) { return ( ( this . num ) == ( other . num ) ) && ( ( this . denom ) == ( other . denom ) ) ; } | org . junit . Assert . assertTrue ( instance . equals ( info2 ) ) |
getHtml ( ) { when ( markdownProcessor . markdownToHtml ( de . blizzy . documentr . markdown . PageRendererTest . MARKDOWN , de . blizzy . documentr . markdown . PageRendererTest . PROJECT , de . blizzy . documentr . markdown . PageRendererTest . BRANCH , de . blizzy . documentr . markdown . PageRendererTest . PAGE_PATH , authentication , Locale . US , de . blizzy . documentr . markdown . PageRendererTest . CONTEXT ) ) . thenReturn ( de . blizzy . documentr . markdown . PageRendererTest . HTML ) ; java . lang . String result = pageRenderer . getHtml ( de . blizzy . documentr . markdown . PageRendererTest . PROJECT , de . blizzy . documentr . markdown . PageRendererTest . BRANCH , de . blizzy . documentr . markdown . PageRendererTest . PAGE_PATH , authentication , Locale . US , de . blizzy . documentr . markdown . PageRendererTest . CONTEXT ) ; "<AssertPlaceHolder>" ; } getHtml ( java . lang . String , java . lang . String , java . lang . String , org . springframework . security . core . Authentication , java . util . Locale , java . lang . String ) { if ( log . isInfoEnabled ( ) ) { log . info ( "rendering<sp>page<sp>{}/{}/{}<sp>for<sp>user<sp>{}" , projectName , branchName , de . blizzy . documentr . util . Util . toUrlPagePath ( path ) , authentication . getName ( ) ) ; } de . blizzy . documentr . page . Page page = pageStore . getPage ( projectName , branchName , path , true ) ; java . lang . String markdown = ( ( de . blizzy . documentr . page . PageTextData ) ( page . getData ( ) ) ) . getText ( ) ; return markdownProcessor . markdownToHtml ( markdown , projectName , branchName , path , authentication , locale , contextPath ) ; } | org . junit . Assert . assertEquals ( de . blizzy . documentr . markdown . PageRendererTest . HTML , result ) |
testTimeZoneMatches ( ) { org . apache . commons . lang3 . time . DateParser parser = getInstance ( org . apache . commons . lang3 . time . FastDateParserTest . yMdHmsSZ , org . apache . commons . lang3 . time . FastDateParserTest . REYKJAVIK ) ; "<AssertPlaceHolder>" ; } getTimeZone ( ) { return this . timeZone ; } | org . junit . Assert . assertEquals ( org . apache . commons . lang3 . time . FastDateParserTest . REYKJAVIK , parser . getTimeZone ( ) ) |
canBeSatisfiedFalse ( ) { eu . abc4trust . services . user . UserServiceFactory userServiceFactory = new eu . abc4trust . services . user . UserServiceFactory ( ) ; java . lang . String engineSuffix = "idemix" ; eu . abc4trust . xml . IssuancePolicyAndAttributes issuancePolicyAndAttributes = userServiceFactory . loadIssuancePolicyAndAttributes ( "/issuancePolicyAndAttributes.xml" ) ; issuancePolicyAndAttributes . getAttribute ( ) . get ( 2 ) . setAttributeValue ( "1995-05-05Z" ) ; eu . abc4trust . services . TestScenarioFactory testScenarioFactory = new eu . abc4trust . services . TestScenarioFactory ( ) ; testScenarioFactory . issuanceProtocol ( engineSuffix , issuancePolicyAndAttributes ) ; boolean b = this . canBeSatisfied ( ) ; "<AssertPlaceHolder>" ; } canBeSatisfied ( ) { eu . abc4trust . services . user . UserServiceFactory userServiceFactory = new eu . abc4trust . services . user . UserServiceFactory ( ) ; java . lang . String presentationPolicyFilename = "presentationPolicySimpleIdentitycard.xml" ; eu . abc4trust . xml . PresentationPolicyAlternatives presentationPolicy = ( ( eu . abc4trust . xml . PresentationPolicyAlternatives ) ( eu . abc4trust . xml . util . XmlUtils . getObjectFromXML ( eu . abc4trust . ri . servicehelper . FileSystem . getInputStream ( ( "src/test/resources/" + presentationPolicyFilename ) ) , true ) ) ) ; boolean b = userServiceFactory . canBeSatisfied ( presentationPolicy ) ; return b ; } | org . junit . Assert . assertFalse ( b ) |
whenStream_thenOk ( ) { java . util . List < com . stackify . optional . User > users = new java . util . ArrayList ( ) ; com . stackify . optional . User user = users . stream ( ) . findFirst ( ) . orElse ( new com . stackify . optional . User ( "default" , "1234" ) ) ; "<AssertPlaceHolder>" ; } getEmail ( ) { return email ; } | org . junit . Assert . assertEquals ( user . getEmail ( ) , "default" ) |
testFromJsonObjectNoData ( ) { javax . json . JsonObject jsonObject = javax . json . Json . createObjectBuilder ( ) . build ( ) ; edu . wpi . rail . jrosbridge . messages . std . Int32 data = edu . wpi . rail . jrosbridge . messages . std . Int32 . fromJsonObject ( jsonObject ) ; "<AssertPlaceHolder>" ; } getData ( ) { return this . data ; } | org . junit . Assert . assertEquals ( 0 , data . getData ( ) ) |
testGetFile ( ) { upDownloader . upload ( testFile , bin ) ; byte [ ] b = upDownloader . getFile ( testFile ) ; "<AssertPlaceHolder>" ; } getFile ( java . lang . String ) { java . io . File f = new java . io . File ( basePath , com . github . emailtohl . building . common . utils . UpDownloader . getSystemPath ( relativePath ) ) ; byte [ ] bin ; try ( java . io . InputStream in = new java . io . BufferedInputStream ( new java . io . FileInputStream ( f ) ) ) { bin = new byte [ in . available ( ) ] ; in . read ( bin ) ; } return bin ; } | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( bin , b ) ) |
testUAndQuery_EncodingDelimiter ( ) { java . lang . String [ ] inputStr = new java . lang . String [ ] { "+" , "&" , "=" } ; for ( java . lang . String str : inputStr ) { java . lang . String matcher = "name=" + ( org . terasoluna . gfw . web . el . Functions . u ( str ) ) ; java . util . Map < java . lang . String , java . lang . Object > map = new java . util . LinkedHashMap < java . lang . String , java . lang . Object > ( ) ; map . put ( "name" , str ) ; java . lang . String actual = org . terasoluna . gfw . web . el . Functions . query ( map ) ; "<AssertPlaceHolder>" ; } } query ( java . lang . Object ) { if ( params == null ) { return "" ; } java . lang . Class < ? > clazz = params . getClass ( ) ; if ( org . springframework . beans . BeanUtils . isSimpleValueType ( clazz ) ) { return "" ; } return org . terasoluna . gfw . web . el . Functions . mapToQuery ( org . terasoluna . gfw . web . el . Functions . OBJECT_TO_MAP_CONVERTER . convert ( params ) ) ; } | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( matcher ) ) |
testRDFSSubPropertyOf ( ) { org . apache . stanbol . reasoners . jena . JenaRDFSReasoningServiceTest . log . info ( "Testing<sp>rdfs:subPropertyOf<sp>inference<sp>with<sp>RDFS<sp>reasoner" ) ; com . hp . hpl . jena . rdf . model . Property collegueOf = TestData . model . createProperty ( ( ( TestData . TEST_NS ) + "collegueOf" ) ) ; collegueOf . addProperty ( RDFS . subPropertyOf , TestData . foaf_knows ) ; TestData . alexdma . addProperty ( collegueOf , TestData . enridaga ) ; com . hp . hpl . jena . rdf . model . Model input = com . hp . hpl . jena . rdf . model . ModelFactory . createUnion ( TestData . foaf , TestData . alexdma . getModel ( ) ) ; com . hp . hpl . jena . rdf . model . InfModel inferred = reasoningService . run ( input ) ; com . hp . hpl . jena . rdf . model . Statement knowsHim = TestData . model . createStatement ( TestData . alexdma , TestData . foaf_knows , TestData . enridaga ) ; org . apache . stanbol . reasoners . jena . JenaRDFSReasoningServiceTest . log . info ( "Does<sp>alexdma<sp>foaf:knows<sp>enridaga?...(true)?<sp>{}" , inferred . contains ( knowsHim ) ) ; "<AssertPlaceHolder>" ; TestData . alexdma . removeProperties ( ) ; } contains ( java . lang . Object ) { for ( org . apache . stanbol . rules . base . api . Rule semionRule : rules ) { if ( semionRule . equals ( o ) ) { return true ; } } return false ; } | org . junit . Assert . assertTrue ( inferred . contains ( knowsHim ) ) |
testGetDisabledReason ( ) { "<AssertPlaceHolder>" ; verify ( dlg , times ( 2 ) ) . getDisabledReason ( ) ; verify ( autosaveMgr , never ( ) ) . autosave ( ) ; } getDisabledReason ( ) { return getDelegate ( ) . getDisabledReason ( ) ; } | org . junit . Assert . assertEquals ( dlg . getDisabledReason ( ) , user . getDisabledReason ( ) ) |
getBigDecimal ( ) { final java . lang . Float value = 1.2F ; final io . trane . ndbc . value . FloatValue wrapper = new io . trane . ndbc . value . FloatValue ( value ) ; "<AssertPlaceHolder>" ; } getBigDecimal ( ) { return new java . math . BigDecimal ( get ( ) ) ; } | org . junit . Assert . assertEquals ( new java . math . BigDecimal ( value ) , wrapper . getBigDecimal ( ) ) |
emptyLogger ( ) { org . jenkinsci . test . acceptance . po . JenkinsLogger logger = jenkins . createLogger ( "test" , java . util . Collections . singletonMap ( "" , Level . ALL ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { open ( ) ; return ( getElement ( by . css ( "#main-panel<sp>pre" ) ) ) == null ; } | org . junit . Assert . assertFalse ( logger . isEmpty ( ) ) |
restoreWithFilterSuccessfullyWithoutChecksumAndMatching ( ) { entry = new org . codice . ddf . configuration . migration . ImportMigrationExternalEntryImpl ( mockContext , com . google . common . collect . ImmutableMap . of ( MigrationEntryImpl . METADATA_NAME , org . codice . ddf . configuration . migration . ImportMigrationExternalEntryImplTest . ENTRY_NAME , MigrationEntryImpl . METADATA_SOFTLINK , false ) ) ; "<AssertPlaceHolder>" ; } restore ( boolean , java . nio . file . PathMatcher ) { org . apache . commons . lang . Validate . notNull ( filter , "invalid<sp>null<sp>path<sp>filter" ) ; if ( ( restored ) == null ) { this . restored = false ; if ( filter . matches ( path ) ) { this . restored = handleRestore ( required , filter ) ; } else { this . restored = handleRestoreWhenFilterNotMatching ( required ) ; } } return restored ; } | org . junit . Assert . assertThat ( entry . restore ( true , ( p ) -> true ) , org . hamcrest . CoreMatchers . equalTo ( true ) ) |
testWithNameWhenSameName ( ) { final com . allanbank . mongodb . bson . element . NullElement element = new com . allanbank . mongodb . bson . element . NullElement ( "foo" ) ; "<AssertPlaceHolder>" ; } withName ( java . lang . String ) { if ( getName ( ) . equals ( name ) ) { return this ; } return new com . allanbank . mongodb . bson . element . UuidElement ( name , getSubType ( ) , myUuid ) ; } | org . junit . Assert . assertSame ( element , element . withName ( "foo" ) ) |
testText ( ) { label . setText ( "abc" ) ; "<AssertPlaceHolder>" ; } getText ( ) { checkWidget ( ) ; return getText ( 0 ) ; } | org . junit . Assert . assertEquals ( "abc" , label . getText ( ) ) |
createService ( ) { wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareMaven ( project . getName ( ) , com . liferay . ide . ui . module . tests . SERVICE ) ; wizardAction . next ( ) ; wizardAction . newModuleInfo . openSelectServiceDialog ( ) ; dialogAction . prepareText ( "*lifecycleAction" ) ; dialogAction . confirm ( ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningJobs ( ) ; viewAction . project . openUpdateMavenProjectDialog ( project . getName ( ) ) ; dialogAction . updateMavenProject . selectAll ( ) ; dialogAction . confirm ( ) ; jobAction . waitForUpdateMavenProject ( ) ; "<AssertPlaceHolder>" ; viewAction . project . closeAndDelete ( project . getName ( ) ) ; } visibleFileTry ( java . lang . String [ ] ) { try { return _getProjects ( ) . isVisible ( files ) ; } catch ( java . lang . Exception e ) { _getProjects ( ) . setFocus ( ) ; try { java . lang . String [ ] parents = java . util . Arrays . copyOfRange ( files , 0 , ( ( files . length ) - 1 ) ) ; _getProjects ( ) . expand ( parents ) ; _getProjects ( ) . contextMenu ( com . liferay . ide . ui . liferay . action . REFRESH , parents ) ; ide . sleep ( 2000 ) ; } catch ( java . lang . Exception e1 ) { } for ( int i = ( files . length ) - 1 ; i > 0 ; i -- ) { java . lang . String [ ] parents = java . util . Arrays . copyOfRange ( files , 0 , ( ( files . length ) - i ) ) ; org . eclipse . swtbot . swt . finder . widgets . SWTBotTreeItem parent = _getProjects ( ) . getTreeItem ( parents ) ; _getProjects ( ) . expand ( parents ) ; java . lang . String subnode = files [ ( ( files . length ) - i ) ] ; _jobAction . waitForSubnode ( parent , subnode , com . liferay . ide . ui . liferay . action . REFRESH ) ; } return _getProjects ( ) . isVisible ( files ) ; } } | org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( project . getName ( ) ) ) |
testReturnTypesCompileString ( ) { java . util . List < java . lang . String > ls = new java . util . ArrayList < java . lang . String > ( ) ; ls . add ( "homer" ) ; ls . add ( "marge" ) ; table . createListColumn ( "simpson" , java . lang . String . class , false ) ; attrs . set ( "simpson" , ls ) ; java . util . List < java . lang . String > res = attrs . getList ( "simpson" , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( ls , res ) |
testSelect ( ) { createArtistsDataSet ( ) ; org . apache . cayenne . query . SelectQuery < org . apache . cayenne . testdo . testmap . Artist > query = new org . apache . cayenne . query . SelectQuery ( org . apache . cayenne . testdo . testmap . Artist . class ) ; java . util . List < ? > objects = query . select ( context ) ; "<AssertPlaceHolder>" ; } size ( ) { return neighbors . size ( ) ; } | org . junit . Assert . assertEquals ( 20 , objects . size ( ) ) |
testCreate ( ) { "<AssertPlaceHolder>" ; } create ( ) { if ( null == ( ch . cyberduck . core . sparkle . Updater . CLASS ) ) { return null ; } final ch . cyberduck . core . sparkle . Updater updater = ch . cyberduck . core . sparkle . Updater . CLASS . sharedUpdater ( ) ; updater . setUserAgentString ( new ch . cyberduck . core . PreferencesUseragentProvider ( ) . get ( ) ) ; return updater ; } | org . junit . Assert . assertNotNull ( ch . cyberduck . core . sparkle . Updater . create ( ) ) |
test_writeInt ( int , java . lang . String ) { outputCompact . writeInt ( input ) ; "<AssertPlaceHolder>" ; } toString ( ) { return getClass ( ) . getSimpleName ( ) ; } | org . junit . Assert . assertEquals ( buf . toString ( ) , expected ) |
shouldNotEqualsWhenObjectHasTypeNotTab ( ) { "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == other ) { return true ; } if ( ! ( other instanceof org . eclipse . che . ide . ext . runner . client . tabs . common . Tab ) ) { return false ; } org . eclipse . che . ide . ext . runner . client . tabs . common . Tab tab = ( ( org . eclipse . che . ide . ext . runner . client . tabs . common . Tab ) ( other ) ) ; return java . util . Objects . equals ( title , tab . title ) ; } | org . junit . Assert . assertThat ( tab . equals ( new java . lang . Object ( ) ) , org . hamcrest . core . Is . is ( false ) ) |
customerListAfterGrouping ( ) { java . io . InputStream inputStream = null ; parameters . put ( "customer" , 103 ) ; parameters . put ( "order" , 10123 ) ; if ( ( inputStream = runAndRenderSampleReport ( "samplereports/Reporting<sp>Feature<sp>Examples/Grouping/CustomerListAfter_Grouping.rptdesign" , "xlsx" ) ) != null ) { try { "<AssertPlaceHolder>" ; } finally { inputStream . close ( ) ; } } } runAndRenderSampleReport ( java . lang . String , java . lang . String ) { if ( ( uk . co . spudsoft . birt . emitters . excel . tests . SampleReportsTest . basePath ) != null ) { java . io . File file = new java . io . File ( ( ( uk . co . spudsoft . birt . emitters . excel . tests . SampleReportsTest . basePath ) + filename ) ) ; if ( file . exists ( ) ) { return runAndRenderReport ( file . getAbsolutePath ( ) , extension ) ; } } return null ; } | org . junit . Assert . assertNotNull ( inputStream ) |
should_return_empty_List_if_given_Iterable_is_null ( ) { java . util . Collection < ? > c = null ; "<AssertPlaceHolder>" ; } nonNullElementsIn ( java . lang . Iterable ) { if ( org . fest . util . Iterables . isNullOrEmpty ( i ) ) { return emptyList ( ) ; } java . util . List < T > nonNull = new java . util . ArrayList < T > ( ) ; for ( T element : i ) { if ( element != null ) { nonNull . add ( element ) ; } } return nonNull ; } | org . junit . Assert . assertTrue ( org . fest . util . Iterables . nonNullElementsIn ( c ) . isEmpty ( ) ) |
testDeadMinionsCheckWithNoDeadMinions ( ) { tracker . reportMinionAlive ( com . facebook . buck . distributed . build_slave . MinionHealthTrackerTest . MINION_ONE , com . facebook . buck . distributed . build_slave . MinionHealthTrackerTest . MINION_ONE ) ; tracker . reportMinionAlive ( com . facebook . buck . distributed . build_slave . MinionHealthTrackerTest . MINION_TWO , com . facebook . buck . distributed . build_slave . MinionHealthTrackerTest . MINION_TWO ) ; clock . setCurrentMillis ( com . facebook . buck . distributed . build_slave . MinionHealthTrackerTest . MAX_SILENCE_MILLIS ) ; tracker . reportMinionAlive ( com . facebook . buck . distributed . build_slave . MinionHealthTrackerTest . MINION_THREE , com . facebook . buck . distributed . build_slave . MinionHealthTrackerTest . MINION_THREE ) ; java . util . List < java . lang . String > deadMinions = getDeadMinions ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( segments . length ) == 0 ; } | org . junit . Assert . assertTrue ( deadMinions . isEmpty ( ) ) |
testCompareSorteerVolgorde ( ) { final nl . bzk . brp . domain . berichtmodel . BijgehoudenPersoon bijgehoudenPersoon1 = bouwPersoon ( 1 , 2 ) ; final nl . bzk . brp . domain . berichtmodel . BijgehoudenPersoon bijgehoudenPersoon2 = bouwPersoon ( 2 , 1 ) ; final int compare = DefaultPersoonComparator . INSTANCE . compare ( bijgehoudenPersoon1 , bijgehoudenPersoon2 ) ; "<AssertPlaceHolder>" ; } compare ( nl . bzk . brp . domain . berichtmodel . BijgehoudenPersoon , nl . bzk . brp . domain . berichtmodel . BijgehoudenPersoon ) { final nl . bzk . brp . domain . leveringmodel . MetaObject persoon1 = bijgehoudenPersoon1 . getPersoonslijst ( ) . getMetaObject ( ) ; final nl . bzk . brp . domain . leveringmodel . MetaObject persoon2 = bijgehoudenPersoon2 . getPersoonslijst ( ) . getMetaObject ( ) ; final java . lang . Comparable < java . lang . Number > sorteerVolgorde1 = bepaalSorteerVolgorde ( bijgehoudenPersoon1 ) ; final java . lang . Comparable < java . lang . Number > sorteerVolgorde2 = bepaalSorteerVolgorde ( bijgehoudenPersoon2 ) ; final int sorteerVolgorde = org . apache . commons . lang3 . ObjectUtils . compare ( ( ( java . lang . Comparable ) ( sorteerVolgorde1 ) ) , ( ( java . lang . Comparable ) ( sorteerVolgorde2 ) ) ) ; if ( sorteerVolgorde != 0 ) { return sorteerVolgorde ; } return java . lang . Long . compare ( persoon1 . getObjectsleutel ( ) , persoon2 . getObjectsleutel ( ) ) ; } | org . junit . Assert . assertEquals ( ( - 1 ) , compare ) |
testDefault ( ) { org . apache . accumulo . core . data . Value v = new org . apache . accumulo . core . data . Value ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return sb . toString ( ) ; } | org . junit . Assert . assertEquals ( 0 , v . get ( ) . length ) |
testConnectFutureBeforeChannelActive ( ) { io . netty . bootstrap . Bootstrap cb = new io . netty . bootstrap . Bootstrap ( ) ; io . netty . bootstrap . ServerBootstrap sb = new io . netty . bootstrap . ServerBootstrap ( ) ; cb . group ( io . netty . channel . local . LocalChannelTest . group1 ) . channel ( io . netty . channel . local . LocalChannel . class ) . handler ( new io . netty . channel . ChannelInboundHandlerAdapter ( ) ) ; sb . group ( io . netty . channel . local . LocalChannelTest . group2 ) . channel ( io . netty . channel . local . LocalServerChannel . class ) . childHandler ( new io . netty . channel . ChannelInitializer < io . netty . channel . local . LocalChannel > ( ) { @ io . netty . channel . local . Override public void initChannel ( io . netty . channel . local . LocalChannel ch ) throws io . netty . channel . local . Exception { ch . pipeline ( ) . addLast ( new io . netty . channel . local . LocalChannelTest . TestHandler ( ) ) ; } } ) ; io . netty . channel . Channel sc = null ; io . netty . channel . Channel cc = null ; try { sc = sb . bind ( io . netty . channel . local . LocalChannelTest . TEST_ADDRESS ) . sync ( ) . channel ( ) ; cc = cb . register ( ) . sync ( ) . channel ( ) ; final io . netty . channel . ChannelPromise promise = cc . newPromise ( ) ; final io . netty . util . concurrent . Promise < java . lang . Void > assertPromise = cc . eventLoop ( ) . newPromise ( ) ; cc . pipeline ( ) . addLast ( new io . netty . channel . local . LocalChannelTest . TestHandler ( ) { @ io . netty . channel . local . Override public void channelActive ( io . netty . channel . ChannelHandlerContext ctx ) throws io . netty . channel . local . Exception { if ( promise . isDone ( ) ) { assertPromise . setSuccess ( null ) ; } else { assertPromise . setFailure ( new java . lang . AssertionError ( "connect<sp>promise<sp>should<sp>be<sp>done" ) ) ; } } } ) ; cc . connect ( sc . localAddress ( ) , promise ) . sync ( ) ; assertPromise . syncUninterruptibly ( ) ; "<AssertPlaceHolder>" ; } finally { io . netty . channel . local . LocalChannelTest . closeChannel ( cc ) ; io . netty . channel . local . LocalChannelTest . closeChannel ( sc ) ; } } isSuccess ( ) { return ( byteValue ) == 90 ; } | org . junit . Assert . assertTrue ( promise . isSuccess ( ) ) |
testGetLineup ( ) { com . sonatype . s2 . p2lineup . model . P2Lineup lineup = new com . sonatype . s2 . p2lineup . model . P2Lineup ( ) ; lineup . setDescription ( "description" ) ; lineup . setGroupId ( "groupId-testGetLineup" ) ; lineup . setId ( "id-testGetLineup" ) ; lineup . setVersion ( "version-testGetLineup" ) ; this . getP2LineupManager ( ) . addLineup ( lineup ) ; com . sonatype . s2 . p2lineup . model . P2Lineup result = this . getP2LineupManager ( ) . getLineup ( new com . sonatype . nexus . p2 . lineup . persist . P2Gav ( lineup . getGroupId ( ) , lineup . getId ( ) , lineup . getVersion ( ) ) ) ; "<AssertPlaceHolder>" ; } getVersion ( ) { return version ; } | org . junit . Assert . assertEquals ( lineup , result ) |
ttlDirectoryDeleteReplay ( ) { alluxio . master . file . contexts . CreateDirectoryContext context = alluxio . master . file . contexts . CreateDirectoryContext . mergeFrom ( alluxio . grpc . CreateDirectoryPOptions . newBuilder ( ) . setRecursive ( true ) . setCommonOptions ( alluxio . grpc . FileSystemMasterCommonPOptions . newBuilder ( ) . setTtl ( 0 ) ) ) ; long dirId = mFileSystemMaster . createDirectory ( alluxio . master . file . FileSystemMasterTest . NESTED_DIR_URI , context ) ; stopServices ( ) ; startServices ( ) ; alluxio . wire . FileInfo fileInfo = mFileSystemMaster . getFileInfo ( dirId ) ; "<AssertPlaceHolder>" ; alluxio . heartbeat . HeartbeatScheduler . execute ( HeartbeatContext . MASTER_TTL_CHECK ) ; mThrown . expect ( alluxio . exception . FileDoesNotExistException . class ) ; mFileSystemMaster . getFileInfo ( dirId ) ; } getFileId ( ) { return mFileId ; } | org . junit . Assert . assertEquals ( fileInfo . getFileId ( ) , dirId ) |
testSetSelfIsNoOp ( ) { io . netty . handler . codec . http . HttpHeaders headers = new io . netty . handler . codec . http . DefaultHttpHeaders ( false ) ; headers . add ( "name" , "value" ) ; headers . set ( headers ) ; "<AssertPlaceHolder>" ; } size ( ) { return delegate . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , headers . size ( ) ) |
testGetName ( ) { int result = fixture . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return fName ; } | org . junit . Assert . assertEquals ( 1 , result ) |
testDeepCopyReflect_privateCtor ( ) { org . apache . avro . Schema schema = org . apache . crunch . types . avro . Avros . reflects ( org . apache . crunch . types . avro . PojoWithPrivateCtor . class ) . getSchema ( ) ; org . apache . crunch . types . avro . AvroDeepCopier < org . apache . crunch . types . avro . PojoWithPrivateCtor > avroDeepCopier = new org . apache . crunch . types . avro . AvroDeepCopier . AvroReflectDeepCopier < > ( schema ) ; avroDeepCopier . initialize ( new org . apache . hadoop . conf . Configuration ( ) ) ; org . apache . crunch . types . avro . PojoWithPrivateCtor orig = new org . apache . crunch . types . avro . PojoWithPrivateCtor ( "foo" ) ; org . apache . crunch . types . avro . PojoWithPrivateCtor deepCopy = avroDeepCopier . deepCopy ( orig ) ; "<AssertPlaceHolder>" ; } getField ( ) { return field ; } | org . junit . Assert . assertEquals ( orig . getField ( ) , deepCopy . getField ( ) ) |
testGetTest2 ( ) { io . vertx . core . MultiMap mmap = newMultiMap ( ) ; java . lang . String name = "1" ; "<AssertPlaceHolder>" ; } get ( int ) { switch ( id ) { case 1 : return headerTableSize ; case 2 : return pushEnabled ? 1L : 0L ; case 3 : return maxConcurrentStreams ; case 4 : return ( ( long ) ( initialWindowSize ) ) ; case 5 : return ( ( long ) ( maxFrameSize ) ) ; case 6 : return ( ( long ) ( maxHeaderListSize ) ) ; default : return ( extraSettings ) != null ? extraSettings . get ( id ) : null ; } } | org . junit . Assert . assertNull ( mmap . get ( name ) ) |
testURLWithAccents ( ) { java . lang . String urlWithAccents = "https://hu.wikipedia.org/wiki/rvztr_tkrfrgp" ; java . lang . String expected = ( "<a<sp>href=\"" + ( com . liferay . portal . kernel . util . HtmlUtil . escapeHREF ( urlWithAccents ) ) ) + "\">link</a>" ; java . lang . String actual = _htmlBBCodeTranslator . parse ( ( ( "[url=" + urlWithAccents ) + "]link[/url]" ) ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { if ( com . liferay . portal . kernel . util . Validator . isNull ( s ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String [ ] fields = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _fieldSeparatorPattern . split ( s ) ; if ( ( ( fields . length ) != 4 ) && ( ( fields . length ) != 5 ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String name = fields [ 0 ] ; name = _http . decodeURL ( name ) ; java . lang . String description = fields [ 1 ] ; description = _http . decodeURL ( description ) ; java . lang . String uuid = fields [ 2 ] ; if ( ( com . liferay . portal . kernel . util . Validator . isNull ( name ) ) || ( com . liferay . portal . kernel . util . Validator . isNull ( uuid ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } java . lang . String [ ] attributes = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _attributeSeparatorPattern . split ( fields [ 3 ] ) ; java . util . Map < java . lang . String , java . lang . String > properties = new java . util . HashMap ( ) ; for ( java . lang . String attribute : attributes ) { java . lang . String [ ] keyValuePair = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _keyValueSeparatorPattern . split ( attribute ) ; properties . put ( keyValuePair [ 0 ] , keyValuePair [ 1 ] ) ; } boolean enabled = true ; if ( ( fields . length ) == 5 ) { java . lang . String disabledAttribute = fields [ 4 ] ; java . util . regex . Matcher matcher = com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryParser . _disabledSeparatorPattern . matcher ( disabledAttribute ) ; if ( ! ( matcher . matches ( ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Invalid<sp>image<sp>adaptive<sp>media<sp>configuration:<sp>" + s ) ) ; } enabled = com . liferay . portal . kernel . util . GetterUtil . getBoolean ( matcher . group ( 1 ) ) ; } return new com . liferay . adaptive . media . image . internal . configuration . AMImageConfigurationEntryImpl ( name , description , uuid , properties , enabled ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testCrash_119_ae_00 ( ) { org . nd4j . linalg . factory . Nd4j . create ( 1 ) ; lombok . val tg = org . nd4j . imports . graphmapper . tf . TFGraphMapper . getInstance ( ) . importGraph ( new org . nd4j . linalg . io . ClassPathResource ( "tf_graphs/examples/ae_00/frozen_model.pb" ) . getInputStream ( ) ) ; "<AssertPlaceHolder>" ; lombok . val input0 = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0.9817496 , 0.44406342 , 0.50100771 , 1.0 , - 0.94038386 , 0.46501783 , - 0.4904059 , 0.98153842 , - 0.0019826 , 0.4910831 , - 0.06085236 , 0.93523693 , - 0.05857396 , - 0.4663351 , - 0.02806635 , - 0.96879626 , - 0.03938015 , - 0.51578135 , - 0.06333921 , - 1.0 } , new int [ ] { 5 , 4 } ) ; tg . associateArrayWithVariable ( input0 , tg . getVariable ( "input" ) ) ; tg . asFlatFile ( new java . io . File ( "../../../libnd4j/tests_cpu/resources/ae_00.fb" ) ) ; } getInputStream ( ) { return inputStream ; } | org . junit . Assert . assertNotNull ( tg ) |
testResolve ( ) { org . unidal . dal . jdbc . query . QueryResolver resolver = lookup ( org . unidal . dal . jdbc . query . QueryResolver . class ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( resolver ) |
testCallVoidMethodOnInterfaceBlueprinRandomt ( ) { final net . sf . qualitytest . blueprint . BlueprintTest_interfaceMethod . SomeEntityBean bean = net . sf . qualitytest . blueprint . Blueprint . random ( ) . with ( "getId" , 42L ) . with ( "getName" , "Hello<sp>World!" ) . construct ( net . sf . qualitytest . blueprint . BlueprintTest_interfaceMethod . SomeEntityBean . class ) ; bean . setName ( "something" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( "Hello<sp>World!" , bean . getName ( ) ) |
testLogoutNull ( ) { when ( repo . findByUserid ( ServiceTestConfiguration . USER_ID ) ) . thenReturn ( null ) ; io . pivotal . springtrader . accounts . domain . Account result = service . logout ( ServiceTestConfiguration . USER_ID ) ; "<AssertPlaceHolder>" ; } logout ( java . lang . String ) { io . pivotal . springtrader . accounts . services . AccountService . logger . debug ( ( "AccountService.logout:<sp>Logging<sp>out<sp>account<sp>with<sp>userId:<sp>" + userId ) ) ; io . pivotal . springtrader . accounts . domain . Account account = accountRepository . findByUserid ( userId ) ; if ( account != null ) { account . setAuthtoken ( null ) ; account . setLogoutcount ( ( ( account . getLogoutcount ( ) ) + 1 ) ) ; accountRepository . save ( account ) ; io . pivotal . springtrader . accounts . services . AccountService . logger . info ( ( "AccountService.logout:<sp>Account<sp>logged<sp>out:<sp>" + ( account . getUserid ( ) ) ) ) ; } else { io . pivotal . springtrader . accounts . services . AccountService . logger . warn ( ( "AccountService.logout:<sp>Could<sp>not<sp>find<sp>account<sp>to<sp>logout<sp>with<sp>userId:<sp>" + userId ) ) ; } return account ; } | org . junit . Assert . assertNull ( result ) |
testGetMissingPathsRecursive2 ( ) { java . lang . String path = ( uri . getPath ( ) ) + "/path/to/log" ; org . apache . bookkeeper . util . ZkUtils . createFullPathOptimistic ( zkc . get ( ) , path , org . apache . distributedlog . DistributedLogConstants . EMPTY_BYTES , zkc . getDefaultACL ( ) , CreateMode . PERSISTENT ) ; java . util . List < java . lang . String > missingPaths = org . apache . distributedlog . common . concurrent . FutureUtils . result ( getMissingPaths ( zkc , uri , "path/to/log" ) ) ; "<AssertPlaceHolder>" ; } result ( java . util . concurrent . CompletableFuture , long , java . util . concurrent . TimeUnit ) { return org . apache . distributedlog . common . concurrent . FutureUtils . result ( future , org . apache . distributedlog . common . concurrent . FutureUtils . DEFAULT_EXCEPTION_HANDLER , timeout , timeUnit ) ; } | org . junit . Assert . assertEquals ( java . util . Collections . emptyList ( ) , missingPaths ) |
createPolicyWithConfigurationAndConfigurationData02 ( ) { try ( java . io . InputStream is = io . gravitee . gateway . policy . PolicyConfigurationFactoryTest . class . getResourceAsStream ( "policy-configuration-02.json" ) ) { java . lang . String configuration = org . apache . commons . io . IOUtils . toString ( is , "UTF-8" ) ; io . gravitee . gateway . policy . DummyPolicyConfiguration policyConfiguration = policyConfigurationFactory . create ( io . gravitee . gateway . policy . DummyPolicyConfiguration . class , configuration ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; } } create ( io . gravitee . definition . model . Endpoint , io . gravitee . gateway . core . endpoint . factory . template . EndpointContext ) { for ( io . gravitee . gateway . core . endpoint . factory . EndpointFactory factory : getFactoriesInstances ( ) ) { if ( factory . support ( model . getType ( ) ) ) { return factory . create ( model , context ) ; } } throw new java . lang . IllegalStateException ( java . lang . String . format ( "Unable<sp>to<sp>create<sp>an<sp>endpoint<sp>for<sp>%s" , model ) ) ; } | org . junit . Assert . assertNotNull ( policyConfiguration ) |
testShowExecutionPlanWithParallelism ( ) { try { java . lang . String [ ] parameters = new java . lang . String [ ] { "-e" , "-p" , "17" , eu . stratosphere . client . CliFrontendTestUtils . getTestJarPath ( ) } ; eu . stratosphere . client . CliFrontendInfoTest . InfoTestCliFrontend testFrontend = new eu . stratosphere . client . CliFrontendInfoTest . InfoTestCliFrontend ( 17 ) ; int retCode = testFrontend . info ( parameters ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { System . err . println ( e . getMessage ( ) ) ; e . printStackTrace ( ) ; org . junit . Assert . fail ( ( "Program<sp>caused<sp>an<sp>exception:<sp>" + ( e . getMessage ( ) ) ) ) ; } } info ( java . lang . String [ ] ) { org . apache . commons . cli . CommandLine line ; try { line = parser . parse ( eu . stratosphere . client . CliFrontend . INFO_OPTIONS , args , false ) ; evaluateGeneralOptions ( line ) ; } catch ( org . apache . commons . cli . MissingOptionException e ) { System . out . println ( e . getMessage ( ) ) ; printHelpForInfo ( ) ; return 1 ; } catch ( org . apache . commons . cli . UnrecognizedOptionException e ) { System . out . println ( e . getMessage ( ) ) ; printHelpForInfo ( ) ; return 2 ; } catch ( java . lang . Exception e ) { return handleError ( e ) ; } if ( printHelp ) { printHelpForInfo ( ) ; return 0 ; } boolean description = line . hasOption ( eu . stratosphere . client . CliFrontend . DESCR_OPTION . getOpt ( ) ) ; boolean plan = line . hasOption ( eu . stratosphere . client . CliFrontend . PLAN_OPTION . getOpt ( ) ) ; if ( ( ! description ) && ( ! plan ) ) { System . out . println ( "ERROR:<sp>Specify<sp>the<sp>information<sp>to<sp>display." ) ; printHelpForInfo ( ) ; return 1 ; } eu . stratosphere . client . program . PackagedProgram program ; try { program = buildProgram ( line ) ; } catch ( java . lang . Throwable t ) { return handleError ( t ) ; } if ( program == null ) { printHelpForInfo ( ) ; return 1 ; } int parallelism = - 1 ; if ( line . hasOption ( eu . stratosphere . client . CliFrontend . PARALLELISM_OPTION . getOpt ( ) ) ) { java . lang . String parString = line . getOptionValue ( eu . stratosphere . client . CliFrontend . PARALLELISM_OPTION . getOpt ( ) ) ; try { parallelism = java . lang . Integer . parseInt ( parString ) ; } catch ( java . lang . NumberFormatException e ) { System . out . println ( ( ( "The<sp>value<sp>" + parString ) + "<sp>is<sp>invalid<sp>for<sp>the<sp>degree<sp>of<sp>parallelism." ) ) ; printHelpForRun ( ) ; return 1 ; } if ( parallelism <= 0 ) { System . out . println ( "Invalid<sp>value<sp>for<sp>the<sp>degree-of-parallelism.<sp>Parallelism<sp>must<sp>be<sp>greater<sp>than<sp>zero." ) ; printHelpForRun ( ) ; return 1 ; } } try { if ( description ) { java . lang . String descr = program . getDescription ( ) ; if ( descr != null ) { System . out . println ( "--------------------<sp>Program<sp>Description<sp>---------------------" ) ; System . out . println ( descr ) ; System . out . println ( "--------------------------------------------------------------" ) ; } else { System . out . println ( "No<sp>description<sp>available<sp>for<sp>this<sp>program." ) ; } } if ( plan ) { eu . stratosphere . client . program . Client client = getClient ( line ) ; java . lang . String jsonPlan = client . getOptimizedPlanAsJson ( program , parallelism ) ; if ( jsonPlan != null ) { System . out . println ( "-----------------------<sp>Execution<sp>Plan<sp>-----------------------" ) ; System . out . println ( jsonPlan ) ; System . out . println ( "--------------------------------------------------------------" ) ; } else { System . out . println ( "JSON<sp>plan<sp>could<sp>not<sp>be<sp>compiled." ) ; } } return 0 ; } catch ( java . lang . Throwable t ) { return handleError ( t ) ; } finally { program . deleteExtractedLibraries ( ) ; } } | org . junit . Assert . assertTrue ( ( retCode == 0 ) ) |
testGetNotNullHasTypeRefs ( ) { final org . kie . workbench . common . dmn . api . definition . HasTypeRef hasTypeRef = mock ( org . kie . workbench . common . dmn . api . definition . HasTypeRef . class ) ; final java . util . List < org . kie . workbench . common . dmn . api . definition . HasTypeRef > expectedHasTypeRefs = asList ( mock ( org . kie . workbench . common . dmn . api . definition . HasTypeRef . class ) , mock ( org . kie . workbench . common . dmn . api . definition . HasTypeRef . class ) ) ; when ( hasTypeRef . getHasTypeRefs ( ) ) . thenReturn ( expectedHasTypeRefs ) ; final java . util . List < org . kie . workbench . common . dmn . api . definition . HasTypeRef > actualHasTypeRefs = org . kie . workbench . common . dmn . api . definition . v1_1 . common . HasTypeRefHelper . getNotNullHasTypeRefs ( hasTypeRef ) ; "<AssertPlaceHolder>" ; } getNotNullHasTypeRefs ( org . kie . workbench . common . dmn . api . definition . HasTypeRef ) { final java . util . Optional < org . kie . workbench . common . dmn . api . definition . HasTypeRef > optional = java . util . Optional . ofNullable ( hasTypeRef ) ; return optional . map ( HasTypeRef :: getHasTypeRefs ) . orElse ( emptyList ( ) ) ; } | org . junit . Assert . assertEquals ( expectedHasTypeRefs , actualHasTypeRefs ) |
testGetInternalObject ( ) { com . amazonaws . services . kinesis . model . StreamDescription kinesisStreamDescription = new com . amazonaws . services . dynamodbv2 . streamsadapter . model . StreamDescriptionAdapter ( mockDescription ) ; com . amazonaws . services . dynamodbv2 . model . StreamDescription internalObject = ( ( com . amazonaws . services . dynamodbv2 . streamsadapter . model . StreamDescriptionAdapter ) ( kinesisStreamDescription ) ) . getInternalObject ( ) ; "<AssertPlaceHolder>" ; } getInternalObject ( ) { return internalDescription ; } | org . junit . Assert . assertSame ( mockDescription , internalObject ) |
exchangeWithDelayShouldRestart ( ) { network . thunder . core . communication . layer . high . payments . LNPaymentProcessor . TIMEOUT_NEGOTIATION = 500 ; processor12 . makePayment ( getMockPaymentData ( ) ) ; java . lang . Thread . sleep ( 100 ) ; network . thunder . core . communication . layers . high . TestTools . exchangeMessages ( channel12 , channel21 ) ; network . thunder . core . communication . layers . high . TestTools . exchangeMessages ( channel21 , channel12 ) ; network . thunder . core . communication . layer . Message message = ( ( network . thunder . core . communication . layer . Message ) ( channel12 . readOutbound ( ) ) ) ; java . lang . Thread . sleep ( ( ( long ) ( ( network . thunder . core . communication . layer . high . payments . LNPaymentProcessor . TIMEOUT_NEGOTIATION ) * 1.5 ) ) ) ; System . out . println ( message ) ; channel21 . writeInbound ( message ) ; "<AssertPlaceHolder>" ; network . thunder . core . communication . layers . high . TestTools . exchangeMessages ( channel12 , channel21 , network . thunder . core . communication . layer . high . payments . messages . LNPaymentAMessage . class ) ; network . thunder . core . communication . layers . high . TestTools . exchangeMessages ( channel21 , channel12 , network . thunder . core . communication . layer . high . payments . messages . LNPaymentBMessage . class ) ; after ( ) ; } println ( java . lang . Object ) { if ( ( logWriter ) != null ) { logWriter . println ( o ) ; } } | org . junit . Assert . assertNull ( channel21 . readOutbound ( ) ) |
test4 ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; org . terrier . compression . integer . ByteOutputStream out = new org . terrier . compression . integer . ByteOutputStream ( baos ) ; byte [ ] arr = new byte [ ] { 1 , 2 , 3 , 4 , 5 } ; out . write ( arr , 0 , arr . length ) ; out . writeVInt ( 314 ) ; out . write ( arr , 0 , arr . length ) ; out . close ( ) ; org . terrier . compression . integer . ByteIn in = new org . terrier . compression . integer . ByteInputStream ( new java . io . DataInputStream ( new java . io . ByteArrayInputStream ( baos . toByteArray ( ) ) ) ) ; in . skipBytes ( 5 ) ; "<AssertPlaceHolder>" ; in . close ( ) ; } readVInt ( ) { int i = org . apache . hadoop . io . WritableUtils . readVInt ( di ) ; byteOffset += org . apache . hadoop . io . WritableUtils . getVIntSize ( i ) ; return i ; } | org . junit . Assert . assertEquals ( 314 , in . readVInt ( ) ) |
detect_A$String_CRLF ( ) { java . lang . String sourceCodeString = "foo\r\nbar\r\n" ; org . junithelper . core . meta . CurrentLineBreak actual = org . junithelper . core . extractor . CurrentLineBreakDetector . detect ( sourceCodeString ) ; org . junithelper . core . meta . CurrentLineBreak expected = org . junithelper . core . meta . CurrentLineBreak . CRLF ; "<AssertPlaceHolder>" ; } detect ( java . lang . String ) { if ( sourceCodeString == null ) { return null ; } else if ( sourceCodeString . contains ( "\r\n" ) ) { return org . junithelper . core . meta . CurrentLineBreak . CRLF ; } else if ( sourceCodeString . contains ( "\n" ) ) { return org . junithelper . core . meta . CurrentLineBreak . LF ; } return null ; } | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
testInvalidParameter ( ) { final net . violet . platform . datamodel . Lang frLang = getSiteFrLang ( ) ; final net . violet . platform . datamodel . User theOwner = new net . violet . platform . datamodel . mock . UserMock ( 42 , net . violet . common . StringShop . EMPTY_STRING , net . violet . common . StringShop . EMPTY_STRING , net . violet . common . StringShop . EMPTY_STRING , frLang , net . violet . common . StringShop . EMPTY_STRING , net . violet . common . StringShop . EMPTY_STRING , net . violet . common . StringShop . EMPTY_STRING , getParisTimezone ( ) ) ; final java . util . Date now = new java . util . Date ( ) ; final net . violet . platform . datamodel . Application theApplication = new net . violet . platform . datamodel . mock . ApplicationMock ( 42 , "My<sp>first<sp>application" , getPrivateUser ( ) , now ) ; final net . violet . platform . datamodel . ApplicationCredentials cred = new net . violet . platform . datamodel . mock . ApplicationCredentialsMock ( "6992873d28d86925325dc52d15d6feec30bb2da5" , "59e6060a53ab1be5" , theApplication ) ; final net . violet . platform . api . callers . APICaller caller = new net . violet . platform . api . callers . ApplicationAPICaller ( net . violet . platform . dataobjects . ApplicationCredentialsData . getData ( cred ) ) ; final java . util . Map < java . lang . String , java . lang . Object > theParams = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; final java . util . Calendar theCal = java . util . Calendar . getInstance ( ) ; theCal . add ( Calendar . YEAR , 1 ) ; final java . util . Date expiration = theCal . getTime ( ) ; theParams . put ( ActionParam . SESSION_PARAM_KEY , net . violet . platform . api . authentication . SessionManager . generateSessionId ( caller , net . violet . platform . dataobjects . UserData . getData ( theOwner ) , expiration ) ) ; final net . violet . platform . api . actions . ActionParam theActionParam = new net . violet . platform . api . actions . ActionParam ( caller , theParams ) ; final net . violet . platform . api . actions . Action theAction = new net . violet . platform . api . actions . libraries . Delete ( ) ; final java . lang . Object theResult = theAction . processRequest ( theActionParam ) ; "<AssertPlaceHolder>" ; } getData ( net . violet . platform . datamodel . User ) { try { return net . violet . platform . dataobjects . RecordData . getData ( inUser , net . violet . platform . dataobjects . UserData . class , net . violet . platform . datamodel . User . class ) ; } catch ( final java . lang . InstantiationException e ) { net . violet . platform . dataobjects . UserData . LOGGER . fatal ( e , e ) ; } catch ( final java . lang . IllegalAccessException e ) { net . violet . platform . dataobjects . UserData . LOGGER . fatal ( e , e ) ; } catch ( final java . lang . reflect . InvocationTargetException e ) { net . violet . platform . dataobjects . UserData . LOGGER . fatal ( e , e ) ; } catch ( final java . lang . NoSuchMethodException e ) { net . violet . platform . dataobjects . UserData . LOGGER . fatal ( e , e ) ; } return null ; } | org . junit . Assert . assertNull ( theResult ) |
getNumberOfProcessDeploymentInfosWithParameters ( ) { final org . bonitasoft . engine . persistence . QueryOptions options = new org . bonitasoft . engine . persistence . QueryOptions ( 0 , 10 ) ; final long userId = 9 ; final java . lang . String querySuffix = "suffix" ; when ( persistenceService . getNumberOfEntities ( org . bonitasoft . engine . core . process . definition . model . SProcessDefinitionDeployInfo . class , querySuffix , options , java . util . Collections . singletonMap ( "userId" , ( ( java . lang . Object ) ( userId ) ) ) ) ) . thenReturn ( 1L ) ; final long result = processDefinitionServiceImpl . getNumberOfProcessDeploymentInfos ( userId , options , querySuffix ) ; "<AssertPlaceHolder>" ; } getNumberOfProcessDeploymentInfos ( long , org . bonitasoft . engine . persistence . QueryOptions , java . lang . String ) { return persistenceService . getNumberOfEntities ( org . bonitasoft . engine . core . process . definition . model . SProcessDefinitionDeployInfo . class , querySuffix , countOptions , java . util . Collections . singletonMap ( org . bonitasoft . engine . core . process . definition . USER_ID , ( ( java . lang . Object ) ( userId ) ) ) ) ; } | org . junit . Assert . assertEquals ( 1L , result ) |
testSetLiteralWithNulls ( ) { java . lang . String [ ] exprs = new java . lang . String [ ] { "{<sp>}" , "{<sp>10<sp>}" , "{<sp>10<sp>,<sp>null<sp>}" , "{<sp>10<sp>,<sp>null<sp>,<sp>20}" , "{<sp>'10'<sp>,<sp>null<sp>}" , "{<sp>null,<sp>'10'<sp>,<sp>20<sp>}" } ; java . util . Set < ? > [ ] checks = new java . util . Set < ? > [ ] { java . util . Collections . emptySet ( ) , org . apache . commons . jexl3 . SetLiteralTest . createSet ( new java . lang . Integer ( 10 ) ) , org . apache . commons . jexl3 . SetLiteralTest . createSet ( new java . lang . Integer ( 10 ) , null ) , org . apache . commons . jexl3 . SetLiteralTest . createSet ( new java . lang . Integer ( 10 ) , null , new java . lang . Integer ( 20 ) ) , org . apache . commons . jexl3 . SetLiteralTest . createSet ( "10" , null ) , org . apache . commons . jexl3 . SetLiteralTest . createSet ( null , "10" , new java . lang . Integer ( 20 ) ) } ; org . apache . commons . jexl3 . JexlContext jc = new org . apache . commons . jexl3 . MapContext ( ) ; for ( int t = 0 ; t < ( exprs . length ) ; ++ t ) { org . apache . commons . jexl3 . JexlScript e = org . apache . commons . jexl3 . JEXL . createScript ( exprs [ t ] ) ; java . lang . Object o = e . execute ( jc ) ; "<AssertPlaceHolder>" ; } } execute ( java . lang . Object [ ] ) { java . lang . Class < ? > [ ] clazz = new java . lang . Class < ? > [ args . length ] ; for ( int a = 0 ; a < ( args . length ) ; ++ a ) { clazz [ a ] = ( ( args [ a ] ) != null ) ? args [ a ] . getClass ( ) : org . apache . commons . jexl3 . Void . class ; } return clazz ; } | org . junit . Assert . assertTrue ( exprs [ t ] , checks [ t ] . equals ( o ) ) |
testEqualsWithEqualPixelRegions ( ) { edu . illinois . library . cantaloupe . resource . iiif . v1 . Region region1 = new edu . illinois . library . cantaloupe . resource . iiif . v1 . Region ( ) ; region1 . setPercent ( false ) ; region1 . setX ( 20.0F ) ; region1 . setY ( 20.0F ) ; region1 . setWidth ( 20.0F ) ; region1 . setHeight ( 20.0F ) ; edu . illinois . library . cantaloupe . resource . iiif . v1 . Region region2 = new edu . illinois . library . cantaloupe . resource . iiif . v1 . Region ( ) ; region2 . setPercent ( false ) ; region2 . setX ( 20.0F ) ; region2 . setY ( 20.0F ) ; region2 . setWidth ( 20.0F ) ; region2 . setHeight ( 20.0F ) ; "<AssertPlaceHolder>" ; } setHeight ( float ) { if ( height <= 0 ) { throw new edu . illinois . library . cantaloupe . resource . IllegalClientArgumentException ( "Height<sp>must<sp>be<sp>><sp>0" ) ; } this . height = height ; } | org . junit . Assert . assertEquals ( region1 , region2 ) |
testLoadPassword ( ) { final javax . crypto . SecretKey storedSecretKey = storeKeyIntoKeyStoreFile ( org . drools . core . util . KeyStoreHelperTest . KEY_PHRASE ) ; final java . net . URL serverKeyStoreURL = getClass ( ) . getResource ( org . drools . core . util . KeyStoreHelperTest . KEYSTORE_JCEKS_RESOURCE_NAME ) ; java . lang . System . setProperty ( KeyStoreConstants . PROP_PWD_KS_URL , serverKeyStoreURL . toExternalForm ( ) ) ; java . lang . System . setProperty ( KeyStoreConstants . PROP_PWD_KS_PWD , org . drools . core . util . KeyStoreHelperTest . KEYSTORE_SERVER_PASSWORD ) ; try { final org . drools . core . util . KeyStoreHelper serverHelper = new org . drools . core . util . KeyStoreHelper ( ) ; final java . lang . String passwordKey = serverHelper . getPasswordKey ( org . drools . core . util . KeyStoreHelperTest . KEY_ALIAS , org . drools . core . util . KeyStoreHelperTest . KEY_PASSWORD . toCharArray ( ) ) ; "<AssertPlaceHolder>" ; } catch ( final java . lang . RuntimeException re ) { re . printStackTrace ( ) ; org . junit . Assert . fail ( re . getMessage ( ) ) ; } } getPasswordKey ( java . lang . String , char [ ] ) { javax . crypto . SecretKey passwordKey ; try { passwordKey = ( ( javax . crypto . SecretKey ) ( pwdKeyStore . getKey ( pwdKeyAlias , pwdKeyPassword ) ) ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( ( "Unable<sp>to<sp>load<sp>a<sp>key<sp>from<sp>Key<sp>Store.<sp>Source<sp>" + ( e . getCause ( ) ) ) ) ; } return new java . lang . String ( passwordKey . getEncoded ( ) ) ; } | org . junit . Assert . assertEquals ( new java . lang . String ( storedSecretKey . getEncoded ( ) ) , passwordKey ) |
testSetValidationMessage_illegalArtifactId ( ) { enableUi ( ) ; getGroupIdField ( ) . setText ( "com.example" ) ; getArtifactIdField ( ) . setText ( "<:#=<sp>Illegal<sp>ID<sp>=#:>" ) ; "<AssertPlaceHolder>" ; verify ( dialogPage ) . setErrorMessage ( "Illegal<sp>Maven<sp>Artifact<sp>ID:<sp><:#=<sp>Illegal<sp>ID<sp>=#:>" ) ; } setValidationMessage ( org . eclipse . jface . dialogs . DialogPage ) { org . eclipse . core . runtime . IStatus status = validateMavenSettings ( ) ; if ( status . isOK ( ) ) { return true ; } if ( ( org . eclipse . core . runtime . IStatus . ERROR ) == ( status . getSeverity ( ) ) ) { page . setErrorMessage ( status . getMessage ( ) ) ; } else if ( ( org . eclipse . core . runtime . IStatus . WARNING ) == ( status . getSeverity ( ) ) ) { page . setMessage ( status . getMessage ( ) , IMessageProvider . WARNING ) ; } else if ( ( org . eclipse . core . runtime . IStatus . INFO ) == ( status . getSeverity ( ) ) ) { page . setMessage ( status . getMessage ( ) , IMessageProvider . INFORMATION ) ; } return false ; } | org . junit . Assert . assertFalse ( ui . setValidationMessage ( dialogPage ) ) |
testAdoptLeft ( ) { org . gradoop . common . model . impl . id . GradoopId v0 = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; org . gradoop . common . model . impl . id . GradoopId e0 = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; org . gradoop . common . model . impl . id . GradoopId v1 = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; org . gradoop . flink . model . impl . operators . matching . single . cypher . pojos . Embedding left = new org . gradoop . flink . model . impl . operators . matching . single . cypher . pojos . Embedding ( ) ; left . add ( v0 , org . gradoop . common . model . impl . properties . PropertyValue . create ( "Alice" ) ) ; org . gradoop . flink . model . impl . operators . matching . single . cypher . pojos . Embedding right = createEmbedding ( v0 , e0 , v1 ) ; org . gradoop . flink . model . impl . operators . matching . single . cypher . operators . join . functions . MergeEmbeddings udf = new org . gradoop . flink . model . impl . operators . matching . single . cypher . operators . join . functions . MergeEmbeddings ( 3 , com . google . common . collect . Lists . newArrayList ( 0 ) , com . google . common . collect . Lists . newArrayList ( ) , com . google . common . collect . Lists . newArrayList ( ) , com . google . common . collect . Lists . newArrayList ( ) , com . google . common . collect . Lists . newArrayList ( ) ) ; java . util . List < org . gradoop . flink . model . impl . operators . matching . single . cypher . pojos . Embedding > result = new java . util . ArrayList ( ) ; udf . join ( left , right , new org . apache . flink . api . common . functions . util . ListCollector ( result ) ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Object ) { return new org . gradoop . common . model . impl . properties . PropertyValue ( value ) ; } | org . junit . Assert . assertEquals ( org . gradoop . common . model . impl . properties . PropertyValue . create ( "Alice" ) , result . get ( 0 ) . getProperty ( 0 ) ) |
testToStringWithNullDatabaseName ( ) { final com . allanbank . mongodb . bson . DocumentReference ref = new com . allanbank . mongodb . bson . DocumentReference ( "c" , new com . allanbank . mongodb . bson . element . LongElement ( "a" , 1 ) ) ; final java . lang . String expected = "{<sp>'$ref'<sp>:<sp>'c',<sp>'$id'<sp>:<sp>NumberLong('1')<sp>}" ; final java . lang . String result = ref . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { final java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; builder . append ( myMode . name ( ) ) ; if ( ( myServer ) != null ) { builder . append ( '[' ) ; builder . append ( myServer ) ; builder . append ( ']' ) ; } else if ( ! ( myTagMatchingDocuments . isEmpty ( ) ) ) { builder . append ( '[' ) ; boolean first = true ; for ( final com . allanbank . mongodb . bson . Document tagDoc : myTagMatchingDocuments ) { if ( ! first ) { builder . append ( ",<sp>" ) ; } first = false ; builder . append ( '{' ) ; boolean firstElem = true ; for ( final com . allanbank . mongodb . bson . Element element : tagDoc ) { if ( ! firstElem ) { builder . append ( ",<sp>" ) ; } firstElem = false ; builder . append ( element ) ; } builder . append ( '}' ) ; } builder . append ( ']' ) ; } return builder . toString ( ) ; } | org . junit . Assert . assertEquals ( expected , result ) |
testGroovyVersionSupportsActionTrue ( ) { testMojo = new org . codehaus . gmavenplus . mojo . AbstractCompileMojoTest . TestMojo ( "1.5.0" ) ; "<AssertPlaceHolder>" ; } groovyVersionSupportsAction ( ) { return ( ( classWrangler . getGroovyVersion ( ) ) != null ) && ( groovyAtLeast ( minGroovyVersion ) ) ; } | org . junit . Assert . assertTrue ( testMojo . groovyVersionSupportsAction ( ) ) |
testCodeGenInterfaces ( ) { java . lang . String [ ] args = new java . lang . String [ ] { "-d" , output . getCanonicalPath ( ) , "/wadl/bookstore.xml" 1 , "custom.service" , "-tMap" , "{http://www.w3.org/2001/XMLSchema}date=java.util.List..String" , "-async<sp>getName,delete" , "-inheritResourceParams<sp>first" , "/wadl/bookstore.xml" 0 , getLocation ( "/wadl/bookstore.xml" ) } ; org . apache . cxf . tools . wadlto . WADLToJava tool = new org . apache . cxf . tools . wadlto . WADLToJava ( args ) ; tool . run ( new org . apache . cxf . tools . common . ToolContext ( ) ) ; "<AssertPlaceHolder>" ; verifyFiles ( "java" , true , false , "superbooks" , "custom.service" ) ; verifyFiles ( "class" , true , false , "superbooks" , "custom.service" ) ; } run ( org . apache . cxf . tools . common . ToolContext ) { run ( context , null ) ; } | org . junit . Assert . assertNotNull ( output . list ( ) ) |
elem_match_returns_false_when_no_values_in_array_match ( ) { com . redhat . lightblue . query . QueryExpression expr = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'array':'field7','elemMatch':{'field':'elemf3','op':'>','rvalue':10}}" ) ; com . redhat . lightblue . eval . QueryEvaluator eval = com . redhat . lightblue . eval . QueryEvaluator . getInstance ( expr , md ) ; com . redhat . lightblue . eval . QueryEvaluationContext context = eval . evaluate ( jsonDoc ) ; "<AssertPlaceHolder>" ; } getResult ( ) { return result ; } | org . junit . Assert . assertFalse ( context . getResult ( ) ) |
order_03_shouldGenerateDailyDigestNoMessage ( ) { log . debug ( "In<sp>shouldGenerateDailyDigestNoMessage" ) ; mockAuthenticationOnUserService ( fr . ippon . tatami . service . MailDigestServiceTest . DAILY_DIGEST_USER ) ; userService . updateDailyDigestRegistration ( true ) ; org . mockito . ArgumentCaptor < java . util . List > statuses = org . mockito . ArgumentCaptor . forClass ( java . util . List . class ) ; mailDigestService . dailyDigest ( ) ; verify ( mailServiceMock ) . sendDailyDigestEmail ( any ( fr . ippon . tatami . domain . User . class ) , statuses . capture ( ) , anyInt ( ) , anyCollection ( ) ) ; "<AssertPlaceHolder>" ; } sendDailyDigestEmail ( fr . ippon . tatami . domain . User , fr . ippon . tatami . service . List , int , fr . ippon . tatami . service . Collection ) { fr . ippon . tatami . service . MailService . log . debug ( "Sending<sp>daily<sp>digest<sp>e-mail<sp>to<sp>User<sp>'{}'" , user . getLogin ( ) ) ; fr . ippon . tatami . service . Map < java . lang . String , java . lang . Object > model = new fr . ippon . tatami . service . HashMap < java . lang . String , java . lang . Object > ( ) ; model . put ( "user" , user ) ; model . put ( "tatamiUrl" , tatamiUrl ) ; model . put ( "statuses" , statuses ) ; model . put ( "nbStatus" , nbStatus ) ; model . put ( "suggestedUsers" , suggestedUsers ) ; sendTextFromTemplate ( user . getLogin ( ) , model , "dailyDigest" , this . locale ) ; } | org . junit . Assert . assertThat ( ( ( statuses . getValue ( ) . size ( ) ) == 0 ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testLocatedBlockConstructorWithNullCachedLocs ( ) { org . apache . hadoop . hdfs . protocol . DatanodeInfo d = org . apache . hadoop . hdfs . DFSTestUtil . getLocalDatanodeInfo ( ) ; org . apache . hadoop . hdfs . protocol . DatanodeInfo [ ] ds = new org . apache . hadoop . hdfs . protocol . DatanodeInfo [ 1 ] ; ds [ 0 ] = d ; org . apache . hadoop . hdfs . protocol . ExtendedBlock b1 = new org . apache . hadoop . hdfs . protocol . ExtendedBlock ( "bpid" , 1 , 1 , 1 ) ; org . apache . hadoop . hdfs . protocol . LocatedBlock l1 = new org . apache . hadoop . hdfs . protocol . LocatedBlock ( b1 , ds , null , null , 0 , false , null ) ; final org . apache . hadoop . hdfs . protocol . DatanodeInfo [ ] cachedLocs = l1 . getCachedLocations ( ) ; "<AssertPlaceHolder>" ; } getCachedLocations ( ) { return cachedLocs ; } | org . junit . Assert . assertTrue ( ( ( cachedLocs . length ) == 0 ) ) |
testContentTypes ( ) { char [ ] [ ] javaLikeExtensions = org . eclipse . jdt . internal . core . util . Util . getJavaLikeExtensions ( ) ; char [ ] [ ] groovyLikeExtensions = org . eclipse . jdt . groovy . core . util . ContentTypeUtils . getGroovyLikeExtensions ( ) ; char [ ] [ ] javaButNotGroovyExtensions = org . eclipse . jdt . groovy . core . util . ContentTypeUtils . getJavaButNotGroovyLikeExtensions ( ) ; java . lang . String message = ( ( ( ( ( "Invalid<sp>number<sp>of<sp>extensions<sp>found:" + "\njavaLike:<sp>" ) + ( org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharToString ( javaLikeExtensions ) ) ) + "\ngroovyLike:<sp>" ) + ( org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharToString ( groovyLikeExtensions ) ) ) + "\njavaNotGroovyLike:<sp>" ) + ( org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharToString ( javaButNotGroovyExtensions ) ) ; "<AssertPlaceHolder>" ; org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharContains ( javaLikeExtensions , "java" ) ; org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharContains ( javaLikeExtensions , "javatest" ) ; org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharContains ( javaLikeExtensions , "groovy" ) ; org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharContains ( javaLikeExtensions , "groovytest" ) ; org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharNoContains ( groovyLikeExtensions , "java" ) ; org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharNoContains ( groovyLikeExtensions , "javatest" ) ; org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharContains ( groovyLikeExtensions , "groovy" ) ; org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharContains ( groovyLikeExtensions , "groovytest" ) ; org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharContains ( javaButNotGroovyExtensions , "java" ) ; org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharContains ( javaButNotGroovyExtensions , "javatest" ) ; org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharNoContains ( javaButNotGroovyExtensions , "groovy" ) ; org . eclipse . jdt . core . groovy . tests . model . GroovyContentTypeTests . charCharNoContains ( javaButNotGroovyExtensions , "groovytest" ) ; } charCharToString ( char [ ] [ ] ) { return java . lang . String . valueOf ( org . eclipse . jdt . core . compiler . CharOperation . concatWith ( charChar , ',' ) ) ; } | org . junit . Assert . assertEquals ( message , javaLikeExtensions . length , ( ( groovyLikeExtensions . length ) + ( javaButNotGroovyExtensions . length ) ) ) |
testMatchConditionAllDimensions1 ( ) { org . nd4j . linalg . api . ndarray . INDArray array = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ) ; int val = ( ( int ) ( org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . api . ops . impl . reduce . longer . MatchCondition ( array , org . nd4j . linalg . indexing . conditions . Conditions . lessThan ( 5 ) ) ) . getDouble ( 0 ) ) ) ; "<AssertPlaceHolder>" ; } getDouble ( long ) { return cachedByteByteBuffer ( ) . getDouble ( ( ( ( int ) ( i ) ) * 8 ) ) ; } | org . junit . Assert . assertEquals ( 5 , val ) |
testExtractQuarterTimestamp ( ) { java . lang . String sqlText = ( "select<sp>ts,<sp>EXTRACT(QUARTER<sp>FROM<sp>ts)<sp>as<sp>\"QUARTER\"<sp>from<sp>" + ( com . splicemachine . derby . utils . SpliceDateFunctionsIT . tableWatcherI ) ) + "<sp>order<sp>by<sp>ts" ; try ( com . splicemachine . derby . utils . ResultSet rs = methodWatcher . executeQuery ( sqlText ) ) { java . lang . String expected = "2009-07-02<sp>11:22:33.04<sp>|<sp>3<sp>|\n" 1 + ( ( ( ( ( ( "----------------------------------\n" + "2009-01-02<sp>11:22:33.04<sp>|<sp>1<sp>|\n" ) + "2009-07-02<sp>11:22:33.04<sp>|<sp>3<sp>|\n" ) + "2009-09-02<sp>11:22:33.04<sp>|<sp>3<sp>|\n" ) + "2012-12-31<sp>00:00:00.03<sp>|<sp>4<sp>|\n" ) + "<sp>2012-12-31<sp>20:38:40.0<sp>|<sp>4<sp>|\n" ) + "2009-07-02<sp>11:22:33.04<sp>|<sp>3<sp>|\n" 0 ) ; "<AssertPlaceHolder>" ; } } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; } | org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ) |
testMultiThread ( ) { final java . util . concurrent . CountDownLatch startLatch = new java . util . concurrent . CountDownLatch ( 1 ) ; final java . util . concurrent . CountDownLatch finishedLatch = new java . util . concurrent . CountDownLatch ( 10 ) ; final java . util . concurrent . atomic . AtomicBoolean failed = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; java . util . concurrent . ExecutorService executor = java . util . concurrent . Executors . newFixedThreadPool ( 10 ) ; for ( int taskCount = 0 ; taskCount < ( org . apache . hadoop . dynamodb . test . GsonTest . TASK_COUNT ) ; taskCount ++ ) { executor . execute ( new java . lang . Runnable ( ) { @ org . apache . hadoop . dynamodb . test . Override public void run ( ) { try { startLatch . await ( ) ; com . google . gson . Gson gson = org . apache . hadoop . dynamodb . DynamoDBUtil . getGson ( ) ; java . util . Map < java . lang . String , com . amazonaws . services . dynamodbv2 . model . AttributeValue > item = org . apache . hadoop . dynamodb . test . DynamoDBTestUtils . getRandomItem ( ) ; java . lang . String json = gson . toJson ( item , DynamoDBItemWritable . type ) ; java . util . Map < java . lang . String , com . amazonaws . services . dynamodbv2 . model . AttributeValue > deserializedItem = gson . fromJson ( json , DynamoDBItemWritable . type ) ; org . apache . hadoop . dynamodb . test . DynamoDBTestUtils . checkItems ( item , deserializedItem ) ; } catch ( java . lang . Throwable t ) { failed . set ( true ) ; } finally { finishedLatch . countDown ( ) ; } } } ) ; } startLatch . countDown ( ) ; finishedLatch . await ( ) ; "<AssertPlaceHolder>" ; } checkItems ( java . util . Map , java . util . Map ) { for ( java . lang . String attributeType : org . apache . hadoop . dynamodb . test . DynamoDBTestUtils . attributeTypes ) { boolean equals = expectedItem . get ( attributeType ) . equals ( actualItem . get ( attributeType ) ) ; java . lang . String message = ( "Element<sp>with<sp>key<sp>[" + attributeType ) + "]:" ; org . junit . Assert . assertEquals ( message , expectedItem . get ( attributeType ) , actualItem . get ( attributeType ) ) ; } } | org . junit . Assert . assertFalse ( failed . get ( ) ) |
testCompare ( ) { final uk . gov . gchq . gaffer . parquetstore . partitioner . PartitionKey [ ] partitionKeys = new uk . gov . gchq . gaffer . parquetstore . partitioner . PartitionKey [ 6 ] ; partitionKeys [ 0 ] = new uk . gov . gchq . gaffer . parquetstore . partitioner . PartitionKey ( new java . lang . Object [ ] { 1L , 50 , "A" } ) ; partitionKeys [ 1 ] = new uk . gov . gchq . gaffer . parquetstore . partitioner . PartitionKey ( new java . lang . Object [ ] { 1L , 50 , "B" } ) ; partitionKeys [ 2 ] = new uk . gov . gchq . gaffer . parquetstore . partitioner . PartitionKey ( new java . lang . Object [ ] { 1L , 500 , "A" } ) ; partitionKeys [ 3 ] = new uk . gov . gchq . gaffer . parquetstore . partitioner . PartitionKey ( new java . lang . Object [ ] { 1L , 500 , "B" } ) ; partitionKeys [ 4 ] = new uk . gov . gchq . gaffer . parquetstore . partitioner . PartitionKey ( new java . lang . Object [ ] { 1L , 5000 , "A" } ) ; partitionKeys [ 5 ] = new uk . gov . gchq . gaffer . parquetstore . partitioner . PartitionKey ( new java . lang . Object [ ] { 10L , 5000 , "A" } ) ; for ( int i = 1 ; i < ( partitionKeys . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } | org . junit . Assert . assertTrue ( ( ( partitionKeys [ ( i - 1 ) ] . compareTo ( partitionKeys [ i ] ) ) < 0 ) ) |
encodeAndDecode ( ) { java . lang . String input = ( ( "The<sp>date<sp>is:<sp>" + ( new java . util . Date ( ) ) ) + ",<sp>a<sp>random<sp>number<sp>is:<sp>" ) + ( new java . util . Random ( ) . nextLong ( ) ) ; java . lang . String encoded = org . aeonbits . owner . util . Base64 . encode ( input . getBytes ( ) ) ; byte [ ] result = org . aeonbits . owner . util . Base64 . decode ( encoded ) ; "<AssertPlaceHolder>" ; } decode ( java . lang . String ) { if ( ( org . aeonbits . owner . util . Base64 . decoderMethod ) == null ) throw new java . lang . UnsupportedOperationException ( "Cannot<sp>find<sp>Base64<sp>decoder." ) ; try { return ( ( byte [ ] ) ( org . aeonbits . owner . util . Base64 . decoderMethod . invoke ( org . aeonbits . owner . util . Base64 . decoderObject , data ) ) ) ; } catch ( java . lang . Exception e ) { throw new java . lang . UnsupportedOperationException ( e ) ; } } | org . junit . Assert . assertEquals ( input , new java . lang . String ( result ) ) |
testGetProxiedConnection ( ) { final com . allanbank . mongodb . client . connection . Connection mockConnetion = createMock ( com . allanbank . mongodb . client . connection . Connection . class ) ; mockConnetion . close ( ) ; expectLastCall ( ) ; replay ( mockConnetion ) ; final com . allanbank . mongodb . client . connection . proxy . AbstractProxyConnectionTest . TestProxiedConnection conn = new com . allanbank . mongodb . client . connection . proxy . AbstractProxyConnectionTest . TestProxiedConnection ( mockConnetion ) ; "<AssertPlaceHolder>" ; com . allanbank . mongodb . util . IOUtils . close ( conn ) ; verify ( mockConnetion ) ; } getProxiedConnection ( ) { return myProxiedConnection ; } | org . junit . Assert . assertSame ( mockConnetion , conn . getProxiedConnection ( ) ) |
findCandidatesWithOneResult ( ) { System . out . println ( ( ( cz . metacentrum . perun . core . entry . VosManagerEntryIntegrationTest . CLASS_NAME ) + "findCandidatesWithOneResult" ) ) ; final cz . metacentrum . perun . core . api . Vo createdVo = vosManagerEntry . createVo ( sess , myVo ) ; addExtSourceDelegate ( createdVo ) ; final java . util . List < cz . metacentrum . perun . core . api . Candidate > candidates = vosManagerEntry . findCandidates ( sess , createdVo , "kouril" , 1 ) ; "<AssertPlaceHolder>" ; removeExtSourceDelegate ( createdVo ) ; } findCandidates ( cz . metacentrum . perun . core . api . PerunSession , cz . metacentrum . perun . core . api . Vo , java . lang . String , int ) { java . util . List < cz . metacentrum . perun . core . api . ExtSource > extSources = getPerunBl ( ) . getExtSourcesManagerBl ( ) . getVoExtSources ( sess , vo ) ; return this . findCandidates ( sess , vo , searchString , maxNumOfResults , extSources , true ) ; } | org . junit . Assert . assertEquals ( 1 , candidates . size ( ) ) |
testInterruptionAffects ( ) { connection = connectionFactory . createConnection ( ) ; connection . start ( ) ; session = connection . createSession ( false , ActiveMQSession . INDIVIDUAL_ACKNOWLEDGE ) ; javax . jms . Queue queue = session . createQueue ( "AMQ3732Test" ) ; final java . util . concurrent . LinkedBlockingQueue < javax . jms . Message > workQueue = new java . util . concurrent . LinkedBlockingQueue < javax . jms . Message > ( ) ; final javax . jms . MessageConsumer consumer1 = session . createConsumer ( queue ) ; final javax . jms . MessageConsumer consumer2 = session . createConsumer ( queue ) ; final javax . jms . MessageProducer producer = session . createProducer ( queue ) ; java . lang . Thread consumer1Thread = new java . lang . Thread ( new java . lang . Runnable ( ) { @ org . apache . activemq . bugs . Override public void run ( ) { try { while ( ( totalConsumed . get ( ) ) < ( NUM_MESSAGES ) ) { javax . jms . Message message = consumer1 . receiveNoWait ( ) ; if ( message != null ) { workQueue . add ( message ) ; } } } catch ( java . lang . Exception e ) { org . apache . activemq . bugs . AMQ3732Test . LOG . error ( "Caught<sp>an<sp>unexpected<sp>error:<sp>" , e ) ; } } } ) ; consumer1Thread . start ( ) ; java . lang . Thread consumer2Thread = new java . lang . Thread ( new java . lang . Runnable ( ) { @ org . apache . activemq . bugs . Override public void run ( ) { try { while ( ( totalConsumed . get ( ) ) < ( NUM_MESSAGES ) ) { javax . jms . Message message = consumer2 . receive ( 50 ) ; if ( message != null ) { workQueue . add ( message ) ; } } } catch ( java . lang . Exception e ) { org . apache . activemq . bugs . AMQ3732Test . LOG . error ( "Caught<sp>an<sp>unexpected<sp>error:<sp>" , e ) ; } } } ) ; consumer2Thread . start ( ) ; java . lang . Thread producerThread = new java . lang . Thread ( new java . lang . Runnable ( ) { @ org . apache . activemq . bugs . Override public void run ( ) { try { for ( int i = 0 ; i < ( NUM_MESSAGES ) ; ++ i ) { producer . send ( session . createTextMessage ( "TEST" ) ) ; TimeUnit . MILLISECONDS . sleep ( pause . nextInt ( 10 ) ) ; } } catch ( java . lang . Exception e ) { org . apache . activemq . bugs . AMQ3732Test . LOG . error ( "Caught<sp>an<sp>unexpected<sp>error:<sp>" , e ) ; } } } ) ; producerThread . start ( ) ; java . lang . Thread ackingThread = new java . lang . Thread ( new java . lang . Runnable ( ) { @ org . apache . activemq . bugs . Override public void run ( ) { try { while ( ( totalConsumed . get ( ) ) < ( NUM_MESSAGES ) ) { javax . jms . Message message = workQueue . take ( ) ; message . acknowledge ( ) ; totalConsumed . incrementAndGet ( ) ; if ( ( ( totalConsumed . get ( ) ) % 100 ) == 0 ) { org . apache . activemq . bugs . AMQ3732Test . LOG . info ( ( ( "Consumed<sp>" + ( totalConsumed . get ( ) ) ) + "<sp>messages<sp>so<sp>far." ) ) ; } } } catch ( java . lang . Exception e ) { org . apache . activemq . bugs . AMQ3732Test . LOG . error ( "Caught<sp>an<sp>unexpected<sp>error:<sp>" , e ) ; } } } ) ; ackingThread . start ( ) ; producerThread . join ( ) ; consumer1Thread . join ( ) ; consumer2Thread . join ( ) ; ackingThread . join ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return null ; } | org . junit . Assert . assertEquals ( NUM_MESSAGES , totalConsumed . get ( ) ) |
testCloneOfCloneable ( ) { final org . apache . commons . lang3 . ObjectUtilsTest . CloneableString string = new org . apache . commons . lang3 . ObjectUtilsTest . CloneableString ( "apache" ) ; final org . apache . commons . lang3 . ObjectUtilsTest . CloneableString stringClone = org . apache . commons . lang3 . ObjectUtils . clone ( string ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( "apache" , stringClone . getValue ( ) ) |
testGenerateScoreForCheckmate_M8 ( ) { testPly = eubos . position . MateScoreGeneratorTest . LAST_PLY ; score = classUnderTest . generateScoreForCheckmate ( testPly ) ; "<AssertPlaceHolder>" ; } generateScoreForCheckmate ( int ) { int totalMovesSearched = ( searchDepth ) / ( eubos . position . MateScoreGenerator . PLIES_PER_MOVE ) ; int mateMoveNum = ( currPly - 1 ) / ( eubos . position . MateScoreGenerator . PLIES_PER_MOVE ) ; int multiplier = totalMovesSearched - mateMoveNum ; return multiplier * ( eubos . board . pieces . King . MATERIAL_VALUE ) ; } | org . junit . Assert . assertTrue ( ( ( score ) == ( eubos . board . pieces . King . MATERIAL_VALUE ) ) ) |
testBrokenExternalLinkButValueIsCached ( ) { org . kie . internal . utils . KieHelper kieHelper = new org . kie . internal . utils . KieHelper ( ) ; java . io . InputStream dtableIs = this . getClass ( ) . getResourceAsStream ( "BZ967609-brokenExtLinkButValueCached.xls" ) ; kieHelper . addResource ( org . kie . internal . io . ResourceFactory . newInputStreamResource ( dtableIs ) , ResourceType . DTABLE ) ; org . kie . api . KieBase kbase = kieHelper . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { org . kie . api . pmml . PMMLRequestData data = new org . kie . api . pmml . PMMLRequestData ( correlationId , modelName ) ; parameters . forEach ( ( pi ) -> { data . addRequestParam ( pi ) ; } ) ; return data ; } | org . junit . Assert . assertNotNull ( kbase ) |
testConvertReply ( ) { final com . allanbank . mongodb . bson . builder . DocumentBuilder db = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . addInteger ( "ok" , 1 ) ; db . pushArray ( "results" ) . push ( ) ; final java . util . List < com . allanbank . mongodb . bson . Document > docs = java . util . Collections . singletonList ( db . build ( ) ) ; final com . allanbank . mongodb . client . message . Reply reply = new com . allanbank . mongodb . client . message . Reply ( 0 , 0 , 0 , docs , false , false , false , true ) ; final com . allanbank . mongodb . Callback < com . allanbank . mongodb . MongoIterator < com . allanbank . mongodb . bson . Document > > mockCallback = createMock ( com . allanbank . mongodb . Callback . class ) ; replay ( mockCallback ) ; final com . allanbank . mongodb . client . callback . ReplyResultCallback callback = new com . allanbank . mongodb . client . callback . ReplyResultCallback ( mockCallback ) ; "<AssertPlaceHolder>" ; verify ( mockCallback ) ; } start ( ) { return new com . allanbank . mongodb . bson . builder . impl . DocumentBuilderImpl ( ) ; } | org . junit . Assert . assertEquals ( java . util . Collections . singletonList ( com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . build ( ) ) , callback . convert ( reply ) . toList ( ) ) |
testHuwelijkOfGpParserGeenWaarden ( ) { final nl . bzk . migratiebrp . bericht . model . lo3 . parser . Lo3HuwelijkOfGpParser parser = new nl . bzk . migratiebrp . bericht . model . lo3 . parser . Lo3HuwelijkOfGpParser ( ) ; final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Stapel < nl . bzk . migratiebrp . conversie . model . lo3 . categorie . Lo3HuwelijkOfGpInhoud > parsedInhoud = parser . parse ( new java . util . ArrayList ( ) ) ; "<AssertPlaceHolder>" ; } parse ( nl . bzk . brp . expressietaal . lexical . tokens . TokenStack ) { nl . bzk . brp . expressietaal . parser . ParserResultaat result ; nl . bzk . brp . expressietaal . parser . ParserFout fout ; symbolTable = nl . bzk . brp . expressietaal . symbols . BmrSymbolTableFactory . createSymbolTable ( ) ; if ( ( tokenStack == null ) || ( ( tokenStack . size ( ) ) == 0 ) ) { fout = new nl . bzk . brp . expressietaal . parser . ParserFout ( ParserFoutCode . EXPRESSIE_VERWACHT , new nl . bzk . brp . expressietaal . lexical . tokens . EndOfLineToken ( 0 ) ) ; result = new nl . bzk . brp . expressietaal . parser . ParserResultaat ( fout ) ; } else { stack = tokenStack ; nl . bzk . brp . expressietaal . parser . ParserContext context = new nl . bzk . brp . expressietaal . parser . ParserContext ( ) ; context . addIdentifier ( new nl . bzk . brp . expressietaal . parser . Identifier ( "persoon" , nl . bzk . brp . expressietaal . parser . syntaxtree . ExpressieType . PERSOON ) ) ; nl . bzk . brp . expressietaal . parser . ParserResultaat exp = parseExpression ( context ) ; fout = exp . getFout ( ) ; if ( ( ( fout == null ) && ( ! ( stack . finished ( ) ) ) ) && ( ( stack . currentToken ( ) . getTokenType ( ) ) != ( nl . bzk . brp . expressietaal . lexical . tokens . TokenType . END_OF_LINE ) ) ) { if ( ( exp . getExpressie ( ) ) == null ) { fout = new nl . bzk . brp . expressietaal . parser . ParserFout ( ParserFoutCode . SYNTAX_ERROR , stack . currentToken ( ) ) ; } else { fout = new nl . bzk . brp . expressietaal . parser . ParserFout ( ParserFoutCode . EINDE_EXPRESSIE_VERWACHT , stack . currentToken ( ) ) ; } result = new nl . bzk . brp . expressietaal . parser . ParserResultaat ( fout ) ; } else { result = new nl . bzk . brp . expressietaal . parser . ParserResultaat ( exp . getExpressie ( ) , fout ) ; } } return result ; } | org . junit . Assert . assertNull ( parsedInhoud ) |
testAddCrisisType ( ) { qa . qcri . aidr . dbmanager . dto . CrisisTypeDTO addCrisisType = new qa . qcri . aidr . dbmanager . dto . CrisisTypeDTO ( ) ; addCrisisType . setName ( qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestCrisisTypeResourceFacadeImp . sampleCrisisTypeName ) ; qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestCrisisTypeResourceFacadeImp . entityManager . getTransaction ( ) . begin ( ) ; qa . qcri . aidr . dbmanager . dto . CrisisTypeDTO result = qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestCrisisTypeResourceFacadeImp . crisisTypeResourceFacadeImp . addCrisisType ( addCrisisType ) ; qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestCrisisTypeResourceFacadeImp . entityManager . getTransaction ( ) . commit ( ) ; "<AssertPlaceHolder>" ; qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestCrisisTypeResourceFacadeImp . entityManager . getTransaction ( ) . begin ( ) ; qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestCrisisTypeResourceFacadeImp . crisisTypeResourceFacadeImp . deleteCrisisType ( result . getCrisisTypeId ( ) ) ; qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestCrisisTypeResourceFacadeImp . entityManager . getTransaction ( ) . commit ( ) ; } getName ( ) { return this . name ; } | org . junit . Assert . assertEquals ( qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestCrisisTypeResourceFacadeImp . sampleCrisisTypeName , result . getName ( ) ) |
testPushWithBadScheme ( ) { expectedException . expect ( org . apache . druid . storage . hdfs . RuntimeException . class ) ; expectedException . expectMessage ( "No<sp>FileSystem<sp>for<sp>scheme" ) ; testUsingScheme ( "xyzzy" ) ; "<AssertPlaceHolder>" ; } testUsingScheme ( java . lang . String ) { org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( true ) ; java . io . File segmentDir = tempFolder . newFolder ( ) ; java . io . File tmp = new java . io . File ( segmentDir , "version.bin" ) ; final byte [ ] data = new byte [ ] { 0 , 0 , 0 , 1 } ; com . google . common . io . Files . write ( data , tmp ) ; final long size = data . length ; org . apache . druid . storage . hdfs . HdfsDataSegmentPusherConfig config = new org . apache . druid . storage . hdfs . HdfsDataSegmentPusherConfig ( ) ; final java . io . File storageDirectory = tempFolder . newFolder ( ) ; config . setStorageDirectory ( ( scheme != null ? org . apache . druid . java . util . common . StringUtils . format ( "%s://%s" , scheme , storageDirectory . getAbsolutePath ( ) ) : storageDirectory . getAbsolutePath ( ) ) ) ; org . apache . druid . storage . hdfs . HdfsDataSegmentPusher pusher = new org . apache . druid . storage . hdfs . HdfsDataSegmentPusher ( config , conf , new org . apache . druid . jackson . DefaultObjectMapper ( ) ) ; org . apache . druid . timeline . DataSegment segmentToPush = new org . apache . druid . timeline . DataSegment ( "foo" , org . apache . druid . java . util . common . Intervals . of ( "2015/2016" ) , "0" , new java . util . HashMap ( ) , new java . util . ArrayList ( ) , new java . util . ArrayList ( ) , org . apache . druid . timeline . partition . NoneShardSpec . instance ( ) , 0 , size ) ; org . apache . druid . timeline . DataSegment segment = pusher . push ( segmentDir , segmentToPush , false ) ; java . lang . String indexUri = org . apache . druid . java . util . common . StringUtils . format ( "%s/%s/%d_index.zip" , org . apache . hadoop . fs . FileSystem . newInstance ( conf ) . makeQualified ( new org . apache . hadoop . fs . Path ( config . getStorageDirectory ( ) ) ) . toUri ( ) . toString ( ) , pusher . getStorageDir ( segmentToPush , false ) , segmentToPush . getShardSpec ( ) . getPartitionNum ( ) ) ; org . junit . Assert . assertEquals ( segmentToPush . getSize ( ) , segment . getSize ( ) ) ; org . junit . Assert . assertEquals ( segmentToPush , segment ) ; org . junit . Assert . assertEquals ( com . google . common . collect . ImmutableMap . of ( "type" , "hdfs" , "%s://%s" 0 , indexUri ) , segment . getLoadSpec ( ) ) ; final java . lang . String segmentPath = pusher . getStorageDir ( segment , false ) ; java . io . File indexFile = new java . io . File ( org . apache . druid . java . util . common . StringUtils . format ( "%s/%s/%d_index.zip" , storageDirectory , segmentPath , segment . getShardSpec ( ) . getPartitionNum ( ) ) ) ; org . junit . Assert . assertTrue ( indexFile . exists ( ) ) ; java . io . File outDir = new java . io . File ( org . apache . druid . java . util . common . StringUtils . format ( "%s/%s" , config . getStorageDirectory ( ) , segmentPath ) ) ; outDir . setReadOnly ( ) ; try { pusher . push ( segmentDir , segmentToPush , false ) ; } catch ( java . io . IOException e ) { org . junit . Assert . fail ( "should<sp>not<sp>throw<sp>exception" ) ; } } | org . junit . Assert . assertTrue ( false ) |
shouldCompareEqualArrayWithString ( ) { final uk . gov . gchq . gaffer . data . element . comparison . ComparableOrToStringComparator comparator = new uk . gov . gchq . gaffer . data . element . comparison . ComparableOrToStringComparator ( ) ; final int result = comparator . compare ( new java . lang . Integer [ ] { 1 , 1 } , "[1,<sp>1]" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 0 , result ) |
testGetNodeLabelForLocation ( ) { org . opennms . netmgt . model . OnmsNode node = new org . opennms . netmgt . model . OnmsNode ( m_locationDao . getDefaultLocation ( ) , "openNMS@Apex" ) ; m_nodeDao . saveOrUpdate ( node ) ; java . util . List < org . opennms . netmgt . model . OnmsNode > nodes = m_nodeDao . findByLabelForLocation ( "openNMS@Apex" , m_locationDao . getDefaultLocation ( ) . getLocationName ( ) ) ; "<AssertPlaceHolder>" ; } get ( K extends java . io . Serializable ) { return m_entityClass . cast ( org . opennms . netmgt . dao . hibernate . AbstractDaoHibernate . getHibernateTemplate ( ) . get ( m_entityClass , id ) ) ; } | org . junit . Assert . assertEquals ( nodes . get ( 0 ) , node ) |
shouldEqualsEventsWhenSameCountLinesRemovedInLinesRemovedEventType ( ) { com . codenjoy . dojo . tetris . model . GlassEvent event = new com . codenjoy . dojo . tetris . model . GlassEvent ( LINES_REMOVED , 4 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( event . equals ( new com . codenjoy . dojo . tetris . model . GlassEvent ( LINES_REMOVED , 4 ) ) ) |
canConvertToProperties ( ) { com . treasuredata . client . ProxyConfig . ProxyConfigBuilder pb = new com . treasuredata . client . ProxyConfig . ProxyConfigBuilder ( ) ; pb . setHost ( "localhost" ) ; pb . setPort ( 8081 ) ; pb . setUser ( "dummy" ) ; pb . setPassword ( "hello" ) ; com . treasuredata . client . TDClientConfig config = com . treasuredata . client . TDClient . newBuilder ( false ) . setProxy ( pb . createProxyConfig ( ) ) . buildConfig ( ) ; java . util . Properties p1 = config . toProperties ( ) ; com . treasuredata . client . TDClientConfig newConfig = com . treasuredata . client . TDClient . newBuilder ( false ) . setProperties ( p1 ) . buildConfig ( ) ; java . util . Properties p2 = newConfig . toProperties ( ) ; "<AssertPlaceHolder>" ; } toProperties ( ) { java . util . Properties p = new java . util . Properties ( ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . API_ENDPOINT , endpoint ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . API_PORT , port ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . USESSL , useSSL ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . APIKEY , apiKey ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . USER , user ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . PASSOWRD , password ) ; if ( proxy . isPresent ( ) ) { com . treasuredata . client . ProxyConfig pc = proxy . get ( ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . PROXY_HOST , pc . getHost ( ) ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . PROXY_PORT , pc . getPort ( ) ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . PROXY_USER , pc . getUser ( ) ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . PROXY_PASSWORD , pc . getPassword ( ) ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . PROXY_USESSL , pc . useSSL ( ) ) ; } com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . RETRY_LIMIT , retryLimit ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . RETRY_INITIAL_INTERVAL_MILLIS , retryInitialIntervalMillis ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . RETRY_MAX_INTERVAL_MILLIS , retryMaxIntervalMillis ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . RETRY_MULTIPLIER , retryMultiplier ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . CONNECT_TIMEOUT_MILLIS , connectTimeoutMillis ) ; com . treasuredata . client . TDClientConfig . saveProperty ( p , com . treasuredata . client . TDClientConfig . Type . CONNECTION_POOL_SIZE , connectionPoolSize ) ; return p ; } | org . junit . Assert . assertEquals ( p1 , p2 ) |
existanceTest ( ) { org . apache . gossip . crdt . PNCounter counter = new org . apache . gossip . crdt . PNCounter ( mockManagers . get ( 0 ) ) ; "<AssertPlaceHolder>" ; } value ( ) { java . util . Map < java . lang . String , org . apache . gossip . lock . vote . VoteCandidate > copy = new java . util . concurrent . ConcurrentHashMap ( ) ; copy . putAll ( voteCandidates ) ; return java . util . Collections . unmodifiableMap ( copy ) ; } | org . junit . Assert . assertEquals ( 0 , ( ( long ) ( counter . value ( ) ) ) ) |
whenCollectionIsNotEmpty ( ) { try { colletion . add ( java . lang . Integer . valueOf ( 1 ) ) ; checkerCollection . checkIsCollectionISNotEmpty ( colletion ) ; "<AssertPlaceHolder>" ; } catch ( com . stratio . explorer . exceptions . NotPropertyFoundException e ) { org . junit . Assert . fail ( "mothod<sp>should<sp>not<sp>thorw<sp>exception<sp>" ) ; } } checkIsCollectionISNotEmpty ( java . util . Collection ) { if ( colletion . isEmpty ( ) ) { logger . error ( message ) ; throw new com . stratio . explorer . exceptions . NotPropertyFoundException ( new java . lang . Exception ( ) , message ) ; } } | org . junit . Assert . assertTrue ( "mothod<sp>should<sp>not<sp>thorw<sp>exception<sp>" , true ) |
testClear ( ) { resourceRegistry . add ( "name" , mock ( org . eclipse . rap . rwt . service . ResourceLoader . class ) ) ; resourceRegistry . clear ( ) ; "<AssertPlaceHolder>" ; } getResourceRegistrations ( ) { return resources . toArray ( new org . eclipse . rap . rwt . internal . resources . ResourceRegistry . ResourceRegistration [ resources . size ( ) ] ) ; } | org . junit . Assert . assertEquals ( 0 , resourceRegistry . getResourceRegistrations ( ) . length ) |
step_3 ( ) { org . sejda . model . parameter . AddBackPagesParameters parameters = defaultCommandLine ( ) . with ( "-n" , "3" ) . invokeSejdaConsole ( ) ; "<AssertPlaceHolder>" ; } getStep ( ) { return step ; } | org . junit . Assert . assertEquals ( 3 , parameters . getStep ( ) ) |
search ( ) { final org . apache . olingo . ext . proxy . api . Search < org . apache . olingo . fit . proxy . staticservice . odatawcfservice . types . Person , org . apache . olingo . fit . proxy . staticservice . odatawcfservice . types . PersonCollection > search = container . getPeople ( ) . createSearch ( ) . setSearch ( service . getClient ( ) . getSearchFactory ( ) . or ( service . getClient ( ) . getSearchFactory ( ) . literal ( "Bob" ) , service . getClient ( ) . getSearchFactory ( ) . literal ( "Jill" ) ) ) ; final org . apache . olingo . fit . proxy . staticservice . odatawcfservice . types . PersonCollection result = search . getResult ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return geospatials . isEmpty ( ) ; } | org . junit . Assert . assertFalse ( result . isEmpty ( ) ) |
testStartNoHttpWhenBkHttpEnabled ( ) { org . apache . commons . configuration . PropertiesConfiguration config = new org . apache . commons . configuration . PropertiesConfiguration ( ) ; config . setProperty ( PrometheusMetricsProvider . PROMETHEUS_STATS_HTTP_ENABLE , true ) ; config . setProperty ( "httpServerEnabled" , true ) ; @ lombok . Cleanup ( "stop" ) org . apache . bookkeeper . stats . prometheus . PrometheusMetricsProvider provider = new org . apache . bookkeeper . stats . prometheus . PrometheusMetricsProvider ( ) ; provider . start ( config ) ; "<AssertPlaceHolder>" ; } start ( org . apache . commons . configuration . Configuration ) { this . underlying . start ( conf ) ; } | org . junit . Assert . assertNull ( provider . server ) |
noExceptionInContext_ReturnsFalse ( ) { "<AssertPlaceHolder>" ; } shouldRetry ( java . util . function . Consumer ) { return condition . shouldRetry ( software . amazon . awssdk . core . retry . RetryPolicyContext . builder ( ) . applyMutation ( builder ) . build ( ) ) ; } | org . junit . Assert . assertFalse ( shouldRetry ( ( builder ) -> builder . exception ( null ) ) ) |
testSerialization ( ) { org . jfree . chart . ChartRenderingInfo i1 = new org . jfree . chart . ChartRenderingInfo ( ) ; i1 . setChartArea ( new java . awt . geom . Rectangle2D . Double ( 1.0 , 2.0 , 3.0 , 4.0 ) ) ; org . jfree . chart . ChartRenderingInfo i2 = ( ( org . jfree . chart . ChartRenderingInfo ) ( org . jfree . chart . TestUtils . serialised ( i1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; } | org . junit . Assert . assertEquals ( i1 , i2 ) |
listTilde ( ) { org . springframework . expression . Expression expr = org . springframework . sync . PathToSpEL . pathToExpression ( "/~/description" ) ; java . util . List < org . springframework . sync . Todo > todos = new java . util . ArrayList < org . springframework . sync . Todo > ( ) ; todos . add ( new org . springframework . sync . Todo ( 1L , "A" , false ) ) ; todos . add ( new org . springframework . sync . Todo ( 2L , "B" , false ) ) ; todos . add ( new org . springframework . sync . Todo ( 3L , "C" , false ) ) ; "<AssertPlaceHolder>" ; } pathToExpression ( java . lang . String ) { return org . springframework . sync . PathToSpEL . SPEL_EXPRESSION_PARSER . parseExpression ( org . springframework . sync . PathToSpEL . pathToSpEL ( path ) ) ; } | org . junit . Assert . assertEquals ( "C" , ( ( java . lang . String ) ( expr . getValue ( todos ) ) ) ) |
testReservedCharacterUnEscapingInUserId ( ) { org . lilyproject . repository . api . IdGenerator idGenerator = new org . lilyproject . repository . impl . id . IdGeneratorImpl ( ) ; java . lang . String idString = "USER.special\\.characters\\,are\\=fun\\\\.key=hoeba\\=hoep" ; org . lilyproject . repository . api . RecordId recordId = idGenerator . fromString ( idString ) ; java . lang . String encodedString = recordId . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return name ; } | org . junit . Assert . assertEquals ( idString , encodedString ) |
returning2 ( ) { new org . n3r . eql . Eqll ( ) . update ( "prepareTable4MyProcedure" ) . execute ( ) ; java . util . List < java . lang . String > ret = new org . n3r . eql . Eqll ( ) . params ( 10 ) . procedure ( "myprocedure2" ) . execute ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return parts . size ( ) ; } | org . junit . Assert . assertThat ( ( ( ret . size ( ) ) > 0 ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testBuildWithDisabledDefaultConstraintsWithOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . pagination . OrderBy order1 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . ASC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( order1 ) ; org . lnu . is . domain . asset . Asset context = new org . lnu . is . domain . asset . Asset ( ) ; java . lang . String expectedSql = "SELECT<sp>e<sp>FROM<sp>Asset<sp>e<sp>ORDER<sp>BY<sp>e.name<sp>ASC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . asset . Asset > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; } | org . junit . Assert . assertEquals ( expectedSql , actualQuery ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.