### Question:
CheckClientResponseAspect { @AfterReturning(value = "@annotation(org.opengroup.osdu.ingest.aspect.CheckClientResponse)", returning = "response") public void checkResponse(feign.Response response) { try { HttpStatus httpStatus = HttpStatus.valueOf(response.status()); if (httpStatus.isError()) { String errorMessage = IOUtils.toString(response.body().asInputStream(), "utf-8"); log.error("Client exception status - {}, message - {}", httpStatus, errorMessage); switch (httpStatus.value()) { case 400: throw new BadRequestException(errorMessage); case 401: throw new UnauthorizedException(errorMessage); case 403: throw new ForbiddenException(errorMessage); case 404: throw new NotFoundException(errorMessage); case 500: throw new ServerErrorException(errorMessage); default: throw new CoreException(errorMessage); } } } catch (IOException exception) { throw new OsduRuntimeException("Exception in check client response aspect", exception); } }  @AfterReturning(value = "@annotation(org.opengroup.osdu.ingest.aspect.CheckClientResponse)", returning = "response") void checkResponse(feign.Response response);  }### Answer:
@Test void shouldPassIfStatusIsOk() { Response response = Response.builder() .body("response body", StandardCharsets.UTF_8) .request(getFeignRequest()) .status(200).build(); Throwable thrown = catchThrowable(() -> aspect.checkResponse(response)); then(thrown).isNull(); }