@Test public void areMulePluginVersionNotCompatibleWithAllNotCompatibleTest() { dependencies.add(createDependency(0, "0.8.0", "mule-plugin")); dependencies.add(createDependency(1, "1.0.1", "mule-plugin")); dependencies.add(createDependency(2, "2.0.1", "mule-plugin")); assertThat("Mule plugins should be considered version compatible", validator.areMulePluginVersionCompatible(dependencies), is(false)); }
protected boolean areMulePluginVersionCompatible(List<ArtifactCoordinates> dependencies) { Set<String> majors = dependencies.stream() .map(ArtifactCoordinates::getVersion) .map(VersionUtils::getMajor) .collect(Collectors.toSet()); return majors.size() <= 1; }
MulePluginsCompatibilityValidator { protected boolean areMulePluginVersionCompatible(List<ArtifactCoordinates> dependencies) { Set<String> majors = dependencies.stream() .map(ArtifactCoordinates::getVersion) .map(VersionUtils::getMajor) .collect(Collectors.toSet()); return majors.size() <= 1; } }
MulePluginsCompatibilityValidator { protected boolean areMulePluginVersionCompatible(List<ArtifactCoordinates> dependencies) { Set<String> majors = dependencies.stream() .map(ArtifactCoordinates::getVersion) .map(VersionUtils::getMajor) .collect(Collectors.toSet()); return majors.size() <= 1; }  }
MulePluginsCompatibilityValidator { protected boolean areMulePluginVersionCompatible(List<ArtifactCoordinates> dependencies) { Set<String> majors = dependencies.stream() .map(ArtifactCoordinates::getVersion) .map(VersionUtils::getMajor) .collect(Collectors.toSet()); return majors.size() <= 1; }  void validate(List<ArtifactCoordinates> mulePlugins); }
MulePluginsCompatibilityValidator { protected boolean areMulePluginVersionCompatible(List<ArtifactCoordinates> dependencies) { Set<String> majors = dependencies.stream() .map(ArtifactCoordinates::getVersion) .map(VersionUtils::getMajor) .collect(Collectors.toSet()); return majors.size() <= 1; }  void validate(List<ArtifactCoordinates> mulePlugins);  }