SymbolDependency extends TypedPropertiesBag implements SymbolDependencyContainer, ToSmithyBuilder<SymbolDependency>, Comparable<SymbolDependency> { public static Builder builder() { return new Builder(); } private  SymbolDependency(Builder builder); static Builder builder(); static Map<String, Map<String, SymbolDependency>> gatherDependencies(
            Stream<SymbolDependency> symbolStream); static Map<String, Map<String, SymbolDependency>> gatherDependencies(
            Stream<SymbolDependency> symbolStream,
            BinaryOperator<SymbolDependency> versionMergeFunction
    ); String getDependencyType(); String getPackageName(); String getVersion(); @Override List<SymbolDependency> getDependencies(); @Override Builder toBuilder(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(SymbolDependency other);  }
@Test public void hasProperties() { SymbolDependency dependency = SymbolDependency.builder() .dependencyType("dev") .packageName("foo") .version("10.0.1") .putProperty("foo", "baz!") .build(); assertThat(dependency.expectProperty("foo", String.class), equalTo("baz!")); }
@Test public void canBeSorted() { SymbolDependency a = SymbolDependency.builder().dependencyType("a").packageName("a").version("1").build(); SymbolDependency a2 = SymbolDependency.builder().dependencyType("a").packageName("a2").version("1").build(); SymbolDependency a3 = SymbolDependency.builder().dependencyType("a2").packageName("a").version("1").build(); SymbolDependency b = SymbolDependency.builder().dependencyType("b").packageName("b").version("1").build(); SymbolDependency b2 = SymbolDependency.builder().dependencyType("b").packageName("b").version("2").build(); SymbolDependency c = SymbolDependency.builder().dependencyType("b").packageName("c").version("1").build(); List<SymbolDependency> dependencies = Arrays.asList(c, b2, b, a3, a2, a); Collections.sort(dependencies); assertThat(dependencies, contains(a, a2, a3, b, b2, c)); }