Hello lovely Kotliners! In my test, this line whe...
# getting-started
n
Hello lovely Kotliners! In my test, this line where I mock a return from
repository
Copy code
every { repository.save(any()) } returns fleetEntity
Returns the following after switching JDK from Eclipse Temurin to docker.io/ibm-semeru-runtimes:open-17.0.13_11-jdk
Copy code
FleetServiceTest > should return created fleet given request() FAILED
    io.mockk.MockKException at FleetServiceTest.kt:44
        Caused by: java.lang.ClassCastException at FleetServiceTest.kt:44
repository interface:
Copy code
package org.springframework.data.repository;

import java.util.Optional;

@NoRepositoryBean
public interface CrudRepository<T, ID> extends Repository<T, ID> {
    <S extends T> S save(S entity);

    <S extends T> Iterable<S> saveAll(Iterable<S> entities);

    Optional<T> findById(ID id);

    boolean existsById(ID id);

    Iterable<T> findAll();

    Iterable<T> findAllById(Iterable<ID> ids);

    long count();

    void deleteById(ID id);

    void delete(T entity);

    void deleteAllById(Iterable<? extends ID> ids);

    void deleteAll(Iterable<? extends T> entities);

    void deleteAll();
}
Any ideas as to why this CastException occurs all of a sudden after changing the JDK? This is important because the new JDK image has a significantly smaller memory footprint.
e
there is a #C9EJFT6DB channel
but as you mention IBM Semeru, this looks like an existing bug: https://github.com/mockk/mockk/issues/726
🙌 1