We need a mock library in the core for the proper unit testing. My favorite is Mockito . We could add PowerMock  as well for the ease of mocking static methods e.g. Context.getConceptService().
Patient is unintentionally deleted while replacing his/her drug regimen from the regimen tab of the dashboard
Use mocks to test implementation id