### Question:
StringUtils { public static String strReplaceAll(String orig, String pattern, String str) { return orig.replaceAll(pattern, Matcher.quoteReplacement(str)); } private  StringUtils(); static String strReplaceAll(String orig, String pattern, String str); static String getEscapedValue(String value); static String getUnescapedValue(String value); static final String AMPERSAND; static final String ESCAPE_AMPERSAND; static final String PROPERTY_VALUE_DELIMITER; static final String ESCAPE_DELIMITER; }### Answer:
@Test public void replaceAllHandlesStringAsLiteral() { assertThat(StringUtils.strReplaceAll("@token@", "@token@", "$\\$\\$")).isEqualTo("$\\$\\$"); }
@Test public void replaceAllReplacesAllOccurrences() { assertThat(StringUtils.strReplaceAll("<a>@token@<a><b> 123 </b>@token@<c> +.? </c>", "@token@", "$\\$\\$")) .isEqualTo("<a>$\\$\\$<a><b> 123 </b>$\\$\\$<c> +.? </c>"); }