### Question:
CustomerService implements ICustomerService { public Customer findById(Long id) { Span childSpan = tracer.buildSpan("findById").start(); childSpan.setTag("layer", "Service"); logger.debug("Entering CustomerService.findById()"); Customer c = repository.findById(id); childSpan.finish(); return c; }  Customer findById(Long id);  }### Answer:
@Test public void findByIdExistingTest() { Customer c = service.findById(1L); assertThat(c.getId(), equalTo(1L)); assertThat(c.getUsername(), equalTo("mockusername")); assertThat(c.getName(), equalTo("Test User Mock")); assertThat(c.getSurname(), equalTo("Test Surname Mock")); assertThat(c.getAddress(), equalTo("Test Address Mock")); assertThat(c.getZipCode(), equalTo("MOCKZIP")); assertThat(c.getCity(), equalTo("Test City Mock")); assertThat(c.getCountry(), equalTo("Test Country Mock")); }
@Test public void findByIdNonExistingTest() { Customer c = service.findById(2L); assertThat(c, is(nullValue())); }