@Test public void getItems() { Set<FakeItem> actual = memento.getItems(); assertThat( actual ).isEqualTo( ALL_ITEMS ); }
public Set<T> getItems() { return new HashSet<>( items ); }
Memento { public Set<T> getItems() { return new HashSet<>( items ); } }
Memento { public Set<T> getItems() { return new HashSet<>( items ); } Memento( Set<T> items, Optional<T> topItem ); }
Memento { public Set<T> getItems() { return new HashSet<>( items ); } Memento( Set<T> items, Optional<T> topItem ); @SuppressWarnings( "unchecked" ) static Memento<T> empty(); Set<T> getItems(); Optional<T> getTopItem(); }
Memento { public Set<T> getItems() { return new HashSet<>( items ); } Memento( Set<T> items, Optional<T> topItem ); @SuppressWarnings( "unchecked" ) static Memento<T> empty(); Set<T> getItems(); Optional<T> getTopItem();  }