I have a private method called getSubject in a class which i have just implemented. I am trying to carry out a unit test on the private method but my issue is that the private method getSubject is calling another method getSubjectOracle() (note:getSubjectOracle is a public method in a jar file) which returns a String subject. A pseoudocode is shown below:
public class Service{
private oracleDao
//setter for oracle dao avilable
private String getSubject(String id,Stringountry){
String subject = oracleDao.getSubjectOracle(String id,String country)
return subject;
}
}
Any idea how i can mock the return of the method oracleDao.getSubjectOracle(String id,String country) in order to carry unit test for method getSubject(String id, String country) pls?
I have search online of helpful resouces but could not get any.
Thanks in advance.