### Question:
JBossWebPrincipalFactory extends GenericPrincipalFactory { static Constructor findJBossGenericPrincipalConstructor() { for (Constructor<?> c : JBossGenericPrincipal.class.getConstructors()) { if (c.getParameterTypes().length == 9 && c.getParameterTypes()[0].equals(Realm.class) && c.getParameterTypes()[1].equals(String.class) && c.getParameterTypes()[3].equals(List.class) && c.getParameterTypes()[4].equals(Principal.class) && c.getParameterTypes()[6].equals(Object.class) && c.getParameterTypes()[8].equals(Subject.class)) { return c; } } return null; }  @Override GenericPrincipal createPrincipal(Realm realm, final Principal identity, final Set<String> roleSet);  }### Answer:
@Test public void test() { Constructor constructor = JBossWebPrincipalFactory.findJBossGenericPrincipalConstructor(); Assert.assertNotNull(constructor); Assert.assertEquals(Realm.class, constructor.getParameterTypes()[0]); Assert.assertEquals(String.class, constructor.getParameterTypes()[1]); Assert.assertEquals(List.class, constructor.getParameterTypes()[3]); Assert.assertEquals(Principal.class, constructor.getParameterTypes()[4]); Assert.assertEquals(Object.class, constructor.getParameterTypes()[6]); Assert.assertEquals(Subject.class, constructor.getParameterTypes()[8]); }