@Test
public void testGenerateDomainTemplateVersionQuery() throws SQLException {

    Map<String, Integer> templateDetails = new HashMap<>();
    String templateName1 = "aws";
    String templateName2 = "aws_bastion";
    templateDetails.put(templateName1, 1);
    templateDetails.put(templateName2, 2);
    String expectedQuery = "SELECT domain.name, domain_template.template FROM domain_template JOIN domain ON domain_template.domain_id=domain.domain_id WHERE" +
            " (domain_template.template = 'aws_bastion' and current_version < 2) OR (domain_template.template = 'aws' and current_version < 1);";
    JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
    String generatedQuery = jdbcConn.generateDomainTemplateVersionQuery(templateDetails);
    assertNotNull(generatedQuery);
    assertEquals(generatedQuery, expectedQuery);
}