@Test @DisplayName("Uses default group data initialization") void testCreateTransientGroupDataGroupInit(@Mock InMemoryGroup group, @Mock EntryData data1, @Mock EntryData data2) { when(group.initialData()).thenReturn(Arrays.asList(data1, data2)); GroupData data = dataStore.getGroupData(group); assertThat(data.getEntries()).containsOnly(data1, data2); }
@Override public GroupData getGroupData(InMemoryGroup group) { Collection<EntryData> data = this.entries.computeIfAbsent(group.getName(), __ -> new ArrayList<>(group.initialData())); return new TransientGroupData(group, data); }
TransientGroupDataStore implements GroupDataStore { @Override public GroupData getGroupData(InMemoryGroup group) { Collection<EntryData> data = this.entries.computeIfAbsent(group.getName(), __ -> new ArrayList<>(group.initialData())); return new TransientGroupData(group, data); } }
TransientGroupDataStore implements GroupDataStore { @Override public GroupData getGroupData(InMemoryGroup group) { Collection<EntryData> data = this.entries.computeIfAbsent(group.getName(), __ -> new ArrayList<>(group.initialData())); return new TransientGroupData(group, data); }  }
TransientGroupDataStore implements GroupDataStore { @Override public GroupData getGroupData(InMemoryGroup group) { Collection<EntryData> data = this.entries.computeIfAbsent(group.getName(), __ -> new ArrayList<>(group.initialData())); return new TransientGroupData(group, data); }  void setEntries(String groupName, Collection<EntryData> entries); @Override GroupData getGroupData(InMemoryGroup group); }
TransientGroupDataStore implements GroupDataStore { @Override public GroupData getGroupData(InMemoryGroup group) { Collection<EntryData> data = this.entries.computeIfAbsent(group.getName(), __ -> new ArrayList<>(group.initialData())); return new TransientGroupData(group, data); }  void setEntries(String groupName, Collection<EntryData> entries); @Override GroupData getGroupData(InMemoryGroup group);  }