### Question:
LoggingSpanExporter implements SpanExporter { @Override public CompletableResultCode flush() { CompletableResultCode resultCode = new CompletableResultCode(); for (Handler handler : logger.getHandlers()) { try { handler.flush(); } catch (Throwable t) { resultCode.fail(); } } return resultCode.succeed(); }  @Override CompletableResultCode export(Collection<SpanData> spans); @Override CompletableResultCode flush(); @Override CompletableResultCode shutdown();  }### Answer:
@Test void testFlush() { final AtomicBoolean flushed = new AtomicBoolean(false); Logger.getLogger(LoggingSpanExporter.class.getName()) .addHandler( new StreamHandler(System.err, new SimpleFormatter()) { @Override public synchronized void flush() { flushed.set(true); } }); exporter.flush(); assertThat(flushed.get()).isTrue(); }