@Test public void equalsHashCodeAndToStringWork() { Target<TestInterface> t1 = new HardCodedTarget<TestInterface>(TestInterface.class, "http: Target<TestInterface> t2 = new HardCodedTarget<TestInterface>(TestInterface.class, "http: Target<OtherTestInterface> t3 = new HardCodedTarget<OtherTestInterface>(OtherTestInterface.class, "http: TestInterface i1 = Feign.builder().target(t1); TestInterface i2 = Feign.builder().target(t1); TestInterface i3 = Feign.builder().target(t2); OtherTestInterface i4 = Feign.builder().target(t3); assertThat(i1) .isEqualTo(i2) .isNotEqualTo(i3) .isNotEqualTo(i4); assertThat(i1.hashCode()) .isEqualTo(i2.hashCode()) .isNotEqualTo(i3.hashCode()) .isNotEqualTo(i4.hashCode()); assertThat(i1.toString()) .isEqualTo(i2.toString()) .isNotEqualTo(i3.toString()) .isNotEqualTo(i4.toString()); assertThat(t1) .isNotEqualTo(i1); assertThat(t1.hashCode()) .isEqualTo(i1.hashCode()); assertThat(t1.toString()) .isEqualTo(i1.toString()); }
public static Builder builder() { return new Builder(); }
Feign { public static Builder builder() { return new Builder(); } }
Feign { public static Builder builder() { return new Builder(); }  }
Feign { public static Builder builder() { return new Builder(); }  static Builder builder(); static String configKey(Class targetType, Method method); @Deprecated static String configKey(Method method); abstract T newInstance(Target<T> target); }
Feign { public static Builder builder() { return new Builder(); }  static Builder builder(); static String configKey(Class targetType, Method method); @Deprecated static String configKey(Method method); abstract T newInstance(Target<T> target);  }