@Test
public void testBuild() throws Exception {
// Configure the Supplier
Role supplierRole = DatabaseLoader.buildSupplierRole();
User steveUser = DatabaseLoader.buildSteveSupplier(supplierRole);
BigMoney unitPrice = MoneyUtils.parse("GBP 1.23");
// Configure some PricingRules
PricingRule pricingRule = DatabaseLoader.buildPresetMarginPricingRule();
BigMoney price = PriceBuilder
.newInstance()
.withSupplier(steveUser.getSupplier())
.withPricingRule(pricingRule)
.withStartingPrice(unitPrice)
.build();
assertEquals("GBP 1.476",price.toString());