MavenRepository implements Repository { @Override public String configShortName(String config) { if (!config.startsWith("@")) { return null; } MavenCoordinates coordinates = MavenCoordinates.fromConfigGAV(config); if (coordinates == null) { return config.substring(0).replaceAll(":", "_"); } return coordinates.getArtifactId(); } MavenRepository(Iterable<String> defaultGroupIds, URI repositoryBase, URI... repositoryBases);  MavenRepository(Iterable<String> defaultGroupIds, Iterable<URI> repositoryBases); @Inject  MavenRepository(CoordinatorConfig config); @Override String configRelativize(String config); @Override String configResolve(String config); @Override String configShortName(String config); @Override String configUpgrade(String config, String version); @Override boolean configEqualsIgnoreVersion(String config1, String config2); @Override URI configToHttpUri(String config); @Override String binaryRelativize(String binary); @Override String binaryResolve(String binary); @Override String binaryUpgrade(String binary, String version); @Override boolean binaryEqualsIgnoreVersion(String binary1, String binary2); @Override URI binaryToHttpUri(String binary); URI toHttpUri(MavenCoordinates coordinates, boolean required); MavenCoordinates resolve(MavenCoordinates coordinates); @Override String toString();  }
@Test public void configShortName() throws Exception { Assert.assertEquals(repo.configShortName("@apple:1.0"), "apple"); }