tomcat.getHost().setDeployOnStartup(true);
String contextPath = "/" + getContextPath();
File webApp = new File(getWorkingDir(), getContextPath());
PomEquippedResolveStage resolver = Maven.resolver().loadPomFromFile("pom.xml");
WebArchive wa = ShrinkWrap.create(WebArchive.class, "rest-test.war").setWebXML(webXmlPath)
.addAsLibraries(resolver.resolve("org.codehaus.jackson:jackson-jaxrs:1.6.5").withTransitivity().asFile())
.addAsLibraries(resolver.resolve("org.camunda.bpm:camunda-engine").withTransitivity().asFile())
.addAsLibraries(resolver.resolve("org.mockito:mockito-core").withTransitivity().asFile())
.addAsServiceProvider(ProcessEngineProvider.class, MockedProcessEngineProvider.class)
.addPackages(true, "org.camunda.bpm.engine.rest");
addRuntimeSpecificLibraries(wa, resolver);