LayoutVersion { public static boolean supports(Map<Integer, SortedSet<LayoutFeature>> map, final LayoutFeature f, final int lv) { final SortedSet<LayoutFeature> set = map.get(lv); return set != null && set.contains(f); }  static void updateMap(Map<Integer, SortedSet<LayoutFeature>> map,
      LayoutFeature[] features); String getString(Map<Integer, SortedSet<LayoutFeature>> map,
      LayoutFeature[] values); static boolean supports(Map<Integer, SortedSet<LayoutFeature>> map,
      final LayoutFeature f, final int lv); static int getCurrentLayoutVersion(LayoutFeature[] features); static final int BUGFIX_HDFS_2991_VERSION; }
@Test public void testSNAPSHOT() { for(Feature f : Feature.values()) { final int version = f.getInfo().getLayoutVersion(); if (NameNodeLayoutVersion.supports(Feature.SNAPSHOT, version)) { assertTrue(NameNodeLayoutVersion.supports( Feature.FSIMAGE_NAME_OPTIMIZATION, version)); } } }