@Before
public void setUp() throws Exception {
String xml = (new TestUtil()).loadXmlFromFile(XML_HTML_FORM_ENTRY_REGIMEN_UTIL_TEST_DATASET);
// used to avoid lock timeout on GP#order.nextOrderNumberSeed
AdministrationService administrationService = mock(AdministrationService.class);
when(administrationService.getGlobalProperty(OpenmrsConstants.GLOBAL_PROPERTY_STANDARD_DRUG_REGIMENS))
.thenReturn(xml);
when(administrationService.getGlobalProperty("")).thenAnswer(new Answer<String>() {
@Override
public String answer(InvocationOnMock invocationOnMock) throws Throwable {
return "" + orderNumberCounter++;
}
});