Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The MockClient offers the possibility to prepare an unsupported version response with MockClient#prepareUnsupportedVersionResponse. That method accepts a RequestMatcher but it is never applied. It should be or we should remove the matcher from the method.
UnsupportedVersionException unsupportedVersionException = null; if (futureResp.isUnsupportedRequest) { unsupportedVersionException = new UnsupportedVersionException( "Api " + request.apiKey() + " with version " + version); } else { AbstractRequest abstractRequest = request.requestBuilder().build(version); if (!futureResp.requestMatcher.matches(abstractRequest)) throw new IllegalStateException("Request matcher did not match next-in-line request " + abstractRequest + " with prepared response " + futureResp.responseBody); } ClientResponse resp = new ClientResponse(request.makeHeader(version), request.callback(), request.destination(), request.createdTimeMs(), time.milliseconds(), futureResp.disconnected, unsupportedVersionException, null, futureResp.responseBody);