Currently i have to rewrite the mock rule to verify the number of calls. I.e.:
mock.onPost().withPath(Matchers.containsString("/something")).doReturn(HttpStatus.SC_OK, "777");
[...]
mock.verify().post().withPath(Matchers.containsString("/something")).called(1);
Especially when using complex rules this is time consuming and a maintenance issue.
I would like to reuse the rule, for example like this:
HttpClientResponseBuilder builder = mock.onPost().withPath(Matchers.containsString("/something")).doReturn(HttpStatus.SC_OK, "777");;
[...]
mock.verify(builder).called(1);