@Test
public void getOptions_shouldLoadCashierOptionsFromTheDatabase() throws Exception {

	when(adminService.getGlobalProperty(ModuleSettings.RECEIPT_REPORT_ID_PROPERTY))
	        .thenReturn("1");
	when(adminService.getGlobalProperty(ModuleSettings.ROUNDING_MODE_PROPERTY))
	        .thenReturn(CashierOptions.RoundingMode.MID.toString());
	when(adminService.getGlobalProperty(ModuleSettings.ROUND_TO_NEAREST_PROPERTY))
	        .thenReturn("5");
	when(adminService.getGlobalProperty(ModuleSettings.ROUNDING_ITEM_ID))
	        .thenReturn("1");
	when(adminService.getGlobalProperty(ModuleSettings.TIMESHEET_REQUIRED_PROPERTY))
	        .thenReturn("true");
	Item item = new Item();
	when(itemService.getById(1))
	        .thenReturn(item);
	CashierOptions options = optionsService.getOptions();
	Assert.assertNotNull(options);
	Assert.assertEquals(1, options.getDefaultReceiptReportId());
	Assert.assertEquals(CashierOptions.RoundingMode.MID, options.getRoundingMode());
	Assert.assertEquals(5, (int)options.getRoundToNearest());
	Assert.assertEquals(item.getUuid(), options.getRoundingItemUuid());
	Assert.assertEquals(true, options.isTimesheetRequired());
}