MockClient implements Client { public void resetRequests() { requests.clear(); } MockClient();  MockClient(boolean sequential); @Override synchronized Response execute(Request request, Request.Options options); MockClient ok(HttpMethod method, String url, InputStream responseBody); MockClient ok(HttpMethod method, String url, String responseBody); MockClient ok(HttpMethod method, String url, byte[] responseBody); MockClient ok(HttpMethod method, String url); MockClient ok(RequestKey requestKey, InputStream responseBody); MockClient ok(RequestKey requestKey, String responseBody); MockClient ok(RequestKey requestKey, byte[] responseBody); MockClient ok(RequestKey requestKey); MockClient add(HttpMethod method, String url, int status, InputStream responseBody); MockClient add(HttpMethod method, String url, int status, String responseBody); MockClient add(HttpMethod method, String url, int status, byte[] responseBody); MockClient add(HttpMethod method, String url, int status); MockClient add(HttpMethod method, String url, Response.Builder response); MockClient add(RequestKey requestKey, int status, InputStream responseBody); MockClient add(RequestKey requestKey, int status, String responseBody); MockClient add(RequestKey requestKey, int status, byte[] responseBody); MockClient add(RequestKey requestKey, int status); MockClient add(RequestKey requestKey, Response.Builder response); @Deprecated MockClient add(HttpMethod method, String url, Response response); MockClient noContent(HttpMethod method, String url); Request verifyOne(HttpMethod method, String url); List<Request> verifyTimes(final HttpMethod method, final String url, final int times); void verifyNever(HttpMethod method, String url); void verifyStatus(); void resetRequests();  }
@Test public void resetRequests() { mockClient.verifyNever(HttpMethod.POST, "/repos/netflix/feign/contributors"); github.create("netflix", "feign", "velo_at_github", "preposterous hacker"); Request result = mockClient.verifyOne(HttpMethod.POST, "/repos/netflix/feign/contributors"); assertThat(result, notNullValue()); mockClient.resetRequests(); mockClient.verifyNever(HttpMethod.POST, "/repos/netflix/feign/contributors"); }