### Question:
UrlUtil { public static String sanitizeUrlPart(IPrimitiveType<?> theString) { String retVal = null; if (theString != null) { retVal = sanitizeUrlPart(theString.getValueAsString()); } return retVal; }  static String constructAbsoluteUrl(String theBase, String theEndpoint); static String constructRelativeUrl(String theParentExtensionUrl, String theExtensionUrl); static String escapeUrlParam(String theUnescaped); static boolean isAbsolute(String theValue); static boolean isNeedsSanitization(CharSequence theString); static boolean isValid(String theUrl); static RuntimeResourceDefinition parseUrlResourceType(FhirContext theCtx, String theUrl); static Map<String, String[]> parseQueryString(String theQueryString); static Map<String, String[]> parseQueryStrings(String... theQueryString); static UrlParts parseUrl(String theUrl); static String sanitizeUrlPart(IPrimitiveType<?> theString); static String sanitizeUrlPart(CharSequence theString); static String[] sanitizeUrlPart(String[] theParameterValues); static String unescape(String theString); static List<NameValuePair> translateMatchUrl(String theMatchUrl);  }### Answer:
@Test public void testSanitize() { assertEquals(" &apos; ", UrlUtil.sanitizeUrlPart(" ' ")); assertEquals(" &lt; ", UrlUtil.sanitizeUrlPart(" < ")); assertEquals(" &gt; ", UrlUtil.sanitizeUrlPart(" > ")); assertEquals(" &quot; ", UrlUtil.sanitizeUrlPart(" \" ")); assertEquals(" &#10; ", UrlUtil.sanitizeUrlPart(" \n ")); assertEquals(" &#13; ", UrlUtil.sanitizeUrlPart(" \r ")); assertEquals(" ", UrlUtil.sanitizeUrlPart(" \0 ")); }