void () { cd(myRepository); myRepository.refresh(false, true); HgRepository hgRepository = HgRepositoryImpl.getInstance(myRepository, myProject, myProject); hg("up branchA"); hg("commit -m 'close branch' --close-branch"); hgRepository.update(); VcsTestUtil.assertEqualCollections(hgRepository.getOpenedBranches(), Arrays.asList("default", "branchB")); }