@Test public void testFormatMemory() { assertThat(formatMemory(0), is("0")); assertThat(formatMemory(1), is("1")); assertThat(formatMemory(1023), is("1023")); assertThat(formatMemory(1024), is("1024")); assertThat(formatMemory(1000), is("1000")); assertThat(formatMemory(2048), is("2048")); assertThat(formatMemory(2000), is("2000")); assertThat(formatMemory(2048 * 1024), is("2097152")); assertThat(formatMemory(2048 * 2000), is("4096000")); assertThat(formatMemory(2000 * 2000), is("4000000")); assertThat(formatMemory(1_000_000_000_000_000L), is("1000000000000000")); assertThat(formatMemory(1_000_000_000_000_000_000L), is("1000000000000000000")); assertThat(formatMemory(parseMemory("1Ei")), is("1125899906842624")); assertThat(formatMemory(parseMemory("1024Ei")), is("1152921504606846976")); assertThat(formatMemory(524288000L), is("524288000")); }
public static String formatMemory(long bytes) { return Long.toString(bytes); }
Quantities { public static String formatMemory(long bytes) { return Long.toString(bytes); } }
Quantities { public static String formatMemory(long bytes) { return Long.toString(bytes); } private  Quantities(); }
Quantities { public static String formatMemory(long bytes) { return Long.toString(bytes); } private  Quantities(); static long parseMemory(String memory); static String formatMemory(long bytes); static String normalizeMemory(String memory); static int parseCpuAsMilliCpus(String cpu); static String formatMilliCpu(int milliCpu); static String normalizeCpu(String milliCpu); }
Quantities { public static String formatMemory(long bytes) { return Long.toString(bytes); } private  Quantities(); static long parseMemory(String memory); static String formatMemory(long bytes); static String normalizeMemory(String memory); static int parseCpuAsMilliCpus(String cpu); static String formatMilliCpu(int milliCpu); static String normalizeCpu(String milliCpu);  }