### Question:
AllOrNoneValueSet implements ValueSet { @Override public ValueSet union(BlockAllocator allocator, ValueSet other) { AllOrNoneValueSet otherValueSet = checkCompatibility(other); return new AllOrNoneValueSet(type, all || otherValueSet.all, nullAllowed || other.isNullAllowed()); } @JsonCreator  AllOrNoneValueSet(@JsonProperty("type") ArrowType type,
            @JsonProperty("all") boolean all,
            @JsonProperty("nullAllowed") boolean nullAllowed); @Override @JsonProperty("nullAllowed") boolean isNullAllowed(); @Override @JsonProperty ArrowType getType(); @Override boolean isNone(); @Override @JsonProperty boolean isAll(); @Override boolean isSingleValue(); @Override Object getSingleValue(); @Override boolean containsValue(Marker value); @Override boolean containsValue(Object value); @Override ValueSet intersect(BlockAllocator allocator, ValueSet other); @Override ValueSet union(BlockAllocator allocator, ValueSet other); @Override ValueSet complement(BlockAllocator allocator); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override void close();  }### Answer:
@Test public void testUnion() throws Exception { AllOrNoneValueSet all = AllOrNoneValueSet.all(Types.MinorType.INT.getType()); AllOrNoneValueSet none = AllOrNoneValueSet.none(Types.MinorType.INT.getType()); assertEquals(all.union(allocator, all), all); assertEquals(all.union(allocator, none), all); assertEquals(none.union(allocator, all), all); assertEquals(none.union(allocator, none), none); }