@Test public void classifierShouldBeEmptyStringWhenNotSet() { Coordinates coordinates = new Coordinates(false, "org.mockito", "mockito-core", "3.24", 3600L, 100, "3.24", null, ".jar", GPG); Map<String, String> map = createCoordinateMap(coordinates); assertThat(map, hasEntry("classifier", EMPTY)); }
public static Map<String, String> createCoordinateMap(Coordinates coordinates) { Map<String, String> coordMap = new HashMap<>(); coordMap.put(GROUP_ID, coordinates.getGroupId()); coordMap.put(ARTIFACT_ID, coordinates.getArtifactId()); coordMap.put(VERSION, coordinates.getBaseVersion()); coordMap.put(EXTENSION, coordinates.getExtension()); coordMap.put(CLASSIFIER, coordinates.getClassifier() == null ? EMPTY : coordinates.getClassifier()); return coordMap; }
MavenVariableResolverAdapterUtil { public static Map<String, String> createCoordinateMap(Coordinates coordinates) { Map<String, String> coordMap = new HashMap<>(); coordMap.put(GROUP_ID, coordinates.getGroupId()); coordMap.put(ARTIFACT_ID, coordinates.getArtifactId()); coordMap.put(VERSION, coordinates.getBaseVersion()); coordMap.put(EXTENSION, coordinates.getExtension()); coordMap.put(CLASSIFIER, coordinates.getClassifier() == null ? EMPTY : coordinates.getClassifier()); return coordMap; } }
MavenVariableResolverAdapterUtil { public static Map<String, String> createCoordinateMap(Coordinates coordinates) { Map<String, String> coordMap = new HashMap<>(); coordMap.put(GROUP_ID, coordinates.getGroupId()); coordMap.put(ARTIFACT_ID, coordinates.getArtifactId()); coordMap.put(VERSION, coordinates.getBaseVersion()); coordMap.put(EXTENSION, coordinates.getExtension()); coordMap.put(CLASSIFIER, coordinates.getClassifier() == null ? EMPTY : coordinates.getClassifier()); return coordMap; } private  MavenVariableResolverAdapterUtil(); }
MavenVariableResolverAdapterUtil { public static Map<String, String> createCoordinateMap(Coordinates coordinates) { Map<String, String> coordMap = new HashMap<>(); coordMap.put(GROUP_ID, coordinates.getGroupId()); coordMap.put(ARTIFACT_ID, coordinates.getArtifactId()); coordMap.put(VERSION, coordinates.getBaseVersion()); coordMap.put(EXTENSION, coordinates.getExtension()); coordMap.put(CLASSIFIER, coordinates.getClassifier() == null ? EMPTY : coordinates.getClassifier()); return coordMap; } private  MavenVariableResolverAdapterUtil(); static Map<String, String> createCoordinateMap(Coordinates coordinates); }
MavenVariableResolverAdapterUtil { public static Map<String, String> createCoordinateMap(Coordinates coordinates) { Map<String, String> coordMap = new HashMap<>(); coordMap.put(GROUP_ID, coordinates.getGroupId()); coordMap.put(ARTIFACT_ID, coordinates.getArtifactId()); coordMap.put(VERSION, coordinates.getBaseVersion()); coordMap.put(EXTENSION, coordinates.getExtension()); coordMap.put(CLASSIFIER, coordinates.getClassifier() == null ? EMPTY : coordinates.getClassifier()); return coordMap; } private  MavenVariableResolverAdapterUtil(); static Map<String, String> createCoordinateMap(Coordinates coordinates);  }