### Question:
DateTimeService { public ZonedDateTime getEndingTimestampOfWeekUTC(ZonedDateTime zonedDateTime) { ZonedDateTime zonedDateTimeToConvert = zonedDateTime; zonedDateTimeToConvert = zonedDateTimeToConvert.toInstant().atZone(ZoneId.of("UTC")); int plusDays = 8 - zonedDateTimeToConvert.getDayOfWeek().getValue(); zonedDateTimeToConvert = zonedDateTimeToConvert.plusDays(plusDays); zonedDateTimeToConvert = zonedDateTimeToConvert.withHour(0).withMinute(0).withSecond(0).withNano(0); zonedDateTimeToConvert = zonedDateTimeToConvert.minus(1, ChronoUnit.SECONDS); return zonedDateTimeToConvert; }  ZonedDateTime getFutureDate(ZonedDateTime timestamp, int numberOfDays, boolean endOfDay); ZonedDateTime getDateTimeNowEurope(); ZonedDateTime getDateTimeNowUTC(); ZonedDateTime getBeginningTimestampOfMonthUTC(final ZonedDateTime zonedDateTime); ZonedDateTime getEndingTimestampOfMonthUTC(ZonedDateTime zonedDateTime); ZonedDateTime getBeginningTimestampOfWeekUTC(ZonedDateTime zonedDateTime); ZonedDateTime getEndingTimestampOfWeekUTC(ZonedDateTime zonedDateTime); ZonedDateTime getBeginningTimestampOfDayUTC(ZonedDateTime zonedDateTime); ZonedDateTime getEndingTimestampOfDayUTC(ZonedDateTime zonedDateTime); ZonedDateTime convertDateToZonedDateTimeEurope(Date date); ZonedDateTime getBeginningOfCurrentYear(); ZonedDateTime getEndingOfCurrentYear(); String getMonthNameFor(ZonedDateTime dateTime);  }### Answer:
@Test public void getEndingTimestampOfWeekUTC() throws Exception { DateTimeService cut = new DateTimeService(); ZonedDateTime expected = ZonedDateTime.now(ZoneId.of("UTC")).withYear(2017).withMonth(6).withDayOfMonth(18).withHour(23).withMinute(59).withSecond(59).withNano(0); ZonedDateTime current = ZonedDateTime.of(2017, 6, 12, 12, 23, 45, 800, ZoneId.of("UTC")); ZonedDateTime endingTimestampOfWeekUTC = cut.getEndingTimestampOfWeekUTC(current); assertThat(endingTimestampOfWeekUTC, is(expected)); assertThat(endingTimestampOfWeekUTC.getZone(), is(ZoneId.of("UTC"))); expected = ZonedDateTime.now(ZoneId.of("UTC")).withYear(2017).withMonth(7).withDayOfMonth(2).withHour(23).withMinute(59).withSecond(59).withNano(0); current = ZonedDateTime.of(2017, 6, 28, 12, 23, 45, 800, ZoneId.of("UTC")); endingTimestampOfWeekUTC = cut.getEndingTimestampOfWeekUTC(current); assertThat(endingTimestampOfWeekUTC, is(expected)); assertThat(endingTimestampOfWeekUTC.getZone(), is(ZoneId.of("UTC"))); }