### Question:
TimeLatMapStrategy implements MapStrategy { static TimeRange extractTimeRangeInFullMonths(List<SamplingPoint> points) { long minTime = Long.MAX_VALUE; long maxTime = Long.MIN_VALUE; for (final SamplingPoint samplingPoint : points) { final long samplingPointTime = samplingPoint.getTime(); if (samplingPointTime < minTime) { minTime = samplingPointTime; } if (samplingPointTime > maxTime) { maxTime = samplingPointTime; } } final Date startDate = new Date(minTime); final Date stopDate = new Date(maxTime); return new TimeRange(TimeUtil.getBeginOfMonth(startDate), TimeUtil.getEndOfMonth(stopDate)); } TimeLatMapStrategy(int width, int height); @Override void initialize(List<SamplingPoint> samplingPoints); @Override PlotPoint map(SamplingPoint samplingPoint);  }### Answer:
@Test public void testExtractTimeRangeInFullMoths_onePoint() throws ParseException { final List<SamplingPoint> points = new ArrayList<>(); points.add(createPoint("2011-06-02T00:00:00Z", 19.0)) ; final TimeRange timeRange = TimeLatMapStrategy.extractTimeRangeInFullMonths(points); assertNotNull(timeRange); assertExpectedTime("2011-06-01T00:00:00Z", timeRange.getStartDate()); assertExpectedTime("2011-07-01T00:00:00Z", timeRange.getStopDate()); }
@Test public void testExtractTimeRangeInFullMoths_threePoints() throws ParseException { final List<SamplingPoint> points = new ArrayList<>(); points.add(createPoint("2010-05-11T00:00:00Z", 19.0)) ; points.add(createPoint("2010-05-08T11:00:00Z", 19.0)) ; points.add(createPoint("2010-05-17T14:00:00Z", 19.0)) ; final TimeRange timeRange = TimeLatMapStrategy.extractTimeRangeInFullMonths(points); assertNotNull(timeRange); assertExpectedTime("2010-05-01T00:00:00Z", timeRange.getStartDate()); assertExpectedTime("2010-06-01T00:00:00Z", timeRange.getStopDate()); }