Ellipse extends AbstractShape { public Ellipse setMaximumIntervals(int numIntervals) { if (numIntervals < 0) { throw new IllegalArgumentException( Logger.logMessage(Logger.ERROR, "Ellipse", "setMaximumIntervals", "invalidNumIntervals")); } this.maximumIntervals = numIntervals; this.reset(); return this; } 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 testMaxIntervalSetterValid() { Ellipse ellipse = new Ellipse(); int maxNumberIntervals = 146; ellipse.setMaximumIntervals(maxNumberIntervals); assertEquals("max interval setter even", maxNumberIntervals, ellipse.maximumIntervals); }
@Test public void testMaxIntervalSetterInvalid() { Ellipse ellipse = new Ellipse(); try { ellipse.setMaximumIntervals(-8); fail("invalid max interval setting"); } catch (Exception e) { assertTrue("maximum interval exception type", e instanceof IllegalArgumentException); } }