@Test public void testParseErrors() { try { MemorySizeParser.parse("-1G"); Assert.fail("expected IllegalArgumentException"); } catch (IllegalArgumentException e) { } try { MemorySizeParser.parse("1000y"); Assert.fail("expected IllegalArgumentException"); } catch (IllegalArgumentException e) { } }
public static long parse(String configuredMemorySize) throws IllegalArgumentException { MemorySize size = parseIncludingUnit(configuredMemorySize); return size.calculateMemorySizeInBytes(); }
MemorySizeParser { public static long parse(String configuredMemorySize) throws IllegalArgumentException { MemorySize size = parseIncludingUnit(configuredMemorySize); return size.calculateMemorySizeInBytes(); } }
MemorySizeParser { public static long parse(String configuredMemorySize) throws IllegalArgumentException { MemorySize size = parseIncludingUnit(configuredMemorySize); return size.calculateMemorySizeInBytes(); }  }
MemorySizeParser { public static long parse(String configuredMemorySize) throws IllegalArgumentException { MemorySize size = parseIncludingUnit(configuredMemorySize); return size.calculateMemorySizeInBytes(); }  static long parse(String configuredMemorySize); }
MemorySizeParser { public static long parse(String configuredMemorySize) throws IllegalArgumentException { MemorySize size = parseIncludingUnit(configuredMemorySize); return size.calculateMemorySizeInBytes(); }  static long parse(String configuredMemorySize);  }