@Test
public void postAjaxExecuteFlowWithSlaSettings() throws Exception {

  mockTestProjectAndFlow();
  mockSubmitExecution();
  this.req.addParameter("ajax", "executeFlow");
  this.req.addParameter("project", "testProject");
  this.req.addParameter("flow", "testFlow");
  this.req.addParameter("slaSettings[1]", ",FINISH,2:30,true,false");
  this.req.addParameter("slaEmails", "sla1@example.com,sla2@example.com");
  this.executorServlet.handlePost(this.req, this.res, this.session);
  assertEquals(200, this.res.getStatus());
  final JsonNode json = this.res.getResponseJson();
  assertEquals("testProject", json.path("project").asText());
  assertEquals("testFlow", json.path("flow").asText());
  assertEquals("Submitted (mocked)", json.path("message").asText());
  assertEquals(99, json.path("execid").asInt());
  final List<SlaOption> slaOptions = this.exFlow.getValue().getExecutionOptions().getSlaOptions();
  final List<SlaOption> expected = Arrays.asList(new SlaOption(SlaType.FLOW_FINISH, "testFlow",
      "", Duration.ofMinutes(150), ImmutableSet.of(SlaAction.ALERT),
      ImmutableList.of("sla1@example.com", "sla2@example.com")));
  Assert.assertEquals(expected, slaOptions);
}