I am using two exception mapper, responseexceptionmapper and exceptionmapper. Now I need to have code coverage from these mappers.
Any examples ?
I am using two exception mapper, responseexceptionmapper and exceptionmapper. Now I need to have code coverage from these mappers.
Any examples ?
Thouse are just normal classes,
I can provide an example, but for unit testing you just need to instantiate the mapper as a normal class and invoke the ´toResponse´ method providing an exception to obtain a response a check if satisfy your requirements.
For an integration test, you just will invoke with RestAssured your service and verify if the response contains the status and body that was provided by the ExceptionMapper
what kind of logic are developing inside the mappers ?