} catch (InvalidSelectorException e) {
}
}
protected void assertSelector(Message message, String text, boolean expected) throws JMSException {
BooleanExpression selector = SelectorParser.parse(text);
assertTrue("Created a valid selector", selector != null);
MessageEvaluationContext context = new MessageEvaluationContext();
context.setMessageReference((org.apache.activemq.command.Message)message);
boolean value = selector.matches(context);
assertEquals("Selector for: " + text, expected, value);
}