private void verifyValue(MockId id, IndexValue valueFromFind, FileSpan fileSpan,
      EnumSet<PersistentIndex.IndexEntryType> types) {
    if (state.allKeys.containsKey(id)) {
      IndexValue expectedValue = state.getExpectedValue(id, types, fileSpan);
      if (expectedValue != null) {
        assertNotNull("Value should be successfully fetched", valueFromFind);
        assertEquals("Bytes from value from index not as expected for " + id + " ex: " + expectedValue + ", actual: "
            + valueFromFind, expectedValue.getBytes(), valueFromFind.getBytes());
      } else {
        assertNull("There should be no value for " + id, valueFromFind);
      }
    } else {
      assertNull("There should have been no value returned", valueFromFind);
    }
  }
Verifies that {@code valueFromFind} matches the expected value from {@link CuratedLogIndexState#referenceIndex}.
@param id the {@link MockId} whose value is required.
@param valueFromFind the {@link IndexValue} that needs to be verified.
@param fileSpan the {@link FileSpan} to use to get expected value. Can be {@code null}
@param types the types of {@link PersistentIndex.IndexEntryType} to look for. The latest entry matching one of the
             types will be returned
ambry-store/src/test/java/com/github/ambry/store/IndexTest.java