@Test public void retryableCallMustBeParameterized() throws InterruptedException { RetryableCalls retryableCalls = new RetryableCalls(); MockWebServer server = new MockWebServer(); Retrofit retrofit = new Retrofit.Builder() .baseUrl(server.url("/")) .addCallAdapterFactory(retryableCalls.getFactory()) .addConverterFactory(new ToStringConverterFactory()) .build(); UnparameterizedService service = retrofit.create(UnparameterizedService.class); try { service.get(); fail(); } catch (IllegalArgumentException serviceMethodException) { assertThat(serviceMethodException.getCause()).hasMessageThat().isEqualTo( "RetryableCall return type must be parameterized " + "as RetryableCall<Foo> or RetryableCall<? extends Foo>"); } }
public CallAdapter.Factory getFactory() { return factory; }
RetryableCalls { public CallAdapter.Factory getFactory() { return factory; } }
RetryableCalls { public CallAdapter.Factory getFactory() { return factory; }  }
RetryableCalls { public CallAdapter.Factory getFactory() { return factory; }  CallAdapter.Factory getFactory(); void retryAllCalls(); void clearCalls(); }
RetryableCalls { public CallAdapter.Factory getFactory() { return factory; }  CallAdapter.Factory getFactory(); void retryAllCalls(); void clearCalls();  }