The DefaultServiceEnricherAddMissingPartsTest class in the JKube project currently uses the deprecated asList() method from AssertJ, which is incompatible with the latest AssertJ versions. This issue aims to replace asList() with asInstanceOf(InstanceOfAssertFactories.list(type.class)) to ensure compatibility and maintain best practices.
Method Replacement: Replace all instances of asList() with asInstanceOf(InstanceOfAssertFactories.list(type.class)) in the DefaultServiceEnricherAddMissingPartsTest class.
Code Cleanup: Check and remove any unused imports or redundant code during this update.
Expected Outcome
The test should run successfully without any deprecation warnings.
The code should maintain compatibility with newer versions of the AssertJ library.
Additional Context
This update is part of an ongoing initiative to refactor deprecated methods throughout the JKube project for better maintainability and compatibility.
Component
JKube Kit
Task description
Description
The
DefaultServiceEnricherAddMissingPartsTest
class in the JKube project currently uses the deprecatedasList()
method from AssertJ, which is incompatible with the latest AssertJ versions. This issue aims to replaceasList()
withasInstanceOf(InstanceOfAssertFactories.list(type.class))
to ensure compatibility and maintain best practices.Affected Class
DefaultServiceEnricherAddMissingPartsTest
https://github.com/eclipse-jkube/jkube/blob/358ce5c29b101de94fc42748ead91c5433cfa44c/jkube-kit/enricher/generic/src/test/java/org/eclipse/jkube/enricher/generic/DefaultServiceEnricherAddMissingPartsTest.java#L71-L72
Proposed Solution
asList()
withasInstanceOf(InstanceOfAssertFactories.list(type.class))
in theDefaultServiceEnricherAddMissingPartsTest
class.Expected Outcome
Additional Context
This update is part of an ongoing initiative to refactor deprecated methods throughout the JKube project for better maintainability and compatibility.
Thank you for working on this issue!