@Test
public void synchronizeInvalid() throws Exception {

    // Create a set of rules that will be added
    List<Map<String, Object>> listOfRules = new ArrayList<>();
    Map<String, Object> elementMap = new HashMap<>();
    Map<String, String> outputTopics = new HashMap<>();
    outputTopics.put("outputStream", "outputTopic");
    elementMap.put("id", "rule_list_one");
    elementMap.put("input", Arrays.asList("test"));
    elementMap.put("output", outputTopics);
    elementMap.put("executionPlan", "from test select a, b insert into outputStream;");
    listOfRules.add(elementMap);
    Map<String, Object> elementMap2 = new HashMap<>();
    Map<String, String> outputTopics2 = new HashMap<>();
    outputTopics2.put("outputStream", "outputTopic");
    // elementMap2.put("id", "rule_list_two");
    elementMap2.put("input", Arrays.asList("test"));
    elementMap2.put("output", outputTopics2);
    elementMap2.put("executionPlan", "from test select a, b insert into outputStream;");
    listOfRules.add(elementMap2);
    String json = objectMapper.writeValueAsString(listOfRules);
    Entity<String> entity = Entity.json(json);
    Response response = target("/v1/synchronize").request(MediaType.APPLICATION_JSON_TYPE).post(entity);
    int statusCode = response.getStatus();
    assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), statusCode);
}