public class ParameterMappingInterceptorTests extends TestCase {
public void testDefaultParameterMapped() throws Exception {
ParameterMappingInterceptor interceptor = new ParameterMappingInterceptor();
Object handler = new Object();
MockActionRequest request = new MockActionRequest();
MockActionResponse response = new MockActionResponse();
String param = ParameterHandlerMapping.DEFAULT_PARAMETER_NAME;
String value = "someValue";
request.setParameter(param, value);
assertNull(response.getRenderParameter(param));
boolean shouldProceed = interceptor.preHandleAction(request, response, handler);
assertTrue(shouldProceed);
assertNotNull(response.getRenderParameter(param));
assertEquals(value, response.getRenderParameter(param));