### Question:
RadlFileAssembler { public static File assemble(File radlFile, File targetDirectory) { File result = createOutputFile(radlFile, targetDirectory); try { Xml.identityTransform(Xml.parseWithIncludes(radlFile), result); } catch (XmlException e) { Log.error("Failed to assemble RADL file: " + e.getMessage()); return radlFile; } return result; } private  RadlFileAssembler(); static File assemble(File radlFile, File targetDirectory); static final String XINCLUDE_FIXUP_BASE_URI; static final String XINCLUDE_FIXUP_LANGUAGE; }### Answer:
@Test public void testAssembleCompleteRadlFile() throws Exception { URL completeFilePath = this.getClass().getResource("sample-complete.radl"); File completeFile = new File(completeFilePath.getFile()); assembled = RadlFileAssembler.assemble(completeFile, null); assertXmlEquals(completeFile, assembled); }
@Test public void testAssembleRadlFilesWithXinclude() throws Exception { URL completeFilePath = this.getClass().getResource("sample-complete.radl"); File completeFile = new File(completeFilePath.getFile()); URL part1Path = this.getClass().getResource("sample-part1.radl"); File part1 = new File(part1Path.getFile()); assembled = RadlFileAssembler.assemble(part1, null); assertXmlEquals(completeFile, assembled); }
@Test public void testAssembleRadlFilesWithXincludeAndLocation() throws Exception { URL completeFilePath = this.getClass().getResource("sample-complete.radl"); File completeFile = new File(completeFilePath.getFile()); URL part1Path = this.getClass().getResource("sample-part1.radl"); File part1 = new File(part1Path.getFile()); File dir = new File("build/test-data/" + System.nanoTime()); assertFalse("Directory does not exist:" + dir, dir.exists()); assembled = RadlFileAssembler.assemble(part1, dir); assertXmlEquals(completeFile, assembled); assertTrue("Directory is created:" + dir, dir.exists()); }