BaseBounds implements Bounds { @Override public void setWidth(double width) { if (!(width >= 0)) { throw new IllegalStateException("Width must be positive"); } this.width = width; } BaseBounds(final double x,
                      final double y,
                      final double width,
                      final double height); @Override double getX(); @Override void setX(double x); @Override double getY(); @Override void setY(double y); @Override double getWidth(); @Override void setWidth(double width); @Override double getHeight(); @Override void setHeight(double height);  }
@Test(expected = IllegalStateException.class) public void invalidSetterWidthParameter() { final BaseBounds b = new BaseBounds(10.0, 20.0, 30.0, 40.0); b.setWidth(-30.0); }