@Test
public void testMount() throws Exception {

    String sampleUriStr = "cifs://192.168.1.128/CSHV3?user=administrator&password=1pass%40word1&foo=bar";
    URI sampleUri = new URI(sampleUriStr);
    s_logger.info("Check HostIp parsing");
    String hostIpStr = resource.getUriHostIp(sampleUri);
    Assert.assertEquals("Expected host IP " + sampleUri.getHost() + " and actual host IP " + hostIpStr + " differ.", sampleUri.getHost(), hostIpStr);
    s_logger.info("Check option parsing");
    String expected = "user=administrator,password=1pass@word1,foo=bar,";
    String actualOpts = resource.parseCifsMountOptions(sampleUri);
    Assert.assertEquals("Options should be " + expected + " and not " + actualOpts, expected, actualOpts);
    // attempt a configured mount
    final Map<String, Object> params = PropertiesUtil.toMap(loadProperties());
    String sampleMount = (String)params.get("testCifsMount");
    if (!sampleMount.isEmpty()) {
        s_logger.info("functional test, mount " + sampleMount);
        URI realMntUri = new URI(sampleMount);
        String mntSubDir = resource.mountUri(realMntUri);
        s_logger.info("functional test, umount " + mntSubDir);
        resource.umount(resource.getMountingRoot() + mntSubDir, realMntUri);
    } else {
        s_logger.info("no entry for testCifsMount in " + "./conf/agent.properties - skip functional test");
    }
}