### Question:
MapModel extends Observable { public void setHeightWidth(int height, int width) { if (myHeight != height || myWidth != width) { myHeight = height; myWidth = width; setChanged(); notifyObservers(SIZE_PROP); } }  int getHeight(); Quadrilateral<GeographicPosition> getRegion(); ScreenBoundingBox getViewport(); int getWidth(); void setHeightWidth(int height, int width); void setRegion(Quadrilateral<GeographicPosition> region); void setViewport(ScreenBoundingBox viewport); static final String REGION_PROP; static final String SIZE_PROP; }### Answer:
@Test public void testSetHeightWidth() { EasyMockSupport support = new EasyMockSupport(); MapModel model = new MapModel(); Observer observer = createObserver(support, model, MapModel.SIZE_PROP, 3); model.addObserver(observer); support.replayAll(); model.setHeightWidth(100, 200); assertEquals(100, model.getHeight()); assertEquals(200, model.getWidth()); model.setHeightWidth(100, 200); model.setHeightWidth(200, 200); assertEquals(200, model.getHeight()); assertEquals(200, model.getWidth()); model.setHeightWidth(200, 100); assertEquals(200, model.getHeight()); assertEquals(100, model.getWidth()); support.verifyAll(); }