@Test
@SuppressWarnings("unchecked")
public void tearDownTriggersCancellation() throws Exception {

    when(mockExecutorService.scheduleAtFixedRate(any(Runnable.class), eq(0L), eq(1L), eq(TimeUnit.SECONDS))).
            thenReturn(mockFuture);
    when(mockFuture.cancel(true)).thenReturn(true);
    AsyncHealthCheckDecorator asyncDecorator = new AsyncHealthCheckDecorator(new DefaultAsyncHealthCheck(), mockExecutorService);
    asyncDecorator.tearDown();
    verify(mockExecutorService, times(1)).scheduleAtFixedRate(any(Runnable.class), eq(0L),
            eq(1L), eq(TimeUnit.SECONDS));
    verify(mockFuture, times(1)).cancel(eq(true));
}