ConsumerATest

4

tests

0

failures

0

ignored

0.958s

duration

100%

successful

Tests

Test Duration Result
validate_should_remove_the_customer_at_given_id() 0.102s passed
validate_should_replace_the_existing_customer_at_given_id() 0.606s passed
validate_should_return_a_well_formatted_existing_customer() 0.130s passed
validate_should_return_the_id_of_created_customer() 0.120s passed

Standard output

2023-05-22 09:13:07.506  INFO 3446 --- [    Test worker] .b.t.c.SpringBootTestContextBootstrapper : Neither @ContextConfiguration nor @ContextHierarchy found for test class [edu.obya.blueprint.customer.cdc.spring.provider.ConsumerATest], using SpringBootContextLoader
2023-05-22 09:13:07.507  INFO 3446 --- [    Test worker] o.s.t.c.support.AbstractContextLoader    : Could not detect default resource locations for test class [edu.obya.blueprint.customer.cdc.spring.provider.ConsumerATest]: no resource found for suffixes {-context.xml, Context.groovy}.
2023-05-22 09:13:07.507  INFO 3446 --- [    Test worker] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [edu.obya.blueprint.customer.cdc.spring.provider.ConsumerATest]: ConsumerATest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
2023-05-22 09:13:07.517  INFO 3446 --- [    Test worker] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration edu.obya.blueprint.Application for test class edu.obya.blueprint.customer.cdc.spring.provider.ConsumerATest
2023-05-22 09:13:07.519  INFO 3446 --- [    Test worker] .b.t.c.SpringBootTestContextBootstrapper : Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.security.test.context.support.WithSecurityContextTestExecutionListener, org.springframework.security.test.context.support.ReactorContextTestExecutionListener, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.event.ApplicationEventsTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener, org.springframework.test.context.event.EventPublishingTestExecutionListener, io.zonky.test.db.EmbeddedDatabaseTestExecutionListener, io.zonky.test.db.event.EventPublishingTestExecutionListener, io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener]
2023-05-22 09:13:07.519  INFO 3446 --- [    Test worker] .b.t.c.SpringBootTestContextBootstrapper : Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@1f7b7ac4, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@19dffe76, org.springframework.test.context.event.ApplicationEventsTestExecutionListener@2086dfb8, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@9a1b870, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@4d484eda, org.springframework.test.context.support.DirtiesContextTestExecutionListener@2b82254b, io.zonky.test.db.EmbeddedDatabaseTestExecutionListener@3d6f549c, io.zonky.test.db.flyway.OptimizedFlywayTestExecutionListener@39090979, org.springframework.test.context.transaction.TransactionalTestExecutionListener@3638ae1c, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@c2a7ded, org.springframework.security.test.context.support.WithSecurityContextTestExecutionListener@4ba61340, org.springframework.test.context.event.EventPublishingTestExecutionListener@3a95898c, org.springframework.security.test.context.support.ReactorContextTestExecutionListener@492e988c, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@16344151, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@6df37cc4, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@7b3c411f, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@46eb5c0c, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener@72e1a349, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@402e48d, io.zonky.test.db.event.EventPublishingTestExecutionListener@1daf79ab]
 ██████╗██╗   ██╗███████╗████████╗ ██████╗ ███╗   ███╗███████╗██████╗ 
██╔════╝██║   ██║██╔════╝╚══██╔══╝██╔═══██╗████╗ ████║██╔════╝██╔══██╗
██║     ██║   ██║███████╗   ██║   ██║   ██║██╔████╔██║█████╗  ██████╔╝
██║     ██║   ██║╚════██║   ██║   ██║   ██║██║╚██╔╝██║██╔══╝  ██╔══██╗
╚██████╗╚██████╔╝███████║   ██║   ╚██████╔╝██║ ╚═╝ ██║███████╗██║  ██║
 ╚═════╝ ╚═════╝ ╚══════╝   ╚═╝    ╚═════╝ ╚═╝     ╚═╝╚══════╝╚═╝  ╚═╝
2023-05-22 09:13:07.558  WARN 3446 --- [    Test worker] ory$DuplicateJsonObjectContextCustomizer : 

Found multiple occurrences of org.json.JSONObject on the class path:

	jar:file:/home/runner/.gradle/caches/modules-2/files-2.1/org.json/json/20220924/5aa95e7688f76c664af205c5937620f02688dfbc/json-20220924.jar!/org/json/JSONObject.class
	jar:file:/home/runner/.gradle/caches/modules-2/files-2.1/com.vaadin.external.google/android-json/0.0.20131108.vaadin1/fa26d351fe62a6a17f5cda1287c1c6110dec413f/android-json-0.0.20131108.vaadin1.jar!/org/json/JSONObject.class

You may wish to exclude one of them to ensure predictable runtime behavior

2023-05-22 09:13:07.560  INFO 3446 --- [    Test worker] e.o.b.c.c.spring.provider.ConsumerATest  : Starting ConsumerATest using Java 17.0.7 on fv-az1256-291 with PID 3446 (started by runner in /home/runner/work/arch-blueprint-java/arch-blueprint-java)
2023-05-22 09:13:07.560  INFO 3446 --- [    Test worker] e.o.b.c.c.spring.provider.ConsumerATest  : The following 1 profile is active: "test"
2023-05-22 09:13:07.930  INFO 3446 --- [    Test worker] trationDelegate$BeanPostProcessorChecker : Bean 'org.zalando.problem.spring.web.autoconfigure.security.ProblemSecurityAutoConfiguration' of type [org.zalando.problem.spring.web.autoconfigure.security.ProblemSecurityAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2023-05-22 09:13:08.518  INFO 3446 --- [    Test worker] s.w.a.s.ProblemSecurityBeanPostProcessor : Register HttpSecurity's exceptionHandling
2023-05-22 09:13:08.689  INFO 3446 --- [    Test worker] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 0 endpoint(s) beneath base path '/admin'
2023-05-22 09:13:08.721  INFO 3446 --- [    Test worker] o.z.p.s.w.a.s.ProblemHttpConfigurer      : Register HttpSecurity's exceptionHandling
2023-05-22 09:13:08.807  INFO 3446 --- [    Test worker] o.s.s.web.DefaultSecurityFilterChain     : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@5bf9c995, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@3200f6e5, org.springframework.security.web.context.SecurityContextPersistenceFilter@18fb5226, org.springframework.security.web.header.HeaderWriterFilter@11f2be38, org.springframework.web.filter.CorsFilter@1703b09a, org.springframework.security.web.authentication.logout.LogoutFilter@59632e3c, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@6402f6b1, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@403a2ed5, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@44bd4b94, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@64476bb5, org.springframework.security.web.session.SessionManagementFilter@4613274d, org.springframework.security.web.access.ExceptionTranslationFilter@31ad368a, org.springframework.security.web.access.intercept.AuthorizationFilter@24d02ed9]
2023-05-22 09:13:09.135  INFO 3446 --- [    Test worker] o.s.c.c.v.m.i.ContractVerifierMessaging  : The message verifier implementation is of type [class org.springframework.cloud.contract.verifier.messaging.noop.NoOpStubMessages]
2023-05-22 09:13:09.164  INFO 3446 --- [    Test worker] e.o.b.c.c.spring.provider.ConsumerATest  : Started ConsumerATest in 1.638 seconds (JVM running for 12.961)
2023-05-22 09:13:09.511  INFO 3446 --- [    Test worker] o.s.mock.web.MockServletContext          : Initializing Spring TestDispatcherServlet ''
2023-05-22 09:13:09.511  INFO 3446 --- [    Test worker] o.s.t.web.servlet.TestDispatcherServlet  : Initializing Servlet ''
2023-05-22 09:13:09.512  INFO 3446 --- [    Test worker] o.s.t.web.servlet.TestDispatcherServlet  : Completed initialization in 1 ms
2023-05-22 09:13:09.711  INFO 3446 --- [    Test worker] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2023-05-22 09:13:09.727  INFO 3446 --- [    Test worker] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.

MockHttpServletRequest:
      HTTP Method = PUT
      Request URI = /customers/64a0f7d1-7b25-412d-b1e0-abacde3c21cd
       Parameters = {}
          Headers = [Content-Type:"application/json", "application/json", Authorization:"Basic dGVzdDp0ZXN0", Content-Length:"70"]
             Body = <no character encoding set>
    Session Attrs = {SPRING_SECURITY_CONTEXT=SecurityContextImpl [Authentication=UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=test, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, credentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=127.0.0.1, SessionId=null], Granted Authorities=[ROLE_USER]]]}

Handler:
             Type = edu.obya.blueprint.customer.adapter.rest.CustomerController
           Method = edu.obya.blueprint.customer.adapter.rest.CustomerController#replace(UUID, CustomerDto)

Async:
    Async started = false
     Async result = null

Resolved Exception:
             Type = null

ModelAndView:
        View name = null
             View = null
            Model = null

FlashMap:
       Attributes = null

MockHttpServletResponse:
           Status = 204
    Error message = null
          Headers = [Vary:"Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers", X-Content-Type-Options:"nosniff", X-XSS-Protection:"1; mode=block", Cache-Control:"no-cache, no-store, max-age=0, must-revalidate", Pragma:"no-cache", Expires:"0", X-Frame-Options:"DENY"]
     Content type = null
             Body = 
    Forwarded URL = null
   Redirected URL = null
          Cookies = []
2023-05-22 09:13:09.799  INFO 3446 --- [    Test worker] o.s.mock.web.MockServletContext          : Initializing Spring TestDispatcherServlet ''
2023-05-22 09:13:09.799  INFO 3446 --- [    Test worker] o.s.t.web.servlet.TestDispatcherServlet  : Initializing Servlet ''
2023-05-22 09:13:09.800  INFO 3446 --- [    Test worker] o.s.t.web.servlet.TestDispatcherServlet  : Completed initialization in 1 ms

MockHttpServletRequest:
      HTTP Method = POST
      Request URI = /customers
       Parameters = {}
          Headers = [Content-Type:"application/json", "application/json", Authorization:"Basic dGVzdDp0ZXN0", Content-Length:"70"]
             Body = <no character encoding set>
    Session Attrs = {SPRING_SECURITY_CONTEXT=SecurityContextImpl [Authentication=UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=test, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, credentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=127.0.0.1, SessionId=null], Granted Authorities=[ROLE_USER]]]}

Handler:
             Type = edu.obya.blueprint.customer.adapter.rest.CustomerController
           Method = edu.obya.blueprint.customer.adapter.rest.CustomerController#create(CustomerDto)

Async:
    Async started = false
     Async result = null

Resolved Exception:
             Type = null

ModelAndView:
        View name = null
             View = null
            Model = null

FlashMap:
       Attributes = null

MockHttpServletResponse:
           Status = 201
    Error message = null
          Headers = [Vary:"Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers", Content-Type:"text/plain", Content-Length:"36", X-Content-Type-Options:"nosniff", X-XSS-Protection:"1; mode=block", Cache-Control:"no-cache, no-store, max-age=0, must-revalidate", Pragma:"no-cache", Expires:"0", X-Frame-Options:"DENY"]
     Content type = text/plain
             Body = 561d643a-9f9e-42f1-aad5-411ad416e6fb
    Forwarded URL = null
   Redirected URL = null
          Cookies = []
2023-05-22 09:13:09.921  INFO 3446 --- [    Test worker] o.s.mock.web.MockServletContext          : Initializing Spring TestDispatcherServlet ''
2023-05-22 09:13:09.922  INFO 3446 --- [    Test worker] o.s.t.web.servlet.TestDispatcherServlet  : Initializing Servlet ''
2023-05-22 09:13:09.922  INFO 3446 --- [    Test worker] o.s.t.web.servlet.TestDispatcherServlet  : Completed initialization in 0 ms

MockHttpServletRequest:
      HTTP Method = DELETE
      Request URI = /customers/64a0f7d1-7b25-412d-b1e0-abacde3c21cd
       Parameters = {}
          Headers = [Authorization:"Basic YWRtaW46YWRtaW4="]
             Body = <no character encoding set>
    Session Attrs = {SPRING_SECURITY_CONTEXT=SecurityContextImpl [Authentication=UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=admin, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, credentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_ADMIN, ROLE_USER]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=127.0.0.1, SessionId=null], Granted Authorities=[ROLE_ADMIN, ROLE_USER]]]}

Handler:
             Type = edu.obya.blueprint.customer.adapter.rest.CustomerController
           Method = edu.obya.blueprint.customer.adapter.rest.CustomerController#remove(UUID)

Async:
    Async started = false
     Async result = null

Resolved Exception:
             Type = null

ModelAndView:
        View name = null
             View = null
            Model = null

FlashMap:
       Attributes = null

MockHttpServletResponse:
           Status = 204
    Error message = null
          Headers = [Vary:"Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers", X-Content-Type-Options:"nosniff", X-XSS-Protection:"1; mode=block", Cache-Control:"no-cache, no-store, max-age=0, must-revalidate", Pragma:"no-cache", Expires:"0", X-Frame-Options:"DENY"]
     Content type = null
             Body = 
    Forwarded URL = null
   Redirected URL = null
          Cookies = []
2023-05-22 09:13:10.025  INFO 3446 --- [    Test worker] o.s.mock.web.MockServletContext          : Initializing Spring TestDispatcherServlet ''
2023-05-22 09:13:10.026  INFO 3446 --- [    Test worker] o.s.t.web.servlet.TestDispatcherServlet  : Initializing Servlet ''
2023-05-22 09:13:10.026  INFO 3446 --- [    Test worker] o.s.t.web.servlet.TestDispatcherServlet  : Completed initialization in 0 ms

MockHttpServletRequest:
      HTTP Method = GET
      Request URI = /customers/64a0f7d1-7b25-412d-b1e0-abacde3c21cd
       Parameters = {}
          Headers = [Authorization:"Basic dGVzdDp0ZXN0"]
             Body = <no character encoding set>
    Session Attrs = {SPRING_SECURITY_CONTEXT=SecurityContextImpl [Authentication=UsernamePasswordAuthenticationToken [Principal=org.springframework.security.core.userdetails.User [Username=test, Password=[PROTECTED], Enabled=true, AccountNonExpired=true, credentialsNonExpired=true, AccountNonLocked=true, Granted Authorities=[ROLE_USER]], Credentials=[PROTECTED], Authenticated=true, Details=WebAuthenticationDetails [RemoteIpAddress=127.0.0.1, SessionId=null], Granted Authorities=[ROLE_USER]]]}

Handler:
             Type = edu.obya.blueprint.customer.adapter.rest.CustomerController
           Method = edu.obya.blueprint.customer.adapter.rest.CustomerController#get(UUID)

Async:
    Async started = false
     Async result = null

Resolved Exception:
             Type = null

ModelAndView:
        View name = null
             View = null
            Model = null

FlashMap:
       Attributes = null

MockHttpServletResponse:
           Status = 200
    Error message = null
          Headers = [Vary:"Origin", "Access-Control-Request-Method", "Access-Control-Request-Headers", Content-Type:"application/json", X-Content-Type-Options:"nosniff", X-XSS-Protection:"1; mode=block", Cache-Control:"no-cache, no-store, max-age=0, must-revalidate", Pragma:"no-cache", Expires:"0", X-Frame-Options:"DENY"]
     Content type = application/json
             Body = {"id":"64a0f7d1-7b25-412d-b1e0-abacde3c21cd","fullName":"John Doe","firstName":"John","lastName":"Doe"}
    Forwarded URL = null
   Redirected URL = null
          Cookies = []