@Test
public void testPendingCommandExecutedOnceOnly() {

    viewModel.pendingCommand = command;
    final Navigator anotherNavigator = mock(Navigator.class);
    viewModel.setNavigator(navigator);
    viewModel.setNavigator(anotherNavigator);
    verify(command, times(1)).execute(navigator);
}