@Test
  public void testToSizeBytes() throws Exception {
    Assert.assertEquals(1L, HiveConf.toSizeBytes("1b"));
    Assert.assertEquals(1L, HiveConf.toSizeBytes("1bytes"));
    Assert.assertEquals(1024L, HiveConf.toSizeBytes("1kb"));
    Assert.assertEquals(1048576L, HiveConf.toSizeBytes("1mb"));
    Assert.assertEquals(1073741824L, HiveConf.toSizeBytes("1gb"));
    Assert.assertEquals(1099511627776L, HiveConf.toSizeBytes("1tb"));
    Assert.assertEquals(1125899906842624L, HiveConf.toSizeBytes("1pb"));
  }
TestHiveConf

Test cases for HiveConf. Loads configuration files located
in common/src/test/resources.
common/src/test/org/apache/hadoop/hive/conf/TestHiveConf.java