static DescriptorDigest generateSelector(ImmutableList<FileEntry> layerEntries)
      throws IOException {
    return Digests.computeJsonDigest(toSortedJsonTemplates(layerEntries));
  }
@Test
  public void testGenerateSelector_targetModificationTimeChanged() throws IOException {
    Path layerFile = temporaryFolder.newFile().toPath();
    AbsoluteUnixPath pathInContainer = AbsoluteUnixPath.get("/bar");
    FilePermissions permissions = FilePermissions.fromOctalString("111");

    FileEntry layerEntry1 = new FileEntry(layerFile, pathInContainer, permissions, Instant.now());
    FileEntry layerEntry2 = new FileEntry(layerFile, pathInContainer, permissions, Instant.EPOCH);

    // Verify that different target modification times generate different selectors
    Assert.assertNotEquals(
        LayerEntriesSelector.generateSelector(ImmutableList.of(layerEntry1)),
        LayerEntriesSelector.generateSelector(ImmutableList.of(layerEntry2)));
  }