Alert { public void severity(String result) { severity = "WARN".equals(result) ? Severity.WARN : Severity.ERROR; }  void severity(String result); public String id; public String app; public String action; public Severity severity; public String errorCode; public String errorMessage; public String kibanaIndex; public String host; }
@Test void severity() { Alert alert = new Alert(); alert.severity("WARN"); assertThat(alert.severity).isEqualTo(Severity.WARN); alert.severity("ERROR"); assertThat(alert.severity).isEqualTo(Severity.ERROR); }