void () { final PyPullUpPresenterImpl sut = configureByClass("ChildWithConflicts"); configureParent(); final Collection<PyMemberInfo<PyElement>> infos = getMemberInfos(sut); final Capture<MultiMap<PyClass, PyMemberInfo<?>>> conflictCapture = Capture.newInstance(); EasyMock.expect(myView.showConflictsDialog(EasyMock.capture(conflictCapture), EasyMock.anyObject())).andReturn(false).anyTimes(); EasyMock.expect(myView.getSelectedMemberInfos()).andReturn(infos).anyTimes(); final PyClass parent = getClassByName("ParentWithConflicts"); EasyMock.expect(myView.getSelectedParent()).andReturn(parent).anyTimes(); myMocksControl.replay(); sut.okClicked(); final MultiMap<PyClass, PyMemberInfo<?>> conflictMap = conflictCapture.getValue(); Assert.assertTrue("No conflicts found, while it should", conflictMap.containsKey(parent)); final Collection<String> conflictedMemberNames = Collections2.transform(conflictMap.get(parent), NameTransformer.INSTANCE); Assert.assertThat("Failed to find right conflicts", conflictedMemberNames, Matchers.containsInAnyOrder( "extends Bar", "CLASS_FIELD", "self.instance_field", "my_func(self)", "__init__(self)" )); }