CustomerDetailsController { @RequestMapping(value = "customers/{customerId}", method = RequestMethod.GET) public String getCustomerDetailsPage(@PathVariable("customerId") String customerId, Model model) { Customer customer = customerService.findCustomerByCustomerId(Integer.parseInt(customerId)); model.addAttribute("customer", customer); return "customers/customerDetails"; }  @RequestMapping(value = "customers/{customerId}", method = RequestMethod.GET) String getCustomerDetailsPage(@PathVariable("customerId") String customerId, Model model);  }
@Test public void testGetCustomerDetailsPage() { Mockito.when(customerService.findCustomerByCustomerId(Matchers.anyInt())) .thenReturn(new Customer()); assertEquals("customers/customerDetails", customerDetailsController.getCustomerDetailsPage("1", new BindingAwareModelMap())); }