@Override
  public X509Certificate[] getAcceptedIssuers() {
    X509Certificate[] issuers = EMPTY;
    X509TrustManager tm = trustManagerRef.get();
    if (tm != null) {
      issuers = tm.getAcceptedIssuers();
    }
    return issuers;
  }
@Test
  public void testNoPassword() throws Exception {
    KeyPair kp = generateKeyPair("RSA");
    cert1 = generateCertificate("CN=Cert1", kp, 30, "SHA1withRSA");
    cert2 = generateCertificate("CN=Cert2", kp, 30, "SHA1withRSA");
    String truststoreLocation = BASEDIR + "/testreload.jks";
    createTrustStore(truststoreLocation, "password", "cert1", cert1);

    Timer fileMonitoringTimer = new Timer(FileBasedKeyStoresFactory.SSL_MONITORING_THREAD_NAME, true);
    final ReloadingX509TrustManager tm =
        new ReloadingX509TrustManager("jks", truststoreLocation, null);
    try {
      fileMonitoringTimer.schedule(new FileMonitoringTimerTask(
              Paths.get(truststoreLocation), tm::loadFrom,null), 10, 10);
      assertEquals(1, tm.getAcceptedIssuers().length);
    } finally {
      fileMonitoringTimer.cancel();
    }
  }