### Question:
RemoveSnapshots implements ExpireSnapshots { @Override public ExpireSnapshots expireOlderThan(long timestampMillis) { LOG.info("Expiring snapshots older than: {} ({})", new Date(timestampMillis), timestampMillis); this.expireOlderThan = timestampMillis; return this; } RemoveSnapshots(TableOperations ops); @Override ExpireSnapshots cleanExpiredFiles(boolean clean); @Override ExpireSnapshots expireSnapshotId(long expireSnapshotId); @Override ExpireSnapshots expireOlderThan(long timestampMillis); @Override ExpireSnapshots retainLast(int numSnapshots); @Override ExpireSnapshots deleteWith(Consumer<String> newDeleteFunc); @Override ExpireSnapshots executeDeleteWith(ExecutorService executorService); @Override List<Snapshot> apply(); @Override void commit();  }### Answer:
@Test public void testExpireOlderThan() { table.newAppend() .appendFile(FILE_A) .commit(); Snapshot firstSnapshot = table.currentSnapshot(); waitUntilAfter(table.currentSnapshot().timestampMillis()); table.newAppend() .appendFile(FILE_B) .commit(); long snapshotId = table.currentSnapshot().snapshotId(); long tAfterCommits = waitUntilAfter(table.currentSnapshot().timestampMillis()); Set<String> deletedFiles = Sets.newHashSet(); table.expireSnapshots() .expireOlderThan(tAfterCommits) .deleteWith(deletedFiles::add) .commit(); Assert.assertEquals("Expire should not change current snapshot", snapshotId, table.currentSnapshot().snapshotId()); Assert.assertNull("Expire should remove the oldest snapshot", table.snapshot(firstSnapshot.snapshotId())); Assert.assertEquals("Should remove only the expired manifest list location", Sets.newHashSet(firstSnapshot.manifestListLocation()), deletedFiles); }