@Test public void convertEmptyJsonToReportPojosTest() throws CluecumberPluginException { String json = ""; Report[] reports = pojoConverter.convertJsonToReportPojos(json); assertThat(reports, is(nullValue())); }
public Report[] convertJsonToReportPojos(final String json) throws CluecumberPluginException { Report[] reports; try { reports = gsonParserWithProcessors.fromJson(json, Report[].class); } catch (JsonParseException e) { throw new CluecumberPluginException(e.getMessage()); } return reports; }
JsonPojoConverter { public Report[] convertJsonToReportPojos(final String json) throws CluecumberPluginException { Report[] reports; try { reports = gsonParserWithProcessors.fromJson(json, Report[].class); } catch (JsonParseException e) { throw new CluecumberPluginException(e.getMessage()); } return reports; } }
JsonPojoConverter { public Report[] convertJsonToReportPojos(final String json) throws CluecumberPluginException { Report[] reports; try { reports = gsonParserWithProcessors.fromJson(json, Report[].class); } catch (JsonParseException e) { throw new CluecumberPluginException(e.getMessage()); } return reports; } @Inject  JsonPojoConverter(
            final ReportJsonPostProcessor reportJsonPostProcessor,
            final ElementJsonPostProcessor elementJsonPostProcessor
    ); }
JsonPojoConverter { public Report[] convertJsonToReportPojos(final String json) throws CluecumberPluginException { Report[] reports; try { reports = gsonParserWithProcessors.fromJson(json, Report[].class); } catch (JsonParseException e) { throw new CluecumberPluginException(e.getMessage()); } return reports; } @Inject  JsonPojoConverter(
            final ReportJsonPostProcessor reportJsonPostProcessor,
            final ElementJsonPostProcessor elementJsonPostProcessor
    ); List<Report> readJsonStream(InputStream in); Report[] convertJsonToReportPojos(final String json); }
JsonPojoConverter { public Report[] convertJsonToReportPojos(final String json) throws CluecumberPluginException { Report[] reports; try { reports = gsonParserWithProcessors.fromJson(json, Report[].class); } catch (JsonParseException e) { throw new CluecumberPluginException(e.getMessage()); } return reports; } @Inject  JsonPojoConverter(
            final ReportJsonPostProcessor reportJsonPostProcessor,
            final ElementJsonPostProcessor elementJsonPostProcessor
    ); List<Report> readJsonStream(InputStream in); Report[] convertJsonToReportPojos(final String json);  }