assertEquals(1, insertionIndex);
assertEquals(0, insertionIndex);
	public void testInsert1() throws Exception {		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1.ae", false, null);		StringBuffer buf= new StringBuffer();		buf.append("package test1.ae;\n");		buf.append("public class E {\n");		buf.append("    int[] fGlobal;\n");		buf.append("    public void goo(int param1, int param2) {\n");		buf.append("    }\n");					buf.append("}\n");		ICompilationUnit compilationUnit= pack1.createCompilationUnit("E.java", buf.toString(), false, null);						CompilationUnit astRoot= createAST(compilationUnit);		TypeDeclaration typeDecl= (TypeDeclaration) astRoot.types().get(0);		List bodyDecls= typeDecl.bodyDeclarations();				AST ast = astRoot.getAST();		BodyDeclaration declaration= createNewField(ast, Modifier.PRIVATE);		int insertionIndex= ASTNodes.getInsertionIndex(declaration, bodyDecls);		assertEquals(1, insertionIndex); // after the first field				declaration= createNewField(ast, Modifier.STATIC);		insertionIndex= ASTNodes.getInsertionIndex(declaration, bodyDecls);		assertEquals(0, insertionIndex); // before the normal field			declaration= createNewField(ast, Modifier.STATIC | Modifier.FINAL);		insertionIndex= ASTNodes.getInsertionIndex(declaration, bodyDecls);		assertEquals(0, insertionIndex); // before the normal field				declaration= createNewMethod(ast, Modifier.PRIVATE, false);		insertionIndex= ASTNodes.getInsertionIndex(declaration, bodyDecls);		assertEquals(2, insertionIndex); // after the normal method				declaration= createNewMethod(ast, Modifier.STATIC, false);		insertionIndex= ASTNodes.getInsertionIndex(declaration, bodyDecls);		assertEquals(1, insertionIndex); // before the normal method				declaration= createNewMethod(ast, 0, true);		insertionIndex= ASTNodes.getInsertionIndex(declaration, bodyDecls);		assertEquals(1, insertionIndex); // before the normal method				declaration= createNewType(ast, 0);		insertionIndex= ASTNodes.getInsertionIndex(declaration, bodyDecls);		assertEquals(0, insertionIndex); // before all			}