@Test public void emptyRecordsPayload() throws Exception { List<OperationalDataRecord> recordList = new ArrayList<>(); OperationalDataRecords records = new OperationalDataRecords(recordList); recordList.add(new OperationalDataRecord()); recordList.add(new OperationalDataRecord()); assertEquals("{\"records\":[{},{}]}", records.getPayload(GSON)); }
String getPayload(Gson gson) { return gson.toJson(this); }
OperationalDataRecords { String getPayload(Gson gson) { return gson.toJson(this); } }
OperationalDataRecords { String getPayload(Gson gson) { return gson.toJson(this); } OperationalDataRecords(List<OperationalDataRecord> records); }
OperationalDataRecords { String getPayload(Gson gson) { return gson.toJson(this); } OperationalDataRecords(List<OperationalDataRecord> records);  }
OperationalDataRecords { String getPayload(Gson gson) { return gson.toJson(this); } OperationalDataRecords(List<OperationalDataRecord> records);   }