DaanHoogland commented on PR #12615: URL: https://github.com/apache/cloudstack/pull/12615#issuecomment-3889196287
> AccountManagerImplTest.beforeTest:164 NotMock Argument passed to when() is not a mock > * Having two @before methods with no guaranteed execution order One of them should probably be @Before and the other @BeforeClass > * Or possibly overwriting mocks inside setUp() with manual Mockito.mock() calls I think no explicit Mocks should have to be created. @InitMocks should take care of injections. > > Would you recommend consolidating the @before methods into one, or removing the manual Mockito.mock() calls and relying only on @mock annotations? no and yes, see above. > Since this test extends AccountManagetImplTestBase, I want to ensure I’m aligning with the existing pattern. The existing pattern may have gone through Mockito upgrades and is not necessarily the best. @vishesh92 , could you have a look as well? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
