MemConfValue { public static MemConfValue parseMaxXmx(final Props props) { return parse(props, Constants.JobProperties.JOB_MAX_XMX, Constants.JobProperties.MAX_XMX_DEFAULT); } private  MemConfValue(final String string, final long size); static MemConfValue parseMaxXms(final Props props); static MemConfValue parseMaxXmx(final Props props); String getString(); long getSize();  }
@Test public void parseMaxXmX() { assertXmx(Props.of(Constants.JobProperties.JOB_MAX_XMX, "1K"), "1K", 1L); }
@Test public void parseEmptyThrows() { final Throwable thrown = catchThrowable(() -> MemConfValue.parseMaxXmx(Props.of(Constants.JobProperties.JOB_MAX_XMX, ""))); assertThat(thrown).isInstanceOf(IllegalArgumentException.class); assertThat(thrown).hasMessage("job.max.Xmx must not have an empty value. " + "Remove the property to use default or specify a valid value."); }