use of feign.QueryMapEncoder in project feign by OpenFeign.
the class ReactiveFeignIntegrationTest method testQueryMapEncoders.
@Test
public void testQueryMapEncoders() {
this.webServer.enqueue(new MockResponse().setBody("No Results Found"));
QueryMapEncoder encoder = mock(QueryMapEncoder.class);
given(encoder.encode(any(Object.class))).willReturn(Collections.emptyMap());
TestReactiveXService service = RxJavaFeign.builder().queryMapEncoder(encoder).target(TestReactiveXService.class, this.getServerUrl());
StepVerifier.create(service.search(new SearchQuery())).expectNext("No Results Found").expectComplete().verify();
verify(encoder, times(1)).encode(any(Object.class));
}
Aggregations