### Question:
RuntimeBean implements CommandListener { @Command public String totalMemory(@Option({"unit","u"}) @Default("MEGABYTES") SizeUnit unit) { final long bytes = Runtime.getRuntime().totalMemory(); 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 testTotalMemory() throws Exception { final String totalMemory = (String) main.exec("totalMemory"); assertNotNull(totalMemory); }