assertEqualString(preview, buf.toString());
String expected1= buf.toString();  proposal= (CUCorrectionProposal) proposals.get(1); String preview2= proposal.getCompilationUnitChange().getPreviewContent();  buf= new StringBuffer(); buf.append("package test1;\n"); buf.append("public class E {\n"); buf.append("    private static final int k = 0;\n"); buf.append("    private int i= k;\n"); buf.append("}\n"); String expected2= buf.toString();  assertEqualStringsIgnoreOrder(new String[] { preview1, preview2 }, new String[] { expected1, expected2 });
	public void testVarInInitializer() throws Exception {		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);		StringBuffer buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public class E {\n");		buf.append("    private int i= k;\n");		buf.append("}\n");		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);				CompilationUnit astRoot= AST.parseCompilationUnit(cu, true);		ArrayList proposals= collectCorrections(cu, astRoot);		assertNumberOf("proposals", proposals.size(), 1);		assertCorrectLabels(proposals);				NewVariableCompletionProposal proposal= (NewVariableCompletionProposal) proposals.get(0);		String preview= proposal.getCompilationUnitChange().getPreviewContent();				buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public class E {\n");		buf.append("    private int k;\n");		buf.append("    private int i= k;\n");		buf.append("}\n");		assertEqualString(preview, buf.toString());	}