### Question:
CheckStyleAuditListener implements AuditListener { public void addError(final AuditEvent auditEvent) { errors.add(toIssue(auditEvent)); } CheckStyleAuditListener(@NotNull final Map<String, PsiFile> fileNamesToPsiFiles,
                                   final boolean suppressErrors,
                                   final int tabWidth,
                                   @NotNull final Optional<String> baseDir,
                                   @NotNull final List<Check> checks); void auditStarted(final AuditEvent auditEvent); void auditFinished(final AuditEvent auditEvent); void fileStarted(final AuditEvent auditEvent); void fileFinished(final AuditEvent auditEvent); void addError(final AuditEvent auditEvent); void addException(final AuditEvent auditEvent, final Throwable throwable); @NotNull Map<PsiFile, List<Problem>> getProblems();  }### Answer:
@Test public void testSeverityLevels() { final CheckStyleAuditListener underTest = new CheckStyleAuditListener(Collections.emptyMap(), false, 2, Optional.empty(), Collections.emptyList()); underTest.addError(createDummyEvent(SeverityLevel.INFO)); underTest.addError(createDummyEvent(SeverityLevel.WARNING)); underTest.addError(createDummyEvent(SeverityLevel.ERROR)); underTest.addError(createDummyEvent(SeverityLevel.IGNORE)); underTest.addError(createDummyEvent(null)); }
@Test public void testWithoutLocalizedMessage() { final CheckStyleAuditListener underTest = new CheckStyleAuditListener(Collections.emptyMap(), false, 2, Optional.empty(), Collections.emptyList()); try { underTest.addError(new AuditEvent("source", "filename.java")); Assert.fail("expected exception was not thrown"); } catch (NullPointerException e) { } }