@Test
public void testUpdateSSHCertRecord() {

    InstanceCertManager instance = new InstanceCertManager(null, null, null, true);
    instance.setSSHSigner(null);
    SSHRecordStore certStore = Mockito.mock(SSHRecordStore.class);
    SSHRecordStoreConnection certConnection = Mockito.mock(SSHRecordStoreConnection.class);
    when(certStore.getConnection()).thenReturn(certConnection);
    instance.setSSHStore(certStore);
    // when record is null, we get success all the time
    assertTrue(instance.updateSSHCertRecord(null, true));
    // now let's set our mock object to return success
    // and pass a real object
    when(certConnection.updateSSHCertRecord(ArgumentMatchers.isA(SSHCertRecord.class))).thenReturn(true);
    SSHCertRecord sshCertRecord = new SSHCertRecord();
    assertTrue(instance.updateSSHCertRecord(sshCertRecord, true));
    instance.shutdown();
}