undo.perform(context, pm);
	protected void performTest(ICompilationUnit unit, Refactoring refactoring, int mode, String out) throws Exception {		IProgressMonitor pm= new NullProgressMonitor();		RefactoringStatus status= checkPreconditions(refactoring, pm);		switch (mode) {			case VALID_SELECTION:				// System.out.println(status);				assertTrue(status.isOK());				break;			case INVALID_SELECTION:				// System.out.println(status);				assertTrue(!status.isOK());				break;			case COMPARE_WITH_OUTPUT:				assertTrue(!status.hasFatalError());				String original= unit.getSource();				final IChange change= refactoring.createChange(pm);				assertNotNull(change);				final ChangeContext context= new ChangeContext(new TestExceptionHandler());				change.aboutToPerform(context, pm);				JavaCore.run(new IWorkspaceRunnable() {					public void run(IProgressMonitor monitor) throws CoreException {						change.perform(context, monitor);					}				}, pm);				change.performed();				final IChange undo= change.getUndoChange();				assertNotNull(undo);				compareSource(unit.getSource(), out);				final ChangeContext context2= new ChangeContext(new TestExceptionHandler());				undo.aboutToPerform(context, pm);				JavaCore.run(new IWorkspaceRunnable() {					public void run(IProgressMonitor monitor) throws CoreException {						undo.perform(context2, monitor);					}				}, pm);				undo.perform(context, pm);				undo.performed();				compareSource(unit.getSource(), original);				break;				}	}