OAuth2ValidatorImpl implements OAuth2Validator { protected String validateResponseType(AuthorizationRequest authorizationRequest) { String responseType = authorizationRequest.getResponseType(); if (StringUtils.isBlank(responseType) || !RESPONSE_TYPES.contains(responseType)) { throw new ValidationResponseException(UNSUPPORTED_RESPONSE_TYPE); } return responseType; }  @Override ValidationResponse validate(AuthorizationRequest authorizationRequest); @Override ValidationResponse validate(AccessTokenRequest request, 
      BasicAuthCredentials clientCredentials);  }
@Test public void testValidateResponseType() { request.setResponseType("not-existing-response-type"); validate(ValidationResponse.UNSUPPORTED_RESPONSE_TYPE); }