@@ -0,0 +1,1406 @@
+package tdl.record.sourcecode.content;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.nio.file.Path;%0Aimport org.eclipse.jgit.api.Git;%0Aimport org.eclipse.jgit.api.errors.GitAPIException;%0Aimport static org.junit.Assert.assertFalse;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.TemporaryFolder;%0Aimport tdl.record.sourcecode.test.FileTestHelper;%0A%0Apublic class CopyFromDirectorySourceCodeProviderTest %7B%0A%0A    @Rule%0A    public TemporaryFolder folder = new TemporaryFolder();%0A%0A    @Test%0A    public void retrieveAndSaveToShouldHonourGitignoreContent() throws IOException, GitAPIException %7B%0A        File original = folder.newFolder();%0A        Path originalPath = original.toPath();%0A        File actual = folder.newFolder();%0A%0A        Git git = Git.init().setDirectory(original).call();%0A        FileTestHelper.appendStringToFile(originalPath, %22file1.txt%22, %22TEST%22);%0A        FileTestHelper.appendStringToFile(originalPath, %22file1.bak%22, %22TEST%22);%0A        FileTestHelper.appendStringToFile(originalPath, %22.gitignore%22, %22*.bak%22);%0A%0A        git.add().addFilepattern(%22.%22).call();%0A        git.commit().setMessage(%22commit1%22).call();%0A%0A        CopyFromDirectorySourceCodeProvider provider = new CopyFromDirectorySourceCodeProvider(originalPath);%0A        provider.retrieveAndSaveTo(actual.toPath());%0A        %0A        assertFalse(actual.toPath().resolve(%22file1.bak%22).toFile().exists());%0A    %7D%0A%7D%0A

Add test.