@Test public void updatePatientNormalBehaviour() { JSONObject json = new JSONObject(); json.put("id", PATIENT_ID); doReturn(PATIENT_ID).when(this.patient).getId(); Response response = this.patientResource.updatePatient(json.toString(), PATIENT_ID, UPDATE); verify(this.patient).updateFromJSON(any(JSONObject.class), any(PatientWritePolicy.class)); Assert.assertEquals(Status.NO_CONTENT.getStatusCode(), response.getStatus()); }
@Override public Response updatePatient(String json, String id, String policy) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, id, policyType); }
DefaultPatientResourceImpl extends XWikiResource implements PatientResource { @Override public Response updatePatient(String json, String id, String policy) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, id, policyType); } }
DefaultPatientResourceImpl extends XWikiResource implements PatientResource { @Override public Response updatePatient(String json, String id, String policy) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, id, policyType); }  }
DefaultPatientResourceImpl extends XWikiResource implements PatientResource { @Override public Response updatePatient(String json, String id, String policy) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, id, policyType); }  @Override Response getPatient(String id); @Override Response updatePatient(String json, String id, String policy); @Override Response patchPatient(final String json, final String id); @Override Response deletePatient(String id); }
DefaultPatientResourceImpl extends XWikiResource implements PatientResource { @Override public Response updatePatient(String json, String id, String policy) { final PatientWritePolicy policyType = PatientWritePolicy.fromString(policy); return updatePatient(json, id, policyType); }  @Override Response getPatient(String id); @Override Response updatePatient(String json, String id, String policy); @Override Response patchPatient(final String json, final String id); @Override Response deletePatient(String id);  }