public static int getMinimumCompatibleLayoutVersion(
      LayoutFeature[] features) {
    return getLastNonReservedFeature(features).getInfo()
        .getMinimumCompatibleLayoutVersion();
  }
@Test
  public void testCurrentMinimumCompatibleLayoutVersion() {
    int expectedMinCompatLV = NameNodeLayoutVersion.Feature.TRUNCATE.getInfo()
        .getLayoutVersion();
    int actualMinCompatLV = LayoutVersion.getMinimumCompatibleLayoutVersion(
        NameNodeLayoutVersion.Feature.values());
    assertEquals("The minimum compatible layout version has changed.  " +
        "Downgrade to prior versions is no longer possible.  Please either " +
        "restore compatibility, or if the incompatibility is intentional, " +
        "then update this assertion.", expectedMinCompatLV, actualMinCompatLV);
  }