diff --git a/src/test/java/com/apptasticsoftware/integrationtest/RssReaderIntegrationTest.java b/src/test/java/com/apptasticsoftware/integrationtest/RssReaderIntegrationTest.java index 5ee9751..bb9f646 100644 --- a/src/test/java/com/apptasticsoftware/integrationtest/RssReaderIntegrationTest.java +++ b/src/test/java/com/apptasticsoftware/integrationtest/RssReaderIntegrationTest.java @@ -371,8 +371,6 @@ void diDigital() throws IOException { } } - - @SuppressWarnings("java:S5961") @Test void rssWorldOfTank() throws IOException { RssReader reader = new RssReader(); @@ -405,10 +403,13 @@ void rssWorldOfTank() throws IOException { assertThat(item.getDescription(), isPresentAnd(not(emptyString()))); assertThat(item.getPubDate(), isPresentAnd(not(emptyString()))); assertThat(item.getLink(), isPresentAnd(not(emptyString()))); - assertThat(item.getEnclosure(), isPresent()); - assertThat(item.getEnclosure().get().getUrl(), is(not(emptyString()))); - assertThat(item.getEnclosure().get().getType(), is(not(emptyString()))); - assertThat(item.getEnclosure().get().getLength(), isPresent()); + if (!item.getEnclosures().isEmpty()) { + for (Enclosure enclosure : item.getEnclosures()) { + assertThat(enclosure.getUrl(), is(not(emptyString()))); + assertThat(enclosure.getType(), is(not(emptyString()))); + assertThat(enclosure.getLength(), isPresent()); + } + } } }