### Question:
AssuranceServiceImpl implements AssuranceService { @Override public Response findAssuranceById(UUID id, HttpHeaders headers) { Assurance assurance = assuranceRepository.findById(id); if (assurance == null) { return new Response<>(0, "No Conotent by this id", null); } else { return new Response<>(1, "Find Assurace Success", assurance); } }  @Override Response findAssuranceById(UUID id, HttpHeaders headers); @Override Response findAssuranceByOrderId(UUID orderId, HttpHeaders headers); @Override Response create(int typeIndex, String orderId, HttpHeaders headers); @Override Response deleteById(UUID assuranceId, HttpHeaders headers); @Override Response deleteByOrderId(UUID orderId, HttpHeaders headers); @Override Response modify(String assuranceId, String orderId, int typeIndex, HttpHeaders headers); @Override Response getAllAssurances(HttpHeaders headers); @Override Response getAllAssuranceTypes(HttpHeaders headers);  }### Answer:
@Test public void testFindAssuranceById1() { UUID id = UUID.randomUUID(); Mockito.when(assuranceRepository.findById(id)).thenReturn(null); Response result = assuranceServiceImpl.findAssuranceById(id, headers); Assert.assertEquals(new Response<>(0, "No Conotent by this id", null), result); }
@Test public void testFindAssuranceById2() { UUID id = UUID.randomUUID(); Assurance assurance = new Assurance(id, null, null); Mockito.when(assuranceRepository.findById(id)).thenReturn(assurance); Response result = assuranceServiceImpl.findAssuranceById(id, headers); Assert.assertEquals(new Response<>(1, "Find Assurace Success", assurance), result); }