@Test
public void testIsValid() {

    assertTrue(FilterExpression.isValid("a"));
    assertTrue(FilterExpression.isValid("a|b"));
    assertTrue(FilterExpression.isValid("!a"));
    assertTrue(FilterExpression.isValid("(((a)))"));
    assertFalse(FilterExpression.isValid("|"));
    assertFalse(FilterExpression.isValid("a|"));
    assertFalse(FilterExpression.isValid("|b"));
    assertFalse(FilterExpression.isValid("!|"));
    assertFalse(FilterExpression.isValid("!|b"));
    assertFalse(FilterExpression.isValid("((a)"));
}