@@ -0,0 +1,2287 @@
+package com.sleekbyte.tailor.utils;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.TemporaryFolder;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0Aimport org.yaml.snakeyaml.error.YAMLException;%0A%0Aimport java.io.File;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.OutputStreamWriter;%0Aimport java.io.PrintWriter;%0Aimport java.io.Writer;%0Aimport java.nio.charset.Charset;%0Aimport java.util.Arrays;%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0A/**%0A * Tests for %7B@link ConfigurationParser%7D.%0A */%0A@RunWith(MockitoJUnitRunner.class)%0Apublic final class ConfigurationParserTest %7B%0A%0A    @Rule%0A    public TemporaryFolder folder = new TemporaryFolder();%0A%0A    @Test(expected = YAMLException.class)%0A    public void testParseConfigurationFileInvalidName() throws IOException %7B%0A        ConfigurationParser.parseConfigurationFile(createConfigFile(%22.invalid-name.yml%22).getAbsolutePath());%0A    %7D%0A%0A    @Test%0A    public void testParseConfigurationFileValidConfigFile() throws IOException %7B%0A        Configuration config = ConfigurationParser.parseConfigurationFile(createConfigFile(%22.tailor.yml%22)%0A            .getAbsolutePath());%0A%0A        Set%3CString%3E actualIncludeList = config.getInclude();%0A        Set%3CString%3E actualExcludeList = config.getExclude();%0A        Set%3CString%3E expectedIncludeList = new HashSet%3CString%3E(Arrays.asList(%22Source%22));%0A        Set%3CString%3E expectedExcludeList = new HashSet%3CString%3E(Arrays.asList(%22Carthage%22, %22Pods%22));%0A        assertEquals(expectedIncludeList, actualIncludeList);%0A        assertEquals(expectedExcludeList, actualExcludeList);%0A    %7D%0A%0A    private File createConfigFile(String fileName) throws IOException %7B%0A        File configFile = folder.newFile(fileName);%0A        Writer streamWriter = new OutputStreamWriter(new FileOutputStream(configFile), Charset.forName(%22UTF-8%22));%0A        PrintWriter printWriter = new PrintWriter(streamWriter);%0A        printWriter.println(%22include:%22);%0A        printWriter.println(%22  - Source%22);%0A        printWriter.println(%22exclude:%22);%0A        printWriter.println(%22  - Carthage%22);%0A        printWriter.println(%22  - Pods%22);%0A        streamWriter.close();%0A        printWriter.close();%0A        return configFile;%0A    %7D%0A%0A%7D%0A

Add tests for ConfigurationParser