void () { final ReplacePathToMacroMap map = new ReplacePathToMacroMap(); final String path = "jar://C:/idea/lib/forms_rt.jar!/"; map.put("jar://C:/", "jar://$MODULE_DIR$/../../"); final String substituted = map.substitute(path, false); assertEquals("jar://$MODULE_DIR$/../../idea/lib/forms_rt.jar!/", substituted); }