@Test
public void testAfterTestExecutesWithErrors() throws Exception {

    // GIVEN
    doThrow(RuntimeException.class).when(executor).executeAfterTest(eq(connection), eq(Boolean.FALSE));
    // WHEN
    try {
        decorator.afterTest(invocation);
        fail("Exception expected");
    } catch (final RuntimeException e) {
        // expected
    }
    // THEN
    verify(connection).close();
    verify(ctx).storeData(eq(Constants.KEY_CONNECTION), isNull());
    verifyZeroInteractions(dataSource);
}