@Test
public void testOnStartup() throws Exception {

    DefaultWebApplication webApplication = new DefaultWebApplication();
    webApplication.addInitializer(new FileSecurityInitializer());
    webApplication.initialize();
    DefaultSecurityManager manager = (DefaultSecurityManager) webApplication.getSecurityManager();
    DefaultWebApplicationRequest request = new DefaultWebApplicationRequest();
    manager.login(request, "j2ee", "j2ee");
    assertTrue(manager.isUserInRole(request, "Administrator"));
}