### Question:
GroupEngineClient { public void delete(List<Long> groupIds) { try { groupAPI.deleteGroups(groupIds); } catch (DeletionException e) { throw new APIException(new _("Error when deleting groups"), e); } } protected  GroupEngineClient(GroupAPI groupAPI); Group get(Long groupId); String getPath(String groupId); void delete(List<Long> groupIds); Group update(long groupId, GroupUpdater groupUpdater); Group create(GroupCreator groupCreator);  }### Answer:
@Test public void delete_delete_groups_in_engine_repository() throws Exception { List<Long> groupIds = asList(1L, 2L); groupEngineClient.delete(groupIds); verify(groupAPI).deleteGroups(groupIds); }
@Test(expected = APIException.class) public void delete_throw_APIException_if_an_error_occurs_when_deleting_groups_in_engine_repository() throws Exception { List<Long> groupIds = asList(1L, 2L); doThrow(new DeletionException("error")).when(groupAPI).deleteGroups(groupIds); groupEngineClient.delete(groupIds); }