void () { myBuilder = createBuilder("foo"); myBuilder.setDebugMode(true); PsiBuilder.Marker m = myBuilder.mark(); @SuppressWarnings("UnusedDeclaration") PsiBuilder.Marker m1 = myBuilder.mark(); myBuilder.getTokenType(); myBuilder.advanceLexer(); try { m.done(JavaTokenType.PACKAGE_KEYWORD); fail("Assertion must fire"); } catch (AssertionFailedError e) { throw e; } catch (Throwable e) { if (!e.getMessage().startsWith("Another not done marker")) { fail("Wrong assertion message"); } } }