assertEquals(String.class, c.getParameterTypes()[1]);
}
@Test
public void testClassResourceInfoUserResource() throws Exception {
UserResource ur = new UserResource();
ur.setName(HashMap.class.getName());
ur.setPath("/hashmap");
UserOperation op = new UserOperation();
op.setPath("/key/{id}");
op.setName("get");
op.setVerb("POST");
op.setParameters(Collections.singletonList(new Parameter(ParameterType.PATH, "id")));
ur.setOperations(Collections.singletonList(op));
Map<String, UserResource> resources = new HashMap<String, UserResource>();
resources.put(ur.getName(), ur);
ClassResourceInfo cri = ResourceUtils.createClassResourceInfo(resources, ur, true, true);
assertNotNull(cri);
assertEquals("/hashmap", cri.getURITemplate().getValue());
Method method =
HashMap.class.getMethod("get", new Class[]{Object.class});