### Question:
AuthorizableWrapperImpl implements AuthorizableWrapper { @Override public Iterator<Authorizable> getDeclaredMembers() { try { if (authorizable.isGroup()) { return ((Group) authorizable).getDeclaredMembers(); } else { List<Authorizable> empty = Collections.emptyList(); return empty.iterator(); } } catch (RepositoryException e) { log.error("Failed to get declared members of authorizable: {}", authorizable, e); return Collections.emptyIterator(); } } AuthorizableWrapperImpl(ResourceResolver resolver);  AuthorizableWrapperImpl(Resource resource); @Override Authorizable getAuthorizable(); @Override Iterator<Authorizable> getDeclaredMembers(); @Override Iterator<Group> getDeclaredMembership(); @Override Iterator<String> getGroupNames(); @Override String getId(); @Override Iterator<Authorizable> getMembers(); @Override Iterator<Group> getMembership(); @Override boolean isAdministrator(); @Override boolean isMember(String groupName);  }### Answer:
@Test public void testGetDeclaredMembers() throws AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException { AuthorizableWrapper authWrapper = new AuthorizableWrapperImpl(group2Resource); Iterator<Authorizable> members = authWrapper.getDeclaredMembers(); assertTrue(members.hasNext()); assertEquals(1, SlingCMSTestHelper.toStream(members).count()); authWrapper = new AuthorizableWrapperImpl(throwyResource); assertFalse(authWrapper.getDeclaredMembers().hasNext()); authWrapper = new AuthorizableWrapperImpl(adminResource); assertFalse(authWrapper.getDeclaredMembers().hasNext()); }