creator.setNextCreator(new DefaultTypeCreator());
creator.setConfiguration(new Configuration());
tm = new CustomTypeMapping(new DefaultTypeMappingRegistry().createDefaultMappings());
creator.setTypeMapping(tm);
Method method = MyService1.class.getDeclaredMethod("getCollection", new Class[0]);
Type type = creator.createType(method, -1);
assertTrue("type is not a collection", type instanceof CollectionType);
assertEquals("unexpected collection return type for method " + method, Double.class, ((CollectionType)type).getComponentType().getTypeClass());
method = MyService1.class.getDeclaredMethod("getCollection", new Class[]{Integer.TYPE});
type = creator.createType(method, -1);