### Question:
NotificationEditorWidget implements IsWidget,
                                                 NotificationEditorWidgetView.Presenter { @Override public void setExpirationDateTime(String expiresAt) { MatchResult result = RegExp.compile(REPEATABLE + "/" + ISO_DATE_TIME + "/" + PERIOD).exec(expiresAt); if (result != null) { String timeZone = result.getGroup(3); view.enableRepeatNotification(parseDate(result.getGroup(2)), clearTimeZone(timeZone), expiresAt.split("/")[2], expiresAt.split("/")[0]); } else { result = RegExp.compile(ISO_DATE_TIME).exec(expiresAt); if (result != null) { view.disableRepeatNotification(parseDate(result.getGroup(1)), result.getGroup(2)); } } } @Inject  NotificationEditorWidget(NotificationEditorWidgetView view,
                                    ClientTranslationService translationService); @Override Widget asWidget(); @Override String getNameHeader(); @Override String getFromLabel(); @Override String getExpirationLabel(Expiration type); @Override void createOrEdit(NotificationWidgetView parent, NotificationRow row); @Override void ok(String emails); @Override String clearEmails(String emails); void setReadOnly(boolean readOnly); @Override void setRepeatNotificationVisibility(boolean isVisible); @Override void setRepeatNotificationInvisibility(boolean isInvisible); @Override void setNotificationPanelDivVisibility(boolean isVisible); @Override void addUsers(List<String> users); @Override void addGroups(List<String> groups); @Override void addFrom(String from); @Override void addReplyTo(String replyTo); @Override Expiration parseExpiration(String expirationAt, Expiration expiration); @Override void setExpiration(Expiration expiration, NotificationRow row); @Override String getRepeatCount(String repeatable); @Override void setExpirationDateTime(String expiresAt); @Override Date parseDate(String date); @Override String clearTimeZone(String value); @Override NotificationType getNotificationType(boolean isNotStarted); @Override boolean isRepeatable(String repeatable); @Override String minuteOrMonth(MatchResult match);  }### Answer:
@Test public void testSetExpirationDateTime() { String expiresAt = "some value"; NotificationRow row = new NotificationRow(); row.setExpiresAt(expiresAt); presenter.setExpiration(Expiration.DATETIME, row); verify(view, never()).setExpressionTextValue(any()); verify(view).setExpirationDateTime(row); verify(view, never()).setExpirationTimePeriod(any()); }
@Test public void testSetEmptyExpirationDateTime() { presenter.setExpirationDateTime(""); verify(view, never()).enableRepeatNotification(any(), any(), any(), any()); verify(view, never()).disableRepeatNotification(any(), any()); }