public class TestUnion extends TestCase {
@Test
public void testContains() {
Region s1 = Polygon.UNIT_SQUARE;
Region s2 = new Transformation.Translation( .5, .5 ).apply( s1 );
Union u = new Union( s1, s2 );
assertTrue( u.contains( new Point( 0.5, 0.5 )));
assertTrue( u.contains( new Point( 0.25, 0.25 )));
assertTrue( u.contains( new Point( 1.25, 1.25 )));
assertFalse( u.contains( new Point( .25, 1.25 )));