### Question:
PayloadFilesManager { protected URI getOutputFileURI(Part part, String name) throws IOException { if (name.startsWith("/")) { name = name.substring(1); } return getParentURI(part).resolve(name); } private  PayloadFilesManager(
            final File targetDir,
            final ActionReport report,
            final Logger logger,
            final ActionReportHandler reportHandler); private  PayloadFilesManager(
            final File targetDir,
            final ActionReport report,
            final Logger logger); Map<File,Properties> processPartsExtended(
            final Payload.Inbound inboundPayload); List<File> processParts(
            final Payload.Inbound inboundPayload); static final LocalStringManagerImpl strings; }### Answer:
@Test public void testGetOutputFileURI() throws Exception { PayloadFilesManager.Temp instance = new PayloadFilesManager.Temp(Logger.getAnonymousLogger()); try { String originalPath = "way/over/there/myApp.ear"; Part testPart = PayloadImpl.Part.newInstance("text/plain", originalPath, null, "random content"); URI result = instance.getOutputFileURI(testPart, testPart.getName()); assertTrue(result.toASCIIString().endsWith("/myApp.ear")); } finally { instance.cleanup(); } }
@Test public void testBraces() throws Exception { final File tmpDir = File.createTempFile("gfpayl{braces}", "tmp"); tmpDir.delete(); tmpDir.mkdir(); try { final PayloadFilesManager instance = new PayloadFilesManager.Perm(tmpDir, null, Logger.getAnonymousLogger()); final String originalPath = "some/path"; final Part testPart = PayloadImpl.Part.newInstance("text/plain", originalPath, null, "random content"); final URI result = instance.getOutputFileURI(testPart, testPart.getName()); assertFalse(result.toASCIIString().contains("{")); } finally { PayloadFilesManagerTest.cleanup(tmpDir); } }