ClientSessionFactory cf = locator.createSessionFactory();
ClientSessionInternal clientSession = (ClientSessionInternal)cf.createSession(false, true, true);
clientSession.createQueue(queueName, queueName, false);
try
{
clientSession.createConsumer(queueName, "this is not valid filter");
Assert.fail("should throw exception");
}
catch (HornetQException e)
{
Assert.assertEquals(e.getCode(), HornetQException.INVALID_FILTER_EXPRESSION);