input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
shouldGetAttributesReturnAnNoAttributesWhenInitiateAnPointSolution ( ) { org . uma . jmetal . util . solutionattribute . impl . GenericSolutionAttributeTest . MockedDoubleSolution solution = new org . uma . jmetal . util . solutionattribute . impl . GenericSolutionAttributeTest . MockedDoubleSolution ( ) ; "<AssertPlaceHolder>" ; } getAttributes ( ) { return attributes ; }
org . junit . Assert . assertTrue ( solution . getAttributes ( ) . isEmpty ( ) )
testCodeProperty ( ) { target . setCode ( "code1" ) ; "<AssertPlaceHolder>" ; } getCode ( ) { return code ; }
org . junit . Assert . assertEquals ( "code1" , target . getCode ( ) )
getNewestTargetNumber ( ) { final java . util . Map < java . lang . String , java . util . Set < java . lang . String > > indexNameAliases = com . google . common . collect . ImmutableMap . of ( "graylog_1" , java . util . Collections . emptySet ( ) , "graylog_2" , java . util . Collections . emptySet ( ) , "graylog_3" , java . util . Collections . singleton ( "graylog_deflector" ) , "graylog_4_restored_archive" , java . util . Collections . emptySet ( ) ) ; when ( indices . getIndexNamesAndAliases ( anyString ( ) ) ) . thenReturn ( indexNameAliases ) ; final org . graylog2 . indexer . MongoIndexSet mongoIndexSet = new org . graylog2 . indexer . MongoIndexSet ( config , indices , nodeId , indexRangeService , auditEventSender , systemJobManager , jobFactory , activityWriter ) ; final int number = mongoIndexSet . getNewestIndexNumber ( ) ; "<AssertPlaceHolder>" ; } getIndexNamesAndAliases ( java . lang . String ) { final io . searchbox . indices . aliases . GetAliases request = new io . searchbox . indices . aliases . GetAliases . Builder ( ) . addIndex ( indexPattern ) . setParameter ( "expand_wildcards" , "open" ) . build ( ) ; final io . searchbox . client . JestResult jestResult = org . graylog2 . indexer . cluster . jest . JestUtils . execute ( jestClient , request , ( ) -> "Couldn't<sp>collect<sp>aliases<sp>for<sp>index<sp>pattern<sp>" + indexPattern ) ; final ImmutableMap . Builder < java . lang . String , java . util . Set < java . lang . String > > indexAliasesBuilder = com . google . common . collect . ImmutableMap . builder ( ) ; final java . util . Iterator < Map . Entry < java . lang . String , com . fasterxml . jackson . databind . JsonNode > > it = jestResult . getJsonObject ( ) . fields ( ) ; while ( it . hasNext ( ) ) { final Map . Entry < java . lang . String , com . fasterxml . jackson . databind . JsonNode > entry = it . next ( ) ; final java . lang . String indexName = entry . getKey ( ) ; final com . fasterxml . jackson . databind . JsonNode aliasMetaData = entry . getValue ( ) . path ( "aliases" ) ; if ( aliasMetaData . isObject ( ) ) { final com . google . common . collect . ImmutableSet < java . lang . String > aliasNames = com . google . common . collect . ImmutableSet . copyOf ( aliasMetaData . fieldNames ( ) ) ; indexAliasesBuilder . put ( indexName , aliasNames ) ; } } return indexAliasesBuilder . build ( ) ; }
org . junit . Assert . assertEquals ( 3 , number )
testUpdateEntity ( ) { final long dummyId = 0 ; org . hibernate . Session session = sf . openSession ( ) ; org . hibernate . Transaction tx = session . beginTransaction ( ) ; session . save ( new com . hazelcast . hibernate . entity . DummyEntity ( dummyId , null , 0 , null ) ) ; tx . commit ( ) ; tx = session . beginTransaction ( ) ; com . hazelcast . hibernate . entity . DummyEntity ent = ( ( com . hazelcast . hibernate . entity . DummyEntity ) ( session . get ( com . hazelcast . hibernate . entity . DummyEntity . class , dummyId ) ) ) ; ent . setName ( "updatedName" ) ; session . update ( ent ) ; tx . commit ( ) ; session . close ( ) ; session = sf2 . openSession ( ) ; com . hazelcast . hibernate . entity . DummyEntity entity = ( ( com . hazelcast . hibernate . entity . DummyEntity ) ( session . get ( com . hazelcast . hibernate . entity . DummyEntity . class , dummyId ) ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object , long ) { return delegate . get ( key , txTimestamp ) ; }
org . junit . Assert . assertEquals ( "updatedName" , entity . getName ( ) )
removeSomeUserContent ( ) { createSomeTagUserContent ( ) ; manager . remove ( user , content ) ; final java . util . List < cc . kune . domain . Tag > tags = manager . find ( user , content ) ; "<AssertPlaceHolder>" ; } size ( ) { int result = 0 ; if ( ( inputMap ) != null ) { result = inputMap . size ( ) ; } return result ; }
org . junit . Assert . assertEquals ( 0 , tags . size ( ) )
testMutationsLine11 ( ) { java . lang . reflect . Method m2 = clazz . getMethod ( "m2" , double . class ) ; java . util . List < de . unisb . cs . st . javalanche . mutation . results . Mutation > mutations = de . unisb . cs . st . javalanche . mutation . results . persistence . QueryManager . getMutations ( className , MutationType . REPLACE_CONSTANT , 11 ) ; "<AssertPlaceHolder>" ; for ( de . unisb . cs . st . javalanche . mutation . results . Mutation mutation : mutations ) { double addInfo = java . lang . Double . parseDouble ( mutation . getOperatorAddInfo ( ) ) ; if ( addInfo == ( - 2.0 ) ) { java . lang . Double [ ] input = new java . lang . Double [ ] { 5.0 } ; checkUnmutated ( input , ( ( java . lang . Double ) ( 10.0 ) ) , m2 , clazz ) ; checkMutation ( mutation , input , ( ( java . lang . Double ) ( - 10.0 ) ) , m2 , clazz ) ; } else { org . junit . Assert . fail ( ( "Did<sp>not<sp>expect<sp>mutation<sp>" + mutation ) ) ; } } } size ( ) { return possibilities . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , mutations . size ( ) )
testBuildWithParametersAndDisabledDefaultConstraints ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . order . type . OrderType orderType = new org . lnu . is . domain . order . type . OrderType ( ) ; org . lnu . is . domain . employee . Employee employee = new org . lnu . is . domain . employee . Employee ( ) ; org . lnu . is . domain . asset . Asset asset = new org . lnu . is . domain . asset . Asset ( ) ; org . lnu . is . domain . partner . Partner partner = new org . lnu . is . domain . partner . Partner ( ) ; org . lnu . is . domain . optype . OperationType opType = new org . lnu . is . domain . optype . OperationType ( ) ; org . lnu . is . domain . department . Department department = new org . lnu . is . domain . department . Department ( ) ; org . lnu . is . domain . reason . Reason reason = new org . lnu . is . domain . reason . Reason ( ) ; org . lnu . is . domain . order . Order parent = new org . lnu . is . domain . order . Order ( ) ; java . lang . String reasonText = "fsdfsd" ; java . lang . String docSeries = "fdsfds" ; java . lang . String docNum = "fsdfds" ; java . util . Date docDate = new java . util . Date ( ) ; java . lang . String docIssued = "fdfds" ; java . util . Date evDate = new java . util . Date ( ) ; org . lnu . is . domain . order . Order context = new org . lnu . is . domain . order . Order ( ) ; context . setOrderType ( orderType ) ; context . setEmployee ( employee ) ; context . setAsset ( asset ) ; context . setPartner ( partner ) ; context . setOpType ( opType ) ; context . setDepartment ( department ) ; context . setReason ( reason ) ; context . setParent ( parent ) ; context . setReasonText ( reasonText ) ; context . setDocSeries ( docSeries ) ; context . setDocNum ( docNum ) ; context . setDocDate ( docDate ) ; context . setDocIssued ( docIssued ) ; context . setEvDate ( evDate ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>Order<sp>e<sp>WHERE<sp>(<sp>e.orderType<sp>=<sp>:orderType<sp>AND<sp>e.employee<sp>=<sp>:employee<sp>AND<sp>e.asset<sp>=<sp>:asset<sp>AND<sp>e.partner<sp>=<sp>:partner<sp>AND<sp>e.opType<sp>=<sp>:opType<sp>AND<sp>e.department<sp>=<sp>:department<sp>AND<sp>e.reason<sp>=<sp>:reason<sp>AND<sp>e.parent<sp>=<sp>:parent<sp>AND<sp>e.reasonText<sp>LIKE<sp>CONCAT('%',:reasonText,'%')<sp>AND<sp>e.docSeries<sp>LIKE<sp>CONCAT('%',:docSeries,'%')<sp>AND<sp>e.docNum<sp>LIKE<sp>CONCAT('%',:docNum,'%')<sp>AND<sp>e.docDate<sp>=<sp>:docDate<sp>AND<sp>e.docIssued<sp>LIKE<sp>CONCAT('%',:docIssued,'%')<sp>AND<sp>e.evDate<sp>=<sp>:evDate<sp>)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . order . Order > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expected , actualQuery )
updateLeftOffTimeFetch ( ) { java . time . Instant now = java . time . Instant . now ( ) . truncatedTo ( ChronoUnit . SECONDS ) ; rdfRepository . updateLeftOffTime ( now ) ; "<AssertPlaceHolder>" ; } fetchLeftOffTime ( ) { org . wikidata . query . rdf . tool . rdf . RdfRepository . log . info ( "Checking<sp>for<sp>left<sp>off<sp>time<sp>from<sp>the<sp>updater" ) ; java . lang . StringBuilder b = org . wikidata . query . rdf . common . uri . SchemaDotOrg . prefix ( new java . lang . StringBuilder ( ) ) ; b . append ( "SELECT<sp>*<sp>WHERE<sp>{<sp><" ) . append ( uris . root ( ) ) . append ( "><sp>schema:dateModified<sp>?date<sp>}" ) ; java . time . Instant leftOffTime = dateFromQuery ( b . toString ( ) ) ; if ( leftOffTime != null ) { org . wikidata . query . rdf . tool . rdf . RdfRepository . log . info ( "Found<sp>left<sp>off<sp>time<sp>from<sp>the<sp>updater" ) ; return leftOffTime ; } org . wikidata . query . rdf . tool . rdf . RdfRepository . log . info ( "Checking<sp>for<sp>left<sp>off<sp>time<sp>from<sp>the<sp>dump" ) ; b = org . wikidata . query . rdf . common . uri . Ontology . prefix ( org . wikidata . query . rdf . common . uri . SchemaDotOrg . prefix ( new java . lang . StringBuilder ( ) ) ) ; b . append ( "SELECT<sp>*<sp>WHERE<sp>{<sp>ontology:Dump<sp>schema:dateModified<sp>?date<sp>}" ) ; return dateFromQuery ( b . toString ( ) ) ; }
org . junit . Assert . assertEquals ( now , rdfRepository . fetchLeftOffTime ( ) )
testNegativeY ( ) { org . apache . commons . math . geometry . Vector3D c = new org . apache . commons . math . geometry . Vector3D ( 1.2323 , ( - 1.4343 ) , 1.6333 ) ; java . lang . String expected = ( ( ( ( ( "{1" + ( getDecimalCharacter ( ) ) ) + "23;<sp>-1" ) + ( getDecimalCharacter ( ) ) ) + "43;<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "63}" ; java . lang . String actual = vector3DFormat . format ( c ) ; "<AssertPlaceHolder>" ; } format ( java . lang . Object [ ] ) { return format . format ( arguments ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testInitOK ( ) { com . webpagebytes . cms . engine . ResourceRequestProcessor processor = new com . webpagebytes . cms . engine . ResourceRequestProcessor ( ) ; java . lang . Throwable exception = null ; try { processor . initialize ( "admin" , "META-INF/config/resourceswhitelist.properties" ) ; } catch ( com . webpagebytes . cms . exception . WPBException e ) { exception = e ; } "<AssertPlaceHolder>" ; } initialize ( java . util . Set , java . lang . String ) { java . util . Set < java . lang . String > newPatters = new java . util . HashSet < java . lang . String > ( patterns ) ; java . util . HashSet < java . lang . String > newSimplePatterns = new java . util . HashSet < java . lang . String > ( ) ; java . util . HashMap < java . lang . String , com . webpagebytes . cms . engine . URLDataStructure > newPatternsWithParams = new java . util . HashMap < java . lang . String , com . webpagebytes . cms . engine . URLDataStructure > ( ) ; java . util . HashMap < java . lang . Integer , java . util . Set < java . lang . String > > newDeepToPatternUrls = new java . util . HashMap < java . lang . Integer , java . util . Set < java . lang . String > > ( ) ; java . util . HashMap < java . lang . String , com . webpagebytes . cms . engine . URLDataStructure > newPatternsAllMatch = new java . util . HashMap < java . lang . String , com . webpagebytes . cms . engine . URLDataStructure > ( ) ; for ( java . lang . String pattern : patterns ) { com . webpagebytes . cms . engine . URLDataStructure aUrlStructure = new com . webpagebytes . cms . engine . URLDataStructure ( pattern ) ; if ( aUrlStructure . hasParams ( ) ) { newPatternsWithParams . put ( pattern , aUrlStructure ) ; if ( ( newDeepToPatternUrls . containsKey ( aUrlStructure . getDeep ( ) ) ) == false ) { newDeepToPatternUrls . put ( aUrlStructure . getDeep ( ) , new java . util . HashSet < java . lang . String > ( ) ) ; } newDeepToPatternUrls . get ( aUrlStructure . getDeep ( ) ) . add ( pattern ) ; } else { newSimplePatterns . add ( pattern ) ; } if ( aUrlStructure . isAllMatch ( ) ) { newPatternsAllMatch . put ( pattern , aUrlStructure ) ; } } this . patterns = newPatters ; this . simplePatterns = newSimplePatterns ; this . patternsWithParams = newPatternsWithParams ; this . deepToPatternUrls = newDeepToPatternUrls ; this . patternsWithAllMatch = newPatternsAllMatch ; setFingerPrint ( fingerPrint ) ; }
org . junit . Assert . assertTrue ( ( exception == null ) )
testEqualsWithSelf ( ) { au . gov . ga . earthsci . core . temporal . timescale . BasicTimeScaleLevel l1 = new au . gov . ga . earthsci . core . temporal . timescale . BasicTimeScaleLevel ( "name1" , "description1" , java . math . BigInteger . TEN , 2 ) ; au . gov . ga . earthsci . core . temporal . timescale . BasicTimeScaleLevel l2 = l1 ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return ( object == null ) || ( object == ( this ) ) ; }
org . junit . Assert . assertTrue ( l1 . equals ( l2 ) )
quoteReplacements ( ) { java . lang . String escaped = "&#92;<sp>&#36;" ; java . lang . String unescaped = "\\<sp>$" ; "<AssertPlaceHolder>" ; } unescape ( java . lang . String ) { return com . itextpdf . styledxmlparser . jsoup . nodes . Entities . unescape ( string , false ) ; }
org . junit . Assert . assertEquals ( unescaped , com . itextpdf . styledxmlparser . jsoup . nodes . Entities . unescape ( escaped ) )
testUnassignUsersFromRole ( ) { long [ ] standardRoleIds = addStandardRoles ( ) ; com . liferay . portal . kernel . service . UserGroupRoleServiceUtil . deleteUserGroupRoles ( addUsers ( ) , organization . getGroupId ( ) , standardRoleIds [ 0 ] ) ; "<AssertPlaceHolder>" ; } isPropagateRoles ( ) { return com . liferay . portal . security . membership . policy . BaseMembershipPolicyTestCase . _propagateRoles ; }
org . junit . Assert . assertTrue ( isPropagateRoles ( ) )
shouldBeTrueWhenGivenTrue ( ) { final org . pitest . functional . predicate . Or < java . lang . Object > testee = or ( ( i ) -> true ) ; "<AssertPlaceHolder>" ; } test ( java . lang . String ) { return this . includedClassPathElement . contains ( a ) ; }
org . junit . Assert . assertTrue ( testee . test ( null ) )
testEffect4 ( ) { java . lang . String words = segW . segWords ( "" , "|" ) ; "<AssertPlaceHolder>" ; } segWords ( java . lang . String , java . lang . String ) { return segWords ( new java . io . StringReader ( txt ) , wordSpilt ) ; }
org . junit . Assert . assertEquals ( "|" , words )
unbindWithSubContext ( ) { final org . apache . openejb . core . ivm . naming . IvmContext context = new org . apache . openejb . core . ivm . naming . IvmContext ( "" ) ; context . bind ( "global/foo/Bar" , "Bar" ) ; org . apache . openejb . util . Contexts . createSubcontexts ( context , "global/foo/Bar" ) ; "<AssertPlaceHolder>" ; context . unbind ( "global/foo/Bar" ) ; try { context . lookup ( "global/foo/Bar" ) ; org . junit . Assert . fail ( ) ; } catch ( final org . apache . openejb . ivm . naming . NamingException ne ) { } try { ( ( org . apache . openejb . ivm . naming . Context ) ( ( ( org . apache . openejb . ivm . naming . Context ) ( context . lookup ( "global" ) ) ) . lookup ( "foo" ) ) ) . lookup ( "Bar" ) ; org . junit . Assert . fail ( ) ; } catch ( final org . apache . openejb . ivm . naming . NamingException ne ) { } } lookup ( java . lang . String ) { final java . util . Properties p = new java . util . Properties ( ) ; p . put ( Context . INITIAL_CONTEXT_FACTORY , "org.apache.openejb.core.LocalInitialContextFactory" ) ; final javax . naming . InitialContext ctx = new javax . naming . InitialContext ( p ) ; try { return ctx . lookup ( ( "java:comp/env/ejb/" + s ) ) ; } finally { ctx . close ( ) ; } }
org . junit . Assert . assertEquals ( "Bar" , context . lookup ( "global/foo/Bar" ) )
testToTempByteBuf ( ) { @ org . jetbrains . annotations . NotNull java . lang . String hi = "Hello<sp>World" ; @ org . jetbrains . annotations . NotNull char [ ] chars = hi . toCharArray ( ) ; net . openhft . chronicle . bytes . NativeBytesStore < java . lang . Void > bs = net . openhft . chronicle . bytes . NativeBytesStore . lazyNativeBytesStoreWithFixedCapacity ( 128 ) ; bs . appendUtf8 ( 0 , chars , 0 , chars . length ) ; java . nio . ByteBuffer bb = bs . toTemporaryDirectByteBuffer ( ) ; for ( int i = 0 ; i < ( chars . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } toTemporaryDirectByteBuffer ( ) { if ( net . openhft . chronicle . bytes . VanillaBytes . isClear ( ) ) return bytesStore . toTemporaryDirectByteBuffer ( ) ; return super . toTemporaryDirectByteBuffer ( ) ; }
org . junit . Assert . assertEquals ( bb . get ( i ) , ( ( byte ) ( chars [ i ] ) ) )
testCanOperatorBeSetWhenFactTypeIsNil ( ) { final java . lang . String factField = "" ; doReturn ( factField ) . when ( plugin ) . getFactField ( ) ; "<AssertPlaceHolder>" ; } canOperatorBeSet ( ) { return ( hasFactField ( ) ) && ( ! ( isConstraintValuePredicate ( ) ) ) ; }
org . junit . Assert . assertFalse ( page . canOperatorBeSet ( ) )
givenRegexWithLineTerminator_whenMatchesWithEmbeddedDotall_thenCorrect ( ) { java . util . regex . Pattern pattern = java . util . regex . Pattern . compile ( "(?s)(.*)" ) ; java . util . regex . Matcher matcher = pattern . matcher ( ( ( "this<sp>is<sp>a<sp>text" + ( java . lang . System . getProperty ( "line.separator" ) ) ) + "<sp>continued<sp>on<sp>another<sp>line" ) ) ; matcher . find ( ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { return env . getProperty ( key ) ; }
org . junit . Assert . assertEquals ( ( ( "this<sp>is<sp>a<sp>text" + ( java . lang . System . getProperty ( "line.separator" ) ) ) + "<sp>continued<sp>on<sp>another<sp>line" ) , matcher . group ( 1 ) )
testToString ( ) { jsonObject . put ( "foo" , "bar" ) ; "<AssertPlaceHolder>" ; } encode ( ) { return io . vertx . core . json . Json . encode ( map ) ; }
org . junit . Assert . assertEquals ( jsonObject . encode ( ) , jsonObject . toString ( ) )
createPolicyWithConfigurationAndConfigurationData ( ) { io . gravitee . gateway . policy . PolicyMetadata policyDefinition = mock ( io . gravitee . gateway . policy . PolicyMetadata . class ) ; when ( policyDefinition . policy ( ) ) . then ( ( ( org . mockito . stubbing . Answer < java . lang . Class > ) ( ( invocationOnMock ) -> . class ) ) ) ; when ( policyDefinition . configuration ( ) ) . then ( ( ( org . mockito . stubbing . Answer < java . lang . Class > ) ( ( invocationOnMock ) -> . class ) ) ) ; java . lang . Object policy = policyFactory . create ( policyDefinition , null ) ; "<AssertPlaceHolder>" ; } 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 ( policy )
testGetIpAddress ( ) { byte [ ] bytes = java . net . InetAddress . getLocalHost ( ) . getAddress ( ) ; "<AssertPlaceHolder>" ; } getIpAddress ( ) { try { return com . cedarsoftware . util . InetAddressUtilities . getLocalHost ( ) . getAddress ( ) ; } catch ( java . lang . Exception e ) { com . cedarsoftware . util . InetAddressUtilities . LOG . warn ( "Failed<sp>to<sp>obtain<sp>computer's<sp>IP<sp>address" , e ) ; return new byte [ ] { 0 , 0 , 0 , 0 } ; } }
org . junit . Assert . assertArrayEquals ( bytes , com . cedarsoftware . util . InetAddressUtilities . getIpAddress ( ) )
constructorSuccess ( java . util . concurrent . LinkedBlockingDeque ) { new tests . unit . com . microsoft . azure . sdk . iot . device . fileupload . Expectations ( ) { { new com . microsoft . azure . sdk . iot . device . transport . https . HttpsTransportManager ( mockConfig ) ; result = mockHttpsTransportManager ; java . util . concurrent . Executors . newScheduledThreadPool ( 10 ) ; result = mockScheduler ; } } ; final com . microsoft . azure . sdk . iot . device . fileupload . FileUpload fileUpload = new com . microsoft . azure . sdk . iot . device . fileupload . FileUpload ( mockConfig ) ; new tests . unit . com . microsoft . azure . sdk . iot . device . fileupload . Verifications ( ) { { new java . util . concurrent . LinkedBlockingDeque ( ) ; times = 1 ; } } ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( fileUpload )
getPreviousReleaseShouldReturnNullNoPreviousRelease ( ) { ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity result = resourceImportService . getPreviousRelease ( resourcesInGroupNotOrderedByRelease , ch . puzzle . itc . mobiliar . business . resourcegroup . control . ResourceImportServiceTest . RESOURCE_MAIN_RELEASE_A ) ; "<AssertPlaceHolder>" ; } getPreviousRelease ( ch . puzzle . itc . mobiliar . business . resourcegroup . control . Set , ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity ) { if ( resource == null ) { return null ; } ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity result = null ; ch . puzzle . itc . mobiliar . business . resourcegroup . control . List < ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity > allReleaseResourcesOrderedByRelease = new ch . puzzle . itc . mobiliar . business . resourcegroup . control . ArrayList ( allReleaseResources ) ; ch . puzzle . itc . mobiliar . business . resourcegroup . control . Collections . sort ( allReleaseResourcesOrderedByRelease , resourceReleaseComparator ) ; for ( ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceEntity resourceInRelease : allReleaseResourcesOrderedByRelease ) { if ( resource . getId ( ) . equals ( resourceInRelease . getId ( ) ) ) { return result ; } result = resourceInRelease ; } return null ; }
org . junit . Assert . assertNull ( result )
testGetPasswordEncoder ( ) { config = new org . pentaho . platform . config . SpringSecurityHibernateConfig ( document ) ; org . dom4j . Node node = mock ( org . dom4j . Node . class ) ; when ( node . getText ( ) ) . thenReturn ( org . pentaho . platform . repository2 . userroledao . jackrabbit . security . DefaultPentahoPasswordEncoder . class . getName ( ) ) ; when ( document . selectSingleNode ( anyString ( ) ) ) . thenReturn ( node ) ; org . springframework . security . authentication . encoding . PasswordEncoder passwordEncoder = config . getPasswordEncoder ( ) ; "<AssertPlaceHolder>" ; } getPasswordEncoder ( ) { try { java . lang . String pentahoEncoderClassName = document . selectSingleNode ( org . pentaho . platform . config . SpringSecurityHibernateConfig . PASSWORD_ENCODER_CLASS_XPATH ) . getText ( ) ; java . lang . Class passwordEncoderClass = java . lang . Class . forName ( pentahoEncoderClassName ) ; return ( ( org . springframework . security . authentication . encoding . PasswordEncoder ) ( passwordEncoderClass . newInstance ( ) ) ) ; } catch ( java . lang . ClassNotFoundException e ) { return null ; } catch ( java . lang . InstantiationException e ) { return null ; } catch ( java . lang . IllegalAccessException e ) { return null ; } }
org . junit . Assert . assertTrue ( ( passwordEncoder instanceof org . pentaho . platform . repository2 . userroledao . jackrabbit . security . DefaultPentahoPasswordEncoder ) )
testSearch ( ) { info . smart_tools . smartactors . base . interfaces . iaction . IAction < info . smart_tools . smartactors . iobject . iobject . IObject [ ] > callback = mock ( info . smart_tools . smartactors . base . interfaces . iaction . IAction . class ) ; when ( message . getCallback ( ) ) . thenReturn ( callback ) ; when ( resultSet . next ( ) ) . thenReturn ( true , true , false ) ; when ( resultSet . getString ( 1 ) ) . thenReturn ( "{<sp>\"testID\":<sp>123,<sp>\"test\":<sp>\"value\"<sp>}" ) ; task . prepare ( null ) ; task . execute ( ) ; verify ( connection ) . compileQuery ( any ( info . smart_tools . smartactors . database_postgresql . postgres_connection . QueryStatement . class ) ) ; verify ( sqlStatement ) . execute ( ) ; verify ( resultSet , times ( 3 ) ) . next ( ) ; verify ( resultSet , times ( 2 ) ) . getString ( anyInt ( ) ) ; verify ( connection ) . commit ( ) ; org . mockito . ArgumentCaptor < info . smart_tools . smartactors . iobject . iobject . IObject [ ] > results = org . mockito . ArgumentCaptor . forClass ( info . smart_tools . smartactors . iobject . iobject . IObject [ ] . class ) ; verify ( callback ) . execute ( results . capture ( ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return null ; }
org . junit . Assert . assertEquals ( 2 , results . getValue ( ) . length )
testGetTooltip ( ) { java . lang . String expResult = "Config<sp>changed<sp>since<sp>last<sp>build" ; java . lang . String result = sut . getTooltip ( ) ; "<AssertPlaceHolder>" ; } getTooltip ( ) { return hudson . plugins . jobConfigHistory . Messages . JobConfigBadgeAction_ToolTip ( ) ; }
org . junit . Assert . assertEquals ( expResult , result )
textSummaryNullTest ( ) { java . lang . String text = org . oscarehr . e2e . model . export . body . FamilyHistoryModelTest . nullFamilyHistoryModel . getTextSummary ( ) ; "<AssertPlaceHolder>" ; } getTextSummary ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ( familyHistory . getFamilyHistory ( ) . getObservation_date ( ) ) != null ) { sb . append ( familyHistory . getFamilyHistory ( ) . getObservation_date ( ) ) ; } if ( ! ( org . oscarehr . e2e . util . EverestUtils . isNullorEmptyorWhitespace ( familyHistory . getFamilyHistory ( ) . getNote ( ) ) ) ) { sb . append ( "<sp>" . concat ( familyHistory . getFamilyHistory ( ) . getNote ( ) . replaceAll ( "\\\\n" , "\n" ) ) ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertNotNull ( text )
testSafeName ( ) { java . lang . String safeName = io . prometheus . jmx . JmxCollector . safeName ( input ) ; "<AssertPlaceHolder>" ; } safeName ( java . lang . String ) { if ( name == null ) { return null ; } boolean prevCharIsUnderscore = false ; java . lang . StringBuilder safeNameBuilder = new java . lang . StringBuilder ( name . length ( ) ) ; if ( ( ! ( name . isEmpty ( ) ) ) && ( java . lang . Character . isDigit ( name . charAt ( 0 ) ) ) ) { safeNameBuilder . append ( "_" ) ; } for ( char nameChar : name . toCharArray ( ) ) { boolean isUnsafeChar = ! ( ( ( java . lang . Character . isLetterOrDigit ( nameChar ) ) || ( nameChar == ':' ) ) || ( nameChar == '_' ) ) ; if ( isUnsafeChar || ( nameChar == '_' ) ) { if ( prevCharIsUnderscore ) { continue ; } else { safeNameBuilder . append ( "_" ) ; prevCharIsUnderscore = true ; } } else { safeNameBuilder . append ( nameChar ) ; prevCharIsUnderscore = false ; } } return safeNameBuilder . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , safeName )
testVanillaCSV ( ) { java . lang . String [ ] expectedFileContents = new java . lang . String [ ] { "1,2,3,4" , "5,6,7,8" , "9,10,11" , "12,13,14" } ; java . lang . String vanillaCSVFile = tmpDir . copyResourceFileName ( "vanilla.csv" ) ; java . io . File vanillaFile = new java . io . File ( vanillaCSVFile ) ; java . io . InputStream inputStream = new java . io . FileInputStream ( vanillaFile ) ; org . apache . crunch . io . text . csv . CSVRecordIterator csvRecordIterator = new org . apache . crunch . io . text . csv . CSVRecordIterator ( inputStream ) ; java . util . ArrayList < java . lang . String > fileContents = new java . util . ArrayList < java . lang . String > ( 5 ) ; while ( csvRecordIterator . hasNext ( ) ) { fileContents . add ( csvRecordIterator . next ( ) ) ; } for ( int i = 0 ; i < ( expectedFileContents . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } get ( int ) { switch ( index ) { case 0 : return first ; case 1 : return second ; case 2 : return third ; default : throw new java . lang . ArrayIndexOutOfBoundsException ( ) ; } }
org . junit . Assert . assertEquals ( expectedFileContents [ i ] , fileContents . get ( i ) )
testparseValueForDBUserId ( ) { java . lang . Long expected = new java . lang . Long ( 123 ) ; java . lang . Object objectValue = org . sagebionetworks . table . cluster . SQLUtils . parseValueForDB ( ColumnType . USERID , "123" ) ; "<AssertPlaceHolder>" ; } parseValueForDB ( org . sagebionetworks . repo . model . table . ColumnType , java . lang . String ) { if ( value == null ) return null ; if ( type == null ) throw new java . lang . IllegalArgumentException ( "Type<sp>cannot<sp>be<sp>null" ) ; org . sagebionetworks . table . cluster . ColumnTypeInfo info = org . sagebionetworks . table . cluster . ColumnTypeInfo . getInfoForType ( type ) ; return info . parseValueForDatabaseWrite ( value ) ; }
org . junit . Assert . assertEquals ( expected , objectValue )
indexExpression ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = Sequence ( Property ( "foo" ) , Index ( 3 ) ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "foo[3]" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return runtime . compile ( str ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) )
removeFromRowKeyTest ( ) { "<AssertPlaceHolder>" ; } removeFromRowKey ( K ) { return persistence . deleteByKey ( rowKey , baseClass ) ; }
org . junit . Assert . assertTrue ( dao . removeFromRowKey ( new java . lang . Long ( 2 ) ) )
testIsCachedWithNoConfiguration ( ) { "<AssertPlaceHolder>" ; } isCached ( org . xwiki . model . reference . DocumentReference ) { if ( ( documentReference != null ) && ( isFarmEnabled ( ) ) ) { if ( isCachedInFarm ( documentReference ) ) { return true ; } return isCachedInWiki ( documentReference ) ; } return false ; }
org . junit . Assert . assertFalse ( this . configuration . isCached ( this . documentReference ) )
testEnumWithDefault ( ) { org . apache . avro . List < java . lang . String > symbols = org . apache . avro . Arrays . asList ( "a" , "b" ) ; java . lang . String enumDefault = "a" ; org . apache . avro . Schema expected = org . apache . avro . Schema . createEnum ( "myenum" , null , null , symbols , enumDefault ) ; expected . addProp ( "p" , "v" ) ; org . apache . avro . Schema schema = org . apache . avro . SchemaBuilder . enumeration ( "myenum" ) . prop ( "p" , "v" ) . defaultSymbol ( enumDefault ) . symbols ( "a" , "b" ) ; "<AssertPlaceHolder>" ; } prop ( java . lang . String , java . lang . String ) { return prop ( name , com . fasterxml . jackson . databind . node . TextNode . valueOf ( val ) ) ; }
org . junit . Assert . assertEquals ( expected , schema )
shouldBeAbleToInjectContext ( ) { javax . naming . Context context = new javax . naming . InitialContext ( ) ; org . jboss . arquillian . container . test . impl . enricher . resource . InitialContextProviderTestCase . ContextClass test = execute ( org . jboss . arquillian . container . test . impl . enricher . resource . InitialContextProviderTestCase . ContextClass . class , javax . naming . Context . class , context ) ; "<AssertPlaceHolder>" ; } execute ( java . lang . String , java . lang . Class , java . lang . Object ) { java . net . URLConnection connection = new java . net . URL ( url ) . openConnection ( ) ; if ( ! ( connection instanceof java . net . HttpURLConnection ) ) { throw new java . lang . IllegalStateException ( ( "Error<sp>sending<sp>request<sp>Object,<sp>" 0 + connection ) ) ; } java . net . HttpURLConnection httpConnection = ( ( java . net . HttpURLConnection ) ( connection ) ) ; httpConnection . setUseCaches ( false ) ; httpConnection . setDefaultUseCaches ( false ) ; httpConnection . setDoInput ( true ) ; prepareHttpConnection ( httpConnection ) ; try { if ( requestObject != null ) { httpConnection . setRequestMethod ( "POST" ) ; httpConnection . setDoOutput ( true ) ; httpConnection . setRequestProperty ( "Error<sp>sending<sp>request<sp>Object,<sp>" 1 , "application/octet-stream" ) ; } if ( requestObject != null ) { java . io . ObjectOutputStream ous = new java . io . ObjectOutputStream ( httpConnection . getOutputStream ( ) ) ; try { ous . writeObject ( requestObject ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( ( "Error<sp>sending<sp>request<sp>Object,<sp>" + requestObject ) , e ) ; } finally { ous . flush ( ) ; ous . close ( ) ; } } try { httpConnection . getResponseCode ( ) ; } catch ( java . net . ConnectException e ) { return null ; } if ( ( httpConnection . getResponseCode ( ) ) == ( java . net . HttpURLConnection . HTTP_OK ) ) { java . io . ObjectInputStream ois = new java . io . ObjectInputStream ( httpConnection . getInputStream ( ) ) ; java . lang . Object o ; try { o = ois . readObject ( ) ; } finally { ois . close ( ) ; } if ( ! ( returnType . isInstance ( o ) ) ) { throw new java . lang . IllegalStateException ( ( ( ( "Error<sp>reading<sp>results,<sp>expected<sp>a<sp>" + ( returnType . getName ( ) ) ) + "<sp>but<sp>got<sp>" ) + o ) ) ; } return returnType . cast ( o ) ; } else if ( ( httpConnection . getResponseCode ( ) ) == ( java . net . HttpURLConnection . HTTP_NO_CONTENT ) ) { return null ; } else if ( ( httpConnection . getResponseCode ( ) ) != ( java . net . HttpURLConnection . HTTP_NOT_FOUND ) ) { throw new java . lang . IllegalStateException ( ( ( ( ( ( ( ( "Error<sp>launching<sp>test<sp>at<sp>" + url ) + ".<sp>" ) + "Got<sp>" ) + ( httpConnection . getResponseCode ( ) ) ) + "<sp>(" ) + ( httpConnection . getResponseMessage ( ) ) ) + ")" ) ) ; } } finally { httpConnection . disconnect ( ) ; } return null ; }
org . junit . Assert . assertEquals ( context , test . context )
testInvalidPEMWithHeaderAndFooter ( ) { java . lang . String pem = "jQAwgYkCgYEAwpfpLdi7dWTHNzETt+L7618/dWUQFb/C7o1jIxFgbKOVIB6d5YmvUbJck5PYxFkz" 3 + ( ( ( ( ( ( ( ( ( ( ( "MIICOjCCAaOgAwIBAgIJANXi/oWxvJNzMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNVBAYTAlVTMQ0w" + "jQAwgYkCgYEAwpfpLdi7dWTHNzETt+L7618/dWUQFb/C7o1jIxFgbKOVIB6d5YmvUbJck5PYxFkz" 4 ) + "jQAwgYkCgYEAwpfpLdi7dWTHNzETt+L7618/dWUQFb/C7o1jIxFgbKOVIB6d5YmvUbJck5PYxFkz" 0 ) + "CzAJBgNVBAYTAlVTMQ0wCwYDVQQIEwRUZXN0MQ0wCwYDVQQHEwRUZXN0MQ8wDQYDVQQKEwZIYWRv" ) + "b3AxDTALBgNVBAsTBFRlc3QxEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOB" ) + "jQAwgYkCgYEAwpfpLdi7dWTHNzETt+L7618/dWUQFb/C7o1jIxFgbKOVIB6d5YmvUbJck5PYxFkz" ) + "C25fmU5H71WGOI1Kle5TFDmIo+hqh5xqu1YNRZz9i6D94g+2AyYr9BpvH4ZfdHs7r9AU7c3kq68V" ) + "7OPuuaHb25J8isiOyA3RiWuJGQlXTdkCAwEAATANBgkqhkiG9w0BAQUFAAOBgQAdRUyCUqE9sdim" ) + "Fbll9BuZDKV16WXeWGq+kTd7ETe7l0fqXjq5EnrifOai0L/pXwVvS2jrFkKQRlRxRGUNaeEBZ2Wy" ) + "9aTyR+HGHCfvwoCegc9rAVw/DLaRriSO/jnEXzYK6XLVKH+hx5UXrJ7Oyc7JjZUc3g9kCWORThCX" ) + "Mzc1xA==" ) + "\n-----END<sp>CERTIFICATE-----" ) ; try { com . hortonworks . registries . auth . util . CertificateUtil . parseRSAPublicKey ( pem ) ; org . junit . Assert . fail ( "jQAwgYkCgYEAwpfpLdi7dWTHNzETt+L7618/dWUQFb/C7o1jIxFgbKOVIB6d5YmvUbJck5PYxFkz" 2 ) ; } catch ( javax . servlet . ServletException se ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertTrue ( se . getMessage ( ) . contains ( "jQAwgYkCgYEAwpfpLdi7dWTHNzETt+L7618/dWUQFb/C7o1jIxFgbKOVIB6d5YmvUbJck5PYxFkz" 1 ) )
testEquals ( ) { com . mongodb . DBObject actual = parse ( "number<sp>=<sp>?" ) . getQuery ( ) ; com . mongodb . DBObject expected = com . mongodb . QueryBuilder . start ( "number" ) . is ( com . gigaspaces . persistency . qa . utest . parser . SQL2MongoBaseVisitorTest . PARAMETER_PLACEHOLDER ) . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { synchronized ( org . openspaces . rest . utils . ControllerUtils . XapConnectionCache . cache ) { log . finest ( "getting<sp>space" ) ; org . openspaces . core . GigaSpace gs = getSpace ( ) ; if ( gs != null ) return gs ; log . finest ( ( "lookupgroups:<sp>" + ( org . openspaces . rest . utils . ControllerUtils . lookupGroups ) ) ) ; log . finest ( ( "lookupLocators:<sp>" + ( org . openspaces . rest . utils . ControllerUtils . lookupLocators ) ) ) ; log . finest ( ( "spaceName:<sp>" + ( org . openspaces . rest . utils . ControllerUtils . spaceName ) ) ) ; java . lang . String url = "jini://*/*/" + ( org . openspaces . rest . utils . ControllerUtils . spaceName ) ; if ( ( ( ( org . openspaces . rest . utils . ControllerUtils . lookupGroups ) != null ) && ( ( org . openspaces . rest . utils . ControllerUtils . lookupGroups . length ( ) ) > 0 ) ) || ( ( ( org . openspaces . rest . utils . ControllerUtils . lookupLocators ) != null ) && ( ( org . openspaces . rest . utils . ControllerUtils . lookupLocators . length ( ) ) > 0 ) ) ) { url += "lookupLocators:<sp>" 0 ; boolean lookupGroupsSetted = false ; if ( ( ( org . openspaces . rest . utils . ControllerUtils . lookupGroups ) != null ) && ( ( org . openspaces . rest . utils . ControllerUtils . lookupGroups . length ( ) ) > 0 ) ) { url += "groups=" + ( org . openspaces . rest . utils . ControllerUtils . lookupGroups ) ; lookupGroupsSetted = true ; } if ( ( ( org . openspaces . rest . utils . ControllerUtils . lookupLocators ) != null ) && ( ( org . openspaces . rest . utils . ControllerUtils . lookupLocators . length ( ) ) > 0 ) ) { if ( lookupGroupsSetted ) { url += "&" ; } url += "locators=" + ( org . openspaces . rest . utils . ControllerUtils . lookupLocators ) ; } } log . info ( ( "<sp>connecting<sp>to<sp>" + url ) ) ; org . openspaces . core . space . UrlSpaceConfigurer usc = new org . openspaces . core . space . UrlSpaceConfigurer ( url ) ; gs = new org . openspaces . core . GigaSpaceConfigurer ( usc . space ( ) ) . gigaSpace ( ) ; org . openspaces . rest . utils . ControllerUtils . XapConnectionCache . cache . set ( new org . openspaces . rest . utils . ControllerUtils . XapEndpoint ( gs , usc ) ) ; log . finest ( "<sp>returning<sp>space" ) ; return gs ; } }
org . junit . Assert . assertEquals ( expected , actual )
testTouches ( ) { com . vividsolutions . jts . geom . Coordinate [ ] coords = new com . vividsolutions . jts . geom . Coordinate [ ] { new com . vividsolutions . jts . geom . Coordinate ( 0 , 0 ) , new com . vividsolutions . jts . geom . Coordinate ( 10 , 10 ) } ; com . vividsolutions . jts . geom . LineString lineString = new com . vividsolutions . jts . geom . GeometryFactory ( ) . createLineString ( coords ) ; org . opengis . filter . Filter filter = ff . touches ( ff . property ( "name" ) , ff . literal ( lineString ) ) ; com . vividsolutions . jts . geom . Envelope env = ( ( com . vividsolutions . jts . geom . Envelope ) ( filter . accept ( visitor , null ) ) ) ; "<AssertPlaceHolder>" ; } accept ( org . opengis . filter . expression . ExpressionVisitor , java . lang . Object ) { return visitor . visit ( this , extraData ) ; }
org . junit . Assert . assertEquals ( new com . vividsolutions . jts . geom . Envelope ( 0 , 10 , 0 , 10 ) , env )
testSetSeriesKeys ( ) { org . jfree . data . category . DefaultIntervalCategoryDataset empty = new org . jfree . data . category . DefaultIntervalCategoryDataset ( new double [ 0 ] [ 0 ] , new double [ 0 ] [ 0 ] ) ; boolean pass = true ; try { empty . setSeriesKeys ( new java . lang . String [ 0 ] ) ; } catch ( java . lang . RuntimeException e ) { pass = false ; } "<AssertPlaceHolder>" ; } setSeriesKeys ( java . lang . Comparable [ ] ) { if ( ( seriesKeys . length ) > 1 ) { throw new java . lang . IllegalArgumentException ( "Contours<sp>only<sp>support<sp>one<sp>series" ) ; } this . seriesKey = seriesKeys [ 0 ] ; fireDatasetChanged ( ) ; }
org . junit . Assert . assertTrue ( pass )
testGetAttributeValueListsNoAuthorizedNamespaces ( ) { java . util . Set < java . lang . String > authorizedNamespaces = new java . util . HashSet ( ) ; when ( namespaceSecurityHelper . getAuthorizedNamespaces ( NamespacePermissionEnum . READ ) ) . thenReturn ( authorizedNamespaces ) ; org . finra . herd . model . api . xml . AttributeValueListKeys result = attributeValueListService . getAttributeValueLists ( ) ; verify ( namespaceSecurityHelper ) . getAuthorizedNamespaces ( NamespacePermissionEnum . READ ) ; verifyNoMoreInteractionsHelper ( ) ; "<AssertPlaceHolder>" ; } verifyNoMoreInteractionsHelper ( ) { verifyNoMoreInteractions ( awsHelper , javaPropertiesHelper , retryPolicyFactory , s3Operations ) ; }
org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . AttributeValueListKeys ( ) , result )
testRetryable ( ) { com . amazonaws . AbortedException ae1 = new com . amazonaws . AbortedException ( ) ; "<AssertPlaceHolder>" ; } isRetryable ( ) { return false ; }
org . junit . Assert . assertFalse ( ae1 . isRetryable ( ) )
test_clients__client_type__stats_get ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method . GET ) ; request . setEndpoint ( "clients/{client_type}/stats" ) ; request . addQueryParam ( "localhost:4010" 0 , "day" ) ; request . addQueryParam ( "start_date" , "2016-01-01" ) ; request . addQueryParam ( "end_date" , "2016-04-01" ) ; com . sendgrid . Response response = sg . api ( request ) ; "<AssertPlaceHolder>" ; } api ( com . sendgrid . Request ) { com . sendgrid . Request req = new com . sendgrid . Request ( ) ; req . setMethod ( request . getMethod ( ) ) ; req . setBaseUri ( this . host ) ; req . setEndpoint ( ( ( ( "/" + ( version ) ) + "/" ) + ( request . getEndpoint ( ) ) ) ) ; req . setBody ( request . getBody ( ) ) ; for ( Map . Entry < java . lang . String , java . lang . String > header : this . requestHeaders . entrySet ( ) ) { req . addHeader ( header . getKey ( ) , header . getValue ( ) ) ; } for ( Map . Entry < java . lang . String , java . lang . String > queryParam : request . getQueryParams ( ) . entrySet ( ) ) { req . addQueryParam ( queryParam . getKey ( ) , queryParam . getValue ( ) ) ; } return makeCall ( req ) ; }
org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) )
whenDifferentSessionsAndRequests_thenAlwaysSingleApplicationScopedBean ( ) { org . springframework . mock . web . MockHttpSession session1 = new org . springframework . mock . web . MockHttpSession ( ) ; org . springframework . mock . web . MockHttpSession session2 = new org . springframework . mock . web . MockHttpSession ( ) ; java . lang . String applicationScopedServiceInstanceNumber1 = this . mockMvc . perform ( get ( "/appointments/application" ) . session ( session1 ) . accept ( MediaType . ALL ) ) . andExpect ( status ( ) . isOk ( ) ) . andReturn ( ) . getResponse ( ) . getContentAsString ( ) ; java . lang . String applicationScopedServiceInstanceNumber2 = this . mockMvc . perform ( get ( "/appointments/application" ) . session ( session2 ) . accept ( MediaType . ALL ) ) . andExpect ( status ( ) . isOk ( ) ) . andReturn ( ) . getResponse ( ) . getContentAsString ( ) ; "<AssertPlaceHolder>" ; } getResponse ( ) { try { return httpClient . call ( ) ; } catch ( com . baeldung . vavr . exception . handling . client . ClientException e ) { return null ; } }
org . junit . Assert . assertEquals ( applicationScopedServiceInstanceNumber1 , applicationScopedServiceInstanceNumber2 )
testGetMessage ( ) { org . openscience . cdk . inchi . InChIToStructure parser = new org . openscience . cdk . inchi . InChIToStructure ( "InChI=1S/CH5/h1H4" , org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; parser . getAtomContainer ( ) ; java . lang . String message = parser . getMessage ( ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return output . getMessage ( ) ; }
org . junit . Assert . assertNotNull ( message )
testDecomposeQuery_2DSpatialOneIndexFilter ( ) { final int LATITUDE_BITS = 31 ; final int LONGITUDE_BITS = 31 ; final org . locationtech . geowave . core . index . sfc . SFCDimensionDefinition [ ] SPATIAL_DIMENSIONS = new org . locationtech . geowave . core . index . sfc . SFCDimensionDefinition [ ] { new org . locationtech . geowave . core . index . sfc . SFCDimensionDefinition ( new org . locationtech . geowave . core . geotime . index . dimension . LongitudeDefinition ( ) , LONGITUDE_BITS ) , new org . locationtech . geowave . core . index . sfc . SFCDimensionDefinition ( new org . locationtech . geowave . core . geotime . index . dimension . LatitudeDefinition ( ) , LATITUDE_BITS ) } ; final org . locationtech . geowave . core . index . sfc . SpaceFillingCurve hilbertSFC = org . locationtech . geowave . core . index . sfc . SFCFactory . createSpaceFillingCurve ( SPATIAL_DIMENSIONS , SFCType . HILBERT ) ; final org . locationtech . geowave . core . index . sfc . data . NumericRange rangeX = new org . locationtech . geowave . core . index . sfc . data . NumericRange ( 55 , 57 ) ; final org . locationtech . geowave . core . index . sfc . data . NumericRange rangeY = new org . locationtech . geowave . core . index . sfc . data . NumericRange ( 25 , 27 ) ; final org . locationtech . geowave . core . index . sfc . data . BasicNumericDataset spatialQuery = new org . locationtech . geowave . core . index . sfc . data . BasicNumericDataset ( new org . locationtech . geowave . core . index . sfc . data . NumericData [ ] { rangeX , rangeY } ) ; final org . locationtech . geowave . core . index . sfc . RangeDecomposition rangeDecomposition = hilbertSFC . decomposeRange ( spatialQuery , true , 1 ) ; "<AssertPlaceHolder>" ; } getRanges ( ) { return ranges ; }
org . junit . Assert . assertEquals ( 1 , rangeDecomposition . getRanges ( ) . length )
testContainerScopeListNoOp ( ) { com . facebook . buck . rules . keys . hasher . CountingRuleKeyHasher < com . google . common . hash . HashCode > countHasher = newCountHasher ( ) ; com . facebook . buck . rules . keys . RuleKeyScopedHasher containerHasher = new com . facebook . buck . rules . keys . DefaultRuleKeyScopedHasher ( countHasher ) ; try ( com . facebook . buck . rules . keys . RuleKeyScopedHasher . ContainerScope containerScope = containerHasher . containerScope ( RuleKeyHasher . Container . LIST ) ) { } "<AssertPlaceHolder>" ; } newGuavaHasher ( ) { return new com . facebook . buck . rules . keys . hasher . GuavaRuleKeyHasher ( com . google . common . hash . Hashing . sha1 ( ) . newHasher ( ) ) ; }
org . junit . Assert . assertEquals ( newGuavaHasher ( ) . hash ( ) , countHasher . hash ( ) )
shouldNotStartDisabledSplashScreens ( ) { java . util . List < org . uberfire . client . mvp . SplashScreenActivity > splashScreenList = new java . util . ArrayList < org . uberfire . client . mvp . SplashScreenActivity > ( ) ; org . uberfire . client . mvp . SplashScreenActivity expectedSplashScreenActivity = makeSplashScreenThatIntercepts ( kansas , false ) ; splashScreenList . add ( expectedSplashScreenActivity ) ; when ( activityBeansCache . getSplashScreens ( ) ) . thenReturn ( splashScreenList ) ; org . uberfire . client . mvp . SplashScreenActivity splashScreenActivity = activityManager . getSplashScreenInterceptor ( kansas ) ; "<AssertPlaceHolder>" ; } getSplashScreenInterceptor ( org . uberfire . mvp . PlaceRequest ) { org . uberfire . client . mvp . SplashScreenActivity resultBean = null ; for ( org . uberfire . client . mvp . SplashScreenActivity splashScreen : activityBeansCache . getSplashScreens ( ) ) { if ( splashScreen . intercept ( placeRequest ) ) { if ( splashScreen . isEnabled ( ) ) { resultBean = splashScreen ; break ; } } } return startIfNecessary ( secure ( resultBean ) , placeRequest ) ; }
org . junit . Assert . assertNull ( splashScreenActivity )
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . asset . entry . rel . model . AssetEntryAssetCategoryRel > assetEntryAssetCategoryRels = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( assetEntryAssetCategoryRels . isEmpty ( ) )
testCopyOfIterator ( ) { java . lang . Iterable < java . lang . String > iterable = asSet ( "Hello" ) ; "<AssertPlaceHolder>" ; } copyOf ( java . util . Collection ) { return new org . kocakosm . pitaya . collection . ImmutableSet < E > ( new java . util . LinkedHashSet < E > ( c ) ) ; }
org . junit . Assert . assertEquals ( iterable , org . kocakosm . pitaya . collection . ImmutableSet . copyOf ( iterable . iterator ( ) ) )
TestSameInputStream ( ) { org . apache . nifi . minifi . bootstrap . configuration . differentiators . interfaces . Differentiator < java . io . InputStream > differentiator = org . apache . nifi . minifi . bootstrap . configuration . differentiators . WholeConfigDifferentiator . getInputStreamDifferentiator ( ) ; differentiator . initialize ( org . apache . nifi . minifi . bootstrap . configuration . differentiators . WholeConfigDifferentiatorTest . properties , org . apache . nifi . minifi . bootstrap . configuration . differentiators . WholeConfigDifferentiatorTest . configurationFileHolder ) ; java . io . FileInputStream fileInputStream = new java . io . FileInputStream ( org . apache . nifi . minifi . bootstrap . configuration . differentiators . WholeConfigDifferentiatorTest . defaultConfigPath . toFile ( ) ) ; "<AssertPlaceHolder>" ; } isNew ( java . io . InputStream ) { return compareInputStreamToConfigFile ( inputStream ) ; }
org . junit . Assert . assertFalse ( differentiator . isNew ( fileInputStream ) )
testProcess_noConnection ( ) { net . roboconf . agent . monitoring . internal . nagios . NagiosHandler handler = new net . roboconf . agent . monitoring . internal . nagios . NagiosHandler ( ) ; handler . setAgentId ( net . roboconf . agent . monitoring . internal . nagios . NagiosHandlerTest . APP_NAME , net . roboconf . agent . monitoring . internal . nagios . NagiosHandlerTest . SCOPED_INSTANCE_PATH ) ; handler . reset ( null , net . roboconf . agent . monitoring . internal . nagios . NagiosHandlerTest . EVENT_NAME , "" ) ; "<AssertPlaceHolder>" ; } process ( ) { net . roboconf . messaging . api . messages . from_agent_to_dm . MsgNotifAutonomic result = null ; java . lang . String response = null ; if ( ( this . url ) != null ) response = ( this . url . startsWith ( "https:" ) ) ? httpsQuery ( ) : httpQuery ( ) ; if ( response != null ) response = response . replace ( '{' , '<sp>' ) . replace ( '}' , '<sp>' ) . trim ( ) ; else response = "" ; java . util . HashMap < java . lang . String , java . lang . String > map = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; for ( java . lang . String s : response . split ( "\\n" ) ) { java . lang . String [ ] kv = s . split ( ":" ) ; if ( ( kv . length ) == 2 ) map . put ( kv [ 0 ] . replace ( "\"" , "<sp>" ) . trim ( ) , kv [ 1 ] ) ; else break ; } if ( map . isEmpty ( ) ) { this . logger . warning ( "The<sp>REST<sp>response<sp>could<sp>not<sp>be<sp>parsed." ) ; this . logger . finer ( ( "Received<sp>response:<sp>" + response ) ) ; } else if ( evalCondition ( map ) ) { result = new net . roboconf . messaging . api . messages . from_agent_to_dm . MsgNotifAutonomic ( this . applicationName , this . scopedInstancePath , this . eventId , response . toString ( ) ) ; } return result ; }
org . junit . Assert . assertNull ( handler . process ( ) )
testBeansProjectDescriptionWriterWithXMLConfigsOnly ( ) { beansProject . addConfig ( "basic-bean-config.xml" , IBeansConfig . Type . MANUAL ) ; java . io . ByteArrayOutputStream os = new java . io . ByteArrayOutputStream ( ) ; org . springframework . ide . eclipse . core . io . xml . XMLWriter writer = new org . springframework . ide . eclipse . core . io . xml . XMLWriter ( os ) ; org . springframework . ide . eclipse . beans . core . internal . project . BeansProjectDescriptionWriter . write ( beansProject , writer ) ; writer . flush ( ) ; writer . close ( ) ; java . lang . String description = os . toString ( ) ; java . util . regex . Matcher matcher = java . util . regex . Pattern . compile ( "<configs>\\W*<config>\\W*basic-bean-config.xml\\W*</config>\\W*</configs>" ) . matcher ( description ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( "SshHost<sp>[host=" + ( host ) ) + ",<sp>port=" ) + ( port ) ) + ",<sp>fingerPrint=" ) + ( fingerPrint ) ) + "]" ; }
org . junit . Assert . assertTrue ( matcher . find ( ) )
testMutableAdd_double_ExecutorService ( ) { jsat . linear . GenericMatrixTest . TestImp ApTwo = new jsat . linear . GenericMatrixTest . TestImp ( new double [ ] [ ] { new double [ ] { 1 + 2 , 5 + 2 , 4 + 2 , 8 + 2 , 9 + 2 } , new double [ ] { 1 + 2 , 5 + 2 , 7 + 2 , 3 + 2 , 7 + 2 } , new double [ ] { 0 + 2 , 3 + 2 , 8 + 2 , 5 + 2 , 6 + 2 } , new double [ ] { 3 + 2 , 8 + 2 , 0 + 2 , 7 + 2 , 0 + 2 } , new double [ ] { 1 + 2 , 9 + 2 , 2 + 2 , 9 + 2 , 6 + 2 } } ) ; jsat . linear . Matrix aCopy = jsat . linear . GenericMatrixTest . A . clone ( ) ; aCopy . mutableAdd ( 2 , jsat . linear . GenericMatrixTest . threadpool ) ; "<AssertPlaceHolder>" ; } mutableAdd ( double , jsat . distributions . kernels . Vec ) { mutableAdd ( c , x_t , k . getQueryInfo ( x_t ) ) ; }
org . junit . Assert . assertEquals ( ApTwo , aCopy )
testGetState ( ) { com . natpryce . piazza . InvestigationViewState viewState = new com . natpryce . piazza . InvestigationViewState ( ResponsibilityEntry . State . TAKEN , com . natpryce . piazza . InvestigationViewStateTest . NAME , null ) ; jetbrains . buildServer . responsibility . ResponsibilityEntry . State description = viewState . getState ( ) ; "<AssertPlaceHolder>" ; } getState ( ) { return state ; }
org . junit . Assert . assertEquals ( ResponsibilityEntry . State . TAKEN , description )
testBuild ( ) { org . lnu . is . domain . person . address . PersonAddress context = new org . lnu . is . domain . person . address . PersonAddress ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>PersonAddress<sp>e<sp>WHERE<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . person . address . PersonAddress > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
testGetAccessTokenExtractor_1 ( ) { org . jinstagram . auth . InstagramApi fixture = new org . jinstagram . auth . InstagramApi ( ) ; org . jinstagram . auth . AccessTokenExtractor result = fixture . getAccessTokenExtractor ( ) ; "<AssertPlaceHolder>" ; } getAccessTokenExtractor ( ) { return new org . jinstagram . auth . AccessTokenExtractor ( ) { @ org . jinstagram . auth . Override public org . jinstagram . auth . model . Token extract ( java . lang . String response ) { org . jinstagram . utils . Preconditions . checkEmptyString ( response , "Cannot<sp>extract<sp>a<sp>token<sp>from<sp>a<sp>null<sp>or<sp>empty<sp>String" ) ; try { com . google . gson . JsonParser parser = new com . google . gson . JsonParser ( ) ; com . google . gson . JsonObject obj = parser . parse ( response ) . getAsJsonObject ( ) ; java . lang . String token = null ; if ( obj . has ( "access_token" ) ) { token = obj . get ( "access_token" ) . getAsString ( ) ; } if ( org . apache . commons . lang3 . StringUtils . isEmpty ( token ) ) { throw new org . jinstagram . auth . exceptions . OAuthException ( ( "Cannot<sp>extract<sp>an<sp>access<sp>token.<sp>Response<sp>was:<sp>" + response ) ) ; } return new org . jinstagram . auth . model . Token ( token , "" , response ) ; } catch ( com . google . gson . JsonParseException e ) { throw new org . jinstagram . auth . exceptions . OAuthException ( ( "Cannot<sp>extract<sp>an<sp>access<sp>token.<sp>Response<sp>was:<sp>" + response ) ) ; } } } ; }
org . junit . Assert . assertNotNull ( result )
isTwoOrIdsWorking ( ) { final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityOne<sp>r<sp>where<sp>(r.id<sp>=<sp>1)<sp>or<sp>(r.id<sp>=<sp>3)" ; final java . util . List < com . uaihebert . model . test . RegularEntityOne > resultFromJPQL = jpqlHelper . getListFromJPQL ( query , com . uaihebert . model . test . RegularEntityOne . class ) ; "<AssertPlaceHolder>" ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityOne > uaiCriteria = createCriteria ( com . uaihebert . model . test . RegularEntityOne . class ) ; uaiCriteria . orEquals ( "id" , 1L ) . orEquals ( "id" , 3L ) ; validateTestLists ( resultFromJPQL , uaiCriteria . getResultList ( ) ) ; } getListFromJPQL ( java . lang . String , java . lang . Class ) { return getListFromJPQL ( query , classToUse , null ) ; }
org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) == 2 ) )
testPriorityLevel24 ( ) { int n = jannovar . common . VariantType . priorityLevel ( VariantType . INTERGENIC ) ; "<AssertPlaceHolder>" ; } priorityLevel ( jannovar . common . VariantType ) { switch ( vt ) { case FS_DELETION : case FS_INSERTION : case NON_FS_SUBSTITUTION : case FS_SUBSTITUTION : case MISSENSE : case NON_FS_DELETION : case NON_FS_INSERTION : case SPLICING : case STOPGAIN : case STOPLOSS : case FS_DUPLICATION : case NON_FS_DUPLICATION : case START_LOSS : return 1 ; case ncRNA_EXONIC : case ncRNA_SPLICING : return 2 ; case UTR3 : return 3 ; case UTR5 : return 4 ; case SYNONYMOUS : return 5 ; case INTRONIC : return 6 ; case ncRNA_INTRONIC : return 7 ; case UPSTREAM : case DOWNSTREAM : return 8 ; case INTERGENIC : return 9 ; case ERROR : return 10 ; default : return 10 ; } }
org . junit . Assert . assertEquals ( 9 , n )
testCreateProblemSectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . DocumentBuilder < org . openhealthtools . mdht . uml . cda . ccd . ContinuityOfCareDocument > clinicalDocumentBuilder = org . openhealthtools . mdht . uml . cda . ccd . builder . CCDBuilderFactory . createContinuityOfCareDocumentBuilder ( ) ; org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . ccd . ProblemSection > sectionBuilder = org . openhealthtools . mdht . uml . cda . ccd . builder . CCDBuilderFactory . createProblemSectionBuilder ( ) ; org . openhealthtools . mdht . uml . cda . ccd . ProblemSection section = sectionBuilder . buildSection ( ) ; "<AssertPlaceHolder>" ; org . openhealthtools . mdht . uml . cda . util . CDAUtil . save ( clinicalDocumentBuilder . with ( section ) . buildDocument ( ) , System . out ) ; } buildSection ( ) { org . openhealthtools . mdht . uml . cda . Section section = CDAFactory . eINSTANCE . createSection ( ) ; construct ( section ) ; return section ; }
org . junit . Assert . assertNotNull ( section )
testGetWikiPage ( ) { System . out . println ( "getWikiPage" ) ; kg . apc . jmeter . vizualizers . PerfMonGui instance = new kg . apc . jmeter . vizualizers . PerfMonGui ( ) ; java . lang . String result = instance . getWikiPage ( ) ; "<AssertPlaceHolder>" ; } getWikiPage ( ) { return "ResponseCodesPerSecond" ; }
org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) )
fetchModeSelectHql ( ) { persistBooks ( ( ) -> new com . example . entities . BookFetchModeSelect ( ) ) ; System . out . println ( "FetchMode.SELECT<sp>HQL" ) ; java . util . List books = getCurrentSession ( ) . createQuery ( "select<sp>b<sp>from<sp>BookFetchModeSelect<sp>b" ) . list ( ) ; "<AssertPlaceHolder>" ; } getCurrentSession ( ) { return sessionFactory . getCurrentSession ( ) ; }
org . junit . Assert . assertEquals ( 4 , books . size ( ) )
shouldReturnValidationResultForString ( ) { final uk . gov . gchq . gaffer . commonutil . iterable . AlwaysValid < java . lang . String > validator = new uk . gov . gchq . gaffer . commonutil . iterable . AlwaysValid ( ) ; final uk . gov . gchq . koryphe . ValidationResult result = validator . validateWithValidationResult ( "test" ) ; "<AssertPlaceHolder>" ; } validateWithValidationResult ( uk . gov . gchq . gaffer . data . element . Element ) { final uk . gov . gchq . koryphe . ValidationResult validationResult = new uk . gov . gchq . koryphe . ValidationResult ( ) ; if ( null == element ) { validationResult . addError ( "Element<sp>was<sp>null" ) ; } else if ( null != ( schema ) ) { validationResult . add ( validateWithSchemaWithValidationResult ( element ) ) ; } else if ( null != ( view ) ) { validationResult . add ( validateAgainstViewFilterWithValidationResult ( element , uk . gov . gchq . gaffer . store . ElementValidator . FilterType . PRE_AGGREGATION_FILTER ) ) ; validationResult . add ( validateAgainstViewFilterWithValidationResult ( element , uk . gov . gchq . gaffer . store . ElementValidator . FilterType . POST_AGGREGATION_FILTER ) ) ; validationResult . add ( validateAgainstViewFilterWithValidationResult ( element , uk . gov . gchq . gaffer . store . ElementValidator . FilterType . POST_TRANSFORM_FILTER ) ) ; } return validationResult ; }
org . junit . Assert . assertTrue ( result . isValid ( ) )
testCreateMetaDataRequest ( ) { org . kaaproject . kaa . client . KaaClientProperties properties = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . KaaClientProperties . class ) ; org . kaaproject . kaa . client . persistence . KaaClientState state = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . persistence . KaaClientState . class ) ; org . mockito . Mockito . when ( state . getProfileHash ( ) ) . thenReturn ( org . kaaproject . kaa . common . hash . EndpointObjectHash . fromSha1 ( "123" ) ) ; org . kaaproject . kaa . common . hash . EndpointObjectHash publicKeyHash = org . kaaproject . kaa . common . hash . EndpointObjectHash . fromSha1 ( "567" ) ; org . kaaproject . kaa . client . channel . MetaDataTransport transport = new org . kaaproject . kaa . client . channel . impl . transports . DefaultMetaDataTransport ( ) ; transport . createMetaDataRequest ( ) ; transport . setClientProperties ( properties ) ; transport . createMetaDataRequest ( ) ; transport . setClientState ( state ) ; transport . createMetaDataRequest ( ) ; transport . setEndpointPublicKeyhash ( publicKeyHash ) ; transport . setTimeout ( 5 ) ; org . kaaproject . kaa . common . endpoint . gen . SyncRequestMetaData request = transport . createMetaDataRequest ( ) ; org . mockito . Mockito . verify ( state , org . mockito . Mockito . times ( 1 ) ) . getProfileHash ( ) ; org . mockito . Mockito . verify ( properties , org . mockito . Mockito . times ( 1 ) ) . getSdkToken ( ) ; "<AssertPlaceHolder>" ; } getTimeout ( ) { return timeout ; }
org . junit . Assert . assertEquals ( new java . lang . Long ( 5 ) , request . getTimeout ( ) )
specificValueTest ( ) { java . lang . String specificJson = "{\"value\":<sp>\"abcdnefg\"}" ; com . ctrip . soa . caravan . util . serializer . ssjson . TestEntity testEntity = SSJsonSerializer . DEFAULT . deserialize ( new java . io . ByteArrayInputStream ( specificJson . getBytes ( ) ) , com . ctrip . soa . caravan . util . serializer . ssjson . TestEntity . class ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertNotNull ( testEntity . getValue ( ) )
testPostEntities ( ) { org . apache . hadoop . yarn . client . api . impl . TestTimelineClient . mockEntityClientResponse ( spyTimelineWriter , ClientResponse . Status . OK , false , false ) ; try { org . apache . hadoop . yarn . api . records . timeline . TimelinePutResponse response = client . putEntities ( org . apache . hadoop . yarn . client . api . impl . TestTimelineClient . generateEntity ( ) ) ; "<AssertPlaceHolder>" ; } catch ( org . apache . hadoop . yarn . exceptions . YarnException e ) { org . junit . Assert . fail ( "Exception<sp>is<sp>not<sp>expected" ) ; } } getErrors ( ) { return errors ; }
org . junit . Assert . assertEquals ( 0 , response . getErrors ( ) . size ( ) )
given_TwoObjectOfTheSameClass_when_CreatingImmutableVersionBasedOnTheSameInterface_then_CreatingImmutableVersionCreatesOneClassOnly ( ) { com . javax0 . immutator . ImmutableTest . MutableClass testObject1 = new com . javax0 . immutator . ImmutableTest . MutableClass ( ) ; com . javax0 . immutator . ImmutableTest . MutableClass immutable1 = Immutable . of . using ( com . javax0 . immutator . ImmutableTest . ImmutableMethods . class ) . of ( testObject1 ) ; com . javax0 . immutator . ImmutableTest . MutableClass testObject2 = new com . javax0 . immutator . ImmutableTest . MutableClass ( ) ; com . javax0 . immutator . ImmutableTest . MutableClass immutable2 = Immutable . of . using ( com . javax0 . immutator . ImmutableTest . ImmutableMethods . class ) . of ( testObject2 ) ; "<AssertPlaceHolder>" ; } of ( T ) { @ com . javax0 . immutator . SuppressWarnings ( "unchecked" ) com . javax0 . djcproxy . ProxyFactory < T > factory = ( ( com . javax0 . djcproxy . ProxyFactory < T > ) ( com . javax0 . immutator . Immutable . globalFactory ) ) ; T proxy = factory . create ( original , com . javax0 . djcproxy . interceptors . RuntimeExceptionInterceptor . getInstance ( ) ) ; return proxy ; }
org . junit . Assert . assertEquals ( immutable1 . getClass ( ) , immutable2 . getClass ( ) )
testReturnTypeExceptionWithTrue ( ) { boolean expected = true ; boolean result = org . slieb . throwables . LongPredicateWithThrowable . castLongPredicateWithThrowable ( ( v1 ) -> { throw new java . lang . Exception ( "expect<sp>exception" ) ; } ) . thatReturnsOnCatch ( expected ) . test ( 0 ) ; "<AssertPlaceHolder>" ; } test ( long ) { try { return testWithThrowable ( v1 ) ; } catch ( java . lang . RuntimeException | java . lang . Error exception ) { throw exception ; } catch ( final java . lang . Throwable throwable ) { throw new org . slieb . throwables . SuppressedException ( throwable ) ; } }
org . junit . Assert . assertEquals ( expected , result )
testBindWithDoubleQuote ( ) { org . apache . directory . ldap . client . api . LdapConnection connection = new org . apache . directory . ldap . client . api . LdapNetworkConnection ( org . apache . directory . api . util . Network . LOOPBACK_HOSTNAME , getLdapServer ( ) . getPort ( ) ) ; connection . bind ( "uid=\"admin\",ou=\"system\"" , "secret" ) ; "<AssertPlaceHolder>" ; connection . close ( ) ; } isAuthenticated ( ) { return ( session ) != null ; }
org . junit . Assert . assertTrue ( connection . isAuthenticated ( ) )
accountTest_1 ( ) { org . ethereum . facade . Repository repository = org . ethereum . manager . WorldManager . getInstance ( ) . getRepository ( ) ; org . ethereum . crypto . ECKey cowKey = org . ethereum . crypto . ECKey . fromPrivate ( org . ethereum . crypto . HashUtil . sha3 ( "cow" . getBytes ( ) ) ) ; repository . createAccount ( cowKey . getAddress ( ) ) ; repository . addBalance ( cowKey . getAddress ( ) , BigInteger . TEN ) ; org . ethereum . core . Wallet wallet = new org . ethereum . core . Wallet ( ) ; wallet . importKey ( cowKey . getPrivKeyBytes ( ) ) ; java . math . BigInteger walletBalance = wallet . getBalance ( cowKey . getAddress ( ) ) ; "<AssertPlaceHolder>" ; } getAddress ( ) { return address ; }
org . junit . Assert . assertEquals ( BigInteger . TEN , walletBalance )
testGetRedirectURLNull ( ) { org . easymock . EasyMock . expect ( druidCoordinator . getCurrentLeader ( ) ) . andReturn ( null ) . anyTimes ( ) ; org . easymock . EasyMock . replay ( druidCoordinator ) ; java . net . URL url = coordinatorRedirectInfo . getRedirectURL ( "query" , "/request" ) ; "<AssertPlaceHolder>" ; org . easymock . EasyMock . verify ( druidCoordinator ) ; } getRedirectURL ( java . lang . String , java . lang . String ) { return isOverlordRequest ( requestURI ) ? overlordRedirectInfo . getRedirectURL ( queryString , requestURI ) : coordinatorRedirectInfo . getRedirectURL ( queryString , requestURI ) ; }
org . junit . Assert . assertNull ( url )
testSimpleWriteReadSignBySign ( ) { org . apache . olingo . server . core . serializer . utils . CircleStreamBuffer csb = new org . apache . olingo . server . core . serializer . utils . CircleStreamBuffer ( ) ; java . io . OutputStream write = csb . getOutputStream ( ) ; byte [ ] writeData = "Test" . getBytes ( org . apache . olingo . server . core . serializer . utils . CircleStreamBufferTest . DEFAULT_CHARSET ) ; for ( byte element : writeData ) { write . write ( element ) ; } java . io . InputStream inStream = csb . getInputStream ( ) ; byte [ ] buffer = new byte [ 4 ] ; for ( int i = 0 ; i < ( buffer . length ) ; i ++ ) { buffer [ i ] = ( ( byte ) ( inStream . read ( ) ) ) ; } java . lang . String result = new java . lang . String ( buffer , org . apache . olingo . server . core . serializer . utils . CircleStreamBufferTest . DEFAULT_CHARSET ) ; "<AssertPlaceHolder>" ; } read ( ) { throw new java . io . IOException ( "test" ) ; }
org . junit . Assert . assertEquals ( "Test" , result )
testNormalizeSelector2 ( ) { java . lang . String selector = "<sp>h1<sp>,<sp>div<sp>" ; java . lang . String expResult = "h1,div" ; java . lang . String result = org . netbeans . modules . web . inspect . CSSUtils . normalizeSelector ( selector ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expResult , result )
testCreateAndRetrieve ( ) { com . jverstry . Item . MilliTimeItem retr = myService . createAndRetrieve ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( retr )
deveObterIcmsSN201ComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS icms = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMS ( ) ; final com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMSSN201 icmsSetado = new com . fincatto . documentofiscal . nfe400 . classes . nota . NFNotaInfoItemImpostoICMSSN201 ( ) ; icms . setIcmssn201 ( icmsSetado ) ; "<AssertPlaceHolder>" ; } getIcmssn201 ( ) { return this . icmssn201 ; }
org . junit . Assert . assertEquals ( icmsSetado , icms . getIcmssn201 ( ) )
testBasicTypes ( ) { org . teiid . adminapi . impl . ModelMetaData mmd = new org . teiid . adminapi . impl . ModelMetaData ( ) ; mmd . setName ( "m" ) ; mmd . addSourceMapping ( "x3" , "x3" , null ) ; org . teiid . metadata . MetadataStore ms = org . teiid . query . unittest . RealMetadataFactory . exampleBQTStore ( ) ; org . teiid . metadata . Schema s = ms . getSchema ( "BQT1" ) ; org . teiid . metadata . KeyRecord pk = new org . teiid . metadata . KeyRecord ( org . teiid . adminapi . Model . Type . Primary ) ; org . teiid . metadata . Table smalla = s . getTable ( "SmallA" ) ; pk . setName ( "pk" ) ; pk . addColumn ( smalla . getColumnByName ( "IntKey" ) ) ; smalla . setPrimaryKey ( pk ) ; java . lang . String ddl = org . teiid . query . metadata . DDLStringVisitor . getDDLString ( s , java . util . EnumSet . allOf ( org . teiid . adminapi . Admin . SchemaObjectType . class ) , "SmallA" ) ; mmd . addSourceMetadata ( "DDL" , ddl ) ; org . teiid . runtime . HardCodedExecutionFactory hc = buildHardCodedExecutionFactory ( ) ; org . teiid . olingo . TestODataIntegration . teiid . addTranslator ( "x3" , hc ) ; org . teiid . olingo . TestODataIntegration . teiid . deployVDB ( "northwind" , mmd ) ; org . eclipse . jetty . client . api . ContentResponse response = org . teiid . olingo . TestODataIntegration . http . GET ( ( ( org . teiid . olingo . TestODataIntegration . baseURL ) + "/northwind/m/SmallA?$format=json&$select=TimeValue" ) ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; }
org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) )
shouldInvokeBackendWhenPostWithStringParamAndInputStreamParam ( ) { org . apache . http . HttpResponse expectedResponse = mock ( org . ektorp . http . HttpResponse . class , new org . mockito . internal . stubbing . answers . ThrowsException ( new java . lang . UnsupportedOperationException ( ) ) ) ; doReturn ( "mock<sp>expectedResponse" ) . when ( expectedResponse ) . toString ( ) ; doReturn ( null ) . when ( expectedResponse ) . getEntity ( ) ; doReturn ( new org . ektorp . android . http . AndroidHttpClientTest . FakeStatusLine ( ) ) . when ( expectedResponse ) . getStatusLine ( ) ; doReturn ( null ) . when ( expectedResponse ) . getFirstHeader ( "ETag" ) ; org . apache . http . client . HttpClient client = mock ( org . apache . http . client . HttpClient . class , new org . mockito . internal . stubbing . answers . ThrowsException ( new java . lang . UnsupportedOperationException ( ) ) ) ; org . apache . http . client . HttpClient backend = mock ( org . apache . http . client . HttpClient . class , new org . mockito . internal . stubbing . answers . ThrowsException ( new java . lang . UnsupportedOperationException ( ) ) ) ; doReturn ( expectedResponse ) . when ( backend ) . execute ( any ( org . apache . http . client . methods . HttpUriRequest . class ) ) ; org . ektorp . android . http . AndroidHttpClient service = new org . ektorp . android . http . AndroidHttpClient ( client , backend ) ; org . ektorp . http . HttpResponse androidHttpResponse = service . post ( "" , new java . io . ByteArrayInputStream ( new byte [ 0 ] ) ) ; "<AssertPlaceHolder>" ; } post ( java . lang . String , org . apache . http . HttpEntity ) { org . apache . http . client . methods . HttpPost post = new org . apache . http . client . methods . HttpPost ( uri ) ; post . setEntity ( httpEntity ) ; return executeRequest ( post , true ) ; }
org . junit . Assert . assertNotNull ( androidHttpResponse )
invoke_exists ( ) { cache . put ( org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . KEY , org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . VALUE ) ; boolean f = cache . invoke ( org . cache2k . test . core . BasicCacheOperationsWithoutCustomizationsTest . KEY , new org . cache2k . processor . EntryProcessor < java . lang . Integer , java . lang . Integer , java . lang . Boolean > ( ) { @ org . cache2k . test . core . Override public org . cache2k . test . core . Boolean process ( final org . cache2k . processor . MutableCacheEntry < java . lang . Integer , java . lang . Integer > e ) throws java . lang . Exception { return e . exists ( ) ; } } ) ; "<AssertPlaceHolder>" ; } exists ( ) { return exists ; }
org . junit . Assert . assertTrue ( f )
testSimpleEjbModule ( ) { final java . util . List < org . apache . maven . plugins . ear . EarModule > modules = new java . util . ArrayList < org . apache . maven . plugins . ear . EarModule > ( ) ; final org . apache . maven . plugins . ear . EarModule module = new org . apache . maven . plugins . ear . EjbModule ( createArtifact ( "foo" , "ejb" ) ) ; setUri ( module , "foo-1.0.jar" ) ; modules . add ( module ) ; final org . apache . maven . plugins . ear . util . EarMavenArchiver archiver = new org . apache . maven . plugins . ear . util . EarMavenArchiver ( modules ) ; "<AssertPlaceHolder>" ; } generateClassPathEntry ( java . lang . String ) { final java . lang . StringBuilder classpath = new java . lang . StringBuilder ( ) ; for ( final org . apache . maven . plugins . ear . EarModule earModule : earModules ) { if ( ! ( earModule . isExcluded ( ) ) ) { classpath . append ( classPathPrefix ) . append ( earModule . getUri ( ) ) . append ( "<sp>" ) ; } } return classpath . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( "foo-1.0.jar" , archiver . generateClassPathEntry ( "" ) )
getHost ( ) { "<AssertPlaceHolder>" ; } getHost ( ) { return host ; }
org . junit . Assert . assertSame ( this . host , this . context . getHost ( ) )
CommandWithDoubleQuoteTest ( ) { expected . clear ( ) ; expected . add ( "echo" ) ; expected . add ( "Hello!<sp>World" ) ; result = commandline . translateCommandline ( "echo<sp>\"Hello!<sp>World\"" ) ; "<AssertPlaceHolder>" ; } translateCommandline ( java . lang . String ) { if ( ( toProcess == null ) || ( ( toProcess . length ( ) ) == 0 ) ) { return java . util . Collections . emptyList ( ) ; } final int normal = 0 ; final int inQuote = 1 ; final int inDoubleQuote = 2 ; int state = normal ; final java . util . StringTokenizer tok = new java . util . StringTokenizer ( toProcess , "\"\'<sp>" , true ) ; final java . util . ArrayList < java . lang . String > result = new java . util . ArrayList ( ) ; final java . lang . StringBuilder current = new java . lang . StringBuilder ( ) ; boolean lastTokenHasBeenQuoted = false ; while ( tok . hasMoreTokens ( ) ) { java . lang . String nextTok = tok . nextToken ( ) ; switch ( state ) { case inQuote : if ( "\'" . equals ( nextTok ) ) { lastTokenHasBeenQuoted = true ; state = normal ; } else { current . append ( nextTok ) ; } break ; case inDoubleQuote : if ( "\"" . equals ( nextTok ) ) { lastTokenHasBeenQuoted = true ; state = normal ; } else { current . append ( nextTok ) ; } break ; default : if ( "\'" . equals ( nextTok ) ) { state = inQuote ; } else if ( "\"" . equals ( nextTok ) ) { state = inDoubleQuote ; } else if ( "<sp>" . equals ( nextTok ) ) { if ( lastTokenHasBeenQuoted || ( ( current . length ( ) ) != 0 ) ) { result . add ( current . toString ( ) ) ; current . setLength ( 0 ) ; } } else { current . append ( nextTok ) ; } lastTokenHasBeenQuoted = false ; break ; } } if ( lastTokenHasBeenQuoted || ( ( current . length ( ) ) != 0 ) ) { result . add ( current . toString ( ) ) ; } if ( ( state == inQuote ) || ( state == inDoubleQuote ) ) { throw new java . lang . IllegalArgumentException ( ( "unbalanced<sp>quotes<sp>in<sp>" + toProcess ) ) ; } return result ; }
org . junit . Assert . assertEquals ( expected , result )
testDistinguishBetweenInsertAfterAndInsertBeforeToPreserverOrder2 ( ) { org . antlr . v4 . tool . LexerGrammar g = new org . antlr . v4 . tool . LexerGrammar ( ( "lexer<sp>grammar<sp>T;\n" + ( ( "A<sp>:<sp>\'a\';\n" + "B<sp>:<sp>\'b\';\n" ) + "C<sp>:<sp>\'c\';\n" ) ) ) ; java . lang . String input = "aa" ; org . antlr . v4 . runtime . LexerInterpreter lexEngine = g . createLexerInterpreter ( new org . antlr . v4 . runtime . ANTLRInputStream ( input ) ) ; org . antlr . v4 . runtime . CommonTokenStream stream = new org . antlr . v4 . runtime . CommonTokenStream ( lexEngine ) ; stream . fill ( ) ; org . antlr . v4 . runtime . TokenStreamRewriter tokens = new org . antlr . v4 . runtime . TokenStreamRewriter ( stream ) ; tokens . insertBefore ( 0 , "<p>" ) ; tokens . insertBefore ( 0 , "<b>" ) ; tokens . insertAfter ( 0 , "</p>" ) ; tokens . insertAfter ( 0 , "</b>" ) ; tokens . insertBefore ( 1 , "<b>" ) ; tokens . insertAfter ( 1 , "</b>" ) ; java . lang . String result = tokens . getText ( ) ; java . lang . String expecting = "<b><p>a</p></b><b>a</b>" ; "<AssertPlaceHolder>" ; } getText ( ) { return delegate . getText ( ) ; }
org . junit . Assert . assertEquals ( expecting , result )
testDifferentOrders ( ) { edu . ucla . sspace . graph . isomorphism . Graph < edu . ucla . sspace . graph . isomorphism . Edge > g1 = new edu . ucla . sspace . graph . isomorphism . SparseUndirectedGraph ( ) ; g1 . add ( 0 ) ; edu . ucla . sspace . graph . isomorphism . Graph < edu . ucla . sspace . graph . isomorphism . Edge > g2 = new edu . ucla . sspace . graph . isomorphism . SparseUndirectedGraph ( ) ; g2 . add ( 0 ) ; g2 . add ( 1 ) ; edu . ucla . sspace . graph . isomorphism . IsomorphismTester isoTest = new edu . ucla . sspace . graph . isomorphism . TypedVF2IsomorphismTester ( ) ; "<AssertPlaceHolder>" ; } areIsomorphic ( edu . ucla . sspace . graph . isomorphism . Graph , edu . ucla . sspace . graph . isomorphism . Graph ) { edu . ucla . sspace . graph . isomorphism . Graph < ? extends edu . ucla . sspace . graph . isomorphism . Edge > g1mapped = remap ( g1 , null ) ; edu . ucla . sspace . graph . isomorphism . Graph < ? extends edu . ucla . sspace . graph . isomorphism . Edge > g2mapped = remap ( g2 , null ) ; edu . ucla . sspace . graph . isomorphism . State state = makeInitialState ( g1mapped , g2mapped ) ; return match ( state ) ; }
org . junit . Assert . assertFalse ( isoTest . areIsomorphic ( g1 , g2 ) )
whenValidateInputUsingScanner_thenValidated ( ) { final java . lang . String input = "2000" ; final java . io . InputStream stdin = System . in ; java . lang . System . setIn ( new java . io . ByteArrayInputStream ( input . getBytes ( ) ) ) ; final java . util . Scanner scanner = new java . util . Scanner ( System . in ) ; final boolean isIntInput = scanner . hasNextInt ( ) ; "<AssertPlaceHolder>" ; java . lang . System . setIn ( stdin ) ; scanner . close ( ) ; }
org . junit . Assert . assertTrue ( isIntInput )
testBackupDriverCreateTopLevelBackupDest ( ) { java . lang . String [ ] args = new java . lang . String [ ] { "create" , "full" , "hdfs://localhost:1020" , "-t" , "t1" } ; int result = org . apache . hadoop . util . ToolRunner . run ( conf , new org . apache . hadoop . hbase . backup . BackupDriver ( ) , args ) ; "<AssertPlaceHolder>" ; } run ( java . lang . String , java . util . Map , org . apache . hadoop . hbase . TableName ) { java . util . Map < org . apache . hadoop . hbase . tool . LoadIncrementalHFiles . LoadQueueItem , java . nio . ByteBuffer > originRet ; if ( dirPath != null ) { originRet = run ( dirPath , tableName ) ; } else { originRet = run ( map , tableName ) ; } java . util . Map < org . apache . hadoop . hbase . mapreduce . LoadIncrementalHFiles . LoadQueueItem , java . nio . ByteBuffer > ret = new java . util . HashMap ( ) ; originRet . forEach ( ( k , v ) -> { ret . put ( new org . apache . hadoop . hbase . mapreduce . LoadQueueItem ( k . getFamily ( ) , k . getFilePath ( ) ) , v ) ; } ) ; return ret ; }
org . junit . Assert . assertEquals ( 1 , result )
testClassnameConfig ( ) { final com . inspiresoftware . lib . dto . geda . assembler . MethodSynthesizerProxy proxy = new com . inspiresoftware . lib . dto . geda . assembler . MethodSynthesizerProxy ( this . getClass ( ) . getClassLoader ( ) ) ; proxy . configure ( "synthesizerImpl" , com . inspiresoftware . lib . dto . geda . assembler . extension . impl . JavassistMethodSynthesizer . class . getCanonicalName ( ) ) ; final com . inspiresoftware . lib . dto . geda . assembler . extension . MethodSynthesizer syn = proxy . getSynthesizer ( ) ; "<AssertPlaceHolder>" ; } getSynthesizer ( ) { return synthesizer ; }
org . junit . Assert . assertTrue ( ( syn instanceof com . inspiresoftware . lib . dto . geda . assembler . extension . impl . JavassistMethodSynthesizer ) )
protocolleren ( ) { long aantalBerichtenVoor = jdbcTemplate . queryForObject ( "select<sp>count(id)<sp>from<sp>prot.levsaantek" , nl . bzk . brp . delivery . bevraging . gba . ws . Long . class ) ; request ( nl . bzk . brp . delivery . bevraging . gba . ws . Vragen . adresvraag ( 10110 , nl . bzk . brp . delivery . bevraging . gba . ws . Vragen . param ( 81190 , "0626200010016003" ) ) , "001801" ) ; long aantalBerichtenNa = jdbcTemplate . queryForObject ( "select<sp>count(id)<sp>from<sp>prot.levsaantek" , nl . bzk . brp . delivery . bevraging . gba . ws . Long . class ) ; "<AssertPlaceHolder>" ; } param ( int , java . lang . String ) { nl . bzk . brp . delivery . bevraging . gba . ws . vraag . Zoekparameter zoekparameter = new nl . bzk . brp . delivery . bevraging . gba . ws . vraag . Zoekparameter ( ) ; zoekparameter . setRubrieknummer ( rubriek ) ; zoekparameter . setZoekwaarde ( waarde ) ; return zoekparameter ; }
org . junit . Assert . assertEquals ( ( aantalBerichtenVoor + 1 ) , aantalBerichtenNa )
testSort1 ( ) { java . util . List < java . net . InetSocketAddress > expected = java . util . Arrays . asList ( io . netty . resolver . dns . NameServerComparatorTest . IPV4ADDRESS1 , io . netty . resolver . dns . NameServerComparatorTest . IPV4ADDRESS2 , io . netty . resolver . dns . NameServerComparatorTest . IPV6ADDRESS1 , io . netty . resolver . dns . NameServerComparatorTest . IPV6ADDRESS2 , io . netty . resolver . dns . NameServerComparatorTest . UNRESOLVED1 , io . netty . resolver . dns . NameServerComparatorTest . UNRESOLVED2 ) ; java . util . List < java . net . InetSocketAddress > addresses = new java . util . ArrayList < java . net . InetSocketAddress > ( java . util . Arrays . asList ( io . netty . resolver . dns . NameServerComparatorTest . IPV6ADDRESS1 , io . netty . resolver . dns . NameServerComparatorTest . IPV4ADDRESS1 , io . netty . resolver . dns . NameServerComparatorTest . IPV6ADDRESS2 , io . netty . resolver . dns . NameServerComparatorTest . UNRESOLVED1 , io . netty . resolver . dns . NameServerComparatorTest . UNRESOLVED2 , io . netty . resolver . dns . NameServerComparatorTest . IPV4ADDRESS2 ) ) ; io . netty . resolver . dns . NameServerComparator comparator = new io . netty . resolver . dns . NameServerComparator ( java . net . Inet4Address . class ) ; java . util . Collections . sort ( addresses , comparator ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expected , addresses )
checkEqualKeysUsage ( ) { info . smart_tools . smartactors . scope . iscope . IScope scope = new info . smart_tools . smartactors . scope . recursive_scope . Scope ( null ) ; java . lang . Integer number1 = 1 ; java . lang . Integer number2 = 2 ; scope . setValue ( "number" , number1 ) ; scope . setValue ( "number" , number2 ) ; "<AssertPlaceHolder>" ; } getValue ( java . lang . Object ) { java . lang . Object value = storage . get ( key ) ; if ( null == value ) { try { return parent . getValue ( key ) ; } catch ( java . lang . NullPointerException e ) { throw new info . smart_tools . smartactors . scope . iscope . exception . ScopeException ( ( "Value<sp>not<sp>found<sp>for<sp>key<sp>" + key ) , e ) ; } } return value ; }
org . junit . Assert . assertEquals ( scope . getValue ( "number" ) , number2 )
testGetItems ( ) { when ( element . getName ( ) ) . thenReturn ( "MENU-01" ) ; java . util . List < mmarquee . automation . AutomationElement > collection = new java . util . ArrayList ( ) ; collection . add ( new mmarquee . automation . AutomationElement ( elem ) ) ; when ( element . findAll ( any ( ) , any ( ) ) ) . thenReturn ( collection ) ; mmarquee . automation . controls . menu . AutomationMainMenu menu = new mmarquee . automation . controls . menu . AutomationMainMenu ( new mmarquee . automation . controls . ElementBuilder ( element ) . parent ( parent ) ) ; java . util . List < mmarquee . automation . controls . menu . AutomationMenuItem > items = menu . getItems ( ) ; "<AssertPlaceHolder>" ; } getItems ( ) { mmarquee . automation . controls . menu . Menu menu = new mmarquee . automation . controls . menu . Menu ( new mmarquee . automation . controls . ElementBuilder ( element ) ) ; java . util . List < mmarquee . automation . Element > itemElements = new java . util . LinkedList ( ) ; itemElements . add ( targetElement ) ; when ( element . findAll ( mmarquee . automation . BaseAutomationTest . isTreeScope ( TreeScope . CHILDREN ) , any ( ) ) ) . thenReturn ( itemElements ) ; java . util . List < mmarquee . automation . controls . menu . MenuItem > items = menu . getItems ( ) ; org . junit . Assert . assertEquals ( targetElement , items . get ( 0 ) . getElement ( ) ) ; }
org . junit . Assert . assertTrue ( ( ( items . size ( ) ) == 1 ) )
testParseLong1 ( ) { java . lang . String value = "9223372036854775807" ; byte [ ] bytes = value . getBytes ( ) ; long result = org . apache . tomcat . util . buf . Ascii . parseLong ( bytes , 0 , bytes . length ) ; "<AssertPlaceHolder>" ; } valueOf ( int ) { return org . apache . tomcat . util . net . jsse . openssl . Cipher . idMap . get ( java . lang . Integer . valueOf ( cipherId ) ) ; }
org . junit . Assert . assertEquals ( value , java . lang . String . valueOf ( result ) )
testGetDictionaryByVersion ( ) { cfml . dictionary . DictionaryManager . initDictionaries ( ) ; cfml . dictionary . SyntaxDictionary fun = cfml . dictionary . DictionaryManager . getDictionaryByVersion ( fPrefs . getCFDictionary ( ) ) ; System . err . println ( fun . dictionaryURL ) ; java . util . Set wee = fun . getAllTags ( ) ; "<AssertPlaceHolder>" ; } getAllTags ( ) { java . util . ArrayList < net . htmlparser . jericho . Element > allTags = new java . util . ArrayList < net . htmlparser . jericho . Element > ( ) ; java . util . Iterator < java . lang . String > sources = fCfmlSources . keySet ( ) . iterator ( ) ; while ( sources . hasNext ( ) ) { allTags . addAll ( ( ( cfml . parsing . CFMLSource ) ( fCfmlSources . get ( sources . next ( ) ) ) ) . getAllElements ( ) ) ; } return allTags ; }
org . junit . Assert . assertNotNull ( fun )
testIsSatisfiedUnexpectedErrorInByteSan ( ) { org . osgi . framework . Bundle bundle = mock ( org . osgi . framework . Bundle . class ) ; java . util . Map < java . security . cert . X509Certificate , java . util . List < java . security . cert . X509Certificate > > trustedCerts = new java . util . HashMap ( ) ; java . security . cert . X509Certificate key = mock ( java . security . cert . X509Certificate . class ) ; javax . security . auth . x500 . X500Principal principal = new javax . security . auth . x500 . X500Principal ( "CN=test,<sp>OU=Dev,<sp>O=DDF,<sp>ST=AZ,<sp>C=US" ) ; when ( key . getSubjectX500Principal ( ) ) . thenReturn ( principal ) ; java . util . List < java . util . List < ? > > altNames = new java . util . ArrayList ( ) ; java . util . List < java . lang . Object > objects = new java . util . ArrayList ( ) ; objects . add ( 0 ) ; objects . add ( new byte [ 0 ] ) ; altNames . add ( objects ) ; when ( key . getSubjectAlternativeNames ( ) ) . thenReturn ( altNames ) ; trustedCerts . put ( key , new java . util . ArrayList ( ) ) ; when ( bundle . getSignerCertificates ( org . osgi . framework . Bundle . SIGNERS_TRUSTED ) ) . thenReturn ( trustedCerts ) ; org . codice . ddf . condition . SignerCondition principalCondition = new org . codice . ddf . condition . SignerCondition ( bundle , new org . osgi . service . condpermadmin . ConditionInfo ( org . codice . ddf . condition . SignerCondition . class . getName ( ) , new java . lang . String [ ] { "test" } ) ) ; boolean satisfied = principalCondition . isSatisfied ( ) ; "<AssertPlaceHolder>" ; } isSatisfied ( ) { return ! ( java . lang . System . getProperty ( org . codice . ddf . itests . common . annotations . SkipUnstableTest . INCLUDE_UNSTABLE_TESTS_PROPERTY , "false" ) . equals ( "true" ) ) ; }
org . junit . Assert . assertThat ( satisfied , org . hamcrest . core . Is . is ( true ) )
testLessThanRecordThresholdCount ( ) { int thresholdVolume = 5 ; int uploadCheckPeriod = 2000 ; org . kaaproject . kaa . client . logging . LogStorageStatus logStorageStatus = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . logging . LogStorageStatus . class ) ; org . mockito . Mockito . when ( logStorageStatus . getConsumedVolume ( ) ) . thenReturn ( ( ( long ) ( thresholdVolume - 1 ) ) ) ; org . kaaproject . kaa . client . logging . strategies . StorageSizeWithTimeLimitLogUploadStrategy strategy = new org . kaaproject . kaa . client . logging . strategies . StorageSizeWithTimeLimitLogUploadStrategy ( thresholdVolume , uploadCheckPeriod , java . util . concurrent . TimeUnit . MILLISECONDS ) ; "<AssertPlaceHolder>" ; } checkUploadNeeded ( org . kaaproject . kaa . client . logging . LogStorageStatus ) { org . kaaproject . kaa . client . logging . LogUploadStrategyDecision decision = LogUploadStrategyDecision . NOOP ; if ( ( status . getConsumedVolume ( ) ) >= ( volumeThreshold ) ) { org . kaaproject . kaa . client . logging . DefaultLogUploadStrategy . LOG . info ( "Need<sp>to<sp>upload<sp>logs<sp>-<sp>current<sp>size:<sp>{},<sp>threshold:<sp>{}" , status . getConsumedVolume ( ) , volumeThreshold ) ; decision = LogUploadStrategyDecision . UPLOAD ; } else if ( ( status . getRecordCount ( ) ) >= ( countThreshold ) ) { org . kaaproject . kaa . client . logging . DefaultLogUploadStrategy . LOG . info ( "Need<sp>to<sp>upload<sp>logs<sp>-<sp>current<sp>count:<sp>{},<sp>threshold:<sp>{}" , status . getRecordCount ( ) , countThreshold ) ; decision = LogUploadStrategyDecision . UPLOAD ; } return decision ; }
org . junit . Assert . assertEquals ( strategy . checkUploadNeeded ( logStorageStatus ) , LogUploadStrategyDecision . NOOP )
shouldBoardSizeSpecify_whenGameStart ( ) { board = new com . codenjoy . dojo . minesweeper . model . Minesweeper ( v ( 10 ) , v ( com . codenjoy . dojo . minesweeper . model . SapperTheHeroTest . MINES_COUNT ) , v ( com . codenjoy . dojo . minesweeper . model . SapperTheHeroTest . CHARGE_COUNT ) , NO_MINES ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
org . junit . Assert . assertEquals ( 10 , board . size ( ) )
testDefeasibleEntailmentWithStrictOverride ( ) { org . kie . api . runtime . KieSession kSession = getSession ( "org/drools/compiler/beliefsystem/defeasible/strictOverride.drl" ) ; kSession . fireAllRules ( ) ; org . drools . core . common . TruthMaintenanceSystem tms = ( ( org . drools . core . common . NamedEntryPoint ) ( kSession . getEntryPoint ( "DEFAULT" ) ) ) . getTruthMaintenanceSystem ( ) ; org . kie . api . definition . type . FactType Ctype = kSession . getKieBase ( ) . getFactType ( "org.drools.defeasible" , "C" ) ; org . kie . api . definition . type . FactType Xtype = kSession . getKieBase ( ) . getFactType ( "org.drools.defeasible" , "X" ) ; org . drools . core . util . ObjectHashMap keys = tms . getEqualityKeyMap ( ) ; org . drools . core . util . Iterator iter = keys . iterator ( ) ; org . drools . core . util . ObjectHashMap . ObjectEntry entry ; while ( ( entry = ( ( org . drools . core . util . ObjectHashMap . ObjectEntry ) ( iter . next ( ) ) ) ) != null ) { org . drools . core . common . EqualityKey key = ( ( org . drools . core . common . EqualityKey ) ( entry . getValue ( ) ) ) ; java . lang . Class factClass = key . getFactHandle ( ) . getObject ( ) . getClass ( ) ; if ( factClass == ( Ctype . getFactClass ( ) ) ) { checkStatus ( key , 1 , DefeasibilityStatus . DEFINITELY ) ; } else if ( factClass == ( Xtype . getFactClass ( ) ) ) { checkStatus ( key , 1 , DefeasibilityStatus . DEFINITELY ) ; } else { org . junit . Assert . fail ( ( "Unrecognized<sp>object<sp>has<sp>been<sp>logically<sp>justified<sp>:<sp>" + factClass ) ) ; } } "<AssertPlaceHolder>" ; } getObjects ( ) { return null ; }
org . junit . Assert . assertEquals ( 5 , kSession . getObjects ( ) . size ( ) )
failCase3 ( ) { org . openstack . atlas . api . validation . verifiers . VerifierResult result = hostNameVerifier . verify ( "**" ) ; "<AssertPlaceHolder>" ; } passed ( ) { return passed ; }
org . junit . Assert . assertFalse ( result . passed ( ) )
equalityNull ( ) { canvas = new com . opera . core . systems . model . Canvas ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( ( obj == null ) || ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) ) { return false ; } com . opera . core . systems . arguments . OperaArgument other = ( ( com . opera . core . systems . arguments . OperaArgument ) ( obj ) ) ; if ( ( argument ) == null ) { if ( ( other . argument ) != null ) { return false ; } } else if ( ! ( argument . equals ( other . argument ) ) ) { return false ; } return true ; }
org . junit . Assert . assertFalse ( canvas . equals ( null ) )
testAdd ( ) { org . nd4j . linalg . api . ops . executioner . OpExecutioner opExecutioner = org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) ; org . nd4j . linalg . api . ndarray . INDArray x = org . nd4j . linalg . factory . Nd4j . ones ( 5 ) ; org . nd4j . linalg . api . ndarray . INDArray xDup = x . dup ( ) ; org . nd4j . linalg . api . ndarray . INDArray solution = org . nd4j . linalg . factory . Nd4j . valueArrayOf ( 5 , 2.0 ) ; opExecutioner . exec ( new org . nd4j . linalg . api . ops . impl . transforms . pairwise . arithmetic . AddOp ( new org . nd4j . linalg . api . ndarray . INDArray [ ] { x , xDup } , new org . nd4j . linalg . api . ndarray . INDArray [ ] { x } ) ) ; "<AssertPlaceHolder>" ; } getFailureMessage ( ) { return ( ( "Failed<sp>with<sp>backend<sp>" + ( backend . getClass ( ) . getName ( ) ) ) + "<sp>and<sp>ordering<sp>" ) + ( ordering ( ) ) ; }
org . junit . Assert . assertEquals ( getFailureMessage ( ) , solution , x )
injectComposedMetadataKeyIdInstanceInOperation ( ) { org . mule . test . metadata . extension . LocationKey payload = ( ( org . mule . test . metadata . extension . LocationKey ) ( flowRunner ( org . mule . test . module . extension . metadata . SIMPLE_MULTILEVEL_KEY_RESOLVER ) . run ( ) . getMessage ( ) . getPayload ( ) . getValue ( ) ) ) ; org . mule . test . metadata . extension . LocationKey expected = new org . mule . test . metadata . extension . LocationKey ( ) ; expected . setContinent ( org . mule . test . module . extension . metadata . AMERICA ) ; expected . setCountry ( org . mule . test . module . extension . metadata . USA ) ; expected . setCity ( org . mule . test . module . extension . metadata . SAN_FRANCISCO ) ; "<AssertPlaceHolder>" ; } setCity ( java . lang . String ) { this . city = city ; }
org . junit . Assert . assertThat ( payload , org . hamcrest . core . Is . is ( expected ) )