PersistedGroupData implements GroupData { @Override public Stream<EntryData> getEntries() { return table.findAll(); } PersistedGroupData(InMemoryGroup group, ClientTable<EntryData> table); @Override Stream<EntryData> getEntries(); @Override void addEntry(EntryData data); @Override void modifyEntry(EntryData data, Consumer<EntryData> modifier); @Override BackendGroup<InMemoryQuery<?>> getGroup();  }
@Test @DisplayName("Provides entries from backing table") void testGetEntries(@Mock Stream<EntryData> stream) { when(table.findAll()).thenReturn(stream); assertThat(groupData.getEntries()).isSameAs(stream); }