@Test
public void testInit() throws Exception {

    boolean error = false;
    try {
        ExtensionLoader loader = new ExtensionLoader(null, false, null);
    } catch (Exception e) {
        error = true;
    }
    Assert.assertTrue(error);
    Field field = RpcRunningState.class.getDeclaredField("shuttingDown");
    field.setAccessible(true);
    boolean origin = (Boolean) field.get(null);
    try {
        field.set(null, true);
        ExtensionLoader loader = new ExtensionLoader(Filter.class, null);
        Assert.assertNull(loader.getAllExtensions());
    } finally {
        field.set(null, origin);
    }
    error = false;
    try {
        ExtensionLoader loader = new ExtensionLoader(NotExtensible.class, false, null);
    } catch (Exception e) {
        error = true;
    }
    Assert.assertTrue(error);
}