void () { try { doTest(0, PsiModifier.PRIVATE); fail("Conflict was not detected"); } catch (BaseRefactoringProcessor.ConflictsInTestsException e) { assertEquals("Method <b><code>Test.foo(Bar)</code></b> is private and will not be accessible from instance initializer of class <b><code>Test</code></b>.", e.getMessage()); } }