@Test
public void testCalculateHoursCustomWorkingHours() {

    Properties config = new Properties();
    config.setProperty(BusinessCalendarImpl.HOURS_PER_DAY, "6");
    String expectedDate = "2012-05-04 15:45";
    
    SessionPseudoClock clock = new StaticPseudoClock(parseToDateWithTime("2012-05-03 13:45").getTime());
    BusinessCalendarImpl businessCal = new BusinessCalendarImpl(config, clock);
    
    Date result = businessCal.calculateBusinessTimeAsDate("8h");
    
    assertEquals(expectedDate, formatDate("yyyy-MM-dd HH:mm", result));
}