public static String escape(final String raw) {
        if (raw == null) {
            return null;
        }

        final String escapedCurlyBrackets = CURLY_BRACKET_ESCAPE.matcher(raw).replaceAll("\\\\$1\\}");

        return URL_ESCAPE.matcher(escapedCurlyBrackets).replaceAll("\\\\$1");
    }
@Test
    public void shouldBeRobustAtEscaping() {
        assertThat(MvelHelper.escape(null)).isNull();
        assertThat(MvelHelper.escape("")).isEmpty();
        assertThat(MvelHelper.escape(" ")).isEqualTo(" ");
    }