mock a private method which doesn't return anything using Junit

40 Views Asked by At

I am writing a test case in Junit for function which is public[firstFunction] and its invoking another function which is private.

public firstFunction(Object1 object1 , Object2 object2){
       secondFunction(object1,object2)
}
private secondFunction(Object1 object1 , Object2 object2){
       ....
}

I am trying to write a test case using but unable to find solution3

0

There are 0 best solutions below