### Question:
RuntimeBean implements CommandListener { @Command public String maxMemory(@Option({"unit","u"}) @Default("MEGABYTES") SizeUnit unit) { final long bytes = Runtime.getRuntime().maxMemory(); final Size size = new Size(unit.convert(bytes, SizeUnit.BYTES), unit); return size.toString(); }  @Command void gc(); @Command String freeMemory(@Option({"unit", "u"}) @Default("MEGABYTES") SizeUnit unit); @Command String maxMemory(@Option({"unit","u"}) @Default("MEGABYTES") SizeUnit unit); @Command String totalMemory(@Option({"unit","u"}) @Default("MEGABYTES") SizeUnit unit); @Command String threads();  }### Answer:
@Test public void testMaxMemory() throws Exception { final String maxMemory = (String) main.exec("maxMemory"); assertNotNull(maxMemory); }