@Test
public void postAjaxExecuteFlowWithInvalidSlaSettings() throws Exception {

  mockTestProjectAndFlow();
  mockSubmitExecution();
  this.req.addParameter("ajax", "executeFlow");
  this.req.addParameter("project", "testProject");
  this.req.addParameter("flow", "testFlow");
  this.req.addParameter("slaSettings[1]", "broken-syntax-for-sla");
  this.executorServlet.handlePost(this.req, this.res, this.session);
  assertEquals(200, this.res.getStatus());
  assertEquals("Error parsing flow options: Error parsing SLA setting 'broken-syntax-for-sla': "
          + "java.lang.ArrayIndexOutOfBoundsException: 1",
      this.res.getResponseJson().path("error").asText());
}