* Test that intersecting a full number line with the negation of one that
* only permits decimals, leaves only rationals
*/
@Test
public void intersectToNZOnly() {
RestrictedDatatype<XMLGregorianCalendar> dr = new RestrictedTimelineDatatype( dt,
DatatypeConstants.DATETIME, false );
assertTrue( dr.contains( dateTime( "2009-01-01T12:00:00Z" ) ) );
assertTrue( dr.contains( dateTime( "2006-06-01T06:14:23" ) ) );
dr = dr.intersect( new RestrictedTimelineDatatype( dt, DatatypeConstants.DATETIME, true ),
true );
assertFalse( dr.contains( dateTime( "2009-01-01T12:00:00Z" ) ) );
assertTrue( dr.contains( dateTime( "2006-06-01T06:14:23" ) ) );
}