use of org.apache.harmony.security.tests.support.RandomImpl in project robovm by robovm.
the class ProviderServiceTest method testNewInstance.
public void testNewInstance() throws Exception {
Provider p = new MyProvider();
Provider.Service s = new Provider.Service(p, "SecureRandom", "algorithm", "org.apache.harmony.security.tests.support.RandomImpl", null, null);
Object o = s.newInstance(null);
assertTrue("incorrect instance", o instanceof RandomImpl);
try {
o = s.newInstance(new Object());
fail("No expected NoSuchAlgorithmException");
} catch (NoSuchAlgorithmException e) {
}
}
Aggregations