} catch (InvalidAlgorithmParameterException e) {
}
}
public void testEngineGetTrustManagers() throws Exception {
TrustManagerFactoryImpl tmf = new TrustManagerFactoryImpl();
try {
tmf.engineGetTrustManagers();
fail("No expected IllegalStateException");
} catch (IllegalStateException e) {
// expected
}
KeyStore ks;
ks = KeyStore.getInstance("BKS");
ks.load(null, null);
tmf.engineInit(ks);
TrustManager[] tma = tmf.engineGetTrustManagers();
assertEquals("Incorrect array length", 1, tma.length);
assertTrue("Incorrect KeyManager type",
tma[0] instanceof TrustManagerImpl);
}