@Test
public void testCountPublicKeys() throws Exception {

    
    JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
    Mockito.when(mockResultSet.getInt(1)).thenReturn(5).thenReturn(7).thenReturn(2); 
        // return domain/service id/count
    
    Mockito.when(mockResultSet.next()).thenReturn(true);
    
    assertEquals(jdbcConn.countPublicKeys("my-domain", "service1"), 2);
    jdbcConn.close();
}