ActionExtractorsResolver { public ActionExtractorsContainer resolveParameterExtractors() { Map<Class, ActionParameterExtractor> extractors = new HashMap<Class, ActionParameterExtractor>(); resolveDefaultParameterExtractors(extractors); resolveCustomParameterExtractors(extractors); ActionExtractorsContainer actionExtractorsContainer = new ActionExtractorsContainer(); actionExtractorsContainer.setParameterExtractors(extractors); return actionExtractorsContainer; }  ActionExtractorsContainer resolveParameterExtractors();  }
@Test public void resolveBuiltInParameterExtractors() throws Exception { ActionExtractorsContainer extractorsContainer = actionExtractorsResolver.resolveParameterExtractors(); ActionParameterExtractor defaultObjectExtractor = extractorsContainer.getParameterExtractor(Object.class); assertNotNull(defaultObjectExtractor); assertTrue(defaultObjectExtractor.isDeserializationRequired()); ActionParameterExtractor connectorExtractor = extractorsContainer.getParameterExtractor(BaseUserContext.class); assertNotNull(connectorExtractor); assertFalse(connectorExtractor.isDeserializationRequired()); }
@Test public void resolveCustomParameterExtractor() throws Exception { ActionExtractorsContainer extractorsContainer = actionExtractorsResolver.resolveParameterExtractors(); ActionParameterExtractor customBeanExtractor = extractorsContainer.getParameterExtractor(NonDefaultSerializedMockBean.class); assertNotNull(customBeanExtractor); assertTrue(customBeanExtractor instanceof SimpleMockParameterExtractor); assertTrue(customBeanExtractor.isDeserializationRequired()); }