test_class.file: core/src/test/java/de/lise/terradoc/core/customization/modification/ComposedResourceDescriptionProviderTest.java
test_class.identifier: ComposedResourceDescriptionProviderTest
test_case.body: @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");
      }
test_case.class_method_signature: ComposedResourceDescriptionProviderTest.getResourceDescriptionShouldReturnOnFirstResultWithoutInvokingTheFollowinProviders()
test_case.full_signature: @Test void getResourceDescriptionShouldReturnOnFirstResultWithoutInvokingTheFollowinProviders()
test_case.identifier: getResourceDescriptionShouldReturnOnFirstResultWithoutInvokingTheFollowinProviders
test_case.invocations: mock mock thenReturn when getAsciidocDescription any of thenReturn when getAsciidocDescription any empty asList getAsciidocDescription isEqualTo get isNotEmpty assertThat getAsciidocDescription verify times getAsciidocDescription verify never
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void getResourceDescriptionShouldReturnOnFirstResultWithoutInvokingTheFollowinProviders()
focal_class.declarator: providers
focal_class.modifier: private final
focal_class.original_string: private final Iterable<ResourceDescriptionProvider> providers;
focal_class.type: Iterable<ResourceDescriptionProvider>
focal_class.var_name: providers
focal_class.file: core/src/main/java/de/lise/terradoc/core/customization/modification/ComposedResourceDescriptionProvider.java
focal_class.identifier: ComposedResourceDescriptionProvider
focal_class.interfaces: implements ResourceDescriptionProvider
focal_class.class_method_signature: ComposedResourceDescriptionProvider.ComposedResourceDescriptionProvider(Iterable<ResourceDescriptionProvider> providers)
focal_class.full_signature: public  ComposedResourceDescriptionProvider(Iterable<ResourceDescriptionProvider> providers)
focal_class.identifier: ComposedResourceDescriptionProvider
focal_class.modifiers: public
focal_class.parameters: (Iterable<ResourceDescriptionProvider> providers)
focal_class.signature:  ComposedResourceDescriptionProvider(Iterable<ResourceDescriptionProvider> providers)
focal_class.class_method_signature: ComposedResourceDescriptionProvider.getAsciidocDescription(String fullQualifiedTerraformAddress)
focal_class.full_signature: @Override public Optional<String> getAsciidocDescription(String fullQualifiedTerraformAddress)
focal_class.identifier: getAsciidocDescription
focal_class.modifiers: @Override public
focal_class.parameters: (String fullQualifiedTerraformAddress)
focal_class.return: Optional<String>
focal_class.signature: Optional<String> getAsciidocDescription(String fullQualifiedTerraformAddress)
focal_method.body: @Override
      public Optional<String> getAsciidocDescription(String fullQualifiedTerraformAddress) {
          Optional<String> result;
          for (ResourceDescriptionProvider provider : providers) {
              result = provider.getAsciidocDescription(fullQualifiedTerraformAddress);
              if (result.isPresent()) {
                  return result;
              }
          }
          return Optional.empty();
      }
focal_method.class_method_signature: ComposedResourceDescriptionProvider.getAsciidocDescription(String fullQualifiedTerraformAddress)
focal_method.full_signature: @Override public Optional<String> getAsciidocDescription(String fullQualifiedTerraformAddress)
focal_method.identifier: getAsciidocDescription
focal_method.invocations: getAsciidocDescription isPresent empty
focal_method.modifiers: @Override public
focal_method.parameters: (String fullQualifiedTerraformAddress)
focal_method.return: Optional<String>
focal_method.signature: Optional<String> getAsciidocDescription(String fullQualifiedTerraformAddress)