@Test
  public void testDefaultCameraUpdatesPG() {
    Scene scene = new Scene(new Group(), 300, 200);
    stage.setScene(scene);
    Toolkit.getToolkit().firePulse();
    Camera cam = scene.getEffectiveCamera();

    cam.setNearClip(20);
    Toolkit.getToolkit().firePulse();
    NGCamera camera = ((StubScene) scene.impl_getPeer()).getCamera();
    assertEquals(20, camera.getNearClip(), 0.00001);
  }
  @Test
  public void testCameraUpdatesPG() {
    Scene scene = new Scene(new Group(), 300, 200);
    Camera cam = new ParallelCamera();
    stage.setScene(scene);

    scene.setCamera(cam);
    Toolkit.getToolkit().firePulse();

    // verify it has correct owner
    cam.setNearClip(20);
    Toolkit.getToolkit().firePulse();
    NGCamera ngCamera = ((StubScene) scene.impl_getPeer()).getCamera();
    assertEquals(20, ngCamera.getNearClip(), 0.00001);

    scene.setCamera(null);
    Toolkit.getToolkit().firePulse();
    // verify owner was removed
    cam.setNearClip(30);
    Toolkit.getToolkit().firePulse();
    assertEquals(20, ngCamera.getNearClip(), 0.00001);

    scene.setCamera(cam);
    Toolkit.getToolkit().firePulse();
    // verify it has correct owner
    cam.setNearClip(40);
    Toolkit.getToolkit().firePulse();
    assertEquals(40, ngCamera.getNearClip(), 0.00001);

    NGCamera oldCam = ngCamera;
    scene.setCamera(new ParallelCamera());
    Toolkit.getToolkit().firePulse();
    // verify owner was removed
    cam.setNearClip(50);
    Toolkit.getToolkit().firePulse();
    ngCamera = scene.getCamera().impl_getPeer();
    assertEquals(40, oldCam.getNearClip(), 0.00001);
    assertEquals(0.1, ngCamera.getNearClip(), 0.00001);
  }