TraceOptions { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof TraceOptions)) { return false; } TraceOptions that = (TraceOptions)obj; return Objects.equals(optionsMask, that.optionsMask); } TraceOptions();  TraceOptions(int optionsMask); static TraceOptions forTraceDisabled(); static TraceOptions forTraceEnabled(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); int getOptionsMask(); boolean getTraceEnabled(); boolean getStackTraceEnabled(); TraceOptions overrideTraceEnabled(boolean enabled); TraceOptions overrideStackTraceEnabled(boolean enabled);  }
@Test public void testEquals() { assertThat(noneEnabled).isEqualTo(defaultTraceOptions); assertThat(noneEnabled).isEqualTo(noneEnabled); assertThat(stackTraceEnabled).isNotEqualTo(allEnabled); }