use of io.github.resilience4j.feign.test.TestServiceFallbackThrowingException in project resilience4j by resilience4j.
the class Resilience4jFeignFallbackFactoryTest method should_go_to_fallback_and_rethrow_an_exception_thrown_in_fallback.
@Test
public void should_go_to_fallback_and_rethrow_an_exception_thrown_in_fallback() {
setupStub(400);
TestService testService = buildTestService(e -> new TestServiceFallbackThrowingException());
Throwable result = catchThrowable(testService::greeting);
assertThat(result).isNotNull().isInstanceOf(RuntimeException.class).hasMessageContaining("Exception in greeting fallback");
verify(1, getRequestedFor(urlPathEqualTo("/greeting")));
}
Aggregations