}
@Test
public void definesTemplateWithComplexExpressionParam() throws Exception
{
QueryTemplate queryTemplate = parser.parse("SELECT * FROM PLANET WHERE POSITION = #[message.inboundProperties['position']] AND NAME= #[planetName]");
assertEquals(QueryType.SELECT, queryTemplate.getType());
assertEquals("SELECT * FROM PLANET WHERE POSITION = ? AND NAME= ?", queryTemplate.getSqlText());
assertEquals(2, queryTemplate.getInputParams().size());
InputQueryParam param1 = queryTemplate.getInputParams().get(0);
assertEquals(UnknownDbType.getInstance(), param1.getType());
assertNull(param1.getName());
assertEquals("#[message.inboundProperties['position']]", param1.getValue());
InputQueryParam param2 = queryTemplate.getInputParams().get(1);
assertEquals(UnknownDbType.getInstance(), param2.getType());
assertNull(param2.getName());
assertEquals("#[planetName]", param2.getValue());
}