Cleaner { void tick() { try (Scope ignored = tracer.spanBuilder("Styx.Cleaner.tick") .setRecordEvents(true) .setSampler(Samplers.alwaysSample()) .startScopedSpan()) { tick0(); } } Cleaner(DockerRunner dockerRunner);   }
@Test public void shouldCleanup() throws IOException { cleaner.tick(); verify(dockerRunner).cleanup(); }
@Test public void shouldSwallowException() throws IOException { doThrow(new IOException()).when(dockerRunner).cleanup(); cleaner.tick(); verify(dockerRunner).cleanup(); }