### Question:
GluecksspiraleLottery extends Lottery implements Serializable { @Override public ZonedDateTime getNextDrawing(final ZonedDateTime startDate, final DrawingType drawingType) { ZonedDateTime baseTimstamp = startDate; if (baseTimstamp == null) { baseTimstamp = getDateTimeNow(); } LocalTime currentTime = baseTimstamp.toLocalTime(); ZonedDateTime drawingDate; final int weekDay = baseTimstamp.getDayOfWeek().getValue(); if ((weekDay < 6) || (weekDay == 6 && currentTime.isBefore(LocalTime.of(18,45)))) { drawingDate = baseTimstamp.plusDays(6 - weekDay).withHour(19).withMinute(0).withSecond(0).withNano(0); } else { drawingDate = baseTimstamp.plusDays(6 + (7 - weekDay)).withHour(19).withMinute(0).withSecond(0).withNano(0); } return drawingDate; } GluecksspiraleLottery(); @Override List<String> getPossibleAdditionalLotteries(); @Override Jackpot getCurrentJackpot(); @Override ZonedDateTime getNextClosingDate(); @Override ZonedDateTime getNextDrawing(final ZonedDateTime startDate, final DrawingType drawingType); @Override String getIdentifier(); @Override Ticket createNewEmbeddedTicket(MainTicket parentTicket, String newAdditionalLotteries); @Override WinCalculator getWinCalculator(); static final String IDENTIFIER; static final int HIGHEST_SELECTABLE_NUMBER; static final int MAX_FIELDS_PER_TICKET; static final int SELECTABLE_NUMBERS; }### Answer:
@Test public void getNextDrawing() throws Exception { GluecksspiraleLottery gluecksspiraleLottery = getGluecksspiraleLottery(); ZonedDateTime currentDate = ZonedDateTime.of(2017, 4, 8, 18, 0, 0, 0, ZoneId.of("Europe/Paris")); ZonedDateTime expected = ZonedDateTime.of(2017, 4, 8, 19, 0, 0, 0, ZoneId.of("Europe/Paris")); assertThat(gluecksspiraleLottery.getNextDrawing(currentDate, null), is(expected)); currentDate = ZonedDateTime.of(2017, 4, 8, 19, 0,0, 0, ZoneId.of("Europe/Paris")); expected = ZonedDateTime.of(2017, 4, 15, 19, 0,0, 0, ZoneId.of("Europe/Paris")); assertThat(gluecksspiraleLottery.getNextDrawing(currentDate, null), is(expected)); currentDate = ZonedDateTime.of(2017, 4, 7, 16, 0,0, 0, ZoneId.of("Europe/Paris")); expected = ZonedDateTime.of(2017, 4, 8, 19, 0,0, 0, ZoneId.of("Europe/Paris")); assertThat(gluecksspiraleLottery.getNextDrawing(currentDate, null), is(expected)); currentDate = ZonedDateTime.of(2017, 4, 9, 19, 0,0, 0, ZoneId.of("Europe/Paris")); expected = ZonedDateTime.of(2017, 4, 15, 19, 0,0, 0, ZoneId.of("Europe/Paris")); assertThat(gluecksspiraleLottery.getNextDrawing(currentDate, null), is(expected)); currentDate = ZonedDateTime.of(2017, 4, 10, 19, 0,0, 0, ZoneId.of("Europe/Paris")); expected = ZonedDateTime.of(2017, 4, 15, 19, 0,0, 0, ZoneId.of("Europe/Paris")); assertThat(gluecksspiraleLottery.getNextDrawing(currentDate, null), is(expected)); }