public String toJson() throws IOException {
    return JsonTemplateMapper.toUtf8String(this);
  }
@Test
  public void testToJson() throws IOException {
    ImageMetadataOutput output = ImageMetadataOutput.fromJson(TEST_JSON);
    Assert.assertEquals(TEST_JSON, output.toJson());
  }