@Test
public void testResolve() throws IOException {

  String regexStr = "^/user/(?<username>\\w+)";
  String dstPathStr = "/namenode1/testResolve/$username";
  String settingsStr = null;
  RegexMountPoint regexMountPoint =
      new RegexMountPoint(inodeTree, regexStr, dstPathStr, settingsStr);
  regexMountPoint.initialize();
  InodeTree.ResolveResult resolveResult =
      regexMountPoint.resolve("/user/hadoop/file1", true);
  Assert.assertEquals(resolveResult.kind, InodeTree.ResultKind.EXTERNAL_DIR);
  Assert.assertTrue(
      resolveResult.targetFileSystem
          instanceof TestRegexMountPointFileSystem);
  Assert.assertEquals("/user/hadoop", resolveResult.resolvedPath);
  Assert.assertTrue(
      resolveResult.targetFileSystem
          instanceof TestRegexMountPointFileSystem);
  Assert.assertEquals("/namenode1/testResolve/hadoop",
      ((TestRegexMountPointFileSystem) resolveResult.targetFileSystem)
          .getUri().toString());
  Assert.assertEquals("/file1", resolveResult.remainingPath.toString());
}