### Question:
OfferService { public Iterable<Offer> findAllTheOffersOfAProduct(final long productId) { return offerRepository.findAllByProductId(productId); }  Iterable<Offer> findAllTheOffersOfAProduct(final long productId);  }### Answer:
@Test public void shouldReturnTheOffersOfAProduct() { long productId = 1; List<Offer> offers = OfferFactory.getOffers(productId, 5); when(offerRepository.findAllByProductId(productId)).thenReturn(offers); assertThat(offerService.findAllTheOffersOfAProduct(productId)).isEqualTo(offers); }