@Test
public void testGetWithZeroLastUpdatedNotExpired() throws Exception {

  // arrange
  S3AFileStatus fileStatus = mock(S3AFileStatus.class);
  Path path = new Path("/file");
  when(fileStatus.getPath()).thenReturn(path);
  PathMetadata pm = new PathMetadata(fileStatus);
  // we set 0 this time as the last updated: can happen eg. when we use an
  // old dynamo table
  pm.setLastUpdated(0L);
  MetadataStore ms = mock(MetadataStore.class);
  when(ms.get(path, false)).thenReturn(pm);
  ITtlTimeProvider timeProvider =
      mock(ITtlTimeProvider.class);
  when(timeProvider.getNow()).thenReturn(101L);
  when(timeProvider.getMetadataTtl()).thenReturn(2L);
  // act
  final PathMetadata pmExpired = S3Guard.getWithTtl(ms, path, timeProvider,
      false, false);
  // assert
  assertNotNull(pmExpired);
}