@Test
public void testInitFromLogManager() throws Exception {

    final LogManager manager = LogManager.getLogManager();
    synchronized (manager) {
        try {
            initGoodTest(MailHandler.class, new Class<?>[0], new Object[0]);
            initBadTest(MailHandler.class, new Class<?>[0], new Object[0]);
            initGoodTest(MailHandler.class,
                    new Class<?>[]{Integer.TYPE}, new Object[]{10});
            initBadTest(MailHandler.class,
                    new Class<?>[]{Integer.TYPE}, new Object[]{100});
            initGoodTest(MailHandler.class,
                    new Class<?>[]{Properties.class},
                    new Object[]{new Properties()});
            initBadTest(MailHandler.class,
                    new Class<?>[]{Properties.class},
                    new Object[]{new Properties()});
            //Test subclass properties.
            initGoodTest(MailHandlerExt.class,
                    new Class<?>[0], new Object[0]);
            initBadTest(MailHandlerExt.class,
                    new Class<?>[0], new Object[0]);
            initGoodTest(MailHandlerExt.class,
                    new Class<?>[]{Integer.TYPE}, new Object[]{10});
            initBadTest(MailHandlerExt.class,
                    new Class<?>[]{Integer.TYPE}, new Object[]{100});
            initGoodTest(MailHandlerExt.class,
                    new Class<?>[]{Properties.class},
                    new Object[]{new Properties()});
            initBadTest(MailHandlerExt.class,
                    new Class<?>[]{Properties.class},
                    new Object[]{new Properties()});
        } finally {
            manager.reset();
        }
    }
}