@Test public void testBigExifDump() throws IOException { BlitlinePostback postback = mapper.readValue(BIG_EXIF_SUCCESS_POSTBACK, BlitlinePostback.class); OriginalMetadata meta = postback.getOriginalMeta(); assertNotNull(meta); assertTrue(postback.isSuccessful()); assertEquals(4468016, meta.getFilesize().intValue()); assertEquals(new Date(1355176258000L), meta.getIsoDateCreated()); assertEquals("Canon EOS 20D", meta.getAllExif().get("Model")); }
@Test public void testSuccess() throws IOException { BlitlinePostback postback = mapper.readValue(SUCCESS_POSTBACK_CONTENT, BlitlinePostback.class); OriginalMetadata original = postback.getOriginalMeta(); assertEquals(Integer.valueOf(3740), original.getWidth()); assertEquals(Integer.valueOf(5573), original.getHeight()); assertEquals(new Date(1307502570000L), original.getIsoDateCreated()); assertTrue(postback.isSuccessful()); assertEquals(1, postback.getImages().size()); Image image = postback.getImages().iterator().next(); assertEquals(IMAGE_IDENTIFIER, image.getImageIdentifier()); ImageMeta meta = image.getMeta(); assertEquals(Integer.valueOf(43), meta.getWidth()); assertEquals(Integer.valueOf(64), meta.getHeight()); }