void () { try { doTest("<warning descr=\"Magic problem\">just some text</warning>", new MyDoubleInspection()); } catch (ComparisonFailure failure) { String message = failure.getMessage(); String firstLine = message.split("\n")[0]; assertSameLines("hello.txt: duplicated (1:1/14): 'just some text' (Magic problem)", firstLine); } }