|
|
|
@ -85,4 +85,17 @@ public class ExceptionPolarisReporterTest {
|
|
|
|
|
context.setResponse(response);
|
|
|
|
|
exceptionPolarisReporter.run(context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void testHandlerThrowable() {
|
|
|
|
|
// mock request
|
|
|
|
|
Request request = mock(Request.class);
|
|
|
|
|
// mock response
|
|
|
|
|
Response response = mock(Response.class);
|
|
|
|
|
|
|
|
|
|
EnhancedFeignContext context = new EnhancedFeignContext();
|
|
|
|
|
context.setRequest(request);
|
|
|
|
|
context.setResponse(response);
|
|
|
|
|
exceptionPolarisReporter.handlerThrowable(context, new RuntimeException("Mock exception."));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|