@Test
public void testKeyInProperties() throws Exception {

    Properties options = new Properties();
    options.setProperty("security.publickey.test", encoded);
    KeyStoreBuilder builder = new KeyStoreBuilder(options, nullOpener);
    KeyStore store = builder.buildKeyStore();
    Enumeration<String> aliases = store.aliases();
    assertTrue("There is at least one alias", aliases.hasMoreElements());
    assertEquals("test", aliases.nextElement());
    Certificate cert = store.getCertificate("test");
    assertNotNull("Could not find certificate", cert);
    assertEquals(key, cert.getPublicKey());
}