### Question:
CategoricalValueSchema extends AbstractValueSchema { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } if (!super.equals(obj)) { return false; } final CategoricalValueSchema other = (CategoricalValueSchema) obj; return Objects.equals(this.nominalValues, other.nominalValues); } CategoricalValueSchema(final boolean allowMissing,
                                  final Set<String> nominalValues); SortedSet<String> getNominalValues(); @Override boolean validate(final String value); @Override int hashCode(); @Override boolean equals(final Object obj);  }### Answer:
@Test public void testEquals() { final CategoricalValueSchema valueSchema = new CategoricalValueSchema(false, NOMINAL_VALUES); final CategoricalValueSchema valueSchema2 = new CategoricalValueSchema(false, NOMINAL_VALUES); final CategoricalValueSchema valueSchema3 = new CategoricalValueSchema(true, NOMINAL_VALUES); final Set<String> nominalValues2 = ImmutableSet.of("val0", "val1", "val3"); final CategoricalValueSchema valueSchema4 = new CategoricalValueSchema(false, nominalValues2); assertThat(valueSchema) .isEqualTo(valueSchema) .isEqualTo(valueSchema2) .isNotEqualTo(valueSchema3) .isNotEqualTo(valueSchema4) .isNotEqualTo(null); }