*
* @throws Exception if a problem occurs.
*/
@Test
public void canRemoveEmails() throws Exception {
final UserEmails emails = new MkGithub().users().get("joe").emails();
final String removed = "joe@nowhere.com";
final String retained = "joseph@somewhere.net";
emails.add(
Arrays.asList(
new String[]{removed, retained}
)
);
emails.remove(Collections.singleton(removed));
MatcherAssert.assertThat(
emails.iterate(),
Matchers.allOf(
Matchers.<String>iterableWithSize(1),
Matchers.hasItems(retained),
Matchers.not(Matchers.hasItems(removed))
)