@Test
public void testIds() throws Exception {
final ST4StatementLocator statementLocator = new ST4StatementLocator(new STGroupFile("org/skife/jdbi/v2/sqlobject/stringtemplate/Jun.sql.stg"));
Assert.assertEquals(0, statementLocator.locatedSqlCache.size());
Assert.assertEquals("select * from foo where id in ()", statementLocator.locate("get", new TestingStatementContext(ImmutableMap.<String, Object>of())));
Assert.assertEquals(1, statementLocator.locatedSqlCache.size());
Assert.assertEquals("select * from foo where id in ()", statementLocator.locatedSqlCache.get("get"));
Assert.assertEquals("select * from foo where id in (:__ids_0)", statementLocator.locate("get", new TestingStatementContext(ImmutableMap.<String, Object>of("ids", ":__ids_0"))));
Assert.assertEquals(2, statementLocator.locatedSqlCache.size());
Assert.assertEquals("select * from foo where id in (:__ids_0)", statementLocator.locatedSqlCache.get("get___#___ids___#___:__ids_0"));
Assert.assertEquals("select * from foo where id in (:__ids_0,:__ids_1)", statementLocator.locate("get", new TestingStatementContext(ImmutableMap.<String, Object>of("ids", ":__ids_0,:__ids_1"))));
Assert.assertEquals(3, statementLocator.locatedSqlCache.size());
Assert.assertEquals("select * from foo where id in (:__ids_0,:__ids_1)", statementLocator.locatedSqlCache.get("get___#___ids___#___:__ids_0,:__ids_1"));
}
}