### Question:
IdeaConfiguration implements BatchExtension { public File getXMLDefinitionFile() { Writer writer = null; File xmlFile = new File(project.getFileSystem().getSonarWorkingDirectory(), CONFIGURATON_FILE); try { writer = new OutputStreamWriter(new FileOutputStream(xmlFile, false), CharEncoding.UTF_8); exporter.exportProfile(profile, writer); writer.flush(); return xmlFile; } catch (IOException e) { throw new SonarException("Fail to save the Idea Inspections configuration to " + xmlFile.getPath(), e); } finally { IOUtils.closeQuietly(writer); } } IdeaConfiguration(IdeaProfileExporter exporter, RulesProfile profile, Project project); File getXMLDefinitionFile(); List<File> getSourceFiles(); File getReportDirectory(); Charset getCharset(); String getJdkName(); String getJdkHome(); String getJavaHome(); String getMaxMemory(); String getPermSize(); String getInspectionsLibDir(); boolean isRunOnceParseMany(); File getIdeaProject();  }### Answer:
@Test public void writeConfigurationToWorkingDir() throws IOException { Project project = MavenTestUtils.loadProjectFromPom(getClass(), "writeConfigurationToWorkingDir/pom.xml"); IdeaProfileExporter exporter = new FakeExporter(); IdeaConfiguration configuration = new IdeaConfiguration(exporter, null, project); File xmlFile = configuration.getXMLDefinitionFile(); assertThat(xmlFile.exists(), is(true)); assertThat(FileUtils.readFileToString(xmlFile), is("<conf/>")); }