@Test public void updatePatientWithNoAccessReturnsForbidden() throws QueryException { this.exception.expect(HttpStatus.of(Response.Status.FORBIDDEN)); when(this.patientsQuery.execute()).thenReturn(Collections.singletonList(PATIENT_ID)); when(this.access.hasAccess(this.currentUser, Right.EDIT, this.patientReference)).thenReturn(false); this.component.updatePatient(EMPTY_JSON, ID_LABEL, ID_VALUE, UPDATE, true); }
@Override public Response updatePatient(final String json, final String label, final String id, final String policy, final boolean create) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, label, id, policyType, create); }
DefaultPatientByLabeledExternalIdentifierResourceImpl extends XWikiResource implements
    PatientByLabeledExternalIdentifierResource { @Override public Response updatePatient(final String json, final String label, final String id, final String policy, final boolean create) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, label, id, policyType, create); } }
DefaultPatientByLabeledExternalIdentifierResourceImpl extends XWikiResource implements
    PatientByLabeledExternalIdentifierResource { @Override public Response updatePatient(final String json, final String label, final String id, final String policy, final boolean create) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, label, id, policyType, create); }  }
DefaultPatientByLabeledExternalIdentifierResourceImpl extends XWikiResource implements
    PatientByLabeledExternalIdentifierResource { @Override public Response updatePatient(final String json, final String label, final String id, final String policy, final boolean create) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, label, id, policyType, create); }  @Override Response getPatient(String label, String id); @Override Response updatePatient(final String json, final String label, final String id,
        final String policy, final boolean create); @Override Response patchPatient(String json, String label, String id, boolean create); @Override Response deletePatient(String label, String id); }
DefaultPatientByLabeledExternalIdentifierResourceImpl extends XWikiResource implements
    PatientByLabeledExternalIdentifierResource { @Override public Response updatePatient(final String json, final String label, final String id, final String policy, final boolean create) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, label, id, policyType, create); }  @Override Response getPatient(String label, String id); @Override Response updatePatient(final String json, final String label, final String id,
        final String policy, final boolean create); @Override Response patchPatient(String json, String label, String id, boolean create); @Override Response deletePatient(String label, String id);  }