When @StartModule is added to the PatientServiceTest class, it is resulting in some of the tests failing, for example:
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.openmrs.Patient.identifiers, no session or session was closed.
The issue seems to be related to the way the spring context is refreshed in StartModuleExecutionListener
There might be a cleaner way to do it
To Reproduce, simply add @StartModule to the start of the class, using any module (e.g. xstream). Run the tests in this class to see the errors.