use of rx.Completable in project feign by OpenFeign.
the class HystrixBuilderTest method rxCompletableEmptyBody.
@Test
public void rxCompletableEmptyBody() {
server.enqueue(new MockResponse());
TestInterface api = target();
Completable completable = api.completable();
assertThat(completable).isNotNull();
assertThat(server.getRequestCount()).isEqualTo(0);
TestSubscriber<String> testSubscriber = new TestSubscriber<String>();
completable.subscribe(testSubscriber);
testSubscriber.awaitTerminalEvent();
testSubscriber.assertCompleted();
testSubscriber.assertNoErrors();
}
Aggregations