### Question:
ExpireSnapshotsAction extends BaseAction<ExpireSnapshotsActionResult> { public ExpireSnapshotsAction expireOlderThan(long timestampMillis) { this.expireOlderThanValue = timestampMillis; return this; } ExpireSnapshotsAction(SparkSession spark, Table table); ExpireSnapshotsAction streamDeleteResults(boolean stream); ExpireSnapshotsAction executeDeleteWith(ExecutorService executorService); ExpireSnapshotsAction expireSnapshotId(long expireSnapshotId); ExpireSnapshotsAction expireOlderThan(long timestampMillis); ExpireSnapshotsAction retainLast(int numSnapshots); ExpireSnapshotsAction deleteWith(Consumer<String> newDeleteFunc); Dataset<Row> expire(); @Override ExpireSnapshotsActionResult execute();  }### Answer:
@Test public void testExpireOlderThan() { table.newAppend() .appendFile(FILE_A) .commit(); Snapshot firstSnapshot = table.currentSnapshot(); rightAfterSnapshot(); table.newAppend() .appendFile(FILE_B) .commit(); long snapshotId = table.currentSnapshot().snapshotId(); long tAfterCommits = rightAfterSnapshot(); Set<String> deletedFiles = Sets.newHashSet(); ExpireSnapshotsActionResult result = Actions.forTable(table).expireSnapshots() .expireOlderThan(tAfterCommits) .deleteWith(deletedFiles::add) .execute(); 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); checkExpirationResults(0, 0, 1, result); }