### Question:
Domain { public boolean overlaps(Domain other) { checkCompatibility(other); if (this.isNullAllowed() && other.isNullAllowed()) { return true; } return values.overlaps(other.getValues()); } private  Domain(ValueSet values, boolean nullAllowed); @JsonCreator static Domain create(
            @JsonProperty("values") ValueSet values,
            @JsonProperty("nullAllowed") boolean nullAllowed); static Domain none(Type type); static Domain all(Type type); static Domain onlyNull(Type type); static Domain notNull(Type type); static Domain singleValue(Type type, Object value); static Domain multipleValues(Type type, List<?> values); Type getType(); @JsonProperty ValueSet getValues(); @JsonProperty boolean isNullAllowed(); boolean isNone(); boolean isAll(); boolean isSingleValue(); boolean isNullableSingleValue(); boolean isOnlyNull(); Object getSingleValue(); Object getNullableSingleValue(); boolean includesNullableValue(Object value); boolean overlaps(Domain other); boolean contains(Domain other); Domain intersect(Domain other); Domain union(Domain other); static Domain union(List<Domain> domains); Domain complement(); Domain subtract(Domain other); @Override int hashCode(); @Override boolean equals(Object obj); Domain simplify(); Domain simplify(int threshold); @Override String toString(); String toString(ConnectorSession session); static final int DEFAULT_COMPACTION_THRESHOLD; }### Answer:
@Test public void testOverlaps() { assertTrue(Domain.all(BIGINT).overlaps(Domain.all(BIGINT))); assertFalse(Domain.all(BIGINT).overlaps(Domain.none(BIGINT))); assertTrue(Domain.all(BIGINT).overlaps(Domain.notNull(BIGINT))); assertTrue(Domain.all(BIGINT).overlaps(Domain.onlyNull(BIGINT))); assertTrue(Domain.all(BIGINT).overlaps(Domain.singleValue(BIGINT, 0L))); assertFalse(Domain.none(BIGINT).overlaps(Domain.all(BIGINT))); assertFalse(Domain.none(BIGINT).overlaps(Domain.none(BIGINT))); assertFalse(Domain.none(BIGINT).overlaps(Domain.notNull(BIGINT))); assertFalse(Domain.none(BIGINT).overlaps(Domain.onlyNull(BIGINT))); assertFalse(Domain.none(BIGINT).overlaps(Domain.singleValue(BIGINT, 0L))); assertTrue(Domain.notNull(BIGINT).overlaps(Domain.all(BIGINT))); assertFalse(Domain.notNull(BIGINT).overlaps(Domain.none(BIGINT))); assertTrue(Domain.notNull(BIGINT).overlaps(Domain.notNull(BIGINT))); assertFalse(Domain.notNull(BIGINT).overlaps(Domain.onlyNull(BIGINT))); assertTrue(Domain.notNull(BIGINT).overlaps(Domain.singleValue(BIGINT, 0L))); assertTrue(Domain.onlyNull(BIGINT).overlaps(Domain.all(BIGINT))); assertFalse(Domain.onlyNull(BIGINT).overlaps(Domain.none(BIGINT))); assertFalse(Domain.onlyNull(BIGINT).overlaps(Domain.notNull(BIGINT))); assertTrue(Domain.onlyNull(BIGINT).overlaps(Domain.onlyNull(BIGINT))); assertFalse(Domain.onlyNull(BIGINT).overlaps(Domain.singleValue(BIGINT, 0L))); assertTrue(Domain.singleValue(BIGINT, 0L).overlaps(Domain.all(BIGINT))); assertFalse(Domain.singleValue(BIGINT, 0L).overlaps(Domain.none(BIGINT))); assertTrue(Domain.singleValue(BIGINT, 0L).overlaps(Domain.notNull(BIGINT))); assertFalse(Domain.singleValue(BIGINT, 0L).overlaps(Domain.onlyNull(BIGINT))); assertTrue(Domain.singleValue(BIGINT, 0L).overlaps(Domain.singleValue(BIGINT, 0L))); }