@Test public void getPatientAccessReturnsSecureAccess() throws ComponentLookupException { EntityPermissionsManager internal = this.mocker.getInstance(EntityPermissionsManager.class); Patient patient = mock(Patient.class); EntityAccess internalAccess = mock(EntityAccess.class); when(internal.getEntityAccess(patient)).thenReturn(internalAccess); PatientAccess result = this.mocker.getComponentUnderTest().getPatientAccess(patient); Assert.assertNotNull(result); Assert.assertTrue(result instanceof SecurePatientAccess); }
@Override public PatientAccess getPatientAccess(Patient targetPatient) { return new SecurePatientAccess(this.internalService.getEntityAccess(targetPatient), this.internalService); }
SecurePermissionsManager implements PermissionsManager { @Override public PatientAccess getPatientAccess(Patient targetPatient) { return new SecurePatientAccess(this.internalService.getEntityAccess(targetPatient), this.internalService); } }
SecurePermissionsManager implements PermissionsManager { @Override public PatientAccess getPatientAccess(Patient targetPatient) { return new SecurePatientAccess(this.internalService.getEntityAccess(targetPatient), this.internalService); }  }
SecurePermissionsManager implements PermissionsManager { @Override public PatientAccess getPatientAccess(Patient targetPatient) { return new SecurePatientAccess(this.internalService.getEntityAccess(targetPatient), this.internalService); }  @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); @Override void fireRightsUpdateEvent(String patientId); }
SecurePermissionsManager implements PermissionsManager { @Override public PatientAccess getPatientAccess(Patient targetPatient) { return new SecurePatientAccess(this.internalService.getEntityAccess(targetPatient), this.internalService); }  @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); @Override void fireRightsUpdateEvent(String patientId);  }