Example #1
0
 @Test
 public void testConstructor() throws Exception {
   Class<HMAC> c = HMAC.class;
   assertEquals(1, c.getDeclaredConstructors().length);
   Constructor<HMAC> constructor = c.getDeclaredConstructor();
   assertTrue(Modifier.isPrivate(constructor.getModifiers()));
   constructor.setAccessible(true);
   constructor.newInstance();
 }