### Question:
ProductService implements IProductService { public Product findById(Long id) { Span childSpan = tracer.buildSpan("findById").start(); childSpan.setTag("layer", "Service"); logger.debug("Entering ProductService.findById()"); Product p = repository.findById(id); childSpan.finish(); return p; }  Product findById(Long id);  }### Answer:
@Test public void findByIdExistingTest() { Product p = service.findById(1L); assertThat(p.getId(), equalTo(1L)); assertThat(p.getName(), equalTo("Test")); assertThat(p.getDescription(), equalTo("Test Product")); }
@Test public void findByIdNonExistingTest() { Product p = service.findById(2L); assertThat(p, is(nullValue())); }