@RunWith(DefaultServer.class)
public class ContentTypeFilesTestCase {
@BeforeClass
public static void setup() throws ServletException {
final PathHandler root = new PathHandler();
final ServletContainer container = ServletContainer.Factory.newInstance();
DeploymentInfo builder = new DeploymentInfo()
.setClassIntrospecter(TestClassIntrospector.INSTANCE)
.setClassLoader(ContentTypeFilesTestCase.class.getClassLoader())
.setContextPath("/app")
.setDeploymentName("servletContext.war")
.setResourceManager(new TestResourceLoader(ContentTypeServlet.class))
.setDefaultServletConfig(new DefaultServletConfig(true))
.addMimeMapping(new MimeMapping("jnlp", "application/x-java-jnlp-file"));
DeploymentManager manager = container.addDeployment(builder);
manager.deploy();
root.addPrefixPath(builder.getContextPath(), manager.start());
DefaultServer.setRootHandler(root);
}