@Test
void provide_with_one_of_provider_throws_exception_test() {

    MetadataStatementsProvider providerA = mock(MetadataStatementsProvider.class);
    Map<AAGUID, Set<MetadataStatement>> mapA = new HashMap<>();
    mapA.put(new AAGUID("df495bdc-223a-429d-9f0e-ebfa29155812"), new HashSet<>());
    when(providerA.provide()).thenReturn(mapA);
    MetadataStatementsProvider providerB = mock(MetadataStatementsProvider.class);
    when(providerB.provide()).thenThrow(new RuntimeException("unexpected error"));
    AggregatingMetadataStatementsProvider target = new AggregatingMetadataStatementsProvider(Arrays.asList(providerA, providerB));
    assertThat(target.provide()).containsOnlyKeys(new AAGUID("df495bdc-223a-429d-9f0e-ebfa29155812"));
}