Exif { public void save() throws IOException { if (!mRemoveTimestamp) { attachLastModifiedTimestamp(); } mExifInterface.saveAttributes(); } Exif(File file);  Exif(String filePath);  Exif(InputStream is); private  Exif(ExifInterface exifInterface); void save(); @Override String toString(); int getWidth(); int getHeight(); @Nullable String getDescription(); void setDescription(@Nullable String description); int getRotation(); boolean isFlippedVertically(); boolean isFlippedHorizontally(); long getLastModifiedTimestamp(); long getTimestamp(); @Nullable Location getLocation(); void rotate(int degrees); void flipVertically(); void flipHorizontally(); void attachTimestamp(); void removeTimestamp(); void attachLocation(Location location); void removeLocation();  }
@Test public void save() { assertEquals(-1, exif.getLastModifiedTimestamp()); try { exif.save(); } catch (IOException e) { } assertWithin(System.currentTimeMillis(), exif.getLastModifiedTimestamp(), 3); exif.removeTimestamp(); assertEquals(-1, exif.getLastModifiedTimestamp()); try { exif.save(); } catch (IOException e) { } assertEquals(-1, exif.getLastModifiedTimestamp()); }