@Test
public void testGetPublicKeyEntry() throws Exception {

    
    JDBCConnection jdbcConn = new JDBCConnection(mockConn, true);
    Mockito.when(mockResultSet.getInt(1))
        .thenReturn(5) // domain id
        .thenReturn(7); // service id
    Mockito.when(mockResultSet.next())
        .thenReturn(true) // this one is for domain id
        .thenReturn(true) // this one is for service id
        .thenReturn(true); // for key
    
    Mockito.when(mockResultSet.getString(ZMSConsts.DB_COLUMN_KEY_VALUE))
        .thenReturn("Value1");

    PublicKeyEntry publicKey = jdbcConn.getPublicKeyEntry("my-domain", "service1", "zone1", false);
    assertNotNull(publicKey);
    assertEquals("Value1", publicKey.getKey());
    assertEquals("zone1", publicKey.getId());
    jdbcConn.close();
}