@Test
public void testNewImage() throws IOException {

  String input = String.format(RECORD_FORMAT,
      "\"NewImage\":{" +
      "  \"Message\":{" +
      "    \"S\":\"New item!\"" +
      "  }," +
      "  \"Bytes\":{" +
      "    \"B\":\"aGVsbG8=\"" +
      "  }," +
      "  \"IsSold\":{" +
      "    \"BOOL\":1" +
      "  }," +
      "  \"Id\":{" +
      "    \"N\":\"101\"" +
      "  }," +
      "  \"Tags\":{" +
      "    \"SS\":[\"message\",\"sold\"]" +
      "  }," +
      "  \"Metrics\":{" +
      "    \"NS\":[\"42.2\",\"3.14\"]" +
      "  }," +
      "  \"Blobs\":{" +
      "    \"BS\":[\"Zm9v\",\"YmFy\"]" +
      "  }" +
      "}");
  DynamodbEvent event = DynamodbEventDeserializer.deserialize(input);
  String result = new DynamodbEventSerializer().serialize(event.getRecords().get(0));
  String expected = String.format(EXPECTED_FORMAT, "\"newImage\":{\"Message\":\"New item!\",\"Bytes\":[104,101,108,108,111],\"IsSold\":true,\"Id\":101,\"Tags\":[\"message\",\"sold\"],\"Metrics\":[42.2,3.14],\"Blobs\":[[102,111,111],[98,97,114]]}");
  assertEquals(expected, result);
}