@ParameterizedTest
  @MethodSource("memorySizeProvider")
  void testUnitConversion(
      MemorySize memorySize,
      long expectedBytes,
      long expectedKibiBytes,
      long expectedMebiBytes,
      long expectedGibiBytes,
      long expectedTebiBytes) {
    assertEquals(expectedBytes, memorySize.getBytes());
    assertEquals(expectedKibiBytes, memorySize.getKibiBytes());
    assertEquals(expectedMebiBytes, memorySize.getMebiBytes());
    assertEquals(expectedGibiBytes, memorySize.getGibiBytes());
    assertEquals(expectedTebiBytes, memorySize.getTebiBytes());
  }
Tests for the {@link MemorySize} class.
amoro-common/src/test/java/org/apache/amoro/utils/MemorySizeTest.java