### Question:
StreamService { public Set<String> getStreamNames(StreamRepository repository) { return Util.getDirectoryNames(repository.getBaseDirectory()); }  Stream readStream(StreamRepository repository, String name); Stream tryReadStream(StreamRepository repository, String name); Stream createStream(StreamRepository streamRepository, String name); void writeVersionHistory(Stream stream); Set<String> getStreamNames(StreamRepository repository); void deleteStream(Path repoLocation, String name); void deleteStream(StreamRepository repo, String name); void deleteStream(Stream stream); void deleteStreams(StreamRepository repository); TreeMap<Integer, Snapshot> getSnapshots(Stream stream); Snapshot takeSnapshot(Stream stream); void restoreLatestSnapshot(Stream stream); void restoreSnapshot(Stream stream, int snapshotNr); void restoreSnapshot(Snapshot snapshot); void deleteSnapshot(Snapshot snapshot); void clearReceiveTempDir(Stream stream); void takeSnapshotIfRequired(Stream stream, Instant now); void pruneSnapshots(Stream stream);  }### Answer:
@Test public void testGetStreamNames() throws Exception { assertTrue(service.getStreamNames(repository).isEmpty()); service.createStream(repository, "test"); Set<String> streamNames = service.getStreamNames(repository); assertEquals(1, streamNames.size()); assertTrue(streamNames.contains("test")); }