public static String sanitizeStreamName(String streamName) {
        Matcher problemCharacterMatcher = Pattern.compile("(?![A-Za-z_\\-\\.]).").matcher(streamName);
        if (streamName.length() > 0 && Character.isLetter(streamName.charAt(0))) {
            return problemCharacterMatcher.replaceAll("_");
        } else {
            return "_s" + problemCharacterMatcher.replaceAll("_");
        }
    }
@Test
    public void testSanitizeStreamName() {
        // replaces the expected characters with underscores (everything except A-Z, a-z, dot, dash, and underscore)
        assertEquals("my-stream_with.all_characterClasses____",
                UIHelpers.sanitizeStreamName("my-stream:with.all_characterClasses1/\\2"));

        // has the expected effect when streamName begins with a non-alpha character
        assertEquals("_s_foo", UIHelpers.sanitizeStreamName("3foo"));

        // handles empty string, though that's not an expected stream name
        assertEquals("_s", UIHelpers.sanitizeStreamName(""));
    }