@Test public void componentToDependency() { Edge actual = Edge.to(Component.of("phoenix", "superhero"), Dependency.on(Component.of("xavier", "superhero"))); Edge expected = Edge.create("superhero:phoenix-to-superhero:xavier", "superhero:phoenix", "superhero:xavier"); Assert.assertEquals(expected, actual); }
public static Edge to(Component component, Dependency dependency) { String from = component.asString().toLowerCase(); String to = dependency.getComponent().asString().toLowerCase(); return Edge.create(from + "-to-" + to, from, to); }
Edge { public static Edge to(Component component, Dependency dependency) { String from = component.asString().toLowerCase(); String to = dependency.getComponent().asString().toLowerCase(); return Edge.create(from + "-to-" + to, from, to); } }
Edge { public static Edge to(Component component, Dependency dependency) { String from = component.asString().toLowerCase(); String to = dependency.getComponent().asString().toLowerCase(); return Edge.create(from + "-to-" + to, from, to); }  }
Edge { public static Edge to(Component component, Dependency dependency) { String from = component.asString().toLowerCase(); String to = dependency.getComponent().asString().toLowerCase(); return Edge.create(from + "-to-" + to, from, to); }  static Edge to(Component component, Dependency dependency); static Edge from(Component component, Consumer consumer); }
Edge { public static Edge to(Component component, Dependency dependency) { String from = component.asString().toLowerCase(); String to = dependency.getComponent().asString().toLowerCase(); return Edge.create(from + "-to-" + to, from, to); }  static Edge to(Component component, Dependency dependency); static Edge from(Component component, Consumer consumer);  }