@@ -0,0 +1,2897 @@
+/*%0A * Copyright 2019, TeamDev. All rights reserved.%0A *%0A * Redistribution and use in source and/or binary forms, with or without%0A * modification, must retain the above copyright notice and the following%0A * disclaimer.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage io.spine.tools.gradle.compiler;%0A%0Aimport com.google.common.collect.ImmutableMap;%0Aimport io.spine.tools.protoc.SpineProtocConfig;%0Aimport org.gradle.api.Project;%0Aimport org.gradle.testfixtures.ProjectBuilder;%0Aimport org.junit.jupiter.api.BeforeEach;%0Aimport org.junit.jupiter.api.DisplayName;%0Aimport org.junit.jupiter.api.Test;%0Aimport org.junit.jupiter.api.io.TempDir;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.IOException;%0A%0Aimport static com.google.common.truth.Truth.assertThat;%0Aimport static io.spine.tools.gradle.compiler.ModelCompilerPlugin.extensionName;%0A%0A@DisplayName(%22%60ProtocPluginConfiguration%60 should%22)%0Aclass ProtocPluginConfigurationTest %7B%0A%0A    private static final String PLUGIN = %22plugin%22;%0A    private File configFile;%0A    private File projectDir;%0A%0A    @BeforeEach%0A    void setUp(@TempDir File tempDir, @TempDir File projectDir) %7B%0A        this.configFile = new File(tempDir, %22config%22);%0A        this.projectDir = projectDir;%0A    %7D%0A%0A    @Test%0A    @DisplayName(%22generate configuration file%22)%0A    void generate() throws IOException %7B%0A        Project project = ProjectBuilder%0A                .builder()%0A                .withProjectDir(projectDir)%0A                .build();%0A        project.apply(ImmutableMap.of(PLUGIN, %22java%22));%0A        Extension extension = new Extension();%0A        extension.generateValidatingBuilders = false;%0A        project.getExtensions().add(extensionName(), extension);%0A%0A        ProtocPluginConfiguration configuration = ProtocPluginConfiguration.forProject(project);%0A        assertThat(configFile.exists()).isFalse();%0A        configuration.writeTo(configFile.toPath());%0A        assertThat(configFile.exists()).isTrue();%0A%0A        SpineProtocConfig actualConfig =%0A                SpineProtocConfig.parseFrom(new FileInputStream(configFile));%0A        assertThat(actualConfig.getSkipValidatingBuilders()).isTrue();%0A    %7D%0A%7D%0A

Add a test for `ProtocPluginConfiguration`