@Test
void testInvokeDataProviderMethodToRetrieveDataShouldThrowParameterResolutionExceptionIfDataProviderInvocationThrows()
        throws Exception {

    // Given:
    Method dataProviderMethod = this.getClass().getDeclaredMethod(
            "testInvokeDataProviderMethodToRetrieveDataShouldThrowParameterResolutionExceptionIfDataProviderInvocationThrows");
    when(extensionContext.getRoot()).thenReturn(extensionContext);
    when(extensionContext.getStore(any(Namespace.class))).thenReturn(store);
    // When:
    Exception result = assertThrows(ParameterResolutionException.class,
            () -> underTest.invokeDataProviderMethodToRetrieveData(dataProviderMethod, true, extensionContext));
    // Then:
    assertThat(result).hasMessageMatching("Exception while invoking dataprovider method '.*': .*");
}