@Test public void shouldDeserialize() throws Exception { final UploadStatistics uploadStatistics = readObjectFromResource("/dataset/uploads/data-uploads-info.json", UploadStatistics.class); assertThat(uploadStatistics, notNullValue()); assertThat(uploadStatistics.getUploadsCount("OK"), is(845)); assertThat(uploadStatistics.getUploadsCount("ERROR"), is(25)); assertThat(uploadStatistics.getUploadsCount("RUNNING"), is(1)); assertThat(uploadStatistics.getUploadsCount("NOT_DEFINED"), is(0)); }
public int getUploadsCount(String uploadStatus) { final Integer uploadsCount = statusesCount.get(uploadStatus); return uploadsCount != null ? uploadsCount : 0; }
UploadStatistics { public int getUploadsCount(String uploadStatus) { final Integer uploadsCount = statusesCount.get(uploadStatus); return uploadsCount != null ? uploadsCount : 0; } }
UploadStatistics { public int getUploadsCount(String uploadStatus) { final Integer uploadsCount = statusesCount.get(uploadStatus); return uploadsCount != null ? uploadsCount : 0; } private  UploadStatistics(@JsonProperty("statusesCount") Map<String, Integer> statusesCount); }
UploadStatistics { public int getUploadsCount(String uploadStatus) { final Integer uploadsCount = statusesCount.get(uploadStatus); return uploadsCount != null ? uploadsCount : 0; } private  UploadStatistics(@JsonProperty("statusesCount") Map<String, Integer> statusesCount); int getUploadsCount(String uploadStatus); @Override String toString(); }
UploadStatistics { public int getUploadsCount(String uploadStatus) { final Integer uploadsCount = statusesCount.get(uploadStatus); return uploadsCount != null ? uploadsCount : 0; } private  UploadStatistics(@JsonProperty("statusesCount") Map<String, Integer> statusesCount); int getUploadsCount(String uploadStatus); @Override String toString(); static final String URI; }