CompilationUnit astRoot= AST.parseCompilationUnit(cu, false);
CompilationUnit astRoot= AST.parseCompilationUnit(cu, false, null, null);
	public void testListInsert() throws Exception {		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);		StringBuffer buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public abstract class E {\n");		buf.append("    public abstract void lee(int p1, int p2, int p3) throws IllegalArgumentException, IllegalAccessException, SecurityException;\n");		buf.append("}\n");			ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);					CompilationUnit astRoot= AST.parseCompilationUnit(cu, false);		NewASTRewrite rewrite= new NewASTRewrite(astRoot.getAST());		AST ast= astRoot.getAST();		TypeDeclaration type= findTypeDeclaration(astRoot, "E");				{ // insert at first and last position & remove 2nd, add after 2nd, remove 3rd			MethodDeclaration methodDecl= findMethodDeclaration(type, "lee");			List parameters= methodDecl.parameters();			assertTrue("must be 3 parameters", parameters.size() == 3);			ListRewriter listRewrite= rewrite.getListRewrite(methodDecl, ASTNodeConstants.PARAMETERS);						SingleVariableDeclaration newParam1= createNewParam(ast, "m1");			SingleVariableDeclaration newParam2= createNewParam(ast, "m2");			listRewrite.insertFirst(newParam1, null);			listRewrite.insertLast(newParam2, null);						List thrownExceptions= methodDecl.thrownExceptions();			assertTrue("must be 3 thrown exceptions", thrownExceptions.size() == 3);						rewrite.markAsRemoved((ASTNode) thrownExceptions.get(1));			rewrite.markAsRemoved((ASTNode) thrownExceptions.get(2));						Name newThrownException= ast.newSimpleName("InterruptedException");			rewrite.getListRewrite(methodDecl, ASTNodeConstants.THROWN_EXCEPTIONS).insertLast(newThrownException, null);		}							String preview= evaluateRewrite(cu, rewrite);				buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public abstract class E {\n");		buf.append("    public abstract void lee(float m1, int p1, int p2, int p3, float m2) throws IllegalArgumentException, InterruptedException;\n");		buf.append("}\n");						assertEqualString(preview, buf.toString());	}