RequestUtils { public static List<String> getUrlParams(WebloungeRequest request, Action action) { List<String> urlparams = new ArrayList<String>(); String path = request.getUrl().getPath(); String actionMountpoint = action.getPath(); String[] params = path.substring(actionMountpoint.length()).split("/"); for (int i = 0; i < params.length; i++) { urlparams.add(params[i]); } return urlparams; } private  RequestUtils(); static boolean containsAction(WebloungeRequest request); static String dumpHeaders(WebloungeRequest request); static String dumpParameters(WebloungeRequest request); static String getRequestedUrlExtension(WebloungeRequest request,
      Action action); static List<String> getRequestedUrlParams(WebloungeRequest request,
      Action action); static String getUrlExtension(WebloungeRequest request, Action action); static List<String> getUrlParams(WebloungeRequest request,
      Action action); static String getParameter(WebloungeRequest request, String parameter); static String getParameter(WebloungeRequest request, Action action,
      int index); static String getParameterWithDefault(WebloungeRequest request,
      String parameter, String defaultValue); static String getParameterWithDefault(WebloungeRequest request,
      Action action, int index, String defaultValue); static String getRequiredParameter(WebloungeRequest request,
      String parameter); static String getRequiredParameter(WebloungeRequest request,
      Action action, int parameter); static String getParameterWithDecoding(WebloungeRequest request,
      String parameter, String decoding); static boolean parameterExists(WebloungeRequest request,
      String parameter); static boolean parameterExists(WebloungeRequest request,
      Action action, int parameter); static short getShortParameter(WebloungeRequest request,
      String parameterName); static short getShortParameter(WebloungeRequest request,
      Action action, int parameter); static short getShortParameterWithDefault(WebloungeRequest request,
      String parameterName, short defaultValue); static short getShortParameterWithDefault(WebloungeRequest request,
      Action action, int index, short defaultValue); static short getRequiredShortParameter(WebloungeRequest request,
      String parameterName); static short getRequiredShortParameter(WebloungeRequest request,
      Action action, int index); static int getIntegerParameter(WebloungeRequest request,
      String parameterName); static int getIntegerParameterWithDefault(WebloungeRequest request,
      String parameterName, int defaultValue); static int getIntegerParameterWithDefault(WebloungeRequest request,
      Action action, int index, int defaultValue); static int getRequiredIntegerParameter(WebloungeRequest request,
      String parameterName); static int getRequiredIntegerParameter(WebloungeRequest request,
      Action action, int index); static long getLongParameter(WebloungeRequest request,
      String parameterName); static long getLongParameterWithDefault(WebloungeRequest request,
      String parameterName, long defaultValue); static long getLongParameterWithDefault(WebloungeRequest request,
      Action action, int index, long defaultValue); static long getRequiredLongParameter(WebloungeRequest request,
      String parameterName); static long getRequiredLongParameter(WebloungeRequest request,
      Action action, int index); static float getFloatParameter(WebloungeRequest request,
      String parameterName); static float getFloatParameterWithDefault(WebloungeRequest request,
      String parameterName, float defaultValue); static float getFloatParameterWithDefault(WebloungeRequest request,
      Action action, int index, float defaultValue); static float getRequiredFloatParameter(WebloungeRequest request,
      String parameterName); static float getRequiredFloatParameter(WebloungeRequest request,
      Action action, int index); static boolean getBooleanParameter(WebloungeRequest request,
      String parameterName); static boolean isEditingState(WebloungeRequest request); static boolean getBooleanParameterWithDefault(
      WebloungeRequest request, String parameterName, boolean defaultValue); static boolean getBooleanParameterWithDefault(
      WebloungeRequest request, Action action, int index, boolean defaultValue); static boolean getRequiredBooleanParameter(WebloungeRequest request,
      String parameterName); static boolean getRequiredBooleanParameter(WebloungeRequest request,
      Action action, int index); static Date getDateParameter(WebloungeRequest request,
      String parameterName); static Date getDateParameterWithDefault(WebloungeRequest request,
      String parameterName, Date defaultValue); static Date getDateParameterWithDefault(WebloungeRequest request,
      Action action, int index, Date defaultValue); static Date getRequiredDateParameter(WebloungeRequest request,
      String parameterName); static Date getRequiredDateParameter(WebloungeRequest request,
      Action action, int index); static void requireAny(WebloungeRequest request, String[] parameters); static boolean isMockRequest(ServletRequest request); static boolean isPrecompileRequest(ServletRequest request); static boolean isCausedByClient(IOException e);  }
@Test @Ignore public void testGetUrlParams() { List<String> urlParams = RequestUtils.getUrlParams(request, action); assertEquals(URL_PARAM_1, urlParams.get(0)); assertEquals(URL_PARAM_2, urlParams.get(1)); }