### Question:
DateTimeService { public ZonedDateTime getBeginningOfCurrentYear() { return getDateTimeNowUTC().withDayOfYear(1).withHour(0).withMinute(0).withSecond(0).withNano(0); }  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 getBeginningOfCurrentYear() { DateTimeService cut = new DateTimeService(); final DateTimeService spyCut = Mockito.spy(cut); final ZonedDateTime now = cut.getDateTimeNowEurope(); ZonedDateTime current = ZonedDateTime.of(now.getYear(), 6, 1, 12, 23, 45, 800, ZoneId.of("UTC")); ZonedDateTime expected = ZonedDateTime.of(now.getYear(), 1, 1, 0, 0, 0, 0, ZoneId.of("UTC")); when(spyCut.getDateTimeNowUTC()).thenReturn(current); assertThat(cut.getBeginningOfCurrentYear(), is(expected)); }