@Ignore
@Test
public void testTaskFormServletWithUserTask() throws Exception {
Repository repository = new VFSRepository(producer.getIoService());
((VFSRepository)repository).setDescriptor(descriptor);
profile.setRepository(repository);
AssetBuilder builder = AssetBuilderFactory.getAssetBuilder(Asset.AssetType.Text);
builder.content("bpmn2 content")
.type("bpmn2")
.name("userTask")
.location("/defaultPackage");
String uniqueId = repository.createAsset(builder.getAsset());
// setup parameters
Map<String, String> params = new HashMap<String, String>();
params.put("uuid", uniqueId);
params.put("json", readFile("src/test/resources/BPMN2-UserTask.json"));
params.put("profile", "jbpm");
params.put("ppdata", null);
TaskFormsServlet taskFormsServlet = new TaskFormsServlet();
taskFormsServlet.setProfile(profile);
taskFormsServlet.init(new TestServletConfig(new TestServletContext(repository)));
taskFormsServlet.doPost(new TestHttpServletRequest(params), new TestHttpServletResponse());
Collection<Asset> forms = repository.listAssets("/defaultPackage", new FilterByExtension("ftl"));
assertNotNull(forms);
assertEquals(2, forms.size());
Iterator<Asset> assets = forms.iterator();
Asset asset1 = assets.next();
assertEquals("evaluate-taskform", asset1.getName());
assertEquals("/defaultPackage", asset1.getAssetLocation());
Asset asset2 = assets.next();
assertEquals("testprocess-taskform", asset2.getName());
assertEquals("/defaultPackage", asset2.getAssetLocation());
Asset<String> form1 = repository.loadAsset(asset1.getUniqueId());
assertNotNull(form1.getAssetContent());
Asset<String> form2 = repository.loadAsset(asset2.getUniqueId());
assertNotNull(form2.getAssetContent());
}