@Override
  public void contextInitialized(ServletContextEvent event) {
    try {
      init();
    } catch (ServerException ex) {
      event.getServletContext().log("ERROR: " + ex.getMessage());
      throw new RuntimeException(ex);
    }
  }
@Test(expected = RuntimeException.class)
  @TestDir
  public void failedInit() throws Exception {
    String dir = TestDirHelper.getTestDir().getAbsolutePath();
    System.setProperty("TestServerWebApp2.home.dir", dir);
    System.setProperty("TestServerWebApp2.config.dir", dir);
    System.setProperty("TestServerWebApp2.log.dir", dir);
    System.setProperty("TestServerWebApp2.temp.dir", dir);
    System.setProperty("testserverwebapp2.services", "FOO");
    ServerWebApp server = new ServerWebApp("TestServerWebApp2") {
    };

    server.contextInitialized(null);
  }