@Test
public void testIsValid()
{

    Map<String, Object> vars = new HashMap<>();
    
    vars.put( "v1", "12" );
    
    assertTrue( ExpressionUtils.isValid( "2 + 8", null ) );
    assertTrue( ExpressionUtils.isValid( "3 - v1", vars ) );
    assertTrue( ExpressionUtils.isValid( "d2:zing(1)", null ) );
    assertTrue( ExpressionUtils.isValid( "d2:oizp(1)", null ) );
    assertTrue( ExpressionUtils.isValid( "d2:oizp(d2:zing(1))", null ) );
    assertTrue( ExpressionUtils.isValid( "d2:daysBetween('2015-02-01','2015-04-02')", null ) );
    assertTrue( ExpressionUtils.isValid( "(d2:zing(1)+d2:zing(1))*50/1", null ) );
    assertTrue( ExpressionUtils.isValid( "d2:condition('1 > 100',5,100)", null ) );
    assertTrue( ExpressionUtils.isValid( "1/(1/100)", null ) );
    assertTrue( ExpressionUtils.isValid( "SUM(1)", null ) );
    assertTrue( ExpressionUtils.isValid( "avg(2+1)", null ) );
    
    assertFalse( ExpressionUtils.isValid( "2 a 3", null ) );
    assertFalse( ExpressionUtils.isValid( "4 b", vars ) );
    assertFalse( ExpressionUtils.isValid( "4 + A", vars ) );
    assertFalse( ExpressionUtils.isValid( "4 + someunkownvar", vars ) );
    assertFalse( ExpressionUtils.isValid( "aver(2+1)", null ) );
}