@Test
  public void testRootUpdatedWhenAddedToScene() {
    Scene scene = new Scene(new Group());

    Group g = new Group();
    scene.setRoot(g);

    assertEquals(g, scene.getRoot());
    assertEquals(scene, g.getScene());
  }
  @Test
  public void testRootUpdatedWhenChangedInScene() {
    Group g = new Group();
    Scene scene = new Scene(g);

    Group g2 = new Group();
    scene.setRoot(g2);

    assertNull(g.getScene());
    assertEquals(g2, scene.getRoot());
    assertEquals(scene, g2.getScene());
  }
 @Test(expected = NullPointerException.class)
 public void testSetNullRoot() {
   Scene scene = new Scene(new Group());
   scene.setRoot(null);
 }