@Test public void multipleRegexInformationCanBeRetrievedForParameter() { String idRegex = "[0-9]*"; String sidRegex = "[0-9]{1,9}"; String imeiRegex = "[0-9\\:\\/]{15}"; String pathBuilder = "{id: " + idRegex + "}" + "/subpath" + "/{sid: " + sidRegex + "}" + "/mobile" + "/{imei: " + imeiRegex + "}"; Element element = buildElement(pathBuilder); PathDetails pathDetails = new PathDetails(element); assertThat(pathDetails.getRegex("id")).isEqualTo(idRegex); assertThat(pathDetails.getRegex("sid")).isEqualTo(sidRegex); assertThat(pathDetails.getRegex("imei")).isEqualTo(imeiRegex); assertThat(pathDetails.getRegex("subpath")).isNull(); assertThat(pathDetails.getRegex("mobile")).isNull(); }
public String getRegex(String paramName) { return regexes.get(paramName); }
PathDetails { public String getRegex(String paramName) { return regexes.get(paramName); } }
PathDetails { public String getRegex(String paramName) { return regexes.get(paramName); } PathDetails(Element element);  PathDetails(
            Element element,
            PathDetails basePath); }
PathDetails { public String getRegex(String paramName) { return regexes.get(paramName); } PathDetails(Element element);  PathDetails(
            Element element,
            PathDetails basePath); String getValue(); String getRegex(String paramName); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
PathDetails { public String getRegex(String paramName) { return regexes.get(paramName); } PathDetails(Element element);  PathDetails(
            Element element,
            PathDetails basePath); String getValue(); String getRegex(String paramName); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }