### Question:
NotificationEditorWidget implements IsWidget,
                                                 NotificationEditorWidgetView.Presenter { @Override public String clearEmails(String emails) { String result = emails.replaceAll("\\s", ""); if (result.startsWith(",")) { result = result.substring(1); } if (result.endsWith(",")) { result = result.substring(0, result.length() - 1); } return result; } @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 testClearEmailsWithEmptyValue() { assertEquals("", presenter.clearEmails("")); }
@Test public void testClearEmailsFromSpaces() { assertEquals("abcd", presenter.clearEmails(" a b c d ")); }
@Test public void testClearEmailsFromCommas() { assertEquals("abc", presenter.clearEmails(",abc,")); }