use @InjectMocks annotation on object B to inject A. 3. after initMocks(this), the reference of B within A is null. code example: @InjectMocks @Spy
確定! 回上一頁