TraceId { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof TraceId)) { return false; } TraceId that = (TraceId)obj; return Objects.equals(traceId, that.traceId); } TraceId(BigInteger traceId); static TraceId invalid(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); boolean isValid(); BigInteger getTraceId(); String getApiString();  }
@Test public void testEquals() { assertThat(first).isEqualTo(first); assertThat(first).isNotEqualTo(second); }