@Test
public void wrapsExceptionsWhenExecuted() {

    final RuntimeException e = mock(RuntimeException.class);
    when(e.getMessage()).thenReturn("oh noes");
    when(underlying.execute()).thenThrow(e);
    HealthCheck.Result actual = healthCheck.execute();
    assertThat(actual.isHealthy())
            .isFalse();
    assertThat(actual.getMessage())
            .isEqualTo("oh noes");
    assertThat(actual.getError())
            .isEqualTo(e);
    assertThat(actual.getDetails())
            .isNull();
    assertThat(actual.getDuration())
            .isGreaterThanOrEqualTo(0);
}