private void verifyValues(IndexSegment segment, MockId id, int valueCount, EnumSet<IndexValue.Flags> flags)
      throws StoreException {
    NavigableSet<IndexValue> values = segment.find(id);
    assertNotNull("Values should have been found for " + id, values);
    assertEquals("Unexpected number of values for " + id, valueCount, values.size());
    for (IndexValue.Flags flagToCheck : IndexValue.Flags.values()) {
      assertEquals("Flag " + flagToCheck + " status not as expected", flags.contains(flagToCheck),
          values.last().isFlagSet(flagToCheck));
    }
  }
Verifies that the values obtained for {@code id} from {@code segment} satisfy the count and deleted state as
provided
@param segment the {@link IndexSegment} to check
@param id the {@link MockId} to find values for
@param valueCount the number of values expected to be returned
@param flags the expected flags for the latest value
@throws StoreException
ambry-store/src/test/java/com/github/ambry/store/IndexSegmentTest.java