@Test public void staticFactoryMethodShouldReturnSameResultAsConstructor() { Component a = TestHelper.componentA(); Consumer expected = new Consumer(a); Consumer actual = Consumer.by(a); Assert.assertEquals(expected, actual); }
public static Consumer by(Component consumer) { return new Consumer(consumer); }
Consumer extends Relationship { public static Consumer by(Component consumer) { return new Consumer(consumer); } }
Consumer extends Relationship { public static Consumer by(Component consumer) { return new Consumer(consumer); } @JsonCreator  Consumer(@JsonProperty("component") Component component); }
Consumer extends Relationship { public static Consumer by(Component consumer) { return new Consumer(consumer); } @JsonCreator  Consumer(@JsonProperty("component") Component component); static Consumer by(Component consumer); @Override int hashCode(); @Override boolean equals(Object o); }
Consumer extends Relationship { public static Consumer by(Component consumer) { return new Consumer(consumer); } @JsonCreator  Consumer(@JsonProperty("component") Component component); static Consumer by(Component consumer); @Override int hashCode(); @Override boolean equals(Object o);  }