path.delete();
// Generate
SimpleGeneratorHostKeyProvider provider = new SimpleGeneratorHostKeyProvider();
provider.setAlgorithm("EC");
provider.setKeySpec(new ECGenParameterSpec("prime256v1"));
provider.setPath(path.getPath());
assertEquals(KeyPairProvider.ECDSA_SHA2_NISTP256, provider.getKeyTypes());
assertNotNull(provider.loadKey(KeyPairProvider.ECDSA_SHA2_NISTP256));
// Read existing
provider = new SimpleGeneratorHostKeyProvider();
provider.setAlgorithm("EC");
provider.setKeySpec(new ECGenParameterSpec("prime256v1"));
provider.setPath(path.getPath());
assertEquals(KeyPairProvider.ECDSA_SHA2_NISTP256, provider.getKeyTypes());
assertNotNull(provider.loadKey(KeyPairProvider.ECDSA_SHA2_NISTP256));
}