@Test
public void testByteResourceUnits() {

    ContainerResources containerResources = ContainerResources.newBuilder()
            .withMemoryMB(2)
            .withDiskMB(4)
            .withNetworkMbps(128)
            .build();
    // Legacy
    when(configuration.isBytePodResourceEnabled()).thenReturn(false);
    V1ResourceRequirements podResources = converter.buildV1ResourceRequirements(containerResources);
    assertThat(podResources.getLimits().get("memory").toSuffixedString()).isEqualTo("2");
    assertThat(podResources.getLimits().get("ephemeral-storage").toSuffixedString()).isEqualTo("4");
    assertThat(podResources.getLimits().get("titus/network").toSuffixedString()).isEqualTo("128");
    // Bytes
    when(configuration.isBytePodResourceEnabled()).thenReturn(true);
    podResources = converter.buildV1ResourceRequirements(containerResources);
    assertThat(podResources.getLimits().get("memory").toSuffixedString()).isEqualTo("2Mi");
    assertThat(podResources.getLimits().get("ephemeral-storage").toSuffixedString()).isEqualTo("4Mi");
    assertThat(podResources.getLimits().get("titus/network").toSuffixedString()).isEqualTo("128M");
}