@Test
 public void testPrefHeightNegativeTreatedAsZero() {
   Region region = new Region();
   region.setPrefHeight(-10);
   assertEquals(0, region.prefHeight(-1), 0);
   assertEquals(0, region.prefHeight(5), 0);
 }
 @Test
 public void testPrefHeightNaNTreatedAsZero() {
   Region region = new Region();
   region.setPrefHeight(Double.NaN);
   assertEquals(0, region.prefHeight(-1), 0);
   assertEquals(0, region.prefHeight(5), 0);
 }
 @Test
 public void testPrefHeightOverride() {
   Region region = new MockRegion(10, 20, 100, 200, 500, 600);
   assertEquals(200, region.prefHeight(-1), 1e-100);
   region.setPrefHeight(300.0);
   assertEquals(300, region.getPrefHeight(), 1e-100);
   assertEquals(300, region.prefHeight(-1), 1e-100);
 }
 @Test
 public void testPrefHeightOverrideThenRestoreComputedSize() {
   Region region = new MockRegion(10, 20, 100, 200, 500, 600);
   region.setPrefHeight(250);
   region.setPrefHeight(Region.USE_COMPUTED_SIZE); // reset
   assertEquals(Region.USE_COMPUTED_SIZE, region.getPrefHeight(), 1e-100);
   assertEquals(200, region.prefHeight(-1), 1e-100);
 }