@Test public void writeJSONWithSelectedFieldsReturnsWhenGetDataReturnsNull() { doReturn(null).when(this.patient).getData(DATA_NAME); JSONObject json = new JSONObject(); Collection<String> selectedFields = new LinkedList<>(); this.component.writeJSON(this.patient, json, selectedFields); Assert.assertEquals(0, json.length()); }
@SuppressWarnings("checkstyle:CyclomaticComplexity") @Override public void writeJSON(Patient patient, JSONObject json) { this.writeJSON(patient, json, null); }
SolvedController implements PatientDataController<SolvedData> { @SuppressWarnings("checkstyle:CyclomaticComplexity") @Override public void writeJSON(Patient patient, JSONObject json) { this.writeJSON(patient, json, null); } }
SolvedController implements PatientDataController<SolvedData> { @SuppressWarnings("checkstyle:CyclomaticComplexity") @Override public void writeJSON(Patient patient, JSONObject json) { this.writeJSON(patient, json, null); }  }
SolvedController implements PatientDataController<SolvedData> { @SuppressWarnings("checkstyle:CyclomaticComplexity") @Override public void writeJSON(Patient patient, JSONObject json) { this.writeJSON(patient, json, null); }  @Override String getName(); @Override PatientData<SolvedData> load(Patient patient); @Override void save(Patient patient); @Override void save(@Nonnull final Patient patient, @Nonnull final PatientWritePolicy policy); @SuppressWarnings("checkstyle:CyclomaticComplexity") @Override void writeJSON(Patient patient, JSONObject json); @Override void writeJSON(Patient patient, JSONObject json, Collection<String> selectedFieldNames); @Override PatientData<SolvedData> readJSON(JSONObject json); }
SolvedController implements PatientDataController<SolvedData> { @SuppressWarnings("checkstyle:CyclomaticComplexity") @Override public void writeJSON(Patient patient, JSONObject json) { this.writeJSON(patient, json, null); }  @Override String getName(); @Override PatientData<SolvedData> load(Patient patient); @Override void save(Patient patient); @Override void save(@Nonnull final Patient patient, @Nonnull final PatientWritePolicy policy); @SuppressWarnings("checkstyle:CyclomaticComplexity") @Override void writeJSON(Patient patient, JSONObject json); @Override void writeJSON(Patient patient, JSONObject json, Collection<String> selectedFieldNames); @Override PatientData<SolvedData> readJSON(JSONObject json);  }