@Test
public void testFromStringParameters() throws Exception {
Class<?>[] argType = {UUID.class, CustomerGender.class, CustomerGender.class};
Method m = Customer.class.getMethod("testFromStringParam", argType);
UUID u = UUID.randomUUID();
Message messageImpl = createMessage();
messageImpl.put(Message.QUERY_STRING, "p1=" + u.toString() + "&p2=1&p3=2");
List<Object> params = JAXRSUtils.processParameters(new OperationResourceInfo(m,
new ClassResourceInfo(Customer.class)),
null,
messageImpl);
assertEquals(3, params.size());
assertEquals("Query UUID Parameter was not matched correctly",
u.toString(), params.get(0).toString());
assertSame(CustomerGender.FEMALE, params.get(1));
assertSame(CustomerGender.MALE, params.get(2));
}