@Test
public void testGetSSHCertRecord() throws Exception {

    Mockito.when(mockResultSet.next()).thenReturn(true);
    Mockito.doReturn("host1,host2").when(mockResultSet).getString(JDBCSSHRecordStoreConnection.DB_COLUMN_PRINCIPALS);
    Mockito.doReturn("10.10.10.11").when(mockResultSet).getString(JDBCSSHRecordStoreConnection.DB_COLUMN_CLIENT_IP);
    Mockito.doReturn("10.10.10.12").when(mockResultSet).getString(JDBCSSHRecordStoreConnection.DB_COLUMN_PRIVATE_IP);
    JDBCSSHRecordStoreConnection jdbcConn = new JDBCSSHRecordStoreConnection(mockConn);
    SSHCertRecord certRecord = jdbcConn.getSSHCertRecord("instance-id", "athenz.api");
    assertEquals(certRecord.getInstanceId(), "instance-id");
    assertEquals(certRecord.getService(), "athenz.api");
    assertEquals(certRecord.getPrincipals(), "host1,host2");
    assertEquals(certRecord.getClientIP(), "10.10.10.11");
    assertEquals(certRecord.getPrivateIP(), "10.10.10.12");
    jdbcConn.close();
}