@Test
public void testTransformWithFlip() throws Exception {

    Region r1 = new Region(1, 2);
    Region r2 = new Region(0, 10);
    assertEquals(5.0, r1.transform(1.5, r2, true));
    assertEquals(10.0, r1.transform(1, r2, true));
    assertEquals(0.0, r1.transform(2, r2, true));
    Region r3 = new Region(-10, 10);
    assertEquals(10.0, r1.transform(1, r3, true));
}