public boolean hasErrors() {
        for (ConfigurationProperty property : this) {
            if (property.hasErrors()) {
                return true;
            }
        }

        return false;
    }
@Test
    void hasErrorsShouldVerifyIfAnyConfigurationPropertyHasErrors() {
        ConfigurationProperty outputDirectory = mock(ConfigurationProperty.class);
        ConfigurationProperty inputDirectory = mock(ConfigurationProperty.class);

        when(outputDirectory.hasErrors()).thenReturn(false);
        when(inputDirectory.hasErrors()).thenReturn(true);

        Configuration configuration = new Configuration(outputDirectory, inputDirectory);

        assertThat(configuration.hasErrors()).isTrue();

        verify(outputDirectory).hasErrors();
        verify(inputDirectory).hasErrors();
    }