### Question:
IRODSUriUtils { public static URI buildURIForAnAccountAndPath(final IRODSAccount irodsAccount, final String irodsPath) { if (irodsAccount == null) { throw new IllegalArgumentException("null iRODSAccount"); } if (irodsPath == null || irodsPath.isEmpty()) { throw new IllegalArgumentException("null or empty irodsAbsolutePath"); } final IRODSUriUserInfo info = IRODSUriUserInfo.unauthenticatedLocalInstance(irodsAccount.getUserName()); final String absPath = mkPathAbs(irodsAccount.getHomeDirectory(), irodsPath); return buildBaseURI(irodsAccount.getHost(), irodsAccount.getPort(), absPath, info); }  static IRODSUriUserInfo getUserInfo(final URI irodsURI); static String getUserName(final URI irodsURI); static String getZone(final URI irodsURI); static String getPassword(final URI irodsURI); static String getHostFromURI(final URI uri); static int getPortFromURI(final URI uri); static String getAbsolutePathFromURI(final URI uri); static IRODSAccount getIRODSAccountFromURI(final URI irodsURI); static boolean isIRODSURIScheme(final URI irodsURI); static URI buildBaseURI(final String host, final int port, final IRODSUriUserInfo userInfo); static URI buildBaseURI(final String host, final int port, final String username); static URI buildURI(final String host, final int port, final IRODSUriUserInfo userInfo,
			final String absPath); static URI buildURI(final String host, final int port, final String username, final String absPath); static URI buildAnonymousURI(final String host, final int port, final String absPath); static URI buildURIForAnAccountAndPath(final IRODSAccount irodsAccount, final String irodsPath); static URI buildURIForAnAccountWithNoUserInformationIncluded(final IRODSAccount irodsAccount,
			final String irodsPath);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testBuildURIForAnAccountAndPathNoAccount() { buildURIForAnAccountAndPath(null, "/"); }
@Test(expected = IllegalArgumentException.class) public void testBuildURIForAnAccountAndPathNoPath() throws Exception { final IRODSAccount acnt = IRODSAccount.instance("host", 10000, "user", "password", "/zone/home/user", "zone", ""); buildURIForAnAccountAndPath(acnt, null); }
@Test public void testBuildURIForAnAccountAndAbsPath() throws Exception { final IRODSAccount acnt = IRODSAccount.instance("host", 10000, "user", "password", "/zone/home/user", "zone", ""); final URI actual = buildURIForAnAccountAndPath(acnt, "/"); assertEquals(new URI("irods: }
@Test public void testBuildURIForAnAccountAndRelPath() throws Exception { final IRODSAccount acnt = IRODSAccount.instance("host", 10000, "user", "password", "/zone/home/user", "zone", ""); final URI actual = buildURIForAnAccountAndPath(acnt, "file.txt"); final URI expected = new URI("irods: assertEquals(expected, actual); }