{
IMenuPolicy policy = MenuObjectInfoUtils.getMenuInfo(bar).getPolicy();
// validate
assertTrue(policy.validatePaste(mementos));
// do paste
List<?> pastedObjects = policy.commandPaste(mementos, null);
assertThat(pastedObjects).hasSize(1);
assertThat(pastedObjects.get(0)).isInstanceOf(MenuBarItemInfo.class);
}
assertEditor(
"public class Test extends LayoutContainer {",