@Test public void relationships() { ComponentRelationshipsProperties c = new ComponentRelationshipsProperties(); DependencyProperties d = createDependency("iceman", "superhero"); ConsumerProperties consumer = createConsumer("galactus", "villain"); c.setConsumers(Arrays.asList(consumer)); c.setDependencies(Arrays.asList(d)); Set<Relationship> actual = c.getRelationships(); Set<Relationship> expected = new HashSet<>(Arrays.asList(Consumer.by(Component.of("galactus", "villain")), Dependency.on(Component.of("iceman", "superhero")))); Assert.assertEquals(expected, actual); }
public Set<Relationship> getRelationships() { return Stream.concat(dependencies().stream(), consumers().stream()).collect(Collectors.toSet()); }
ComponentRelationshipsProperties { public Set<Relationship> getRelationships() { return Stream.concat(dependencies().stream(), consumers().stream()).collect(Collectors.toSet()); } }
ComponentRelationshipsProperties { public Set<Relationship> getRelationships() { return Stream.concat(dependencies().stream(), consumers().stream()).collect(Collectors.toSet()); }  }
ComponentRelationshipsProperties { public Set<Relationship> getRelationships() { return Stream.concat(dependencies().stream(), consumers().stream()).collect(Collectors.toSet()); }  Set<Dependency> dependencies(); Set<Consumer> consumers(); Set<Relationship> getRelationships(); }
ComponentRelationshipsProperties { public Set<Relationship> getRelationships() { return Stream.concat(dependencies().stream(), consumers().stream()).collect(Collectors.toSet()); }  Set<Dependency> dependencies(); Set<Consumer> consumers(); Set<Relationship> getRelationships();  }