eclipse-jkube / jkube

Build and Deploy java applications on Kubernetes
https://www.eclipse.dev/jkube/
Eclipse Public License 2.0
773 stars 518 forks source link

SmallRyeUtilsTest : Replace `Mockito.mock` by creating actual object #3363

Closed rohanKanojia closed 2 months ago

rohanKanojia commented 2 months ago

Component

JKube Kit

Task description

Related to https://github.com/eclipse/jkube/issues/2316

SmallRyeUtilsTest seems to be using mocks here :

https://github.com/eclipse-jkube/jkube/blob/c2c9a0cdd076fbeb25087a6598b448b5271d6293/jkube-kit/jkube-kit-smallrye/src/test/java/org/eclipse/jkube/smallrye/SmallRyeUtilsTest.java#L33

This can easily be refactored to use real object using lombok builders:

    javaProject = JavaProject.builder().build();

Usage of org.mockito.Mockito.mock and org.mockito.Mockito.when is removed from SmallRyeUtilsTest

Expected Behavior

Usages of Mockito.mock and Mockito.when are removed from SmallRyeUtilsTest

Acceptance Criteria

arman-yekkehkhani commented 2 months ago

@rohanKanojia Hi, can I work on this issue?