“If from one activity I book an appointment then it still remains in booked in next activity also”
It depends entirely on how you implemented your calendar object, but yes, whatever you do to it in one Activity should persist to the other Activity.
“How will it generate the bookCal object?”
This depends entirely on the nature of your PatientCalendar object. Singletons shouldn’t be used in many of your tests. That’s one of the good things about Singletons. So in your “createAlwaysBookedCalendar()” method, instantiate a new PatientCalendar that is configured to always be booked and then return it.
Any part of your code that avoids a dependency on your Singleton is then capable of working with any instance you give it, including fake instances and mock instances. That’s why you should limit Singleton access to the highest level control structures. From there, you pass your instance down to any other object that needs it.