I am writing junit test to test the private method which has class declared in it.
My code:
private Object getFunctReturn()
{
InterfaceName obj = new ClassName():
Map map = obj.getMap();
map.foreach()->{
//iterating map here....
}
}
I am using WhiteBox api to test private methods. How can I mock InterfaceName obj = new ClassName(); so that i can proceed to for next execution of code?