### Question:
MenuItemHelper { public static boolean isRuntimeStructureNeeded(MenuItem item) { return visitWithResult(item, new AbstractMenuItemVisitor<Boolean>() { @Override public void visit(RuntimeListMenuItem listItem) { setResult(true); } @Override public void visit(EditableTextMenuItem item) { setResult(true); } @Override public void visit(EditableLargeNumberMenuItem item) { setResult(true); } @Override public void visit(SubMenuItem item) { setResult(true); } @Override public void anyItem(MenuItem item) { setResult(false); } }).orElse(false); }  static Optional<T> visitWithResult(MenuItem item, AbstractMenuItemVisitor<T> visitor); static SubMenuItem asSubMenu(MenuItem item); static boolean isRuntimeStructureNeeded(MenuItem item); static MenuItem createFromExistingWithId(MenuItem selected, int newId); static int eepromSizeForItem(MenuItem item);  }### Answer:
@Test public void testIsRuntimeItem() { assertTrue(MenuItemHelper.isRuntimeStructureNeeded(textItem)); assertTrue(MenuItemHelper.isRuntimeStructureNeeded(ipItem)); assertFalse(MenuItemHelper.isRuntimeStructureNeeded(floatItem)); assertFalse(MenuItemHelper.isRuntimeStructureNeeded(boolMenuItem)); assertTrue(MenuItemHelper.isRuntimeStructureNeeded(subItem)); }