HistoryDialogModel { protected boolean isCurrentRevisionSelected() { return myRightRevisionIndex == 0; } HistoryDialogModel(IdeaGateway gw, LocalVcs vcs, VirtualFile f); List<Revision> getRevisions(); void selectRevisions(int first, int second); void selectChanges(int first, int second); void showChangesOnly(boolean value); boolean doesShowChangesOnly(); List<Change> getChanges(); void createPatch(String path, boolean isReverse); Reverter createReverter(); boolean isRevertEnabled(); boolean isCreatePatchEnabled(); boolean canPerformCreatePatch();  }
@Test public void testIsCurrentRevisionSelected() { m.selectRevisions(1, 2); assertFalse(m.isCurrentRevisionSelected()); m.selectRevisions(2, 2); assertTrue(m.isCurrentRevisionSelected()); m.selectRevisions(-1, -1); assertTrue(m.isCurrentRevisionSelected()); }