@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 testSceneCursorChangePropagatesToScenePeer() {
    final StubToolkit toolkit = (StubToolkit) Toolkit.getToolkit();
    final MouseEventGenerator generator = new MouseEventGenerator();

    final Scene scene = new Scene(new Group(), 300, 200);
    stage.setScene(scene);
    scene.impl_processMouseEvent(generator.generateMouseEvent(MouseEvent.MOUSE_ENTERED, 100, 100));
    toolkit.firePulse();

    scene.setCursor(Cursor.TEXT);
    assertTrue(toolkit.isPulseRequested());
    toolkit.firePulse();

    assertSame(Cursor.TEXT.getCurrentFrame(), ((StubScene) scene.impl_getPeer()).getCursor());
  }
  @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);
  }