@Test
public void testValidInvalidFilters() {

    // invalid
    assertThat(SseUtil.isValidTopicFilter("openhab/.*"), is(false));
    assertThat(SseUtil.isValidTopicFilter("openhab/\\w*/"), is(false));
    assertThat(SseUtil.isValidTopicFilter("sm.*/test/"), is(false));
    assertThat(SseUtil.isValidTopicFilter("openhab.*"), is(false));
    // valid
    assertThat(SseUtil.isValidTopicFilter("openhab"), is(true));
    assertThat(SseUtil.isValidTopicFilter(""), is(true));
    assertThat(SseUtil.isValidTopicFilter(", openhab/*"), is(true));
    assertThat(SseUtil.isValidTopicFilter("openhab,qivicon"), is(true));
    assertThat(SseUtil.isValidTopicFilter("openhab , qivicon"), is(true));
    assertThat(SseUtil.isValidTopicFilter("openhab,    qivicon"), is(true));
    assertThat(SseUtil.isValidTopicFilter("openhab/test"), is(true));
    assertThat(SseUtil.isValidTopicFilter("openhab/test/test/test/test/test"), is(true));
    assertThat(SseUtil.isValidTopicFilter("openhab/test/test/test/test/test,    openhab/test/test/test/test/test"),
            is(true));
    assertThat(
            SseUtil.isValidTopicFilter(
                    "openhab/test/test/test/test/test,    openhab/test/test/test/test/test, openhab,qivicon"),
            is(true));
    assertThat(SseUtil.isValidTopicFilter("////////////"), is(true));
    assertThat(SseUtil.isValidTopicFilter("*/added"), is(true));
    assertThat(SseUtil.isValidTopicFilter("*added"), is(true));
    assertThat(SseUtil.isValidTopicFilter("openhab/test/test:test:123/test"), is(true));
    assertThat(SseUtil.isValidTopicFilter("openhab/test/test-test-123-test:test:123/test"), is(true));
}