Capture<String> param4Capture = new Capture<String>();
Capture<String> param5Capture = new Capture<String>();
Capture<String> param6Capture = new Capture<String>();
ResourceContext mockResourceContext = EasyMock.createMock(ResourceContext.class);
PathKeys mockPathKeys = EasyMock.createMock(PathKeys.class);
//easy mock for processing param1
EasyMock.expect(mockPathKeys.get(EasyMock.capture(param1Capture))).andReturn(param1Value);
EasyMock.expect(mockResourceContext.getPathKeys()).andReturn(mockPathKeys);
//easy mock for processing param2
EasyMock.expect(mockResourceContext.getParameter(EasyMock.capture(param2Capture))).andReturn(param2Value);
//easy mock for processing param3
EasyMock.expect(mockResourceContext.getStructuredParameter(EasyMock.capture(param3Capture))).andReturn(param3Value);