@Test
void getResourceDescriptionShouldReturnOnFirstResultWithoutInvokingTheFollowinProviders() {

    // Arrange
    ResourceDescriptionProvider p1 = mock(ResourceDescriptionProvider.class);
    ResourceDescriptionProvider p2 = mock(ResourceDescriptionProvider.class);
    String testDescription = "some description";
    when(p1.getAsciidocDescription(any())).thenReturn(Optional.of(testDescription));
    when(p2.getAsciidocDescription(any())).thenReturn(Optional.empty());
    List<ResourceDescriptionProvider> providers = Arrays.asList(p1, p2);
    ResourceDescriptionProvider resourceDescriptionProvider = new ComposedResourceDescriptionProvider(providers);
    // Act
    Optional<String> resourceDescription = resourceDescriptionProvider.getAsciidocDescription("some_resource");
    // Assert
    assertThat(resourceDescription).isNotEmpty().get().isEqualTo(testDescription);
    verify(p1, times(1)).getAsciidocDescription("some_resource");
    verify(p2, never()).getAsciidocDescription("some_resource");
}