diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/iiif/IIIFRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/iiif/IIIFRestRepositoryIT.java index d06573a258..c165c435d4 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/iiif/IIIFRestRepositoryIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/iiif/IIIFRestRepositoryIT.java @@ -94,6 +94,7 @@ public class IIIFRestRepositoryIT extends AbstractControllerIntegrationTest { String bitstreamContent = "ThisIsSomeDummyText"; Bitstream bitstream1 = null; + Bitstream bitstream2 = null; try (InputStream is = IOUtils.toInputStream(bitstreamContent, CharEncoding.UTF_8)) { bitstream1 = BitstreamBuilder .createBitstream(context, publicItem1, is, IIIFBundle) @@ -102,6 +103,14 @@ public class IIIFRestRepositoryIT extends AbstractControllerIntegrationTest { .build(); } + try (InputStream is = IOUtils.toInputStream(bitstreamContent, CharEncoding.UTF_8)) { + bitstream2 = BitstreamBuilder + .createBitstream(context, publicItem1, is, "THUMBNAIL") + .withName("Bitstream2") + .withMimeType("image/jpeg") + .build(); + } + context.restoreAuthSystemState(); // Default canvas size and label. @@ -110,7 +119,7 @@ public class IIIFRestRepositoryIT extends AbstractControllerIntegrationTest { .andExpect(jsonPath("$.@context", is("http://iiif.io/api/presentation/2/context.json"))) .andExpect(jsonPath("$.service.profile", is("http://iiif.io/api/search/0/search"))) .andExpect(jsonPath("$.thumbnail.@id", Matchers.containsString("/iiif/2/" - + bitstream1.getID()))) + + bitstream2.getID()))) .andExpect(jsonPath("$.sequences[0].canvases[0].@id", Matchers.containsString("/iiif/" + publicItem1.getID() + "/canvas/c0"))) .andExpect(jsonPath("$.sequences[0].canvases[0].label", is("Page 1")))