@Test
public void testGetVarListInString() throws IOException {

  String srcRegex = "/(\\w+)";
  String target = "/$0/${1}/$1/${2}/${2}";
  RegexMountPoint regexMountPoint =
      new RegexMountPoint(inodeTree, srcRegex, target, null);
  regexMountPoint.initialize();
  Map<String, Set<String>> varMap = regexMountPoint.getVarInDestPathMap();
  Assert.assertEquals(varMap.size(), 3);
  Assert.assertEquals(varMap.get("0").size(), 1);
  Assert.assertTrue(varMap.get("0").contains("$0"));
  Assert.assertEquals(varMap.get("1").size(), 2);
  Assert.assertTrue(varMap.get("1").contains("${1}"));
  Assert.assertTrue(varMap.get("1").contains("$1"));
  Assert.assertEquals(varMap.get("2").size(), 1);
  Assert.assertTrue(varMap.get("2").contains("${2}"));
}