RectangleArea implements Serializable { public Rectangle toRectangle() { RectangleArea rect = round(); return new Rectangle((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height); } @JsonCreator  RectangleArea(@JsonProperty("x") double x, @JsonProperty("y") double y, @JsonProperty("width") double width,
			@JsonProperty("height") double height);  RectangleArea(Rectangle rectangle); double getX(); double getY(); double getWidth(); double getHeight(); RectangleArea floor(); RectangleArea round(); RectangleArea ceil(); RectangleArea move(double deltaX, double deltaY); RectangleArea applyScale(double scale); Rectangle toRectangle(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testToRectangle() throws Exception { RectangleArea rectangle = new RectangleArea(10.5d, 20.5d, 30.5d, 40.5d); Rectangle result = rectangle.toRectangle(); assertThat(result.x, is(11)); assertThat(result.y, is(21)); assertThat(result.width, is(31)); assertThat(result.height, is(41)); }