### Question:
VersionProvider implements CommandLine.IVersionProvider { @Override public String[] getVersion() { return Stream.concat( Stream.of(BesuInfo.version()), pluginVersionsProvider.getPluginVersions().stream()) .toArray(String[]::new); } VersionProvider(final PluginVersionsProvider pluginVersionsProvider); @Override String[] getVersion();  }### Answer:
@Test public void validateEmptyListGenerateBesuInfoVersionOnly() { when(pluginVersionsProvider.getPluginVersions()).thenReturn(emptyList()); final VersionProvider versionProvider = new VersionProvider(pluginVersionsProvider); assertThat(versionProvider.getVersion()).containsOnly(BesuInfo.version()); }
@Test public void validateVersionListGenerateValidValues() { when(pluginVersionsProvider.getPluginVersions()).thenReturn(Collections.singletonList("test")); final VersionProvider versionProvider = new VersionProvider(pluginVersionsProvider); assertThat(versionProvider.getVersion()).containsExactly(BesuInfo.version(), "test"); }