InventoryController { @RequestMapping(value = "/inventories", method = RequestMethod.GET) public int getProductInventories() { return 5; }  @RequestMapping(value = "/inventories", method = RequestMethod.GET) int getProductInventories();  }
@Test public void testGetProductInventories() throws Exception { InventoryController inventoryController = new InventoryController(); int numberOfInventories = inventoryController.getProductInventories(); Assert.assertEquals(5, numberOfInventories); }