@Test
public void test_add_add_settlement() {
Instant now = Instant.now(_holMaster.getClock());
ManageableHoliday holiday = new ManageableHoliday(HolidayType.SETTLEMENT, ExternalId.of("A", "B"), Arrays.asList(LocalDate.of(2010, 6, 9)));
HolidayDocument doc = new HolidayDocument(holiday);
String name = doc.getName();
HolidayDocument test = _holMaster.add(doc);
UniqueId uniqueId = test.getUniqueId();
assertNotNull(uniqueId);
assertEquals("DbHol", uniqueId.getScheme());
assertTrue(uniqueId.isVersioned());
assertTrue(Long.parseLong(uniqueId.getValue()) >= 1000);
assertEquals("0", uniqueId.getVersion());
assertEquals(now, test.getVersionFromInstant());
assertEquals(null, test.getVersionToInstant());
assertEquals(now, test.getCorrectionFromInstant());
assertEquals(null, test.getCorrectionToInstant());
ManageableHoliday testHoliday = test.getHoliday();
assertNotNull(testHoliday);
assertEquals(uniqueId, testHoliday.getUniqueId());
assertEquals(name, test.getName());
assertEquals(HolidayType.SETTLEMENT, testHoliday.getType());
assertEquals(null, testHoliday.getCurrency());
assertEquals(null, testHoliday.getRegionExternalId());
assertEquals(ExternalId.of("A", "B"), testHoliday.getExchangeExternalId());
assertEquals(Arrays.asList(LocalDate.of(2010, 6, 9)), testHoliday.getHolidayDates());
}