RectangleUtils { public static PDRectangle translate(float xOffset, float yOffset, PDRectangle oldRectangle) { return new PDRectangle(oldRectangle.getLowerLeftX() + xOffset, oldRectangle.getLowerLeftY() + yOffset, oldRectangle.getWidth(), oldRectangle.getHeight()); }  static boolean intersect(PDRectangle r1, PDRectangle r2); static PDRectangle translate(float xOffset, float yOffset, PDRectangle oldRectangle); static PDRectangle rotate(int degrees, PDRectangle oldRectangle, PDRectangle mediaBox);  }
@Test public void translateRectangle() { PDRectangle in = new PDRectangle(0, 0, 396, 612); assertThat(RectangleUtils.translate(100, 50, in), is(new PDRectangle(100, 50, 396, 612))); }