@Test
public void add() throws Exception {

    // Create a rule that will be added
    Map<String, Object> elementMap = new HashMap<>();
    Map<String, String> outputTopics = new HashMap<>();
    outputTopics.put("outputStream", "outputTopic");
    elementMap.put("id", "testID");
    elementMap.put("input", Arrays.asList("test"));
    elementMap.put("output", outputTopics);
    elementMap.put("executionPlan", "from test select a, b insert into outputStream;");
    String json = objectMapper.writeValueAsString(elementMap);
    Entity<String> entity = Entity.json(json);
    Response response = target("/v1/").request(MediaType.APPLICATION_JSON_TYPE).post(entity);
    int statusCode = response.getStatus();
    assertEquals(Response.Status.OK.getStatusCode(), statusCode);
}