@Test public void appendReportEntry_REPLACE_ALREADY_EXISTING_NODE() throws IOException { ReportEntry reportEntry = new ReportEntry("property1.propertyB", ReportEntryType.COUNTER, "21"); when(reportValueConverterManager.convertValue(reportEntry)).thenReturn(new JsonPrimitive(21)); jsonAppender.appendReportEntry(jsonReport, reportEntry); JsonObject expectedJson = readJsonFromClasspath("/eu/dnetlib/iis/common/report/report_after_replaced_node.json"); assertEquals(expectedJson, jsonReport); }
public void appendReportEntry(JsonObject jsonReport, ReportEntry reportEntry) { String[] jsonFieldHierarchy = StringUtils.split(reportEntry.getKey().toString(), '.'); insertValue(jsonReport, Lists.newArrayList(jsonFieldHierarchy), reportValueJsonConverterManager.convertValue(reportEntry)); }
ReportEntryJsonAppender { public void appendReportEntry(JsonObject jsonReport, ReportEntry reportEntry) { String[] jsonFieldHierarchy = StringUtils.split(reportEntry.getKey().toString(), '.'); insertValue(jsonReport, Lists.newArrayList(jsonFieldHierarchy), reportValueJsonConverterManager.convertValue(reportEntry)); } }
ReportEntryJsonAppender { public void appendReportEntry(JsonObject jsonReport, ReportEntry reportEntry) { String[] jsonFieldHierarchy = StringUtils.split(reportEntry.getKey().toString(), '.'); insertValue(jsonReport, Lists.newArrayList(jsonFieldHierarchy), reportValueJsonConverterManager.convertValue(reportEntry)); }  }
ReportEntryJsonAppender { public void appendReportEntry(JsonObject jsonReport, ReportEntry reportEntry) { String[] jsonFieldHierarchy = StringUtils.split(reportEntry.getKey().toString(), '.'); insertValue(jsonReport, Lists.newArrayList(jsonFieldHierarchy), reportValueJsonConverterManager.convertValue(reportEntry)); }  void appendReportEntry(JsonObject jsonReport, ReportEntry reportEntry); }
ReportEntryJsonAppender { public void appendReportEntry(JsonObject jsonReport, ReportEntry reportEntry) { String[] jsonFieldHierarchy = StringUtils.split(reportEntry.getKey().toString(), '.'); insertValue(jsonReport, Lists.newArrayList(jsonFieldHierarchy), reportValueJsonConverterManager.convertValue(reportEntry)); }  void appendReportEntry(JsonObject jsonReport, ReportEntry reportEntry);  }