@Test public void convertValue() { ReportEntry reportEntry = new ReportEntry("report.key", ReportEntryType.COUNTER, "45"); JsonElement json = converter.convertValue(reportEntry); assertTrue(json instanceof JsonPrimitive); assertEquals(45L, json.getAsLong()); }
@Override public JsonElement convertValue(ReportEntry reportEntry) { long value = Long.valueOf(reportEntry.getValue().toString()); return new JsonPrimitive(value); }
CounterReportValueJsonConverter implements ReportValueJsonConverter { @Override public JsonElement convertValue(ReportEntry reportEntry) { long value = Long.valueOf(reportEntry.getValue().toString()); return new JsonPrimitive(value); } }
CounterReportValueJsonConverter implements ReportValueJsonConverter { @Override public JsonElement convertValue(ReportEntry reportEntry) { long value = Long.valueOf(reportEntry.getValue().toString()); return new JsonPrimitive(value); }  }
CounterReportValueJsonConverter implements ReportValueJsonConverter { @Override public JsonElement convertValue(ReportEntry reportEntry) { long value = Long.valueOf(reportEntry.getValue().toString()); return new JsonPrimitive(value); }  @Override boolean isApplicable(ReportEntryType reportEntryType); @Override JsonElement convertValue(ReportEntry reportEntry); }
CounterReportValueJsonConverter implements ReportValueJsonConverter { @Override public JsonElement convertValue(ReportEntry reportEntry) { long value = Long.valueOf(reportEntry.getValue().toString()); return new JsonPrimitive(value); }  @Override boolean isApplicable(ReportEntryType reportEntryType); @Override JsonElement convertValue(ReportEntry reportEntry);  }