code: private static ValidationResponseType getValidationResponseType(final HttpServletRequest request,
                                                                      final WebApplicationService service) {
          val format = request.getParameter(CasProtocolConstants.PARAMETER_FORMAT);
          final Function<String, ValidationResponseType> func = FunctionUtils.doIf(StringUtils::isNotBlank,
              t -> ValidationResponseType.valueOf(t.toUpperCase()),
              f -> service != null ? service.getFormat() : ValidationResponseType.XML);
          return func.apply(format);
      }
docs: Gets validation response type.
  
  @param request the request
  @param service the service
  @return the validation response type