
Allon Mureinik has submitted this change and it was merged. Change subject: core: UpdateClusterCommandTest @Spy ...................................................................... core: UpdateClusterCommandTest @Spy Use the @Spy annotation to spy the command being tested in order to allow injecting mocks in subsequent patches. This patch includes: - Changing the command being tested to be initialized once and annotated with @Spy and @InjectMocks. - Thus, there is only only command object per test, so all the methods receiving commands as parameters were redone to use the member. - Now that the command has an @InjectMock annotation on it, the InjectorRule could be removed. - Explicit doReturn(someDependency).when(cmd).getSomeDependency() statements were removed for dependencies that are already injected. - Setters were added to some parameter classes to allow changing its properties after the command has been created. Change-Id: I3a33bd8106306c9bcc80d7c83e1e19a1c4cd0495 Signed-off-by: Allon Mureinik <amureini@redhat.com> --- M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateClusterCommandTest.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/ClusterOperationParameters.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/ManagementNetworkOnClusterOperationParameters.java 3 files changed, 17 insertions(+), 13 deletions(-) Approvals: Allon Mureinik: Verified; Looks good to me, approved; Passed CI tests -- To view, visit https://gerrit.ovirt.org/64623 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3a33bd8106306c9bcc80d7c83e1e19a1c4cd0495 Gerrit-PatchSet: 10 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Tal Nisan <tnisan@redhat.com> Gerrit-Reviewer: Yevgeny Zaspitsky <yzaspits@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>