### Question:
UserEngineClient { public void delete(List<Long> userIds) { try { identityAPI.deleteUsers(userIds); } catch (DeletionException e) { throw new APIException(new _("Error when deleting users"), e); } } UserEngineClient(IdentityAPI identityAPI); User update(long userId, UserUpdater userUpdater); User create(UserCreator creator); User get(long userId); void delete(List<Long> userIds); SearchResult<User> search(SearchOptions searchOptions); List<User> getUsersInGroup(long groupId, int startIndex, int maxResults);  }### Answer:
@Test public void delete_delete_users_in_engine_repository() throws Exception { List<Long> idsToBeDeleted = asList(1L, 2L); userEngineClient.delete(idsToBeDeleted); verify(identityAPI).deleteUsers(idsToBeDeleted); }
@Test(expected = APIException.class) public void delete_throw_APIException_if_exception_occur_when_deleting_users_in_engine_repository() throws Exception { List<Long> idsToBeDeleted = asList(1L, 2L); doThrow(new DeletionException("aMessage")).when(identityAPI).deleteUsers(idsToBeDeleted); userEngineClient.delete(idsToBeDeleted); }