@Test public void equalsSameIndexTest() { final Feature featureToCompare = new Feature("otherName", "description", "uri", 1); assertThat(feature.equals(featureToCompare), is(false)); }
@Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Feature feature = (Feature) o; return index == feature.index && Objects.equals(name, feature.name); }
Feature { @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Feature feature = (Feature) o; return index == feature.index && Objects.equals(name, feature.name); } }
Feature { @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Feature feature = (Feature) o; return index == feature.index && Objects.equals(name, feature.name); } Feature(final String name, final String description, final String uri, final int index); }
Feature { @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Feature feature = (Feature) o; return index == feature.index && Objects.equals(name, feature.name); } Feature(final String name, final String description, final String uri, final int index); String getName(); String getDescription(); String getUri(); int getIndex(); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode(); }
Feature { @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Feature feature = (Feature) o; return index == feature.index && Objects.equals(name, feature.name); } Feature(final String name, final String description, final String uri, final int index); String getName(); String getDescription(); String getUri(); int getIndex(); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode();  }