JDBCCertRecordStore implements CertRecordStore { @Override public void log(final Principal principal, final String ip, final String provider, final String instanceId, final X509Certificate x509Cert) { X509CertUtils.logCert(CERTLOGGER, principal, ip, provider, instanceId, x509Cert); } JDBCCertRecordStore(PoolableDataSource src); @Override CertRecordStoreConnection getConnection(); @Override void setOperationTimeout(int opTimeout); @Override void clearConnections(); @Override void log(final Principal principal, final String ip, final String provider,
                    final String instanceId, final X509Certificate x509Cert); @Override boolean enableNotifications(NotificationManager notificationManager, RolesProvider rolesProvider, final String serverName);  }
@Test public void testLog() { PoolableDataSource mockDataSrc = Mockito.mock(PoolableDataSource.class); JDBCCertRecordStore store = new JDBCCertRecordStore(mockDataSrc); File file = new File("src/test/resources/cert_log.pem"); String pem = null; try { pem = new String(Files.readAllBytes(file.toPath())); } catch (IOException ex) { fail(); } X509Certificate cert = Crypto.loadX509Certificate(pem); Principal principal = SimplePrincipal.create("user", "joe", "creds"); store.log(principal, "10.11.12.13", "athens.provider", "1234", cert); }