}
@Test
public void testMultiValueQueryParam() throws Exception {
JaxRsHandler handler = HandlerCreator.getHandler(MyResource2.class);
Request requestMock = EasyMock.createNiceMock(Request.class);
Response responseMock = EasyMock.createNiceMock(Response.class);
expect(requestMock.getMethod()).andReturn(Method.GET).anyTimes();
RequestURI requestURI = EasyMock.createNiceMock(RequestURI.class);
expect(requestURI.getPath()).andReturn("/foo").anyTimes();
expect(requestURI.getQuery())
.andReturn("key1=value1&key1=value2&key2=value3&key2=value4")
.anyTimes();
expect(requestMock.getRequestURI()).andReturn(requestURI).anyTimes();
replay(requestMock);
replay(requestURI);
replay(responseMock);
handler.handle(requestMock, responseMock);
assertEquals("value1", handleGetParamValue1.get(0));
assertEquals("value2", handleGetParamValue1.get(1));
assertEquals(2, handleGetParamValue1.size());
assertEquals("value3", handleGetParamValue2.get(0).getValue());
assertEquals("value4", handleGetParamValue2.get(1).getValue());