MavenLocation implements Location { public static MavenLocation of(String groupId, String artifactId, String version) { return create(groupId, artifactId, version); } MavenLocation(Builder builder); String getGroupId(); String getArtifactId(); String getVersion(); String getFilename(); String getPackaging(); String getClassifier(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static MavenLocation create(String groupId, String artifactId, String version); static MavenLocation create(String groupId, String artifactId, String version, String classifier); static MavenLocation of(String groupId, String artifactId, String version); static Builder builder();  }
@Test public void testOf() { MavenLocation location = MavenLocation.of("org.codehaus.sonar-plugins", "sonar-clirr-plugin", "1.1"); assertThat(location.getGroupId()).isEqualTo("org.codehaus.sonar-plugins"); assertThat(location.getArtifactId()).isEqualTo("sonar-clirr-plugin"); assertThat(location.getVersion()).isEqualTo("1.1"); assertThat(location.getPackaging()).isEqualTo("jar"); assertThat(location.getFilename()).isEqualTo("sonar-clirr-plugin-1.1.jar"); }