Ellipse extends AbstractShape { public Position getCenter() { return this.center; } Ellipse();  Ellipse(ShapeAttributes attributes);  Ellipse(Position center, double majorRadius, double minorRadius);  Ellipse(Position center, double majorRadius, double minorRadius, ShapeAttributes attributes); Position getCenter(); Ellipse setCenter(Position position); double getMajorRadius(); Ellipse setMajorRadius(double radius); double getMinorRadius(); Ellipse setMinorRadius(double radius); double getHeading(); Ellipse setHeading(double degrees); boolean isExtrude(); Ellipse setExtrude(boolean extrude); boolean isFollowTerrain(); Ellipse setFollowTerrain(boolean followTerrain); int getMaximumIntervals(); Ellipse setMaximumIntervals(int numIntervals);  }
@Test public void testDefaultConstructor() { Ellipse ellipse = new Ellipse(); assertTrue("default null position", ellipse.getCenter() == null); assertEquals("default zero major radius", 0, ellipse.majorRadius, 1e-9); assertEquals("default zero minor radius", 0, ellipse.minorRadius, 1e-9); assertEquals("default zero heading", 0, ellipse.heading, 1e-9); }
@Test public void testCenterGetter() { Position position = new Position(12, 34, 56); double majorRadius = 1000; double minorRadius = 500; Ellipse ellipse = new Ellipse(position, majorRadius, minorRadius); Position actualPosition = ellipse.getCenter(); assertEquals("center getter", position, actualPosition); }