MCAssertStatementsPrettyPrinter extends ExpressionsBasisPrettyPrinter implements MCAssertStatementsVisitor { public String prettyprint(ASTMCAssertStatementsNode a) { getPrinter().clearBuffer(); a.accept(getRealThis()); return getPrinter().getContent(); } MCAssertStatementsPrettyPrinter(IndentPrinter out); IndentPrinter getPrinter(); @Override void handle(ASTAssertStatement a); String prettyprint(ASTMCAssertStatementsNode a); @Override void setRealThis(MCAssertStatementsVisitor realThis); @Override MCAssertStatementsVisitor getRealThis();  }
@Test public void testAssertStatement() throws IOException { Optional<ASTAssertStatement> result = parser.parse_StringAssertStatement("assert a : b;"); assertFalse(parser.hasErrors()); assertTrue(result.isPresent()); ASTAssertStatement ast = result.get(); String output = prettyPrinter.prettyprint(ast); result = parser.parse_StringAssertStatement(output); assertFalse(parser.hasErrors()); assertTrue(result.isPresent()); assertTrue(ast.deepEquals(result.get())); }