@Test
public void generateClassInstances() throws Exception {
String[] intfs = {"org.switchyard.component.resteasy.util.support.WarehouseResource"};
Object instance = ClassUtil.generateSingletons(intfs, this).get(0);
Method method = instance.getClass().getMethod("getItem", Integer.class);
Item response = (Item)method.invoke(instance, 1);
Item apple = new Item(1, "Apple");
Assert.assertTrue(response.equals(apple));
method = instance.getClass().getMethod("addItem", Item.class);
Item orange = new Item(2, "Orange");
Assert.assertEquals("[2:Orange]", method.invoke(instance, orange));
method = instance.getClass().getMethod("updateItem", Item.class);
Item grape = new Item(2, "Grape");
Assert.assertEquals("[2:Grape]", method.invoke(instance, grape));
method = instance.getClass().getMethod("removeItem", Integer.class);
//Assert.assertEquals("2", method.invoke(instance, 2));
method = instance.getClass().getMethod("getItemCount");
Assert.assertEquals(0, method.invoke(instance));