void (@NotNull String text, @Nullable String expected, @NotNull Lexer lexer) { String result = printTokens(lexer, text, 0); if (expected != null) { assertSameLines(expected, result); } else { assertSameLinesWithFile(getPathToTestDataFile(getExpectedFileExtension()), result); } }