Capture<String> param3Capture = new Capture<String>();
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);
//easy mock for processing param4
EasyMock.expect(mockResourceContext.getStructuredParameter(EasyMock.capture(param4Capture))).andReturn(param4Value);
//easy mock for processing param5
EasyMock.expect(mockResourceContext.getStructuredParameter(EasyMock.capture(param5Capture))).andReturn(param5Value);
//easy mock for processing param6
EasyMock.expect(mockResourceContext.getStructuredParameter(EasyMock.capture(param6Capture))).andReturn(param6Value);
EasyMock.replay(mockResourceContext, mockPathKeys);
Object[] results = ArgumentBuilder.buildArgs(positionalArguments, parameters, mockResourceContext);
EasyMock.verify(mockPathKeys, mockResourceContext);