### Question:
AnnotatedSqlStatement { public ImmutableMap<String, List<Parameter>> getParameters() { return ImmutableMap.copyOf(this.parameters); } AnnotatedSqlStatement(LSql lSql, String statementSourceName, String statementName, String typeAnnotation, String sqlString); com.w11k.lsql.LSql getlSql(); String getStatementSourceName(); String getStatementName(); String getTypeAnnotation(); String getSqlString(); ImmutableMap<String, List<Parameter>> getParameters(); Map<String, Converter> getOutConverters(); PreparedStatement createPreparedStatement(Map<String, Object> queryParameters,
                                                     Map<String, Converter> parameterConverters);  }### Answer:
@Test public void statementQueryParameter() { setup(); AnnotatedSqlStatementToQuery<PlainQuery> statement = lSql.createSqlStatement("SELECT * FROM \n" + "person \n" + "WHERE \n" + "id = 99999 \n" + "and age = 11 \n;"); ImmutableMap<String, List<AnnotatedSqlStatement.Parameter>> params = statement.getParameters(); assertEquals(params.get("id").get(0).getName(), "id"); assertEquals(params.get("age").get(0).getName(), "age"); List<Row> rows = statement.query("id", (QueryParameter) (ps, index) -> ps.setInt(index, 1)).toList(); assertEquals(rows.size(), 1); }
@Test() public void queryParameterTypeAnnotations1() { setup(); AnnotatedSqlStatementToQuery<PlainQuery> statement = lSql.createSqlStatement( "select * from person where age > 18 ;"); AnnotatedSqlStatement.Parameter param = statement.getParameters().get("age").get(0); assertEquals(param.getJavaTypeAlias(), "int"); }
@Test() public void queryParameterTypeAnnotations2() { setup(); AnnotatedSqlStatementToQuery<PlainQuery> statement = lSql.createSqlStatement( "select * from person where age > 18 ;"); AnnotatedSqlStatement.Parameter param = statement.getParameters().get("age").get(0); assertEquals(param.getJavaTypeAlias(), "int"); }
@Test() public void queryParameterTypeAnnotations3() { setup(); AnnotatedSqlStatementToQuery<PlainQuery> statement = lSql.createSqlStatement( "select * from person where age > 18 ;"); AnnotatedSqlStatement.Parameter param = statement.getParameters().get("p1").get(0); assertEquals(param.getJavaTypeAlias(), "int"); }
@Test() public void queryParameterTypeAnnotations4() { setup(); AnnotatedSqlStatementToQuery<PlainQuery> statement = lSql.createSqlStatement( "select * from person where age > 18 ;"); AnnotatedSqlStatement.Parameter param = statement.getParameters().get("p1").get(0); assertEquals(param.getJavaTypeAlias(), "int"); }
@Test() public void queryParameterTypeAnnotations5() { setup(); AnnotatedSqlStatementToQuery<PlainQuery> statement = lSql.createSqlStatement( "select * from person where age > 18 ;"); AnnotatedSqlStatement.Parameter param = statement.getParameters().get("p1").get(0); assertEquals(param.getJavaTypeAlias(), "int"); }