Hi friends,
I am a beginner in
Junit testing and just started exploring Junit for writing the test cases. I have a scenario where I am struck and finding it difficult to proceed. The scenario is that I am testing a public method which internally calls private methods. In on of the private method, the method tries to connect to the environment and the properties of the environment is fetched in the private method. How can i override the behavior such that I can override the behavior by populating the properties and mimic the environment dependency even though I do not directly call the private method.
Ex:
In the main class:
In the ConfigDetail class
Please let me know to do proceed.
Thanks and Regards,
Pradeep