@Test
public void testRedirectParameter()
{
InjectionAnnotationReader c = new InjectionAnnotationReader();
RequestSessionAction action = new RequestSessionAction();
c.readAnnotations(action.getClass());
Map<String, InjectionWrapper> inputs = c.getInjectionMap();
HttpServletRequest request = EasyMock.createStrictMock(HttpServletRequest.class);
HttpSession session = EasyMock.createStrictMock(HttpSession.class);
Map<String, Object> map = new HashMap<String, Object>();
map.put("redirectParam", new Integer(1));
expect(request.getSession(false)).andReturn(session);
expect(session.getAttribute(InfrastructureKeys.REDIRECT_PARAMETERS)).andReturn(map);
replay(request);
replay(session);
InjectionWrapper inputWrapper = inputs.get("redirectParameter");
ActionContext injectionContext = new TestContextImpl(request);
inputWrapper.inject(action, injectionContext);
verify(request);
verify(session);
assert action.getRedirectParameter() != null;
}