### Question:
TokenAuthorizationResponseHandler implements TokenEndpointResponseHandler { public boolean handlesResponse(final OAuth2Accessor accessor, final HttpResponse response) { if (accessor == null || !accessor.isValid() || accessor.isErrorResponse()) { return false; } return response != null; } @Inject  TokenAuthorizationResponseHandler(final Provider<OAuth2Message> oauth2MessageProvider,
          final OAuth2Store store); OAuth2HandlerError handleResponse(final OAuth2Accessor accessor,
          final HttpResponse response); boolean handlesResponse(final OAuth2Accessor accessor, final HttpResponse response);  }### Answer:
@Test public void testHandlesResponse_1() throws Exception { final OAuth2Accessor accessor = MockUtils.getOAuth2Accessor_Error(); final HttpResponse response = new HttpResponse(); final boolean result = TokenAuthorizationResponseHandlerTest.tarh.handlesResponse(accessor, response); Assert.assertFalse(result); }
@Test public void testHandlesResponse_2() throws Exception { final OAuth2Accessor accessor = MockUtils.getOAuth2Accessor_Code(); final HttpResponse response = null; final boolean result = TokenAuthorizationResponseHandlerTest.tarh.handlesResponse(accessor, response); Assert.assertFalse(result); }
@Test public void testHandlesResponse_3() throws Exception { final OAuth2Accessor accessor = MockUtils.getOAuth2Accessor_Code(); final HttpResponse response = new HttpResponse(); final boolean result = TokenAuthorizationResponseHandlerTest.tarh.handlesResponse(accessor, response); Assert.assertTrue(result); }