    @Test
    public void testNewSize() throws Exception {

        Rectangle theOriginal = new Rectangle(new Position(10, 10), new Size(5, 7));
        Rectangle theRectangle = theOriginal.newSize(new Size(20, 30));

        assertNotSame(theOriginal, theRectangle);
        assertTrue(theRectangle.contains(new Position(11, 11)));

        assertTrue(theRectangle.contains(new Position(10, 10)));
        assertTrue(theRectangle.contains(new Position(30, 10)));
        assertTrue(theRectangle.contains(new Position(30, 40)));
        assertTrue(theRectangle.contains(new Position(10, 40)));
        assertFalse(theRectangle.contains(new Position(9, 10)));
        assertFalse(theRectangle.contains(new Position(31, 10)));
        assertFalse(theRectangle.contains(new Position(31, 40)));
        assertFalse(theRectangle.contains(new Position(9, 40)));
        assertFalse(theRectangle.contains(new Position(9, 9)));
        assertFalse(theRectangle.contains(new Position(31, 9)));
        assertFalse(theRectangle.contains(new Position(31, 41)));
        assertFalse(theRectangle.contains(new Position(9, 41)));
    }