ModelValidation { public ListBoxModel getAllSeverityFilters() { ListBoxModel options = new ListBoxModel(); options.add(Messages.SeverityFilter_High(), Severity.WARNING_HIGH.getName()); options.add(Messages.SeverityFilter_Normal(), Severity.WARNING_NORMAL.getName()); options.add(Messages.SeverityFilter_Low(), Severity.WARNING_LOW.getName()); return options; } ModelValidation(); @VisibleForTesting  ModelValidation(final JenkinsFacade jenkins); ComboBoxModel getAllCharsets(); Charset getCharset(@CheckForNull final String charset); void ensureValidId(final String id); FormValidation validateId(final String id); FormValidation validateCharset(final String reportEncoding); ListBoxModel getAllSeverityFilters(); ListBoxModel getAllTrendChartTypes(); ComboBoxModel getAllJobs(); FormValidation validateJob(final String referenceJobName); @SuppressWarnings("WeakerAccess") FormValidation validateThreshold(@QueryParameter final int threshold); FormValidation validateHealthy(final int healthy, final int unhealthy); FormValidation validateUnhealthy(final int healthy, final int unhealthy); FormValidation doCheckPattern(@AncestorInPath final AbstractProject<?, ?> project,
            @QueryParameter final String pattern); FormValidation doCheckSourceDirectory(@AncestorInPath final AbstractProject<?, ?> project,
            @QueryParameter final String sourceDirectory);  }
@Test void doFillMinimumPriorityItemsShouldBeNotEmpty() { ModelValidation model = new ModelValidation(); ListBoxModel allFilters = model.getAllSeverityFilters(); assertThat(allFilters.size()).isEqualTo(3); Option actualHighOption = allFilters.get(0); Option actualNormalOption = allFilters.get(1); Option actualLowOption = allFilters.get(2); assertThat(actualHighOption.value).isEqualTo(Severity.WARNING_HIGH.getName()); assertThat(actualHighOption.name).isEqualTo(Messages.SeverityFilter_High()); assertThat(actualNormalOption.value).isEqualTo(Severity.WARNING_NORMAL.getName()); assertThat(actualNormalOption.name).isEqualTo(Messages.SeverityFilter_Normal()); assertThat(actualLowOption.value).isEqualTo(Severity.WARNING_LOW.getName()); assertThat(actualLowOption.name).isEqualTo(Messages.SeverityFilter_Low()); }