Skip to content

Tests fail on Java 24 with Mockito interface mocking error when building v3 branch #105

@RalfsVetra

Description

@RalfsVetra

When building the v3 branch with Java 24, tests are failing due to Mockito being unable to mock the SmartIdConnector interface.

Environment:
Java : 24
JVM vendor name : Oracle Corporation
JVM vendor version : 24.0.1+9-30
JVM name : Java HotSpot(TM) 64-Bit Server VM
JVM version : 24.0.1+9-30
JVM info : mixed mode, sharing
OS name : Linux
OS version : 6.11.0-24-generic

Error message:
Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes [interface ee.sk.smartid.v3.rest.SmartIdConnector, interface java.io.Serializable] [ERROR] SessionStatusPollerTest.setUp:49 Mockito Mockito cannot mock this class: interface ee.sk.smartid.v3.rest.SmartIdConnector.

Steps to reproduce:
1.Clone the repository
2.Checkout the v3 branch
3.Run ./mvnw clean install

Additional context:
The README indicates Java 17 or later is required, but the tests appear to have compatibility issues with Java 24. I was able to build using -DskipTests, but the tests should be updated to work with newer Java versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions