### Question:
ContactsServiceImpl implements ContactsService { @Override public Response findContactsByAccountId(UUID accountId, HttpHeaders headers) { ArrayList<Contacts> arr = contactsRepository.findByAccountId(accountId); ContactsServiceImpl.LOGGER.info("[Contacts-Query-Service][Query-Contacts] Result Size: {}", arr.size()); return new Response<>(1, success, arr); }  @Override Response findContactsById(UUID id, HttpHeaders headers); @Override Response findContactsByAccountId(UUID accountId, HttpHeaders headers); @Override Response createContacts(Contacts contacts, HttpHeaders headers); @Override Response create(Contacts addContacts, HttpHeaders headers); @Override Response delete(UUID contactsId, HttpHeaders headers); @Override Response modify(Contacts contacts, HttpHeaders headers); @Override Response getAllContacts(HttpHeaders headers);  }### Answer:
@Test public void testFindContactsByAccountId() { UUID accountId = UUID.randomUUID(); ArrayList<Contacts> arr = new ArrayList<>(); Mockito.when(contactsRepository.findByAccountId(Mockito.any(UUID.class))).thenReturn(arr); Response result = contactsServiceImpl.findContactsByAccountId(accountId, headers); Assert.assertEquals(new Response<>(1, "Success", arr), result); }