Quantities { public static String formatMilliCpu(int milliCpu) { if (milliCpu % 1000 == 0) { return Long.toString(milliCpu / 1000L); } else { return Long.toString(milliCpu) + "m"; } } 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);  }
@Test public void testFormat() { assertThat(formatMilliCpu(1000), is("1")); assertThat(formatMilliCpu(500), is("500m")); assertThat(formatMilliCpu(1), is("1m")); }