@Test public void testGetProduct() { String title = "The Product Title."; int inventories = 5; when(informationClient.getProductTitle()).thenReturn(title); when(inventoryClient.getProductInventories()).thenReturn(inventories); Product testProduct = aggregator.getProduct(); assertEquals(title, testProduct.getTitle()); assertEquals(inventories, testProduct.getProductInventories()); }
@RequestMapping("/product") public Product getProduct() { Product product = new Product(); product.setTitle(informationClient.getProductTitle()); product.setProductInventories(inventoryClient.getProductInventories()); return product; }
Aggregator { @RequestMapping("/product") public Product getProduct() { Product product = new Product(); product.setTitle(informationClient.getProductTitle()); product.setProductInventories(inventoryClient.getProductInventories()); return product; } }
Aggregator { @RequestMapping("/product") public Product getProduct() { Product product = new Product(); product.setTitle(informationClient.getProductTitle()); product.setProductInventories(inventoryClient.getProductInventories()); return product; }  }
Aggregator { @RequestMapping("/product") public Product getProduct() { Product product = new Product(); product.setTitle(informationClient.getProductTitle()); product.setProductInventories(inventoryClient.getProductInventories()); return product; }  @RequestMapping("/product") Product getProduct(); }
Aggregator { @RequestMapping("/product") public Product getProduct() { Product product = new Product(); product.setTitle(informationClient.getProductTitle()); product.setProductInventories(inventoryClient.getProductInventories()); return product; }  @RequestMapping("/product") Product getProduct();  }