LcL3ProductionType extends HadoopProductionType { static DateRange getWingsRange(ProductionRequest productionRequest, DateRange mainRange) throws ProductionException { int wings = productionRequest.getInteger("wings", 10); Calendar calendar = DateUtils.createCalendar(); calendar.setTime(mainRange.getStartDate()); calendar.add(Calendar.DAY_OF_MONTH, -wings); Date date1 = calendar.getTime(); calendar.setTime(mainRange.getStopDate()); calendar.add(Calendar.DAY_OF_MONTH, wings); Date date2 = calendar.getTime(); return new DateRange(date1, date2); } LcL3ProductionType(FileSystemService fileSystemService, HadoopProcessingService processingService,
                       StagingService stagingService); @Override Production createProduction(ProductionRequest productionRequest);  }
@Test public void testGetWingsRange() throws Exception { ProductionRequest productionRequest = new ProductionRequest("LCL3", "ewa", "wings", "10"); DateRange dateRange = new DateRange(asDate("2010-06-01"), asDate("2010-06-10")); DateRange wingsRange = LcL3ProductionType.getWingsRange(productionRequest, dateRange); assertNotNull(wingsRange); assertEquals("2010-05-22", asString(wingsRange.getStartDate())); assertEquals("2010-06-20", asString(wingsRange.getStopDate())); }