ConflictException extends RuntimeException implements ErrorCode { @Override public Severity severity() { return Severity.WARN; } ConflictException(String message);  ConflictException(String message, String errorCode);  ConflictException(String message, String errorCode, Throwable cause); @Override Severity severity(); @Override String errorCode();  }
@Test void severity() { var exception = new ConflictException("error", "CONFLICT"); assertThat(exception.severity()).isEqualTo(Severity.WARN); }