source: class NavigatingViewModelTest {
  
      @Mock
      private Navigator navigator;
      @Mock
      private NavigationCommand<Navigator> command;
      private NavigatingViewModel<Navigator> viewModel;
  
      @Test
      public void testPendingCommandExecutedOnceOnly() {
  
target:         viewModel.pendingCommand = command;
          final Navigator anotherNavigator = mock(Navigator.class);
          viewModel.setNavigator(navigator);
          viewModel.setNavigator(anotherNavigator);
          verify(command, times(1)).execute(navigator);
      }
  
  }