From 1919d77a45963c360c568e5f4081c854cf553b17 Mon Sep 17 00:00:00 2001 From: Harald Kuhr Date: Sat, 15 Oct 2022 11:55:34 +0200 Subject: [PATCH] Revert "Update test to pass on JDK 19." This reverts commit 37afe24aac7c68160962735ef4ae46a70f0a266d. --- .../imageio/color/LCMSSanitizerStrategyTest.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/color/LCMSSanitizerStrategyTest.java b/imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/color/LCMSSanitizerStrategyTest.java index d8d7c48f..d7b63ea2 100644 --- a/imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/color/LCMSSanitizerStrategyTest.java +++ b/imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/color/LCMSSanitizerStrategyTest.java @@ -32,24 +32,23 @@ package com.twelvemonkeys.imageio.color; import org.junit.Test; -import java.awt.color.*; +import java.awt.color.ICC_Profile; -import static org.junit.Assert.assertArrayEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verifyNoMoreInteractions; public class LCMSSanitizerStrategyTest { @Test(expected = IllegalArgumentException.class) - public void testFixProfileNullProfile() { + public void testFixProfileNullProfile() throws Exception { new LCMSSanitizerStrategy().fixProfile(null); } @Test public void testFixProfile() throws Exception { - ICC_Profile profile = ICC_Profile.getInstance(getClass().getResourceAsStream("/profiles/adobe_rgb_1998.icc")); - byte[] header = profile.getData(ICC_Profile.icSigHead); + ICC_Profile profile = mock(ICC_Profile.class); + new LCMSSanitizerStrategy().fixProfile(profile); - new KCMSSanitizerStrategy().fixProfile(profile); - - assertArrayEquals(header, profile.getData(ICC_Profile.icSigHead)); + verifyNoMoreInteractions(profile); } } \ No newline at end of file