IssuesStatistics implements Serializable { public int getNewSizeOf(final Severity severity) { validateSeverity(severity); return newSizeBySeverity.get(severity); } @SuppressWarnings("checkstyle:ParameterNumber")  IssuesStatistics(
            final int totalErrorSize, final int totalHighSize, final int totalNormalSize, final int totalLowSize,
            final int newErrorSize, final int newHighSize, final int newNormalSize, final int newLowSize,
            final int deltaErrorSize, final int deltaHighSize, final int deltaNormalSize, final int deltaLowSize,
            final int fixedSize); @Whitelisted int getTotalSize(); @Whitelisted int getNewSize(); @Whitelisted int getDeltaSize(); @Whitelisted int getTotalErrorSize(); @Whitelisted int getTotalHighSize(); @Whitelisted int getTotalNormalSize(); @Whitelisted int getTotalLowSize(); @Whitelisted int getNewErrorSize(); @Whitelisted int getNewHighSize(); @Whitelisted int getNewNormalSize(); @Whitelisted int getNewLowSize(); @Whitelisted int getDeltaErrorSize(); @Whitelisted int getDeltaHighSize(); @Whitelisted int getDeltaNormalSize(); @Whitelisted int getDeltaLowSize(); @Whitelisted int getFixedSize(); ImmutableMap<Severity, Integer> getTotalSizePerSeverity(); int getTotalSizeOf(final Severity severity); ImmutableMap<Severity, Integer> getNewSizePerSeverity(); int getNewSizeOf(final Severity severity); @Override boolean equals(final Object o); @Override int hashCode();  }
@Test void shouldRejectUnsupportedSeverities() { IssuesStatistics statistics = createSerializable(); assertThatExceptionOfType(NoSuchElementException.class).isThrownBy( () -> statistics.getNewSizeOf(null)).withMessageContaining("null"); assertThatExceptionOfType(NoSuchElementException.class).isThrownBy( () -> statistics.getNewSizeOf(new Severity("other"))).withMessageContaining("other"); }