### Question:
EmailChanges implements WindowingChanges<Email>, Serializable { @Override public int sumOfChanges() { return additions.size() + changes.size() + deletions.size(); } private  EmailChanges(Set<Email> deletions, Set<Email> changes, Set<Email> additions); static EmailChanges empty(); static Builder builder(); @Override Set<Email> deletions(); @Override Set<Email> changes(); @Override Set<Email> additions(); boolean hasChanges(); @Override int sumOfChanges(); Splitter splitToFit(int firstPartSize); @Override final int hashCode(); @Override final boolean equals(Object obj); @Override String toString(); Iterable<EmailChanges> partition(int windowSize);  }### Answer:
@Test public void sumOfChanges() { Email change = Email.builder().uid(1).read(true).date(date("2004-12-13T21:39:45Z")).build(); Email deletion = Email.builder().uid(2).read(true).date(date("2005-10-13T21:39:45Z")).build(); Email addition = Email.builder().uid(3).read(true).date(date("2006-08-13T21:39:45Z")).build(); Builder emailChanges = EmailChanges.builder() .changes(ImmutableSet.<Email>of(change)) .deletions(ImmutableSet.<Email>of(deletion)) .additions(ImmutableSet.<Email>of(addition)); assertThat(emailChanges.sumOfChanges()).isEqualTo(3); }