diff --git a/apps/openchallenges/organization-service/src/test/java/org/sagebionetworks/openchallenges/organization/service/model/rest/response/ImageResponseTest.java b/apps/openchallenges/organization-service/src/test/java/org/sagebionetworks/openchallenges/organization/service/model/rest/response/ImageResponseTest.java new file mode 100644 index 0000000000..5280c9850b --- /dev/null +++ b/apps/openchallenges/organization-service/src/test/java/org/sagebionetworks/openchallenges/organization/service/model/rest/response/ImageResponseTest.java @@ -0,0 +1,21 @@ +package org.sagebionetworks.openchallenges.organization.service.model.rest.response; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +public class ImageResponseTest { + + @Test + public void ImageUrlGetterAndSetter_ShouldSetAndGetUrl_WhenCalledAfterImageUrlKeyPassed() { + + String imageUrl = "https://example.com/image.jpg"; + ImageResponse imageResponse = new ImageResponse(); + + // Set the url + imageResponse.setUrl(imageUrl); + String retrievedUrl = imageResponse.getUrl(); + + // Confirm that the same image url was retrieved that was set + Assertions.assertEquals(imageUrl, retrievedUrl); + } +} \ No newline at end of file