XmppAppender extends AppenderBase<E> { @Override public void stop() { boolean doStop = isStarted(); super.stop(); if (doStop && conn != null && conn.isConnected()) { conn.disconnect(); chat = null; } }  void setSendToJid(String sendToJid); void setLayout(Layout<E> layout); void setXmmpAccount(String xmmpAccount); void setUsername(String username); void setPassword(String password); void setResourceName(String resourceName); @Override void stop(); @Override void start();  }
@Test public void testStop() throws Exception { appender.start(); appender.stop(); Assert.assertFalse(appender.isStarted()); appender.doAppend("Test message"); verify(chat, never()).sendMessage(any(Message.class)); }