ParameterResolver { public ActionParameterInformation prepareActionParameter(Type parameterType, Annotation[] parameterAnnotations) { ActionParameterInformation parameterInformation = new ActionParameterInformation(parameterType, parameterAnnotations); resolveParamExtractor(parameterInformation, parameterType); resolveParameterDetails(parameterInformation, parameterType, parameterAnnotations); return parameterInformation; }  ActionParameterInformation prepareActionParameter(Type parameterType, Annotation[] parameterAnnotations);  }
@Test public void testDefault() throws NoSuchMethodException { Method defaultAction = SimpleActionClass.class.getMethod("executeDefault", BaseUserContext.class, String.class); Type[] parameters = defaultAction.getGenericParameterTypes(); Type userParameter = parameters[0]; Annotation[] userParameterAnnotations = defaultAction.getParameterAnnotations()[0]; ActionParameterInformation parameterInformation = parameterResolver.prepareActionParameter(userParameter, userParameterAnnotations); assertFalse(parameterInformation.getExtractor().isDeserializationRequired()); }
@Test public void parameterWithBindAnnotation() throws NoSuchMethodException { Method defaultAction = SimpleActionClass.class.getMethod("nonDefaultAction", String.class); Type[] parameters = defaultAction.getGenericParameterTypes(); Type connectorParameter = parameters[0]; Annotation[] connectorParameterAnnotations = defaultAction.getParameterAnnotations()[0]; ActionParameterInformation parameterInformation = parameterResolver.prepareActionParameter(connectorParameter, connectorParameterAnnotations); assertTrue(parameterInformation.getExtractor().isDeserializationRequired()); }