@Test
public void testGetWorkflowDefinitions() throws Exception {

  final String response = given().expect().statusCode(SC_OK).when().get(env.host("/")).asString();
  final JSONArray json = (JSONArray) parser.parse(response);
  assertEquals(2, json.size());
  // Workflow Definition 1
  final JSONObject wd1 = (JSONObject) json.get(0);
  assertEquals("example1", wd1.get("identifier"));
  assertEquals("Example workflow", wd1.get("title"));
  assertEquals("Example workflow definition", wd1.get("description"));
  assertArrayEquals(new String[] { "archive", "my-tag" }, ((JSONArray) wd1.get("tags")).toArray());
  assertFalse(wd1.containsKey("configuration_panel"));
  assertFalse(wd1.containsKey("operations"));
  // Workflow Definition 2
  final JSONObject wd2 = (JSONObject) json.get(1);
  assertEquals("example2", wd2.get("identifier"));
  assertEquals("Another workflow", wd2.get("title"));
  assertEquals("Example workflow definition", wd2.get("description"));
  assertArrayEquals(new String[] {}, ((JSONArray) wd2.get("tags")).toArray());
  assertFalse(wd2.containsKey("configuration_panel"));
  assertFalse(wd2.containsKey("operations"));
}