@Test
public void testExec() throws Exception {

    final Path testFormatter = getFile("view.groovy").getParent();
    IO.copyDirectoryOrFile(testFormatter, this.dataDirectory.getFormatterDir().resolve(RESOURCE_TEST_DIR), false);
    assertCorrectExec("test.js", 200, "application/javascript");
    assertCorrectExec("css/test.css", 200, "text/css");
    assertCorrectExec("test.html", 200, "text/html");
    assertCorrectExec("test.gif", 200, "image/gif");
    assertCorrectExec("test.bmp", 200, "image/bmp");
    assertCorrectExec("test.jpg", 200, "image/jpeg");
    assertCorrectExec("test.jpeg", 200, "image/jpeg");
    assertCorrectExec("test.tif", 200, "image/tiff");
    assertCorrectExec("test.png", 200, "image/png");
    assertCorrectExec("test.xml", 200, "application/xml");
    assertCorrectExec("test.json", 200, "application/json");
    assertCorrectExec("testyxz", 200, "application/octet-stream");
    assertCorrectExec("view.groovy", 200, "text/x-groovy-source,groovy");
    assertCorrectExec("test.xsl", 200, "application/xslt+xml");
    assertCorrectExec("test.xslt", 200, "application/xslt+xml");
    assertCorrectExec("nosuchfile", 404, null);
    assertCorrectExec("../xml_view/view.groovy", 403, null);
}