BaseBounds implements Bounds { @Override public void setHeight(double height) { if (!(height >= 0)) { throw new IllegalStateException("Height must be positive"); } this.height = height; } 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 invalidSetterHeightParameter() { final BaseBounds b = new BaseBounds(10.0, 20.0, 30.0, 40.0); b.setHeight(-40.0); }