UseSupertypeWherePossibleRefactoring ref= UseSupertypeWherePossibleRefactoring.create(clas, JavaPreferencesSettings.getCodeGenerationSettings());
UseSupertypeWherePossibleRefactoring ref= UseSupertypeWherePossibleRefactoring.create(clas, JavaPreferencesSettings.getCodeGenerationSettings(clas.getJavaProject()));
	private void validatePassingTest(String className, String[] cuNames, String superTypeFullName, boolean updateInstanceOf) throws Exception {		IType clas= getClassFromTestFile(getPackageP(), className);						UseSupertypeWherePossibleRefactoring ref= UseSupertypeWherePossibleRefactoring.create(clas, JavaPreferencesSettings.getCodeGenerationSettings());		ref.setUseSupertypeInInstanceOf(updateInstanceOf);					ICompilationUnit[] cus= new ICompilationUnit[cuNames.length];		for (int i= 0; i < cuNames.length; i++) {			cus[i]= createCUfromTestFile(clas.getPackageFragment(), cuNames[i]);					}		ref.setSuperTypeToUse(JavaModelUtil.findType(clas.getJavaProject(), superTypeFullName));		assertEquals("was supposed to pass", null, performRefactoring(ref));		for (int i= 0; i < cus.length; i++) {			String expected= getFileContents(getOutputTestFileName(cuNames[i]));			String actual= cus[i].getSource();			String message= "incorrect changes in " + cus[i].getElementName();			assertEqualLines(message, expected, actual);		}	}