I am trying to figure out why is my test producing NPE for this one particular mock, other mocks are working fine when I checked in debug mode.
This is my test base class:
public class BaseTestCase { public PodamFactory podamFactory = new PodamFactoryImpl(); @BeforeEach void initMocks() { MockitoAnnotations.initMocks(this); } @BeforeEach void beforeEachSeparator() { System.out.println("**--- Executed before each test method in this class ---**"); } }
And my test class extends this base test. This is my debug result. Debug result
https://stackoverflow.com/questions/66020600/npe-for-only-one-bean-when-using-mock February 03, 2021 at 10:57AM
没有评论:
发表评论