Fiz a alteração e mesmo assim continuou falhando.
MockHttpServletRequest:
HTTP Method = POST
Request URI = /medicos/cadastro
Parameters = {}
Headers = [Content-Type:"application/json;charset=UTF-8"]
Body =
Session Attrs = {}
Handler:
Type = med.voll.api.controller.MedicoController
Method = med.voll.api.controller.MedicoController#cadastra(DadosCadastroMedico, UriComponentsBuilder)
Async:
Async started = false
Async result = null
Resolved Exception:
Type = org.springframework.http.converter.HttpMessageNotReadableException
ModelAndView:
View name = null
View = null
Model = null
FlashMap:
Attributes = null
MockHttpServletResponse:
Status = 500
Error message = null
Headers = [Content-Type:"text/plain;charset=UTF-8", Content-Length:"286", X-Content-Type-Options:"nosniff", X-XSS-Protection:"0", Cache-Control:"no-cache, no-store, max-age=0, must-revalidate", Pragma:"no-cache", Expires:"0", X-Frame-Options:"DENY"]
Content type = text/plain;charset=UTF-8
Body = Erro: Required request body is missing: public org.springframework.http.ResponseEntity<med.voll.api.domain.medico.DadosDetalhamentoMedico> med.voll.api.controller.MedicoController.cadastra(med.voll.api.domain.medico.DadosCadastroMedico,org.springframework.web.util.UriComponentsBuilder)
Forwarded URL = null
Redirected URL = null
Cookies = []
MockHttpServletRequest:
HTTP Method = POST
Request URI = /medicos/cadastro
Parameters = {}
Headers = [Content-Type:"application/json;charset=UTF-8", Content-Length:"248"]
Body = {"nome":"Medico","email":"medico@voll.med","telefone":"61999999999","crm":"123456","especialidade":"CARDIOLOGIA","endereco":{"logradouro":"rua xpto","bairro":"bairro","cep":"00000000","cidade":"Brasilia","uf":"DF","complemento":null,"numero":null}}
Session Attrs = {}
Handler:
Type = med.voll.api.controller.MedicoController
Method = med.voll.api.controller.MedicoController#cadastra(DadosCadastroMedico, UriComponentsBuilder)
Async:
Async started = false
Async result = null
Resolved Exception:
Type = org.springframework.web.bind.MethodArgumentNotValidException
ModelAndView:
View name = null
View = null
Model = null
FlashMap:
Attributes = null
MockHttpServletResponse:
Status = 400
Error message = null
Headers = [Content-Type:"application/json", X-Content-Type-Options:"nosniff", X-XSS-Protection:"0", 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 = [{"campo":"endereco.cep","mensagem":"must match \"\\d{5}-\\d{3}\""}]
Forwarded URL = null
Redirected URL = null
Cookies = []
2023-09-18T11:41:47.731-03:00 INFO 15940 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2023-09-18T11:41:47.734-03:00 INFO 15940 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2023-09-18T11:41:47.743-03:00 INFO 15940 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.