@Test public void updatePatientCreatesNewPatient() { Response result = this.component.updatePatient(EMPTY_JSON, ID_LABEL, ID_VALUE, UPDATE, true); Assert.assertEquals(Response.Status.CREATED.getStatusCode(), result.getStatus()); verify(this.repository).create(); verify(this.patient).updateFromJSON(any(JSONObject.class), eq(PatientWritePolicy.UPDATE)); }
@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);  }