public static int compareTierNames(String a, String b) {
    int aValue = getTierRankValue(a);
    int bValue = getTierRankValue(b);
    if (aValue == bValue) {
      return a.compareTo(b);
    }
    return aValue - bValue;
  }
@Test
  public void compareTierNames() {
    Assert.assertTrue("MEM should be placed before SSD",
        FileSystemAdminShellUtils.compareTierNames(Constants.MEDIUM_MEM, Constants.MEDIUM_SSD) < 0);
    Assert.assertTrue("MEM should be placed before HDD",
        FileSystemAdminShellUtils.compareTierNames(Constants.MEDIUM_MEM, Constants.MEDIUM_HDD) < 0);
    Assert.assertTrue("HDD should be placed after SSD",
        FileSystemAdminShellUtils.compareTierNames(Constants.MEDIUM_HDD, Constants.MEDIUM_SSD) > 0);
    Assert.assertTrue("HDD should be placed before DOM",
        FileSystemAdminShellUtils.compareTierNames("DOM", Constants.MEDIUM_HDD) > 0);
    Assert.assertTrue("RAM should be placed after DOM",
        FileSystemAdminShellUtils.compareTierNames("RAM", "DOM") > 0);
  }