@Test(expected=RuntimeException.class)
public void doWebSocketConnectMissingAttribute() throws ServletException {

    ServletContext servletContext = Mockito.mock(ServletContext.class);
    ServletConfig servletConfig = Mockito.mock(ServletConfig.class);
    Mockito.when(servletConfig.getServletContext()).thenReturn(servletContext);
    JettyXmppWebSocketServlet servlet = new JettyXmppWebSocketServlet();
    servlet.init(servletConfig);
}