@Before
  public void setUp() throws IOException {

    settingsService = Mockito.mock(SettingsService.class);
    publicHolidaysService = new PublicHolidaysService(settingsService);

    Mockito.when(settingsService.getSettings()).thenReturn(new Settings());
  }
  @Test
  public void ensureWorkingDurationForNewYearsEveCanBeConfiguredToAWorkingDurationOfZero() {

    Settings settings = new Settings();
    settings.getWorkingTimeSettings().setWorkingDurationForNewYearsEve(DayLength.ZERO);

    Mockito.when(settingsService.getSettings()).thenReturn(settings);

    DateMidnight testDate = new DateMidnight(2013, DateTimeConstants.DECEMBER, 31);

    BigDecimal workingDuration = publicHolidaysService.getWorkingDurationOfDate(testDate, state);

    Assert.assertEquals("Wrong working duration", BigDecimal.ZERO, workingDuration);
  }
  @Test
  public void ensureWorkingDurationForChristmasEveCanBeConfiguredToAWorkingDurationOfMorning() {

    Settings settings = new Settings();
    settings.getWorkingTimeSettings().setWorkingDurationForChristmasEve(DayLength.MORNING);

    Mockito.when(settingsService.getSettings()).thenReturn(settings);

    DateMidnight testDate = new DateMidnight(2013, DateTimeConstants.DECEMBER, 24);

    BigDecimal workingDuration = publicHolidaysService.getWorkingDurationOfDate(testDate, state);

    Assert.assertEquals("Wrong working duration", new BigDecimal("0.5"), workingDuration);
  }