MoveInnerToTopRefactoring ref= MoveInnerToTopRefactoring.create(clas, JavaPreferencesSettings.getCodeGenerationSettings());
MoveInnerToTopRefactoring ref= MoveInnerToTopRefactoring.create(clas, JavaPreferencesSettings.getCodeGenerationSettings(clas.getJavaProject()));
	private void validateFailingTest(String parentClassName, String className, String[] cuNames, String[] packageNames, String enclosingInstanceName, int expectedSeverity) throws Exception {		IType parentClas= getClassFromTestFile(getPackageP(), parentClassName);		IType clas= parentClas.getType(className);		MoveInnerToTopRefactoring ref= MoveInnerToTopRefactoring.create(clas, JavaPreferencesSettings.getCodeGenerationSettings());		if (expectedSeverity == NOT_AVAILABLE && ref == null)			return;		assertEquals("refactoring availability not as expected", expectedSeverity == NOT_AVAILABLE, ref == null);		RefactoringStatus preconditionResult= ref.checkInitialConditions(new NullProgressMonitor());				if (enclosingInstanceName != null){			ref.setEnclosingInstanceName(enclosingInstanceName);		}			ref.setMarkInstanceFieldAsFinal(false);				ICompilationUnit[] cus= new ICompilationUnit[cuNames.length];		for (int i= 0; i < cuNames.length; i++) {			cus[i]= createCUfromTestFile(getPackage(packageNames[i]), cuNames[i]);					}				RefactoringStatus checkInputResult= ref.checkFinalConditions(new NullProgressMonitor());				RefactoringStatus result= new RefactoringStatus();		result.merge(preconditionResult);		result.merge(checkInputResult);		assertEquals("different severity expected", expectedSeverity, result.getSeverity());	}