mockCompartment.expects(once()).method("setSize").with(eq(1.0), eq(2.0));
mockedElement.setSize(1.0, 2.0);
mockCompartment.expects(once()).method("setMinimumSize")
.with(eq(3.0), eq(4.0));
mockedElement.setMinimumSize(3.0, 4.0);
Dimension2D minsize = new DoubleDimension(11.0, 12.0);
Dimension2D size = new DoubleDimension(15.0, 18.0);
mockCompartment.expects(once()).method("getSize").will(returnValue(size));
assertEquals(size, mockedElement.getSize());
mockCompartment.expects(once()).method("getMinimumSize")
.will(returnValue(minsize));
assertEquals(minsize, mockedElement.getMinimumSize());