Revert "Update test to pass on JDK 19."

This reverts commit 37afe24aac7c68160962735ef4ae46a70f0a266d.
This commit is contained in:
Harald Kuhr 2022-10-15 11:55:34 +02:00
parent 37afe24aac
commit 1919d77a45

View File

@ -32,24 +32,23 @@ package com.twelvemonkeys.imageio.color;
import org.junit.Test; 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 { public class LCMSSanitizerStrategyTest {
@Test(expected = IllegalArgumentException.class) @Test(expected = IllegalArgumentException.class)
public void testFixProfileNullProfile() { public void testFixProfileNullProfile() throws Exception {
new LCMSSanitizerStrategy().fixProfile(null); new LCMSSanitizerStrategy().fixProfile(null);
} }
@Test @Test
public void testFixProfile() throws Exception { public void testFixProfile() throws Exception {
ICC_Profile profile = ICC_Profile.getInstance(getClass().getResourceAsStream("/profiles/adobe_rgb_1998.icc")); ICC_Profile profile = mock(ICC_Profile.class);
byte[] header = profile.getData(ICC_Profile.icSigHead); new LCMSSanitizerStrategy().fixProfile(profile);
new KCMSSanitizerStrategy().fixProfile(profile); verifyNoMoreInteractions(profile);
assertArrayEquals(header, profile.getData(ICC_Profile.icSigHead));
} }
} }