rewrite.markAsReplaced(packageDeclaration.getName(), name);
rewrite.markAsReplaced(packageDeclaration.getName(), name, null);
	public void testPackageDeclaration() throws Exception {		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);		StringBuffer buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public class Z {\n");		buf.append("}\n");			ICompilationUnit cu= pack1.createCompilationUnit("Z.java", buf.toString(), false, null);				CompilationUnit astRoot= createAST(cu);		NewASTRewrite rewrite= new NewASTRewrite(astRoot.getAST());		AST ast= astRoot.getAST();				assertTrue("Parse errors", (astRoot.getFlags() & ASTNode.MALFORMED) == 0);				{ // rename package			PackageDeclaration packageDeclaration= astRoot.getPackage();						Name name= ast.newName(new String[] { "org", "eclipse" });						rewrite.markAsReplaced(packageDeclaration.getName(), name);		}						String preview= evaluateRewrite(cu, rewrite);				buf= new StringBuffer();		buf.append("package org.eclipse;\n");		buf.append("public class Z {\n");		buf.append("}\n");			assertEqualString(preview, buf.toString());	}