@Test
public void testParseFlowOptionsSla() throws Exception {

  final HttpServletRequest req = mockRequestWithSla(ImmutableMap.of(
      // job_name, status, duration, is_email, is_kill
      "slaSettings[1]", ",FINISH,2:30,true,false",
      "slaSettings[2]", "test_job,SUCCESS,12:00,false,true",
      "slaSettings[3]", ",SUCCESS,12:00,true,true"));
  final ExecutionOptions options = HttpRequestUtils.parseFlowOptions(req, "test-flow");
  final List<SlaOption> slaOptions = options.getSlaOptions();
  final List<SlaOption> expected = Arrays.asList(
      new SlaOption(SlaType.FLOW_FINISH, "test-flow", "", Duration.ofMinutes(150),
          ImmutableSet.of(SlaAction.ALERT), ImmutableList.of()),
      new SlaOption(SlaType.JOB_SUCCEED, "test-flow", "test_job", Duration.ofMinutes(720),
          ImmutableSet.of(SlaAction.KILL), ImmutableList.of()),
      new SlaOption(SlaType.FLOW_SUCCEED, "test-flow", "", Duration.ofMinutes(720),
          ImmutableSet.of(SlaAction.ALERT, SlaAction.KILL), ImmutableList.of())
  );
  Assert.assertEquals(expected, slaOptions);
}