### Question:
JScpWorker { URI getURIRespectingUsername(URI uri) throws URISyntaxException { if (userName != null && uri.getUserInfo() == null) { uri = new URI(uri.getScheme(), userName, uri.getHost(), uri.getPort(), uri.getPath(), uri.getQuery(), uri.getFragment()); } return uri; } JScpWorker(String userName); FileObject getFileObjectByUri(String file); FileObject getFileObjectByUri(URI file); FileSystemOptions getSftpDefaultOptions();  }### Answer:
@Test public void getURIRespectingUsernameChanges() throws FileSystemException, URISyntaxException { JScpWorker worker = new JScpWorker("uname"); URI uri = worker.getURIRespectingUsername(URI.create("sftp: Assert.assertEquals(uri, URI.create("sftp: }
@Test public void getURIRespectingUsernameDoesntChange1() throws FileSystemException, URISyntaxException { JScpWorker worker = new JScpWorker("uname"); URI uri = worker.getURIRespectingUsername(URI.create("sftp: Assert.assertEquals(uri, URI.create("sftp: }
@Test public void getURIRespectingUsernameDoesntChange2() throws FileSystemException, URISyntaxException { JScpWorker worker = new JScpWorker("uname"); URI uri = worker.getURIRespectingUsername(URI.create("sftp: Assert.assertEquals(uri, URI.create("sftp: }