### Question:
Tokens implements TokenClient { public void generate(ResponseListener<Token> tokenResponseListener, ResponseErrorListener responseErrorListener) { RequestBuilder requestBuilder = new RequestBuilder() .stringRequest(response -> { try { JSONObject jsonObject = new JSONObject(response); tokenResponseListener.onResponse(tokenJsonSerializer.deserialize(jsonObject)); } catch (JSONException e) { responseErrorListener.onErrorResponse(new ServerException("could not parse response ", e)); } }) .setMethod(Request.Method.POST) .setUrl("/tokens") .setErrorListener(error -> { if (error.networkResponse.statusCode >= 500) { responseErrorListener.onErrorResponse(new ServerException("ServerException " + error.networkResponse.statusCode, error)); } else if (error.networkResponse.statusCode >= 400) { responseErrorListener.onErrorResponse(new ClientException("ClientException " + error.networkResponse.statusCode, error)); } }); requestExecutor.execute(requestBuilder); } Tokens(RequestExecutor requestExecutor, TokenJsonSerializer tokenJsonSerializer); void generate(ResponseListener<Token> tokenResponseListener, ResponseErrorListener responseErrorListener);  }### Answer:
@Test public void generate() { tokenClient.generate(null, null); assertTrue(requestExecutor.getRequestBuilder().getUrl().endsWith("/tokens")); assertEquals(requestExecutor.getRequestBuilder().getMethod(), Request.Method.POST); }