void () { try { ExpectedHighlightingData.expectedDuplicatedHighlighting( () -> doTest("<warning descr=\"Magic problem\">just some text</warning>", new MySimpleInspection()) ); } catch (IllegalStateException failure) { String message = failure.getMessage(); assertSameLines(ExpectedHighlightingData.EXPECTED_DUPLICATION_MESSAGE, message); } }