@Test public void listVisibilityOptionsWorksAsExpected() throws ComponentLookupException { List<Visibility> visibilities = new ArrayList<>(); visibilities.add(this.privateVisibility); visibilities.add(this.publicVisibility); when(this.entityPermissionsManager.listVisibilityOptions()).thenReturn(visibilities); Collection<Visibility> returnedVisibilities = this.mocker.getComponentUnderTest().listVisibilityOptions(); Assert.assertEquals(2, returnedVisibilities.size()); Iterator<Visibility> it = returnedVisibilities.iterator(); Assert.assertSame(this.privateVisibility, it.next()); Assert.assertSame(this.publicVisibility, it.next()); }
@Override public Collection<Visibility> listVisibilityOptions() { return this.entityPermissionsManager.listVisibilityOptions(); }
DefaultPermissionsManager implements PermissionsManager { @Override public Collection<Visibility> listVisibilityOptions() { return this.entityPermissionsManager.listVisibilityOptions(); } }
DefaultPermissionsManager implements PermissionsManager { @Override public Collection<Visibility> listVisibilityOptions() { return this.entityPermissionsManager.listVisibilityOptions(); }  }
DefaultPermissionsManager implements PermissionsManager { @Override public Collection<Visibility> listVisibilityOptions() { return this.entityPermissionsManager.listVisibilityOptions(); }  @Override Collection<Visibility> listVisibilityOptions(); @Override Collection<Visibility> listAllVisibilityOptions(); @Override Visibility getDefaultVisibility(); @Override Visibility resolveVisibility(String name); @Override Collection<AccessLevel> listAccessLevels(); @Override AccessLevel resolveAccessLevel(String name); @Override PatientAccess getPatientAccess(Patient targetPatient); @Override Collection<Patient> filterByVisibility(Collection<Patient> patients, Visibility requiredVisibility); @Override Iterator<Patient> filterByVisibility(Iterator<Patient> patients, Visibility requiredVisibility); void fireRightsUpdateEvent(String patientId); }
DefaultPermissionsManager implements PermissionsManager { @Override public Collection<Visibility> listVisibilityOptions() { return this.entityPermissionsManager.listVisibilityOptions(); }  @Override Collection<Visibility> listVisibilityOptions(); @Override Collection<Visibility> listAllVisibilityOptions(); @Override Visibility getDefaultVisibility(); @Override Visibility resolveVisibility(String name); @Override Collection<AccessLevel> listAccessLevels(); @Override AccessLevel resolveAccessLevel(String name); @Override PatientAccess getPatientAccess(Patient targetPatient); @Override Collection<Patient> filterByVisibility(Collection<Patient> patients, Visibility requiredVisibility); @Override Iterator<Patient> filterByVisibility(Iterator<Patient> patients, Visibility requiredVisibility); void fireRightsUpdateEvent(String patientId);  }