@Test
  public void testParseWithDefaultUnit() {
    assertEquals(7, MemorySize.parse("7", MEGA_BYTES).getMebiBytes());
    assertNotEquals(7, MemorySize.parse("7340032", MEGA_BYTES));
    assertEquals(7, MemorySize.parse("7m", MEGA_BYTES).getMebiBytes());
    assertEquals(7168, MemorySize.parse("7", MEGA_BYTES).getKibiBytes());
    assertEquals(7168, MemorySize.parse("7m", MEGA_BYTES).getKibiBytes());
    assertEquals(7, MemorySize.parse("7 m", MEGA_BYTES).getMebiBytes());
    assertEquals(7, MemorySize.parse("7mb", MEGA_BYTES).getMebiBytes());
    assertEquals(7, MemorySize.parse("7 mb", MEGA_BYTES).getMebiBytes());
    assertEquals(7, MemorySize.parse("7mebibytes", MEGA_BYTES).getMebiBytes());
    assertEquals(7, MemorySize.parse("7 mebibytes", MEGA_BYTES).getMebiBytes());
  }
Tests for the {@link MemorySize} class.
amoro-common/src/test/java/org/apache/amoro/utils/MemorySizeTest.java