public static Pair<List<Snapshot>, List<Snapshot>> symmetricDifferenceSplit(
      List<Snapshot> first, List<Snapshot> second) {
    Set<Long> firstSnapshotIds =
        first.stream().map(Snapshot::snapshotId).collect(Collectors.toSet());
    Set<Long> secondSnapshotIds =
        second.stream().map(Snapshot::snapshotId).collect(Collectors.toSet());
    return Pair.of(
        first.stream()
            .filter(s -> !secondSnapshotIds.contains(s.snapshotId()))
            .collect(Collectors.toList()),
        second.stream()
            .filter(s -> !firstSnapshotIds.contains(s.snapshotId()))
            .collect(Collectors.toList()));
  }
@Test
  public void testSymmetricDifference() {
    Assertions.assertEquals(
        Pair.of(Collections.emptyList(), Collections.emptyList()),
        SnapshotsUtil.symmetricDifferenceSplit(testSnapshots, testSnapshots));
    Assertions.assertEquals(
        Pair.of(Collections.emptyList(), testSnapshots),
        SnapshotsUtil.symmetricDifferenceSplit(Collections.emptyList(), testSnapshots));
    Assertions.assertEquals(
        Pair.of(testSnapshots, Collections.emptyList()),
        SnapshotsUtil.symmetricDifferenceSplit(testSnapshots, Collections.emptyList()));
    Assertions.assertEquals(
        Pair.of(testSnapshots.subList(0, 1), testSnapshots.subList(3, 4)),
        SnapshotsUtil.symmetricDifferenceSplit(
            testSnapshots.subList(0, 3), testSnapshots.subList(1, 4)));
  }