### Question:
OfferController { @RequestMapping(path = "/product/{product}", method = RequestMethod.GET) public Iterable<Offer> getProductOffers(@PathVariable("product") long productId) { return offerService.findAllTheOffersOfAProduct(productId); }  @RequestMapping(path = "/product/{product}", method = RequestMethod.GET) Iterable<Offer> getProductOffers(@PathVariable("product") long productId);  }### Answer:
@Test public void shouldReturnTheOffersOfAProduct() { long productId = 1; List<Offer> offers = OfferFactory.getOffers(productId, 5); when(offerService.findAllTheOffersOfAProduct(productId)).thenReturn(offers); assertThat(offerController.getProductOffers(productId)).isEqualTo(offers); }