SavedCookieMixinTests uses readValue(String,Object.class)

The test should not provide SavedCookie.class to the ObjectMapper
since this is not done in production. In particular, it provides the
type that it should be deserialized, but this must be provided in the
JSON since the type is unknown at the time of deserialization.

Issue gh-17006
This commit is contained in:
Rob Winch 2025-05-07 14:38:09 -05:00
parent 241c3cd35a
commit 6118587ff8

View File

@ -88,7 +88,7 @@ public class SavedCookieMixinTests extends AbstractMixinTests {
@Test
public void deserializeSavedCookieJsonTest() throws IOException {
SavedCookie savedCookie = this.mapper.readValue(COOKIE_JSON, SavedCookie.class);
SavedCookie savedCookie = (SavedCookie) this.mapper.readValue(COOKIE_JSON, Object.class);
assertThat(savedCookie).isNotNull();
assertThat(savedCookie.getName()).isEqualTo("SESSION");
assertThat(savedCookie.getValue()).isEqualTo("123456789");