void () { try { doTest(new SimpleInfo("optional", -1, null, "1", "int")); } catch (BaseRefactoringProcessor.ConflictsInTestsException e) { TestCase.assertEquals("Method foo(int) is already defined in the class <b><code>Test</code></b>", e.getMessage()); return; } TestCase.fail("conflicts are not detected!"); }