@Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    NodeInfo nodeInfo = (NodeInfo) o;
    return name.equals(nodeInfo.name);
  }
@Test
  public void test_equals_and_hashCode() {
    NodeInfo foo = new NodeInfo("foo");
    NodeInfo bar = new NodeInfo("bar");
    NodeInfo bar2 = new NodeInfo("bar");

    assertThat(foo.equals(foo)).isTrue();
    assertThat(foo.equals(bar)).isFalse();
    assertThat(bar.equals(bar2)).isTrue();

    assertThat(bar)
      .hasSameHashCodeAs(bar)
      .hasSameHashCodeAs(bar2);
  }