@Test
public void testNewGroup() {

    navTreeEditor.setOnUpdateCommand(updateCommand);
    navTreeEditor.edit(NAV_TREE);
    navTreeEditor.collapse();
    assertFalse(navTreeEditor.isExpanded());
    reset(view);
    NavItemEditor navItemEditor = navTreeEditor.newGroup();
    assertEquals(((NavGroup) navTreeEditor.getNavItem()).getChildren().size(), 2);
    assertTrue(navTreeEditor.isExpanded());
    verify(navItemEditor).startEdition();
    verify(view, times(3)).addChild(any());
    verify(updateCommand, never()).execute();
    when(navRootNodeEditorView.getItemName()).thenReturn("A");
    navItemEditor.onChangesOk();
    verify(updateCommand).execute();
}