test_class.file: insurance-common/src/test/java/org/lab/insurance/common/services/calendar/CalendarServiceTest.java
test_class.identifier: CalendarServiceTest
test_case.body: @Test
  	public void test02() {
  		CalendarService service = new CalendarService();
  		DateTime dt = new DateTime(2017, 10, 1, 0, 0, 0);
  		Date result = service.getNextLaboralDay(dt.toDate(), 0, null);
  		DateTime dtResult = new DateTime(result);
  
  		Assert.assertEquals(2017, dtResult.getYear());
  		Assert.assertEquals(10, dtResult.getMonthOfYear());
  		Assert.assertEquals(2, dtResult.getDayOfMonth());
  	}
test_case.class_method_signature: CalendarServiceTest.test02()
test_case.full_signature: @Test public void test02()
test_case.identifier: test02
test_case.invocations: getNextLaboralDay toDate assertEquals getYear assertEquals getMonthOfYear assertEquals getDayOfMonth
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test02()
focal_class.file: insurance-common/src/main/java/org/lab/insurance/common/services/calendar/CalendarService.java
focal_class.identifier: CalendarService
focal_class.class_method_signature: CalendarService.getNextLaboralDay(final Date date, final int days, final HolidayCalendar calendar)
focal_class.full_signature: public Date getNextLaboralDay(final Date date, final int days, final HolidayCalendar calendar)
focal_class.identifier: getNextLaboralDay
focal_class.modifiers: public
focal_class.parameters: (final Date date, final int days, final HolidayCalendar calendar)
focal_class.return: Date
focal_class.signature: Date getNextLaboralDay(final Date date, final int days, final HolidayCalendar calendar)
focal_class.class_method_signature: CalendarService.isLaboralDay(Date date, HolidayCalendar calendar)
focal_class.full_signature: public boolean isLaboralDay(Date date, HolidayCalendar calendar)
focal_class.identifier: isLaboralDay
focal_class.modifiers: public
focal_class.parameters: (Date date, HolidayCalendar calendar)
focal_class.return: boolean
focal_class.signature: boolean isLaboralDay(Date date, HolidayCalendar calendar)
focal_method.body: public Date getNextLaboralDay(final Date date, final int days, final HolidayCalendar calendar) {
  		DateTime tmp = new DateTime(date);
  		// Note: in the case of previous dates we want to have an offset
  		int check = days < 0 ? Math.abs(days) - 1 : days;
  		int count = 0;
  		int increment = days < 0 ? -1 : 1;
  		do {
  			if (!isLaboralDay(tmp.toDate(), calendar)) {
  				tmp = tmp.plusDays(increment);
  				continue;
  			}
  			tmp = tmp.plusDays(increment);
  			count++;
  		}
  		while (count < check);
  		return tmp.toDate();
  	}
focal_method.class_method_signature: CalendarService.getNextLaboralDay(final Date date, final int days, final HolidayCalendar calendar)
focal_method.full_signature: public Date getNextLaboralDay(final Date date, final int days, final HolidayCalendar calendar)
focal_method.identifier: getNextLaboralDay
focal_method.invocations: abs isLaboralDay toDate plusDays plusDays toDate
focal_method.modifiers: public
focal_method.parameters: (final Date date, final int days, final HolidayCalendar calendar)
focal_method.return: Date
focal_method.signature: Date getNextLaboralDay(final Date date, final int days, final HolidayCalendar calendar)