@Test
public void testInitialize04() throws Exception {

    // 前処理
    Map<String, String> map = new HashMap<String, String>();
    map.put("factory", "factory");
    map.put("url", "url");
    map.put("username", "username");
    DefaultJndiSupport support = new DefaultJndiSupport();
    ReflectionTestUtils.setField(support, "jndiEnvironmentMap", map);
    // テスト実施
    support.initialize();
    // 判定
    Object result = ReflectionTestUtils.getField(support,
            "jndiEnvironmentMap");
    assertSame(map, result);
    assertThat(logger.getLoggingEvents(), is(asList(info(
            "Initialize Weblogic JNDI Resource"), info(
                    "java.naming.factory.initial = factory"), info(
                            "java.naming.provider.url = url"), info(
                                    "java.naming.security.principal = username"),
            info("java.naming.security.credentials = "))));
    Properties props = support.getJndiEnvironment();
    assertEquals("factory", props.get(Context.INITIAL_CONTEXT_FACTORY));
    assertEquals("url", props.get(Context.PROVIDER_URL));
    assertEquals("username", props.get(Context.SECURITY_PRINCIPAL));
    assertEquals("", props.get(Context.SECURITY_CREDENTIALS));
}