Sentinel2Utils { public static String getEndPositionByStart(final String startTime) { long endTimeStamp = 0; final DateFormat formatter = new SimpleDateFormat(Sentinel2Utils.DATE_TIME_FORMAT); logger.debug("(getEndPositionByStart)(startTime:" + startTime + ")|start"); try { endTimeStamp = formatter.parse(startTime).getTime() + Sentinel2Utils.SENSING_TIME; } catch (final Exception ex) { logger.warn("Sentinel-2 ingestion: Cannot parse start sensing " + "time. error: " + ex.getMessage()); return ""; } final String result = formatter.format(endTimeStamp); logger.debug("(getEndPositionByStart) return:" + result + "|end"); return result; } private  Sentinel2Utils(); static String xYZpoints2GML(final String pointsString); static String xYZpoints2JTS(final String pointsString); static String xYPoints2GML(final String pointsString); static String xYPoints2JTS(final String pointsString); static String getEndPositionByStart(final String startTime); static String getSatelliteByProductName(final String productName); static String filterUselessZeros(final String integer); static String getAbsoluteOrbitFromDatatakeFilename(
         final String datatakeFileName); static String getFormattedTimeString(final String rawTimeString); static String formatNumber(double value); static final String DATE_TIME_FORMAT; static final long SENSING_TIME; }
@Test public void testGetEndPositionByStart() throws Exception { final String start = "2013-07-07T17:19:27.000Z"; final String expected = "2013-07-07T17:19:30.608Z"; final String end = Sentinel2Utils.getEndPositionByStart(start); Assert.assertEquals(expected, end); }