/** Test of createResource method, of class IntrospectionModeller. */ @Test public void testCreateResource() { Class<?> resourceClass = HelloWorldResource.class; Resource result = Resource.builder(resourceClass).build(); final List<ResourceMethod> resourceMethods = result.getResourceMethods(); assertEquals( "Unexpected number of resource methods in the resource model.", 2, resourceMethods.size()); ResourceMethod resourceMethod; resourceMethod = find(resourceMethods, "postA"); assertEquals( "Unexpected number of produced media types in the resource method model", 3, resourceMethod.getProducedTypes().size()); assertEquals( "Unexpected number of consumed media types in the resource method model", 2, resourceMethod.getConsumedTypes().size()); resourceMethod = find(resourceMethods, "postB"); assertEquals( "Unexpected number of inherited produced media types in the resource method model", 2, resourceMethod.getProducedTypes().size()); assertEquals( "Unexpected number of inherited consumed media types in the resource method model", 3, resourceMethod.getConsumedTypes().size()); }