RollbarAppender extends AbstractAppender { @Override public boolean stop(final long timeout, final TimeUnit timeUnit) { super.stop(timeout, timeUnit); try { rollbar.close(true); } catch (Exception e) { LOGGER.error("Closing rollbar", e); } return true; } protected  RollbarAppender(String name, Filter filter, Layout<? extends Serializable> layout,
      boolean ignoreExceptions, Rollbar rollbar); @PluginFactory static RollbarAppender createAppender(
      @PluginAttribute("accessToken") @Required final String accessToken,
      @PluginAttribute("codeVersion") final String codeVersion,
      @PluginAttribute("endpoint") final String endpoint,
      @PluginAttribute("environment") final String environment,
      @PluginAttribute("language") final String language,
      @PluginAttribute("enabled") final boolean enabled,
      @PluginAttribute("configProviderClassName") final String configProviderClassName,
      @PluginAttribute("name") @Required final String name,
      @PluginElement("Layout") Layout<? extends Serializable> layout,
      @PluginElement("Filter") Filter filter,
      @PluginAttribute("ignoreExceptions") final String ignore
  ); @Override void append(LogEvent event); @Override boolean stop(final long timeout, final TimeUnit timeUnit); @Override void stop();  }
@Test public void shouldStop() throws Exception { sut.stop(); verify(rollbar).close(true); }
@Test public void shouldStopWithTimeout() throws Exception { long timeout = 100; boolean result = sut.stop(timeout, TimeUnit.MILLISECONDS); assertThat(result, is(true)); verify(rollbar).close(true); }