DiffAnalyticsDao { DatabaseQuery<Object> buildSelect(String geneId) { return new DiffAnalyticsQueryBuilder(geneId).buildSelect(); } @Inject  DiffAnalyticsDao(DataSource dataSource, DiffAnalyticsRowMapper dbeRowMapper);   DiffAnalyticsDao(JdbcTemplate jdbcTemplate, DiffAnalyticsRowMapper dbeRowMapper); List<DiffAnalytics> fetchTopExpressions(String geneId);  }
@Test public void weQueryWithSomeReallyGoodSql() { String geneId = "geneId"; String v = subject.buildSelect(geneId).getQuery(); assertTrue(Pattern.matches("SELECT.*FROM.*", v.toUpperCase())); assertTrue(v.toUpperCase().contains("PRIVATE = 'F'")); }