### Question:
NotificationEditorWidget implements IsWidget,
                                                 NotificationEditorWidgetView.Presenter { @Override public String getExpirationLabel(Expiration type) { switch (type) { case EXPRESSION: return translationService.getValue(EXPIRATION_PREFIX + "expression" + EXPIRATION_POSTFIX); case DATETIME: return translationService.getValue(EXPIRATION_PREFIX + "datetime" + EXPIRATION_POSTFIX); case TIME_PERIOD: return translationService.getValue(EXPIRATION_PREFIX + "time.period" + EXPIRATION_POSTFIX); default: throw new IllegalArgumentException(type.toString() + " is not supported."); } } @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 testGetExpirationLabelDateTime() { presenter.getExpirationLabel(Expiration.DATETIME); verify(translationService).getValue("notification.expiration.datetime.label"); }
@Test public void testGetExpirationLabelExpression() { presenter.getExpirationLabel(Expiration.EXPRESSION); verify(translationService).getValue("notification.expiration.expression.label"); }
@Test public void testGetExpirationLabelTimePeriod() { presenter.getExpirationLabel(Expiration.TIME_PERIOD); verify(translationService).getValue("notification.expiration.time.period.label"); }
@Test(expected = NullPointerException.class) public void testGetExpirationLabelNull() { presenter.getExpirationLabel(null); }