Java guarantees that you can't override `Enum#equals`. You don't have to check whether `expected` is the only value in the `valueTypes`. Assertion can be `assertTrue(ValueType.NIL == v.getType())`.