use of io.github.resilience4j.feign.test.TestFeignDecorator in project resilience4j by resilience4j.
the class DecoratorInvocationHandlerTest method setUp.
@Before
public void setUp() throws Throwable {
target = new HardCodedTarget<TestService>(TestService.class, TestService.class.getSimpleName());
testService = new TestServiceImpl();
greetingMethod = testService.getClass().getDeclaredMethod("greeting");
feignDecorator = new TestFeignDecorator();
methodHandler = mock(MethodHandler.class);
when(methodHandler.invoke(any())).thenReturn(testService.greeting());
dispatch = new HashMap<>();
dispatch.put(greetingMethod, methodHandler);
testSubject = new DecoratorInvocationHandler(target, dispatch, feignDecorator);
}
Aggregations