@Test
public void testWebObject() {

  final String expectedDuration = "60m";
  final String expectedStatus = "FINISH";
  final String expectedId = "job";
  final List<String> expectedAction = Collections.singletonList(SlaOption.WEB_ACTION_KILL);
  SlaOption slaOption = new SlaOptionBuilder(SlaType.JOB_FINISH, "flow", Duration.ofHours(1))
      .setJobName("job").setActions(Collections.singleton(SlaAction.KILL))
      .setEmails(Collections.singletonList("test@email.com")).createSlaOption();
  Map<String, Object> webObject = (Map<String, Object>)slaOption.toWebObject();
  assertThat((String)webObject.get(SlaOption.WEB_DURATION)).isEqualTo(expectedDuration);
  assertThat((String)webObject.get(SlaOption.WEB_STATUS)).isEqualTo(expectedStatus);
  assertThat((String)webObject.get(SlaOption.WEB_ID)).isEqualTo(expectedId);
  assertThat((List<String>)webObject.get(SlaOption.WEB_ACTIONS)).isEqualTo(expectedAction);
}