jp.terasoluna.fw.web.struts.plugins.BLogicIOPlugInTest.java Source code

Java tutorial

Introduction

Here is the source code for jp.terasoluna.fw.web.struts.plugins.BLogicIOPlugInTest.java

Source

/*
 * Copyright (c) 2007 NTT DATA Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package jp.terasoluna.fw.web.struts.plugins;

import java.io.IOException;
import java.net.MalformedURLException;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletException;

import jp.terasoluna.fw.service.thin.BLogicIO;
import jp.terasoluna.fw.service.thin.BLogicProperty;
import jp.terasoluna.fw.service.thin.BLogicResources;
import jp.terasoluna.fw.util.ClassLoadException;
import jp.terasoluna.utlib.LogUTUtil;
import jp.terasoluna.utlib.UTUtil;
import junit.framework.TestCase;

import org.apache.commons.digester.xmlrules.XmlLoadException;
import org.apache.struts.config.ModuleConfig;
import org.apache.struts.config.impl.ModuleConfigImpl;
import org.xml.sax.SAXException;

/**
 * {@link jp.terasoluna.fw.web.struts.plugins.BLogicIOPlugIn} NX
 * ubN{bNXeXg?B
 *
 * <p>
 * <h4>?yNXTv?z</h4>
 * rWlX?WbN?o????[hvOC?B <br>
 * StrutsPlugIn@\gp?AT?[ubg?rWlX?WbN?o
 * ???AT?[ubgReLXg?B<br>
 * <br>
 * O???F<br>
 * init()?\bh?AinitResources()?AinitParser()?B<br>
 * O??wxmlt@Ci[O?B<br>
 * ?A?Servlet?AModuleConfig?W?[
 * null?B
 * <p>
 *
 * @see jp.terasoluna.fw.web.struts.plugins.BLogicIOPlugIn
 */
public class BLogicIOPlugInTest extends TestCase {

    /**
     * eXgP?[X?s GUI AvP?[VN?B
     *
     * @param args
     *            java R}h?p??[^
     */
    public static void main(String[] args) {
        junit.swingui.TestRunner.run(BLogicIOPlugInTest.class);
    }

    /**
     * BLogicIOPlugIn?B
     */
    private BLogicIOPlugIn plugin = null;

    /**
     * ????s?B
     *
     * @throws Exception
     *             ?\bh?O
     * @see junit.framework.TestCase#setUp()
     */
    @Override
    protected void setUp() throws Exception {
        super.setUp();

        // BLogicIOPlugInCX^X
        plugin = new BLogicIOPlugIn();

        UTUtil.setPrivateField(BLogicIOPlugIn.class, "digester", null);
    }

    /**
     * ?I???s?B
     *
     * @throws Exception
     *             ?\bh?O
     * @see junit.framework.TestCase#tearDown()
     */
    @Override
    protected void tearDown() throws Exception {
        super.tearDown();
    }

    /**
     * RXgN^?B
     *
     * @param name
     *            eXgP?[XO?B
     */
    public BLogicIOPlugInTest(String name) {
        super(name);
    }

    /**
     * testInit01()
     * <br><br>
     *
     *  (?n)
     * <br>
     * _?FCG
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:null<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io.xml"<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) O:ServletException<br>
     *                    bvO?FXmlLoadException<br>
     *                    ?ftHg?[t@C??A?O<br>
     *         (?) ?O:??O?<br>
     *                    G?[?O?F""<br>
     *                    O?FXmlLoadException<br>
     *         (?) digesterRules:"/WEB-INF/blogic-io-rules.xml"<br>
     *
     * <br>
     * Digester?[t@Cw???AT?[ubgReLXg\?[XftHg?[t@Co^?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit01() throws Exception {
        // eXgf?[^?
        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules", null);
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io.xml").getPath());

        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // eXg?s
        try {
            plugin.init(servlet, config);
            fail();
        } catch (ServletException e) {
            // eXgmF
            assertEquals(XmlLoadException.class.getName(), e.getRootCause().getClass().getName());
            assertEquals("/WEB-INF/blogic-io-rules.xml", UTUtil.getPrivateField(plugin, "digesterRules"));
            assertTrue(LogUTUtil.checkError("", e.getRootCause()));
            // T?[ubgReLXgo^\?[X
            // ftHg?[t@C?B
            BLogicIOPlugIn_MockServletContextStub01 ctx = (BLogicIOPlugIn_MockServletContextStub01) servlet
                    .getServletContext();
            assertEquals("/WEB-INF/blogic-io-rules.xml", ctx.getCalledResources());

        }
    }

    /**
     * testInit02()
     * <br><br>
     *
     * (?n)
     * <br>
     * _?FCG
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:""()<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io.xml"<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) O:ServletException<br>
     *                    bvO?FXmlLoadException<br>
     *         (?) ?O:??O?<br>
     *                    G?[?O?F""<br>
     *                    O?FXmlLoadException<br>
     *
     * <br>
     * ?[t@C???AServletExceptionX??[?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit02() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");
        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules", "");
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io.xml").getPath());
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        try {
            plugin.init(servlet, config);
            fail();
        } catch (ServletException e) {
            // eXgmF
            assertEquals(XmlLoadException.class.getName(), e.getRootCause().getClass().getName());
            assertTrue(LogUTUtil.checkError("", e.getRootCause()));
        }
    }

    /**
     * testInit03()
     * <br><br>
     *
     * (?n)
     * <br>
     * _?FCG
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"/nothing.xml"?i??[t@C?j<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io.xml"<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) O:ServletException<br>
     *                    bvO?FXmlLoadException<br>
     *         (?) ?O:??O?<br>
     *                    G?[?O?F""<br>
     *                    O?FXmlLoadException<br>
     *
     * <br>
     * ??[t@Cw???AServletExceptionX??[?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit03() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");
        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules", "/nothing.xml");
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io.xml").getPath());
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        try {
            plugin.init(servlet, config);
            fail();
        } catch (ServletException e) {
            // eXgmF
            assertEquals(XmlLoadException.class.getName(), e.getRootCause().getClass().getName());
            assertTrue(LogUTUtil.checkError("", e.getRootCause()));
        }
    }

    /**
     * testInit04()
     * <br><br>
     *
     * (?n)
     * <br>
     * _?FCG
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-empty.xml"?ip?[XG?[?t@C?j<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io.xml"<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) O:ServletException<br>
     *                    bvO?FXmlLoadException<br>
     *         (?) ?O:??O?<br>
     *                    G?[?O?F""<br>
     *                    O?FXmlLoadException<br>
     *
     * <br>
     * p?[XG?[??[t@Cw???AServletExceptionX??[?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit04() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // p?[XG?[?t@C?irules?j
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-empty.xml").getPath());
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io.xml").getPath());
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        try {
            plugin.init(servlet, config);
            fail();
        } catch (ServletException e) {
            // eXgmF
            assertEquals(XmlLoadException.class.getName(), e.getRootCause().getClass().getName());
            assertTrue(LogUTUtil.checkError("", e.getRootCause()));
        }
    }

    /**
     * testInit05()
     * <br><br>
     *
     * (?n)
     * <br>
     * _?FG
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io.xml"<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:parse()?\bhIOExceptionX??[Digester<br>
     *
     * <br>
     * l?F(?) O:ServletException<br>
     *                    bvO?FIOException<br>
     *         (?) ?O:??O?<br>
     *                    G?[?O?F""<br>
     *                    O?FIOException<br>
     *
     * <br>
     * IOException????AServletExceptionbvX??[?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit05() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io.xml").getPath());
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr",
                "jp.terasoluna.fw.web.struts.plugins" + ".BLogicIOPlugIn_BLogicMapperStub01");
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // Digester???iIOException??j
        BLogicIOPlugIn_DigesterStub01 digester = new BLogicIOPlugIn_DigesterStub01();
        UTUtil.setPrivateField(BLogicIOPlugIn.class, "digester", digester);

        // eXg?s
        try {
            plugin.init(servlet, config);
            fail();
        } catch (ServletException e) {
            // eXgmF
            assertEquals(IOException.class.getName(), e.getRootCause().getClass().getName());
            assertTrue(LogUTUtil.checkError("", e.getRootCause()));
        }
    }

    /**
     * testInit06()
     * <br><br>
     *
     * (??n)
     * <br>
     * _?FC
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io.xml"<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) resources:T?[ubgReLXgBLOGIC_RESOURCESL?[BLogicResourcesCX^Xi[?B<br>
     *         (?) mapper:T?[ubgReLXgBLOGIC_MAPPERL?[BLogicMapperCX^Xi[?B<br>
     *
     * <br>
     * }bp?[NXnull?AftHg}bp?[NX"jp.terasoluna.fw.service.thin.BLogicMapper"CX^X???B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit06() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io.xml").getPath());
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        plugin.init(servlet, config);

        // T?[ubgReLXg
        BLogicIOPlugIn_MockServletContextStub01 ctx = (BLogicIOPlugIn_MockServletContextStub01) servlet
                .getServletContext();

        // T?[ubgReLXgftHgBLogicMapperCX^X
        // i[
        assertEquals("jp.terasoluna.fw.service.thin.BLogicMapper",
                ctx.getAttribute("BLOGIC_MAPPER").getClass().getName());

        // T?[ubgReLXgBLogicResourcesCX^X
        // i[
        assertTrue(ctx.getAttribute("BLOGIC_RESOURCES") instanceof BLogicResources);

        // T?[ubgReLXgo^\?[X
        // w?[t@C?B
        assertEquals(BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath(),
                ctx.getCalledResources());
    }

    /**
     * testInit07()
     * <br><br>
     *
     * (??n)
     * <br>
     * _?FC
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io.xml"<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:BLogicMapperp?X^uw?F<br>
     *                "jp.terasoluna.fw.web.struts.plugins.BLogicMapperStub"<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) resources:T?[ubgReLXgBLOGIC_RESOURCESL?[BLogicResourcesCX^Xi[?B<br>
     *         (?) mapper:T?[ubgReLXgBLOGIC_MAPPERL?[BLogicMapperStubCX^Xi[?B<br>
     *
     * <br>
     * }bp?[NXBLogicMapperp?NX?ANXCX^XServletContexto^?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit07() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io.xml").getPath());
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr",
                "jp.terasoluna.fw.web.struts.plugins" + ".BLogicIOPlugIn_BLogicMapperStub01");

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        plugin.init(servlet, config);

        // T?[ubgReLXg
        BLogicIOPlugIn_MockServletContextStub01 ctx = (BLogicIOPlugIn_MockServletContextStub01) servlet
                .getServletContext();

        // T?[ubgReLXgvOCw
        // BLogicMapperp?CX^Xi[
        assertEquals("jp.terasoluna.fw.web.struts.plugins" + ".BLogicIOPlugIn_BLogicMapperStub01",
                ctx.getAttribute("BLOGIC_MAPPER").getClass().getName());

        // T?[ubgReLXgBLogicResourcesCX^X
        // i[
        assertTrue(ctx.getAttribute("BLOGIC_RESOURCES") instanceof BLogicResources);

        // T?[ubgReLXgo^\?[X
        // w?[t@C?B
        assertEquals(BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath(),
                ctx.getCalledResources());
    }

    /**
     * testInit08()
     * <br><br>
     *
     * (?n)
     * <br>
     * _?FCG
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io.xml"<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:BLogicMapper?AAbstractBLogicMapperp?NXw<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) O:ServletException<br>
     *                    bvO?FClassCastException<br>
     *         (?) ?O:??O?<br>
     *                    G?[?O?F""<br>
     *                    O?FClassCastException<br>
     *
     * <br>
     * }bp?[NXBLogicMapper?AAbstractBLogicMapperp?NX?AServletExceptionX??[?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit08() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io.xml").getPath());
        // }bp?[NX(BLogicMapperNX?j
        UTUtil.setPrivateField(plugin, "mapperStr",
                "jp.terasoluna.fw.web.struts.plugins." + "BLogicIOPlugIn_BLogicMapperStub02");

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        try {
            plugin.init(servlet, config);
            fail();
        } catch (ServletException e) {
            // eXgmF
            assertEquals(ClassCastException.class.getName(), e.getRootCause().getClass().getName());
            assertTrue(LogUTUtil.checkError("", e.getRootCause()));
        }
    }

    /**
     * testInit09()
     * <br><br>
     *
     * (?n)
     * <br>
     * _?FCG
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io.xml"<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:?NXw<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) O:ServletException<br>
     *                    bvO?FClassLoadException<br>
     *         (?) ?O:??O?<br>
     *                    G?[?O?F""<br>
     *                    O?FClassLoadException<br>
     *
     * <br>
     * ?}bp?[NXw???AServletExceptionX??[?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit09() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io.xml").getPath());
        // }bp?[NX(?NX?j
        UTUtil.setPrivateField(plugin, "mapperStr", "nothing.NothingClass");

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        try {
            plugin.init(servlet, config);
            fail();
        } catch (ServletException e) {
            // eXgmF
            assertEquals(ClassLoadException.class.getName(), e.getRootCause().getClass().getName());
            assertTrue(LogUTUtil.checkError("", e.getRootCause()));
        }
    }

    /**
     * testInit10()
     * <br><br>
     *
     * (?n)
     * <br>
     * _?FCG
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io.xml"<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:""()<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) O:ServletException<br>
     *                    bvO?FClassLoadException<br>
     *         (?) ?O:??O?<br>
     *                    G?[?O?F""<br>
     *                    O?FClassLoadException<br>
     *
     * <br>
     * }bp?[NX?AServletExceptionX??[?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit10() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io.xml").getPath());
        // }bp?[NX(?j
        UTUtil.setPrivateField(plugin, "mapperStr", "");

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        try {
            plugin.init(servlet, config);
            fail();
        } catch (ServletException e) {
            // eXgmF
            assertEquals(ClassLoadException.class.getName(), e.getRootCause().getClass().getName());
            assertTrue(LogUTUtil.checkError("", e.getRootCause()));
        }
    }

    /**
     * testInit11()
     * <br><br>
     *
     * (?n)
     * <br>
     * _?FCG
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:null<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) O:ServletException<br>
     *                    ?bZ?[W?F"resources file location is not specified"<br>
     *         (?) ?O:??O?<br>
     *                    G?[?O?F"resources file location is not specified"<br>
     *
     * <br>
     * ?WbN?o?}bsO`t@Cw???AServletExceptionX??[?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit11() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C(null)
        UTUtil.setPrivateField(plugin, "resources", "");
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        try {
            plugin.init(servlet, config);
            fail();
        } catch (IllegalArgumentException e) {
            // eXgmF
            // ?bZ?[WmF
            assertEquals("errors.resources.file", e.getMessage());
            assertTrue(LogUTUtil.checkError("resources file location is not specified"));
        }
    }

    /**
     * testInit12()
     * <br><br>
     *
     * (?n)
     * <br>
     * _?FCG
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"nothing.xml"(?t@C)<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) O:ServletException<br>
     *                    bvO?FMalformedURLException<br>
     *         (?) ?O:??O?<br>
     *                    G?[?O?F""<br>
     *                    O?FMalformedURLException<br>
     *
     * <br>
     * ??WbN?o?}bsO`t@Cw???AServletExceptionX??[?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit12() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C(?t@C)
        UTUtil.setPrivateField(plugin, "resources", "nothing.xml");
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        try {
            plugin.init(servlet, config);
            fail();
        } catch (ServletException e) {
            // eXgmF
            assertEquals(MalformedURLException.class.getName(), e.getRootCause().getClass().getName());
            assertTrue(LogUTUtil.checkError("", e.getRootCause()));
        }
    }

    /**
     * testInit13()
     * <br><br>
     *
     * (?n)
     * <br>
     * _?FCG
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:""()<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) O:ServletException<br>
     *                    ?bZ?[W?F"resources file location is not specified"<br>
     *         (?) ?O:??O?<br>
     *                    G?[?O?F"resources file location is not specified"<br>
     *
     * <br>
     * ?WbN?o?}bsO`t@C???AServletExceptionX??[?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit13() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C()
        UTUtil.setPrivateField(plugin, "resources", "");
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        try {
            plugin.init(servlet, config);
            fail();
        } catch (IllegalArgumentException e) {
            // eXgmF
            // ?bZ?[WmF
            assertEquals("errors.resources.file", e.getMessage());
            assertTrue(LogUTUtil.checkError("resources file location is not specified"));
        }
    }

    /**
     * testInit14()
     * <br><br>
     *
     * (?n)
     * <br>
     * _?FCG
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-error-blogic-io.xml"(p?[XG?[?t@C)<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) O:ServletException<br>
     *                    bvO?F<br>
     *                    SAXException<br>
     *         (?) ?O:??O?<br>
     *                    G?[?O?F""<br>
     *                    O?FSAXException<br>
     *
     * <br>
     * p?[XG?[??WbN?o?}bsO`t@Cw???AServletExceptionX??[?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit14() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C(p?[XG?[??j
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-error-blogic-io.xml").getPath());
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        try {
            plugin.init(servlet, config);
            fail();
        } catch (ServletException e) {
            // eXgmF
            // ????ASAXParseException??AcatchSAXExceptioninstanceof`FbN
            assertTrue(e.getRootCause() instanceof SAXException);
            assertTrue(LogUTUtil.checkError("", e.getRootCause()));
        }
    }

    /**
     * testInit15()
     * <br><br>
     *
     * (??n)
     * <br>
     * _?FC
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)="/sub1"<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io.xml"<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) resources:T?[ubgReLXgBLOGIC_RESOURCES/sub1L?[BLogicResourcesCX^Xi[?B<br>
     *         (?) mapper:T?[ubgReLXgBLOGIC_MAPPER/sub1L?[BLogicMapperStubCX^Xi[?B<br>
     *
     * <br>
     * W?[O?AT?[ubgReLXgo^BLogicResources?ABLogicMapperL?[?AW?[?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit15() throws Exception {
        // eXgf?[^?
        // W?[??("/sub1"W?[w?j
        ModuleConfig config = new ModuleConfigImpl("/sub1");

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io.xml").getPath());
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        plugin.init(servlet, config);

        // T?[ubgReLXg
        BLogicIOPlugIn_MockServletContextStub01 ctx = (BLogicIOPlugIn_MockServletContextStub01) servlet
                .getServletContext();

        // T?[ubgReLXgftHgBLogicMapperCX^X
        // i[?i"/sub1"W?[L?[?j
        assertEquals("jp.terasoluna.fw.service.thin.BLogicMapper",
                ctx.getAttribute("BLOGIC_MAPPER/sub1").getClass().getName());

        // T?[ubgReLXgBLogicResourcesCX^X
        // i[?i"/sub1"W?[L?[?j
        assertTrue(ctx.getAttribute("BLOGIC_RESOURCES/sub1") instanceof BLogicResources);
        assertNull(ctx.getAttribute("BLOGIC_RESOURCES"));

        // T?[ubgReLXgo^\?[X
        // w?[t@C?B
        assertEquals(BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath(),
                ctx.getCalledResources());
    }

    /**
     * testInit16()
     * <br><br>
     *
     * (??n)
     * <br>
     * _?FD
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io.xml"?A"BLogicIOPlugInTest-blogic-io2.xml"?ABLogicIOPlugInTest-blogic-io3.xml"?i?t@Cw?j<br>
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) resources:T?[ubgReLXgBLOGIC_RESOURCESL?[BLogicResourcesCX^Xi[?B<br>
     *         (?) mapper:T?[ubgReLXgBLOGIC_MAPPERL?[BLogicMapperCX^Xi[?B<br>
     *
     * <br>
     * blogic-io.xmlt@CRt@CA?A?BLogicProperty?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit16() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io.xml").getPath() + ","
                        + BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io2.xml").getPath() + ","
                        + BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io3.xml").getPath());
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        plugin.init(servlet, config);

        // T?[ubgReLXg
        BLogicIOPlugIn_MockServletContextStub01 ctx = (BLogicIOPlugIn_MockServletContextStub01) servlet
                .getServletContext();

        // T?[ubgReLXgftHgBLogicMapperCX^X
        // i[
        assertEquals("jp.terasoluna.fw.service.thin.BLogicMapper",
                ctx.getAttribute("BLOGIC_MAPPER").getClass().getName());

        // T?[ubgReLXgo^\?[X
        // w?[t@C?B
        assertEquals(BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath(),
                ctx.getCalledResources());

        // XMLp?[X
        BLogicResources resource = (BLogicResources) ctx.getAttribute("BLOGIC_RESOURCES");
        Map map = (Map) UTUtil.getPrivateField(resource, "blogicIO");

        // Pt@Cblogic-iot@C???
        BLogicIO logonIO = (BLogicIO) map.get("/logon");
        // blogic-params`FbN
        assertEquals("test_bean_name1-1", logonIO.getInputBeanName());
        List<BLogicProperty> logonParamList = logonIO.getBLogicParams();
        assertEquals(1, logonParamList.size());
        BLogicProperty property = logonParamList.get(0);
        assertEquals("test_params_blogic", property.getBLogicProperty());
        assertEquals("test_params_property", property.getProperty());
        assertEquals("form", property.getSource());
        // blogic-result`FbN
        List<BLogicProperty> logonResultList = logonIO.getBLogicResults();
        assertEquals(1, logonResultList.size());
        BLogicProperty result = logonResultList.get(0);
        assertEquals("test_result_blogic", result.getBLogicProperty());
        assertEquals("test_result_property", result.getProperty());
        assertEquals("session", result.getDest());

        BLogicIO dbIO = (BLogicIO) map.get("/db");
        // blogic-params`FbN
        assertEquals("test_bean_name1-2", dbIO.getInputBeanName());
        List dbParamList = dbIO.getBLogicParams();
        assertEquals(0, dbParamList.size());
        // blogic-result`FbN
        List dbResultList = dbIO.getBLogicResults();
        assertEquals(0, dbResultList.size());

        // Qt@Cblogic-iot@C???
        BLogicIO logon2IO = (BLogicIO) map.get("/logon2");
        // blogic-params`FbN
        assertEquals("test_bean_name2-1", logon2IO.getInputBeanName());
        List<BLogicProperty> logon2ParamList = logon2IO.getBLogicParams();
        assertEquals(2, logon2ParamList.size());
        BLogicProperty property2_1 = logon2ParamList.get(0);
        assertEquals("test_params_blogic2-1", property2_1.getBLogicProperty());
        assertEquals("test_params_property2-1", property2_1.getProperty());
        assertEquals("form", property2_1.getSource());
        BLogicProperty property2_2 = logon2ParamList.get(1);
        assertEquals("test_params_blogic2-2", property2_2.getBLogicProperty());
        assertEquals("test_params_property2-2", property2_2.getProperty());
        assertEquals("form", property2_2.getSource());
        // blogic-result`FbN
        List<BLogicProperty> logon2ResultList = logon2IO.getBLogicResults();
        assertEquals(2, logon2ResultList.size());
        BLogicProperty result2_1 = logon2ResultList.get(0);
        assertEquals("test_result_blogic2-1", result2_1.getBLogicProperty());
        assertEquals("test_result_property2-1", result2_1.getProperty());
        assertEquals("session", result2_1.getDest());
        BLogicProperty result2_2 = logon2ResultList.get(1);
        assertEquals("test_result_blogic2-2", result2_2.getBLogicProperty());
        assertEquals("test_result_property2-2", result2_2.getProperty());
        assertEquals("session", result2_2.getDest());

        BLogicIO db2IO = (BLogicIO) map.get("/db2");
        // blogic-params`FbN
        assertEquals("test_bean_name2-3", db2IO.getInputBeanName());
        List db2ParamList = db2IO.getBLogicParams();
        assertEquals(0, db2ParamList.size());
        // blogic-result`FbN
        List db2ResultList = db2IO.getBLogicResults();
        assertEquals(0, db2ResultList.size());

        // Rt@Cblogic-iot@C???
        BLogicIO logon3IO = (BLogicIO) map.get("/logon3");
        // blogic-params`FbN
        assertEquals("test_bean_name3-1", logon3IO.getInputBeanName());
        List<BLogicProperty> logon3ParamList = logon3IO.getBLogicParams();
        assertEquals(3, logon3ParamList.size());
        BLogicProperty property3_1 = logon3ParamList.get(0);
        assertEquals("test_params_blogic3-1", property3_1.getBLogicProperty());
        assertEquals("test_params_property3-1", property3_1.getProperty());
        assertEquals("form", property3_1.getSource());
        BLogicProperty property3_2 = logon3ParamList.get(1);
        assertEquals("test_params_blogic3-2", property3_2.getBLogicProperty());
        assertEquals("test_params_property3-2", property3_2.getProperty());
        assertEquals("form", property3_2.getSource());
        BLogicProperty property3_3 = logon3ParamList.get(2);
        assertEquals("test_params_blogic3-3", property3_3.getBLogicProperty());
        assertEquals("test_params_property3-3", property3_3.getProperty());
        assertEquals("form", property3_3.getSource());
        // blogic-result`FbN
        List<BLogicProperty> logon3ResultList = logon3IO.getBLogicResults();
        assertEquals(3, logon3ResultList.size());
        BLogicProperty result3_1 = logon3ResultList.get(0);
        assertEquals("test_result_blogic3-1", result3_1.getBLogicProperty());
        assertEquals("test_result_property3-1", result3_1.getProperty());
        assertEquals("session", result3_1.getDest());
        BLogicProperty result3_2 = logon3ResultList.get(1);
        assertEquals("test_result_blogic3-2", result3_2.getBLogicProperty());
        assertEquals("test_result_property3-2", result3_2.getProperty());
        BLogicProperty result3_3 = logon3ResultList.get(2);
        assertEquals("test_result_blogic3-3", result3_3.getBLogicProperty());
        assertEquals("test_result_property3-3", result3_3.getProperty());
        assertEquals("session", result3_3.getDest());

        // Qt@CRt@Cblogic-iot@C?dpX????A
        // ?t@C??
        BLogicIO duplicateIO = (BLogicIO) map.get("/duplicate");
        // blogic-params`FbN
        assertEquals("test_bean_name3-2", duplicateIO.getInputBeanName());
        List<BLogicProperty> duplicateParamList = duplicateIO.getBLogicParams();
        assertEquals(1, duplicateParamList.size());
        BLogicProperty duplicate1 = duplicateParamList.get(0);
        assertEquals("duplicate_params_blogic2", duplicate1.getBLogicProperty());
        assertEquals("duplicate_params_property2", duplicate1.getProperty());
        assertEquals("form", duplicate1.getSource());
        // blogic-result`FbN
        List<BLogicProperty> duplicateResultList = duplicateIO.getBLogicResults();
        assertEquals(1, duplicateResultList.size());
        BLogicProperty duplicate2 = duplicateResultList.get(0);
        assertEquals("duplicate_result_blogic2", duplicate2.getBLogicProperty());
        assertEquals("duplicate_result_property2", duplicate2.getProperty());
        assertEquals("session", duplicate2.getDest());

        BLogicIO db3IO = (BLogicIO) map.get("/db3");
        // blogic-params`FbN
        assertEquals("test_bean_name3-3", db3IO.getInputBeanName());
        List db3ParamList = db3IO.getBLogicParams();
        assertEquals(0, db3ParamList.size());
        // blogic-result`FbN
        List db3ResultList = db3IO.getBLogicResults();
        assertEquals(0, db3ResultList.size());
    }

    /**
     * testInit17()
     * <br><br>
     *
     * (??n)
     * <br>
     * _?FC
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io4.xml"<br>
     *                bean-namew?B
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) resources:T?[ubgReLXgBLOGIC_RESOURCESL?[BLogicResourcesCX^Xi[?B<br>
     *                              BlogicIOCX^XinputBeanNamenull?B
     *         (?) mapper:T?[ubgReLXgBLOGIC_MAPPERL?[BLogicMapperCX^Xi[?B<br>
     *
     * <br>
     * blogic-io.xmlt@Cbean-name?null?ABLogicIOinputBeanNamenullmF?B
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit17() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io4.xml").getPath());
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        plugin.init(servlet, config);

        // T?[ubgReLXg
        BLogicIOPlugIn_MockServletContextStub01 ctx = (BLogicIOPlugIn_MockServletContextStub01) servlet
                .getServletContext();

        // T?[ubgReLXgftHgBLogicMapperCX^X
        // i[
        assertEquals("jp.terasoluna.fw.service.thin.BLogicMapper",
                ctx.getAttribute("BLOGIC_MAPPER").getClass().getName());

        // T?[ubgReLXgBLogicResourcesCX^X
        // i[
        assertTrue(ctx.getAttribute("BLOGIC_RESOURCES") instanceof BLogicResources);

        BLogicResources resources = (BLogicResources) ctx.getAttribute("BLOGIC_RESOURCES");
        BLogicIO io = resources.getBLogicIO("/logon");

        //BLogicIO#inputBeanNamenullmF?B
        assertNull(io.getInputBeanName());

        // T?[ubgReLXgo^\?[X
        // w?[t@C?B
        assertEquals(BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath(),
                ctx.getCalledResources());
    }

    /**
     * testInit18()
     * <br><br>
     *
     * (?n)
     * <br>
     * _?FG
     * <br><br>
     * l?F(?) servlet:not null<br>
     *         (?) config:W?[(?)=""<br>
     *         (?) rules?iDigester?[t@C?j:"BLogicIOPlugInTest-blogic-io-rules.xml"<br>
     *         (?) blogic-io?i?WbN?o?}bsO`t@C?j:"BLogicIOPlugInTest-blogic-io4.xml"<br>
     *                bean-namew?B
     *         (?) mapperStr?i?WbN?o?fNX?j:null<br>
     *         (?) digester:null<br>
     *
     * <br>
     * l?F(?) O:ServletException<br>
     *                    bvO?F<br>
     *                    IOException<br>
     *         (?) ?O:??O?<br>
     *                    G?[?O?F""<br>
     *                    O?FIOException<br>
     *
     * <br>
     * getPublicIdentifier()?AURLIuWFNg????
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testInit18() throws Exception {
        // eXgf?[^?
        // W?[??
        ModuleConfig config = new ModuleConfigImpl("");

        plugin = new BLogicIOPlugIn() {
            @Override
            public String getPublicIdentifier() {
                return "";
            }
        };

        // BLogic`?[t@C
        UTUtil.setPrivateField(plugin, "digesterRules",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io-rules.xml").getPath());
        // BLogic`t@C
        UTUtil.setPrivateField(plugin, "resources",
                BLogicIOPlugInTest.class.getResource("BLogicIOPlugInTest-blogic-io4.xml").getPath());
        // }bp?[NX
        UTUtil.setPrivateField(plugin, "mapperStr", null);

        // ANVT?[ubg??
        BLogicIOPlugIn_ActionServletStub01 servlet = new BLogicIOPlugIn_ActionServletStub01();

        // eXg?s
        try {
            plugin.init(servlet, config);
            fail("eXgs");
        } catch (ServletException e) {
            assertTrue(e.getRootCause() instanceof IOException);
            assertTrue(LogUTUtil.checkError("", e.getRootCause()));
        }

    }

    /**
     * testSetDigesterRules01()
     * <br><br>
     *
     * (??n)
     * <br>
     * _?FA
     * <br><br>
     * l?F(?) digesterRules:"digesterRules"<br>
     *         (?) digesterRules:null<br>
     *
     * <br>
     * l?F(?) digesterRules:"digesterRules"<br>
     *
     * <br>
     * ?digesterRules?i[
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testSetDigesterRules01() throws Exception {
        // eXg{
        plugin.setDigesterRules("digesterRules");

        // 
        assertEquals("digesterRules", UTUtil.getPrivateField(plugin, "digesterRules"));
    }

    /**
     * testSetResources01()
     * <br><br>
     *
     * (??n)
     * <br>
     * _?FA
     * <br><br>
     * l?F(?) resources:"resources"<br>
     *         (?) resources:null<br>
     *
     * <br>
     * l?F(?) resources:"resources"<br>
     *
     * <br>
     * ?resources?i[
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testSetResources01() throws Exception {
        // eXg{
        plugin.setResources("resources");

        // 
        assertEquals("resources", UTUtil.getPrivateField(plugin, "resources"));
    }

    /**
     * testSetMapperClass01()
     * <br><br>
     *
     * (??n)
     * <br>
     * _?FA
     * <br><br>
     * l?F(?) mapperStr:"mapperStr"<br>
     *         (?) mapperStr:null<br>
     *
     * <br>
     * l?F(?) mapperStr:"mapperStr"<br>
     *
     * <br>
     * ?mapperStr?i[
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testSetMapperClass01() throws Exception {
        // eXg{
        plugin.setMapperClass("mapperStr");

        // 
        assertEquals("mapperStr", UTUtil.getPrivateField(plugin, "mapperStr"));
    }

    /**
     * testSetPublicIdentifier01()
     * <br><br>
     *
     * (??n)
     * <br>
     * _?FA
     * <br><br>
     * l?F(?) publicIdentifier:"publicIdentifier"<br>
     *         (?) publicIdentifier:not null?iftHgl?j<br>
     *
     * <br>
     * l?F(?) publicIdentifier:"publicIdentifier"<br>
     *
     * <br>
     * ?publicIdentifier?i[
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testSetPublicIdentifier01() throws Exception {
        // eXg{
        plugin.setPublicIdentifier("publicIdentifier");

        // 
        assertEquals("publicIdentifier", UTUtil.getPrivateField(plugin, "publicIdentifier"));
    }

    /**
     * testSetDtdUrl01()
     * <br><br>
     *
     * (??n)
     * <br>
     * _?FA
     * <br><br>
     * l?F(?) dtdUrl:"dtdUrl"<br>
     *         (?) dtdUrl:not null?iftHgl?j<br>
     *
     * <br>
     * l?F(?) dtdUrl:"dtdUrl"<br>
     *
     * <br>
     * ?dtdUrl?i[
     * <br>
     *
     * @throws Exception ?\bh?O
     */
    public void testSetDtdUrl01() throws Exception {
        // eXg{
        plugin.setDtdUrl("dtdUrl");

        // 
        assertEquals("dtdUrl", UTUtil.getPrivateField(plugin, "dtdUrl"));
    }

}