void () { EasyMock.expect(myView.getSelectedMemberInfos()).andReturn(Collections.emptyList()).anyTimes(); final Capture<String> errorMessageCapture = configureViewToCaptureError(); final PyExtractSuperclassPresenterImpl sut = configureByClass("Child"); myMocksControl.replay(); sut.launch(); sut.okClicked(); Assert.assertTrue("No error displayed empty list of selected members", errorMessageCapture.hasCaptured()); }