@Test public void shouldBeDifferentWhenBytesAreDifferent() { final LibP2PNodeId libP2PNodeId = new LibP2PNodeId(PeerId.fromHex(ID)); final MockNodeId mockNodeId = new MockNodeId(1); assertThat(mockNodeId).isNotEqualTo(libP2PNodeId); assertThat(libP2PNodeId).isNotEqualTo(mockNodeId); assertThat(mockNodeId.hashCode()).isNotEqualTo(libP2PNodeId.hashCode()); }
@Override public final int hashCode() { return toBytes().hashCode(); }
NodeId { @Override public final int hashCode() { return toBytes().hashCode(); } }
NodeId { @Override public final int hashCode() { return toBytes().hashCode(); }  }
NodeId { @Override public final int hashCode() { return toBytes().hashCode(); }  abstract Bytes toBytes(); abstract String toBase58(); @Override final int hashCode(); @Override final boolean equals(final Object obj); @Override final String toString(); }
NodeId { @Override public final int hashCode() { return toBytes().hashCode(); }  abstract Bytes toBytes(); abstract String toBase58(); @Override final int hashCode(); @Override final boolean equals(final Object obj); @Override final String toString();  }