@Test
public void testCenter() throws Exception {

    RectangleF r = new RectangleF(0,0,1920,1080);
    RectangleF sub = new RectangleF(0,0,1000,1020);
    Rectangle test = sub.centerImmutable(r).asIntRect();
    assertEquals(test.x, 460);
    assertEquals(test.y, 30);
    assertEquals(test.width, 1000);
    assertEquals(test.height, 1020);
}