Browse souce code repository at: https://github.com/jjYBdx4IL/java-evaluation/blob/master/src/test/java/org/apache/commons/io/IOUtilsTest.java
package org.apache.commons.io;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

import java.io.IOException;
import java.net.URISyntaxException;

public class IOUtilsTest {

    @Test
    public void testClasspathJarExtractionByUri() throws IOException, URISyntaxException {
        String result = IOUtils
            .toString(IOUtilsTest.class.getResource("/org/openimaj/text/nlp/warandpeace.txt").toURI(), "UTF-8");
        assertTrue(result.startsWith("The Project Gutenberg EBook of War and Peace, by Leo Tolstoy"));
    }
}
-------------------------------------------------------------------------------
Test set: org.apache.commons.io.IOUtilsTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 s - in org.apache.commons.io.IOUtilsTest
testClasspathJarExtractionByUri  Time elapsed: 0.017 s