@@ -0,0 +1,1070 @@
+package org.vromero.gist.snippet;%0A%0Aimport junit.framework.Assert;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.TemporaryFolder;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.net.URISyntaxException;%0Aimport java.net.URL;%0A%0Apublic class SnippetManagerTest %7B%0A%0A    @Rule%0A    public TemporaryFolder testFolder = new TemporaryFolder();%0A%0A    @Test%0A    public void testSnippetManagerCreateAndRead() throws IOException %7B%0A        File snippetDir = testFolder.newFolder(%22testSnippetManagerCreate%22);%0A%0A        URL javaUrl = getClass().getClassLoader().getResource(%22snippet%22);%0A%0A        Assert.assertNotNull(javaUrl);%0A%0A        File javaFile;%0A        try %7B%0A            javaFile = new File(javaUrl.toURI());%0A        %7D catch(URISyntaxException e) %7B%0A            javaFile = new File(javaUrl.getPath());%0A        %7D%0A%0A        Assert.assertNotNull(javaFile);%0A%0A        SnippetManager manager = new SnippetManager(%22UTF-8%22, snippetDir);%0A        manager.createSnippet(javaFile, %22gist-id%22, %22snip-id%22);%0A        manager.readSnippet(%22gist-id%22, %22snip-id%22);%0A    %7D%0A%0A%7D%0A

Test for snippet manager