Contribution retailerContribution = supplyChain.getContribution("Retailer");
Contribution warehouseContribution = supplyChain.getContribution("Warehouse");
Contribution shipperContribution = supplyChain.getContribution("Shipper");
Contribution supplyChainContribution = supplyChain.getContribution("SupplyChain");
ClassReference customerClassRef = new ClassReference("supplychain.customer.Customer");
customerClassRef = customerContribution.getModelResolver().resolveModel(ClassReference.class, customerClassRef);
Class customerClass = customerClassRef.getJavaClass();
Class customerClassFromContribution = customerContribution.getClassLoader().loadClass("supplychain.customer.Customer");
Assert.assertEquals(customerClass, customerClassFromContribution);
Object customer = supplyChain.getCustomer(customerClass);
Assert.assertTrue(customerClass.isInstance(customer));
ClassReference retailerClassRef = new ClassReference("supplychain.retailer.Retailer");
retailerClassRef = retailerContribution.getModelResolver().resolveModel(ClassReference.class, retailerClassRef);
Class retailerClass = retailerClassRef.getJavaClass();
Class retailerClassFromContribution = retailerContribution.getClassLoader().loadClass("supplychain.retailer.Retailer");
Assert.assertEquals(retailerClass, retailerClassFromContribution);
Class retailerClassFromCustomer = customerContribution.getClassLoader().loadClass("supplychain.retailer.Retailer");
Assert.assertEquals(retailerClass, retailerClassFromCustomer);
ClassReference warehouseClassRef = new ClassReference("supplychain.warehouse.Warehouse");
warehouseClassRef = warehouseContribution.getModelResolver().resolveModel(ClassReference.class, warehouseClassRef);
Class warehouseClass = warehouseClassRef.getJavaClass();
Class warehouseClassFromContribution = warehouseContribution.getClassLoader().loadClass("supplychain.warehouse.Warehouse");
Assert.assertEquals(warehouseClass, warehouseClassFromContribution);
Class warehouseClassFromRetailer = retailerContribution.getClassLoader().loadClass("supplychain.warehouse.Warehouse");
Assert.assertEquals(warehouseClass, warehouseClassFromRetailer);
ClassReference shipperClassRef = new ClassReference("supplychain.shipper.Shipper");
shipperClassRef = shipperContribution.getModelResolver().resolveModel(ClassReference.class, shipperClassRef);
Class shipperClass = shipperClassRef.getJavaClass();
Class shipperClassFromContribution = shipperContribution.getClassLoader().loadClass("supplychain.shipper.Shipper");
Assert.assertEquals(shipperClass, shipperClassFromContribution);
Class shipperClassFromWarehouse = shipperContribution.getClassLoader().loadClass("supplychain.shipper.Shipper");