Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

2 votes
0 answers
6k views

How to mock private methods using Whitebox(org.powermock.reflect)

I want to mock a private method which has been called inside another method. Following is the sample code, I have written. Java code: package org.mockprivatemethods; public class AccountDeposit ...
S Kumar's user avatar
  • 585
0 votes
2 answers
4k views

Coverage: Branch and path coverage test case

I need to implement the Division by Zero operation in a method such that (1) ​every​ test suite that achieves 100% path coverage reveals the fault and (2) it is ​possible​ to create a test suite that ...
user3624146's user avatar