### Question:
DefaultMailStorageConfiguration implements MailStorageConfiguration { @Override public boolean discardSuccessStatuses() { Integer discardSuccessStatuses = this.mailConfigSource.getProperty(DISCARD_SUCCESS_STATUSES); if (discardSuccessStatuses == null) { discardSuccessStatuses = this.xwikiPropertiesSource.getProperty(PREFIX + DISCARD_SUCCESS_STATUSES, 1); } return (discardSuccessStatuses == 1); }  @Override boolean discardSuccessStatuses(); @Override boolean resendAutomaticallyAtStartup();  }### Answer:
@Test void discardSuccessStatusesWhenNotDefined() { when(xwikiPropertiesSource.getProperty("mail.sender.database.discardSuccessStatuses", 1)).thenReturn(1); assertEquals(true, this.configuration.discardSuccessStatuses()); }
@Test void discardSuccessStatusesFalseWhenDefinedInMailConfig() { when(mailConfigSource.getProperty("discardSuccessStatuses")).thenReturn(0); assertEquals(false, this.configuration.discardSuccessStatuses()); }