RectangularBox { public static RectangularBox newInstance(int bottom, int left, int top, int right) { return new RectangularBox(bottom, left, top, right); } RectangularBox(int bottom, int left, int top, int right); int getBottom(); int getLeft(); int getTop(); int getRight(); void rotate(Rotation desiredRotation); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); static RectangularBox newInstance(int bottom, int left, int top, int right); static RectangularBox newInstanceFromPoints(Point bottomLeft, Point topRight); TopLeftRectangularBox toTopLeftRectangularBox();  }
@Test(expected = IllegalArgumentException.class) public void testLeftGreaterRight() { RectangularBox.newInstance(0, 11, 10, 10); }
@Test(expected = IllegalArgumentException.class) public void testBottomGreaterTop() { RectangularBox.newInstance(11, 0, 10, 10); }