QueryResolver queryResolver = new ParametrizedQueryResolver(unresolvedTemplateQuery, paramValueResolver);
DbConnection connection = mock(DbConnection.class);
when(connection.getParamTypes(unresolvedTemplateQuery.getQueryTemplate())).thenReturn(Collections.singletonMap(1, JdbcTypes.INTEGER_DB_TYPE));
Query resolvedQuery = queryResolver.resolve(connection, muleEvent);
assertThat(unresolvedTemplateQuery, not(sameInstance(resolvedQuery)));
assertThat(unresolvedTemplateQuery.getQueryTemplate().getSqlText(), equalTo(resolvedQuery.getQueryTemplate().getSqlText()));
assertThat(resolvedQuery.getQueryTemplate().getParams().get(0).getType(), equalTo(JdbcTypes.INTEGER_DB_TYPE));
assertThat(resolvedParams, sameInstance(resolvedQuery.getParamValues()));
assertThat((String) resolvedParams.get(0).getValue(), equalTo("foo"));
}