JavaPreferencesSettings.getCodeGenerationSettings());
JavaPreferencesSettings.getCodeGenerationSettings(cu.getJavaProject()));
	private void doSingleUnitTest(boolean protectConstructor, ICompilationUnit cu, String outputFileName) throws Exception, JavaModelException, IOException {		ISourceRange		selection= findSelectionInSource(cu.getSource());		IntroduceFactoryRefactoring	ref= IntroduceFactoryRefactoring.create(cu, selection.getOffset(), selection.getLength(), 												   JavaPreferencesSettings.getCodeGenerationSettings());		ref.setProtectConstructor(protectConstructor);		RefactoringStatus	activationResult= ref.checkInitialConditions(new NullProgressMonitor());			assertTrue("activation was supposed to be successful", activationResult.isOK());																		RefactoringStatus	checkInputResult= ref.checkFinalConditions(new NullProgressMonitor());		if (!checkInputResult.isOK()) {			performChange(ref, false);			String newSource = cu.getSource();			System.err.println("!!!Precondition failed for " + getName() + "!!!");			System.err.println("Compile-time error: " + checkInputResult.toString());			System.err.println("Offending source:");			System.err.print(newSource);			assertTrue("precondition was supposed to pass but was " + checkInputResult.toString(), false);		}		performChange(ref, false);		String newSource = cu.getSource();		assertEqualLines(getName() + ": ", getFileContents(outputFileName), newSource);	}