### Question:
FileSystemSupportMatrixService { public Set<CloudStorageSupportedV4Response> getCloudStorageMatrix(String stackVersion) { VersionComparator versionComparator = new VersionComparator(); Set<CloudStorageSupportedV4Response> response = new HashSet<>(); cloudFileSystemSupportMatrix.getProviders().forEach(supportConfigEntries -> { Set<String> supportedFileSystems = supportConfigEntries.getConfigEntries().stream() .filter(supportConfigEntry -> { Versioned minVersion = supportConfigEntry::getMinVersion; Versioned currentVersion = () -> stackVersion.length() > supportConfigEntry.getMinVersion().length() ? stackVersion.substring(0, supportConfigEntry.getMinVersion().length()) : stackVersion; int compared = versionComparator.compare(minVersion, currentVersion); return compared <= 0; }) .map(CloudFileSystemSupportConfigEntry::getSupportedFileSytem) .collect(Collectors.toSet()); if (!supportedFileSystems.isEmpty()) { CloudStorageSupportedV4Response cloudStorageSupportedV4Response = new CloudStorageSupportedV4Response(); cloudStorageSupportedV4Response.setProvider(supportConfigEntries.getProvider()); cloudStorageSupportedV4Response.setFileSystemType(supportedFileSystems); response.add(cloudStorageSupportedV4Response); } }); return response; }  @PostConstruct void init(); Set<CloudStorageSupportedV4Response> getCloudStorageMatrix(String stackVersion);  }### Answer:
@Test public void testWithVersion265() { Set<CloudStorageSupportedV4Response> matrix = underTest.getCloudStorageMatrix("2.6.5"); assertEquals(3L, matrix.size()); matrix.forEach(response -> assertTrue(!response.getFileSystemType().isEmpty())); assertEquals(2L, matrix.stream().filter(response -> "AZURE".equalsIgnoreCase(response.getProvider())).findFirst().get().getFileSystemType().size()); }
@Test public void testWithVersion260() { Set<CloudStorageSupportedV4Response> matrix = underTest.getCloudStorageMatrix("2.6.0"); assertEquals(2L, matrix.size()); matrix.forEach(response -> assertTrue(!response.getFileSystemType().isEmpty())); assertEquals(2L, matrix.stream().filter(response -> "AZURE".equalsIgnoreCase(response.getProvider())).findFirst().get().getFileSystemType().size()); }
@Test public void testWithVersion250() { Set<CloudStorageSupportedV4Response> matrix = underTest.getCloudStorageMatrix("2.5.0"); assertTrue(matrix.isEmpty()); }
@Test public void testWithVersion300() { Set<CloudStorageSupportedV4Response> matrix = underTest.getCloudStorageMatrix("3.0.0"); assertEquals(3L, matrix.size()); matrix.forEach(response -> assertTrue(!response.getFileSystemType().isEmpty())); assertEquals(3L, matrix.stream().filter(response -> "AZURE".equalsIgnoreCase(response.getProvider())).findFirst().get().getFileSystemType().size()); }