@Test
public void testListDomainTemplates() throws Exception {

    
    JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
    
    Mockito.when(mockResultSet.next())
        .thenReturn(true) // domain id
        .thenReturn(true)
        .thenReturn(true)
        .thenReturn(true)
        .thenReturn(false);
    Mockito.when(mockResultSet.getString(1))
        .thenReturn("vipng")
        .thenReturn("platforms")
        .thenReturn("user_understanding");
    Mockito.when(mockResultSet.getInt(1)).thenReturn(1); // domain id
    List<String> templates = jdbcConn.listDomainTemplates("my-domain");
    
    // data back is sorted
    
    assertEquals(3, templates.size());
    assertEquals("platforms", templates.get(0));
    assertEquals("user_understanding", templates.get(1));
    assertEquals("vipng", templates.get(2));
    jdbcConn.close();
}