Implementation of Set<Contact> getContacts(int... ids) with tests.