@Test
public void testPutWithTtlDirListingMeta() throws Exception {

  // arrange
  DirListingMetadata dlm = new DirListingMetadata(new Path("/"), null,
      false);
  MetadataStore ms = spy(MetadataStore.class);
  ITtlTimeProvider timeProvider =
      mock(ITtlTimeProvider.class);
  when(timeProvider.getNow()).thenReturn(100L);
  // act
  S3Guard.putWithTtl(ms, dlm, Collections.emptyList(), timeProvider, null);
  // assert
  assertEquals("last update in " + dlm, 100L, dlm.getLastUpdated());
  verify(timeProvider, times(1)).getNow();
  verify(ms, times(1)).put(dlm, Collections.emptyList(), null);
}