@Test
public void testKeyInPropertiesStrictDecoding() throws Exception {

    Properties options = new Properties();
    options.setProperty("security.publickey.test", "NOT A KEY");
    options.setProperty("keystore.strictpublickeydecoding", "true");
    KeyStoreBuilder builder = new KeyStoreBuilder(options, nullOpener);
    try {
        builder.buildKeyStore();
        fail("Expected an exception");
    } catch (RuntimeException e) {
        assertEquals("Could not decode key for test", e.getMessage());
    }
}