@Test public void testGetRequestParams() throws Exception { Param mockParam = mock(Param.class); Request mockRequest = mock(Request.class); List<Param> mockParamList = new ArrayList<Param>(1); mockParamList.add(mockParam); when(mockRequest.getParams()).thenReturn(mockParamList); Method mockMethod = mock(Method.class); when(mockMethod.getRequest()).thenReturn(mockRequest); List<Param> paramList = WadlHelper.getRequestParams(mockMethod); assertEquals(1, paramList.size()); }
public static List<Param> getRequestParams(final Method method) { if (method == null) { throw new IllegalArgumentException(); } final Request request = method.getRequest(); if (request != null) { return request.getParams(); } else { return Collections.emptyList(); } }
WadlHelper { public static List<Param> getRequestParams(final Method method) { if (method == null) { throw new IllegalArgumentException(); } final Request request = method.getRequest(); if (request != null) { return request.getParams(); } else { return Collections.emptyList(); } } }
WadlHelper { public static List<Param> getRequestParams(final Method method) { if (method == null) { throw new IllegalArgumentException(); } final Request request = method.getRequest(); if (request != null) { return request.getParams(); } else { return Collections.emptyList(); } } private  WadlHelper(); }
WadlHelper { public static List<Param> getRequestParams(final Method method) { if (method == null) { throw new IllegalArgumentException(); } final Request request = method.getRequest(); if (request != null) { return request.getParams(); } else { return Collections.emptyList(); } } private  WadlHelper(); static List<Param> getRequestParams(final Method method); static final String computeId(final Method method, final Resource resource, final Resources resources,
            final Application app, final Stack<Resource> ancestors); static final String titleCase(final String text); static final List<T> reverse(final List<T> strings); static final boolean isVersion(final String step); static final String parseTemplateParam(final String step); static final List<String> toSteps(final Resource resource, final Stack<Resource> ancestors); static final boolean isTemplateParam(final String step); }
WadlHelper { public static List<Param> getRequestParams(final Method method) { if (method == null) { throw new IllegalArgumentException(); } final Request request = method.getRequest(); if (request != null) { return request.getParams(); } else { return Collections.emptyList(); } } private  WadlHelper(); static List<Param> getRequestParams(final Method method); static final String computeId(final Method method, final Resource resource, final Resources resources,
            final Application app, final Stack<Resource> ancestors); static final String titleCase(final String text); static final List<T> reverse(final List<T> strings); static final boolean isVersion(final String step); static final String parseTemplateParam(final String step); static final List<String> toSteps(final Resource resource, final Stack<Resource> ancestors); static final boolean isTemplateParam(final String step);  }