changeset 7277:79ce29689619

RT-35197: Use Lambda in FX runtime and samples Reviewed by: kcr
author snorthov
date Tue, 10 Jun 2014 14:35:17 -0400
parents d10817fc3844
children 7dbf508c2334
files tests/app-lifecycle/ClassLoaderApp/src/classloader/TestApp2.java tests/golden-image-suite/src/modena/Modena.java tests/golden-image-suite/src/modena/SameHeightTestController.java tests/golden-image-suite/src/modena/SamplePageHelpers.java tests/golden-image-suite/src/modena/SamplePageNavigation.java tests/golden-image-suite/src/modena/SamplePageTableHelper.java tests/golden-image-suite/src/modena/SamplePageTreeTableHelper.java tests/golden-image-suite/src/modena/SimpleWindowPage.java tests/manual/printing/PageLayoutTest.java tests/manual/printing/PrintOrientTest.java tests/performance/VMPerformance/src/VMPerformance.java tests/system/src/test/java/com/sun/glass/ui/DefaultExceptionHandlerTest.java tests/system/src/test/java/com/sun/glass/ui/ExceptionHandlerTest.java tests/system/src/test/java/com/sun/glass/ui/monocle/input/DoubleClickTest.java tests/system/src/test/java/com/sun/glass/ui/monocle/input/InputDevicePropertyTest.java tests/system/src/test/java/com/sun/glass/ui/monocle/input/MonocleUInput.java tests/system/src/test/java/com/sun/glass/ui/monocle/input/RapidTapTest.java tests/system/src/test/java/com/sun/glass/ui/monocle/input/TestApplication.java tests/system/src/test/java/com/sun/glass/ui/monocle/input/TouchButtonTest.java tests/system/src/test/java/com/sun/glass/ui/monocle/input/TouchExceptionTest.java tests/system/src/test/java/com/sun/glass/ui/monocle/input/TouchTestBase.java tests/system/src/test/java/com/sun/javafx/application/ListenerTestCommon.java tests/system/src/test/java/com/sun/javafx/application/RunLaterTest.java tests/system/src/test/java/com/sun/javafx/application/SingleExitCommon.java tests/system/src/test/java/com/sun/javafx/application/SwingExitCommon.java tests/system/src/test/java/com/sun/javafx/application/SwingNoExit.java tests/system/src/test/java/com/sun/javafx/application/TaskbarAppCommon.java tests/system/src/test/java/com/sun/javafx/sg/prism/RT36296Test.java tests/system/src/test/java/com/sun/javafx/tk/quantum/CloseWindowTest.java tests/system/src/test/java/com/sun/javafx/tk/quantum/WindowSceneInitDisposeTest.java tests/system/src/test/java/helloworld/RectangleTest.java tests/system/src/test/java/javafx/embed/swing/RT23603Test.java tests/system/src/test/java/javafx/embed/swing/RT30650GUI.java tests/system/src/test/java/javafx/scene/PhongMaterialTest.java tests/system/src/test/java/javafx/scene/Snapshot1Test.java tests/system/src/test/java/javafx/scene/Snapshot2Test.java tests/system/src/test/java/javafx/scene/SnapshotCommon.java tests/system/src/test/java/javafx/scene/layout/RegionUITestBase.java tests/system/src/test/java/javafx/stage/ShowAndWaitTest.java tests/system/src/test/java/launchertest/TestApp.java tests/system/src/test/java/launchertest/TestAppNoMain.java tests/system/src/test/java/launchertest/TestAppNoMainThreadCheck.java tests/system/src/test/java/launchertest/TestAppThreadCheck.java tests/system/src/test/java/launchertest/TestNotApplication.java tests/system/src/test/java/launchertest/TestNotApplicationThreadCheck.java tests/system/src/test/java/launchertest/TestPreloader.java tests/system/src/test/java/painttest/ImagePaintTest.java tests/system/src/test/java/sandbox/app/FXApp.java tests/system/src/test/java/test3d/NearAndFarClipTest.java tests/system/src/test/java/test3d/Snapshot3DTest.java tests/system/src/test/java/test3d/TriangleMeshValidationTest.java tests/system/src/test/java/testharness/VisualTestBase.java tests/system/src/test/java/util/Util.java
diffstat 53 files changed, 1725 insertions(+), 2493 deletions(-) [+]
line wrap: on
line diff
--- a/tests/app-lifecycle/ClassLoaderApp/src/classloader/TestApp2.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/app-lifecycle/ClassLoaderApp/src/classloader/TestApp2.java	Tue Jun 10 14:35:17 2014 -0400
@@ -56,11 +56,7 @@
             throw new NullPointerException("TestApp2.init: myCcl is null");
         }
 
-        PlatformImpl.runAndWait(new Runnable() {
-            public void run() {
-                Thread.currentThread().setContextClassLoader(myCcl);
-            }
-        });
+        PlatformImpl.runAndWait(() -> Thread.currentThread().setContextClassLoader(myCcl));
     }
 
     @Override public void start(final Stage stage) throws Exception {
--- a/tests/golden-image-suite/src/modena/Modena.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/golden-image-suite/src/modena/Modena.java	Tue Jun 10 14:35:17 2014 -0400
@@ -49,10 +49,9 @@
 import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+
 import javafx.application.Application;
 import javafx.application.Platform;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.embed.swing.SwingFXUtils;
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
@@ -90,6 +89,7 @@
 import javafx.scene.transform.Scale;
 import javafx.stage.FileChooser;
 import javafx.stage.Stage;
+
 import javax.imageio.ImageIO;
 
 public class Modena extends Application {
@@ -151,18 +151,12 @@
     private TabPane contentTabs;
     private boolean test = false;
     private boolean embeddedPerformanceMode = false;
-    private final EventHandler<ActionEvent> rebuild = new EventHandler<ActionEvent>(){
-        @Override public void handle(ActionEvent event) {
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    updateUserAgentStyleSheet();
-                    rebuildUI(modenaButton.isSelected(), retinaButton.isSelected(),
-                              contentTabs.getSelectionModel().getSelectedIndex(),
-                              samplePageNavigation.getCurrentSection());
-                }
-            });
-        }
-    };
+    private final EventHandler<ActionEvent> rebuild = event -> Platform.runLater(() -> {
+        updateUserAgentStyleSheet();
+        rebuildUI(modenaButton.isSelected(), retinaButton.isSelected(),
+                  contentTabs.getSelectionModel().getSelectedIndex(),
+                  samplePageNavigation.getCurrentSection());
+    });
     
     private static Modena instance;
 
@@ -290,11 +284,7 @@
         if (root != null) root.requestLayout();
 
         // restore scrolled section
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                samplePageNavigation.setCurrentSection(scrolledSection);
-            }
-        });
+        Platform.runLater(() -> samplePageNavigation.setCurrentSection(scrolledSection));
     }
     
     private void rebuildUI(boolean modena, boolean retina, int selectedTab, final SamplePage.Section scrolledSection) {
@@ -344,25 +334,21 @@
             contentTabs.getSelectionModel().select(selectedTab);
             samplePage.setMouseTransparent(test);
             // height test set selection for 
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    for (Node n: heightTest.lookupAll(".choice-box")) {
-                        ((ChoiceBox)n).getSelectionModel().selectFirst();
-                    }
-                    for (Node n: heightTest.lookupAll(".combo-box")) {
-                        ((ComboBox)n).getSelectionModel().selectFirst();
-                    }
+            Platform.runLater(() -> {
+                for (Node n: heightTest.lookupAll(".choice-box")) {
+                    ((ChoiceBox)n).getSelectionModel().selectFirst();
+                }
+                for (Node n: heightTest.lookupAll(".combo-box")) {
+                    ((ComboBox)n).getSelectionModel().selectFirst();
                 }
             });
             // Create Toolbar
             retinaButton = ToggleButtonBuilder.create()
                 .text("@2x")
                 .selected(retina)
-                .onAction(new EventHandler<ActionEvent>(){
-                    @Override public void handle(ActionEvent event) {
-                        ToggleButton btn = (ToggleButton)event.getSource();
-                        setRetinaMode(btn.isSelected());
-                    }
+                .onAction(event -> {
+                    ToggleButton btn = (ToggleButton)event.getSource();
+                    setRetinaMode(btn.isSelected());
                 })
                 .build();
             ToggleGroup themesToggleGroup = new ToggleGroup();
@@ -391,22 +377,16 @@
                     .build(),
                 rtlButton = ToggleButtonBuilder.create()
                     .text("RTL")
-                    .onAction(new EventHandler<ActionEvent>() {
-                            @Override public void handle(ActionEvent event) {
-                                root.setNodeOrientation(rtlButton.isSelected() ? 
-                                        NodeOrientation.RIGHT_TO_LEFT : NodeOrientation.LEFT_TO_RIGHT);
-                            }
-                        })
+                    .onAction(event -> root.setNodeOrientation(rtlButton.isSelected() ? 
+                            NodeOrientation.RIGHT_TO_LEFT : NodeOrientation.LEFT_TO_RIGHT))
                     .build(),
                 embeddedPerformanceButton = ToggleButtonBuilder.create()
                     .text("EP")
                     .selected(embeddedPerformanceMode)
                     .tooltip(new Tooltip("Apply Embedded Performance extra stylesheet"))
-                    .onAction(new EventHandler<ActionEvent>() {
-                        @Override public void handle(ActionEvent event) {
-                            embeddedPerformanceMode = embeddedPerformanceButton.isSelected();
-                            rebuild.handle(event);
-                        }
+                    .onAction(event -> {
+                        embeddedPerformanceMode = embeddedPerformanceButton.isSelected();
+                        rebuild.handle(event);
                     })
                     .build(),
                 new Separator(),
@@ -419,11 +399,7 @@
                 createAccentColorPicker(),
                 new Separator(),
                 ButtonBuilder.create().text("Save...").onAction(saveBtnHandler).build(),
-                ButtonBuilder.create().text("Restart").onAction(new EventHandler<ActionEvent>() {
-                    @Override public void handle(ActionEvent event) {
-                        restart();
-                    }
-                }).build()
+                ButtonBuilder.create().text("Restart").onAction(event -> restart()).build()
             );
             toolBar.setId("TestAppToolbar");
             // Create content group used for scaleing @2x
@@ -449,12 +425,10 @@
                 contentTabs.getTransforms().setAll(new Scale(2,2));
             }
             // update state
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    // move focus out of the way
-                    modenaButton.requestFocus();
-                    samplePageNavigation.setCurrentSection(scrolledSection);
-                }
+            Platform.runLater(() -> {
+                // move focus out of the way
+                modenaButton.requestFocus();
+                samplePageNavigation.setCurrentSection(scrolledSection);
             });
         } catch (IOException ex) {
             Logger.getLogger(Modena.class.getName()).log(Level.SEVERE, null, ex);
@@ -462,11 +436,7 @@
     }
 
     public RadioMenuItem buildFontRadioMenuItem(String name, final String in_fontName, final int in_fontSize, ToggleGroup tg) {
-        return RadioMenuItemBuilder.create().text(name).onAction(new EventHandler<ActionEvent>(){
-                   @Override public void handle(ActionEvent event) {
-                       setFont(in_fontName, in_fontSize);
-                   }
-               }).style("-fx-font: " + in_fontSize + "px \"" + in_fontName + "\";").toggleGroup(tg).build();
+        return RadioMenuItemBuilder.create().text(name).onAction(event -> setFont(in_fontName, in_fontSize)).style("-fx-font: " + in_fontSize + "px \"" + in_fontName + "\";").toggleGroup(tg).build();
     }
     
     public void setFont(String in_fontName, int in_fontSize) {
@@ -497,11 +467,7 @@
                 Color.MAGENTA,
                 Color.BLACK
         );
-        colorPicker.valueProperty().addListener(new ChangeListener<Color>() {
-            @Override public void changed(ObservableValue<? extends Color> observable, Color oldValue, Color c) {
-                setBaseColor(c);
-            }
-        });
+        colorPicker.valueProperty().addListener((observable, oldValue, c) -> setBaseColor(c));
         return colorPicker;
     }
     
@@ -533,15 +499,13 @@
                 Color.MAGENTA,
                 Color.BLACK
         );
-        colorPicker.valueProperty().addListener(new ChangeListener<Color>() {
-            @Override public void changed(ObservableValue<? extends Color> observable, Color oldValue, Color c) {
-                if (c == null) {
-                    backgroundColor = null;
-                } else {
-                    backgroundColor = c;
-                }
-                updateUserAgentStyleSheet();
+        colorPicker.valueProperty().addListener((observable, oldValue, c) -> {
+            if (c == null) {
+                backgroundColor = null;
+            } else {
+                backgroundColor = c;
             }
+            updateUserAgentStyleSheet();
         });
         return colorPicker;
     }
@@ -567,11 +531,7 @@
                 Color.MAGENTA,
                 Color.BLACK
         );
-        colorPicker.valueProperty().addListener(new ChangeListener<Color>() {
-            @Override public void changed(ObservableValue<? extends Color> observable, Color oldValue, Color c) {
-                setAccentColor(c);
-            }
-        });
+        colorPicker.valueProperty().addListener((observable, oldValue, c) -> setAccentColor(c));
         return colorPicker;
     }
 
@@ -584,31 +544,29 @@
         updateUserAgentStyleSheet();
     }
     
-    private EventHandler<ActionEvent> saveBtnHandler = new EventHandler<ActionEvent>() {
-        @Override public void handle(ActionEvent event) {
-            FileChooser fc = new FileChooser();
-            fc.getExtensionFilters().add(new FileChooser.ExtensionFilter("PNG", "*.png"));
-            File file = fc.showSaveDialog(mainStage);
-            if (file != null) {
-                try {
-                    samplePage.getStyleClass().add("root");
-                    int width = (int)(samplePage.getLayoutBounds().getWidth()+0.5d);
-                    int height = (int)(samplePage.getLayoutBounds().getHeight()+0.5d);
-                    BufferedImage imgBuffer = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);
-                    Graphics2D g2 = imgBuffer.createGraphics();
-                    for (int y=0; y<height; y+=2048) {
-                        SnapshotParameters snapshotParameters = new SnapshotParameters();
-                        int remainingHeight = Math.min(2048, height - y);
-                        snapshotParameters.setViewport(new Rectangle2D(0,y,width,remainingHeight));
-                        WritableImage img = samplePage.snapshot(snapshotParameters, null);
-                        g2.drawImage(SwingFXUtils.fromFXImage(img,null),0,y,null);
-                    }
-                    g2.dispose();
-                    ImageIO.write(imgBuffer, "PNG", file);
-                    System.out.println("Written image: "+file.getAbsolutePath());
-                } catch (IOException ex) {
-                    Logger.getLogger(Modena.class.getName()).log(Level.SEVERE, null, ex);
+    private EventHandler<ActionEvent> saveBtnHandler = event -> {
+        FileChooser fc = new FileChooser();
+        fc.getExtensionFilters().add(new FileChooser.ExtensionFilter("PNG", "*.png"));
+        File file = fc.showSaveDialog(mainStage);
+        if (file != null) {
+            try {
+                samplePage.getStyleClass().add("root");
+                int width = (int)(samplePage.getLayoutBounds().getWidth()+0.5d);
+                int height = (int)(samplePage.getLayoutBounds().getHeight()+0.5d);
+                BufferedImage imgBuffer = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);
+                Graphics2D g2 = imgBuffer.createGraphics();
+                for (int y=0; y<height; y+=2048) {
+                    SnapshotParameters snapshotParameters = new SnapshotParameters();
+                    int remainingHeight = Math.min(2048, height - y);
+                    snapshotParameters.setViewport(new Rectangle2D(0,y,width,remainingHeight));
+                    WritableImage img = samplePage.snapshot(snapshotParameters, null);
+                    g2.drawImage(SwingFXUtils.fromFXImage(img,null),0,y,null);
                 }
+                g2.dispose();
+                ImageIO.write(imgBuffer, "PNG", file);
+                System.out.println("Written image: "+file.getAbsolutePath());
+            } catch (IOException ex) {
+                Logger.getLogger(Modena.class.getName()).log(Level.SEVERE, null, ex);
             }
         }
     };
--- a/tests/golden-image-suite/src/modena/SameHeightTestController.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/golden-image-suite/src/modena/SameHeightTestController.java	Tue Jun 10 14:35:17 2014 -0400
@@ -33,9 +33,9 @@
 
 import java.net.URL;
 import java.util.ResourceBundle;
+
 import javafx.application.Platform;
 import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.fxml.FXML;
 import javafx.fxml.Initializable;
 import javafx.geometry.Insets;
@@ -67,33 +67,19 @@
     private Node arrow;
 
     @Override public void initialize(URL url, ResourceBundle rb) {
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                Text buttonTextNode = (Text)horizFirstButton.lookup(".text");
-                buttonTextNode.layoutYProperty().addListener(new ChangeListener<Number>() {
-                    @Override public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
-                        StackPane.setMargin(horizBaseLine, new Insets(t1.doubleValue(),0,0,0));
-                    }
-                });
-                Text textFieldTextNode = (Text)vertFirstTextField.lookup(".text");
-                textFieldTextNode.layoutXProperty().addListener(new ChangeListener<Number>() {
-                    @Override public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
-                        StackPane.setMargin(vertBaseLine, new Insets(0,0,0,t1.doubleValue()));
-                    }
-                });
-                arrowButton = editableCombo.lookup(".arrow-button");
-                arrow = editableCombo.lookup(".arrow");
-                ChangeListener updater = new ChangeListener() {
-                    @Override public void changed(ObservableValue ov, Object t, Object t1) {
-                        updateArrowLinePositions();
-                    }
-                };
-                arrow.layoutBoundsProperty().addListener(updater);
-                arrowButton.layoutBoundsProperty().addListener(updater);
-                editableCombo.layoutBoundsProperty().addListener(updater);
-                arrowButtonContainer.layoutBoundsProperty().addListener(updater);
-                updateArrowLinePositions();
-            }
+        Platform.runLater(() -> {
+            Text buttonTextNode = (Text)horizFirstButton.lookup(".text");
+            buttonTextNode.layoutYProperty().addListener((ov, t, t1) -> StackPane.setMargin(horizBaseLine, new Insets(t1.doubleValue(),0,0,0)));
+            Text textFieldTextNode = (Text)vertFirstTextField.lookup(".text");
+            textFieldTextNode.layoutXProperty().addListener((ov, t, t1) -> StackPane.setMargin(vertBaseLine, new Insets(0,0,0,t1.doubleValue())));
+            arrowButton = editableCombo.lookup(".arrow-button");
+            arrow = editableCombo.lookup(".arrow");
+            ChangeListener updater = (ov, t, t1) -> updateArrowLinePositions();
+            arrow.layoutBoundsProperty().addListener(updater);
+            arrowButton.layoutBoundsProperty().addListener(updater);
+            editableCombo.layoutBoundsProperty().addListener(updater);
+            arrowButtonContainer.layoutBoundsProperty().addListener(updater);
+            updateArrowLinePositions();
         });
     }
     
--- a/tests/golden-image-suite/src/modena/SamplePageHelpers.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/golden-image-suite/src/modena/SamplePageHelpers.java	Tue Jun 10 14:35:17 2014 -0400
@@ -33,9 +33,8 @@
 
 import java.util.ArrayList;
 import java.util.List;
+
 import javafx.application.Platform;
-import javafx.beans.InvalidationListener;
-import javafx.beans.Observable;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
 import javafx.css.PseudoClass;
@@ -75,7 +74,6 @@
 import javafx.scene.paint.Color;
 import javafx.scene.shape.LineBuilder;
 import javafx.scene.shape.RectangleBuilder;
-import javafx.util.Callback;
 
 /**
  * Helper static methods for Sample Page
@@ -98,18 +96,16 @@
     
     static <T extends Node> T withState(final T node, final String state, final String subNodeStyleClass, final String subNodeState) {
         withState(node, state);
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                if (node != null) {
-                    Node subNode = node.lookup(subNodeStyleClass);
-                    if (subNode != null) {
-                        withState(node.lookup(subNodeStyleClass), subNodeState);
-                    } else {
-                        System.err.println("node = " + node+" node.lookup("+subNodeStyleClass+") = " + subNode);
-                    }
+        Platform.runLater(() -> {
+            if (node != null) {
+                Node subNode = node.lookup(subNodeStyleClass);
+                if (subNode != null) {
+                    withState(node.lookup(subNodeStyleClass), subNodeState);
                 } else {
-                    System.err.println("node = " + node);
+                    System.err.println("node = " + node+" node.lookup("+subNodeStyleClass+") = " + subNode);
                 }
+            } else {
+                System.err.println("node = " + node);
             }
         });
         return node;
@@ -225,11 +221,7 @@
         Pagination pagination = new Pagination(numOfPages);
         if (bullet) pagination.getStyleClass().add("bullet");
         if (!arrows) pagination.setStyle("-fx-arrows-visible:false;");
-        pagination.setPageFactory(new Callback<Integer, Node>() {
-            @Override public Node call(Integer param) {
-                return new Label("Page Label "+param);
-            }
-        });
+        pagination.setPageFactory(param -> new Label("Page Label "+param));
         return pagination;
     }
     
@@ -272,13 +264,11 @@
             createMenu("Help")
         );
 //        mb.setMouseTransparent(true);
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                // get second menu and force into hover state
-                try {
-                    new ArrayList<Node>(mb.lookupAll(".menu")).get(1).pseudoClassStateChanged(PseudoClass.getPseudoClass("hover"), true);
-                } catch (Exception e) { e.printStackTrace(); }
-            }
+        Platform.runLater(() -> {
+            // get second menu and force into hover state
+            try {
+                new ArrayList<Node>(mb.lookupAll(".menu")).get(1).pseudoClassStateChanged(PseudoClass.getPseudoClass("hover"), true);
+            } catch (Exception e) { e.printStackTrace(); }
         });
         return  mb;
     }
@@ -302,18 +292,16 @@
         // create a place holder container
         final StackPane contextMenu = new StackPane();
         // show context menu then steal and place inline
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                menu.show(contextMenu,-1000,-1000);
-                menu.hide();
-                Platform.runLater(new Runnable() {
-                    @Override public void run() {
-                        final Node menuContent = menu.getSkin().getNode();
-                        contextMenu.getChildren().add(menuContent);
-                        menuContent.setMouseTransparent(true);
+        Platform.runLater(() -> {
+            menu.show(contextMenu,-1000,-1000);
+            menu.hide();
+            Platform.runLater(() -> {
+                final Node menuContent = menu.getSkin().getNode();
+                contextMenu.getChildren().add(menuContent);
+                menuContent.setMouseTransparent(true);
 //                        System.out.println("menuContent = " + menuContent);
 //                        System.out.println("menuContent.lookupAll(\".menu-item\") = " + menuContent.lookupAll(".menu-item"));
-                        
+                
 //                        Platform.runLater(new Runnable() {
 //                            @Override public void run() {
 ////                        if (selectAll) {
@@ -326,9 +314,7 @@
 ////                        }
 //                            }
 //                        });
-                    }
-                });
-            }
+            });
         });
         return contextMenu;
     }
@@ -371,11 +357,9 @@
         final MenuItem menu112 = new MenuItem("foo");
         final CheckMenuItem menu113 = new CheckMenuItem("Show \"foo\" item");
         menu113.setSelected(true);
-        menu113.selectedProperty().addListener(new InvalidationListener() {
-            @Override public void invalidated(Observable valueModel) {
-                menu112.setVisible(menu113.isSelected());
-                System.err.println("MenuItem \"foo\" is now " + (menu112.isVisible() ? "" : "not") + " visible.");
-            }
+        menu113.selectedProperty().addListener(valueModel -> {
+            menu112.setVisible(menu113.isSelected());
+            System.err.println("MenuItem \"foo\" is now " + (menu112.isVisible() ? "" : "not") + " visible.");
         });
         menu11.getItems().addAll(menu111, menu112, menu113);
 
--- a/tests/golden-image-suite/src/modena/SamplePageNavigation.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/golden-image-suite/src/modena/SamplePageNavigation.java	Tue Jun 10 14:35:17 2014 -0400
@@ -1,7 +1,5 @@
 package modena;
 
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.scene.control.ChoiceBox;
 import javafx.scene.control.Label;
 import javafx.scene.control.ScrollPane;
@@ -25,37 +23,31 @@
         toolBar.getStyleClass().add("bottom");
         toolBar.getItems().add(new Label("Go to section:"));
         final ChoiceBox<SamplePage.Section> sectionChoiceBox = new ChoiceBox<>();
-        sectionChoiceBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<SamplePage.Section>() {
-            @Override public void changed(ObservableValue<? extends SamplePage.Section> observable, SamplePage.Section oldValue, SamplePage.Section newValue) {
-                setCurrentSection(newValue);
-            }
-        });
+        sectionChoiceBox.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> setCurrentSection(newValue));
         sectionChoiceBox.getItems().addAll(samplePage.getSections());
         toolBar.getItems().add(sectionChoiceBox);
         setBottom(toolBar);
-        scrollPane.vvalueProperty().addListener(new ChangeListener<Number>() {
-            @Override public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
-                if (!isLocalChange) {
-                    isLocalChange = true;
-                    // calc scroll position relative to scroll pane content
-                    double posPixels = samplePage.getLayoutBounds().getHeight() * newValue.doubleValue();
-                    // move to top of view port
-                    posPixels -=  scrollPane.getLayoutBounds().getHeight() * newValue.doubleValue();
-                    // move to center of view port
-                    posPixels +=  scrollPane.getLayoutBounds().getHeight() * 0.5;
-                    // find section that contains view port center
-                    currentSection = null;
-                    for (SamplePage.Section section: samplePage.getSections()) {
-                        if (section.box.getBoundsInParent().getMaxY() > posPixels ) {
-                            currentSection = section;
-                            break;
-                        }
+        scrollPane.vvalueProperty().addListener((observable, oldValue, newValue) -> {
+            if (!isLocalChange) {
+                isLocalChange = true;
+                // calc scroll position relative to scroll pane content
+                double posPixels = samplePage.getLayoutBounds().getHeight() * newValue.doubleValue();
+                // move to top of view port
+                posPixels -=  scrollPane.getLayoutBounds().getHeight() * newValue.doubleValue();
+                // move to center of view port
+                posPixels +=  scrollPane.getLayoutBounds().getHeight() * 0.5;
+                // find section that contains view port center
+                currentSection = null;
+                for (SamplePage.Section section: samplePage.getSections()) {
+                    if (section.box.getBoundsInParent().getMaxY() > posPixels ) {
+                        currentSection = section;
+                        break;
                     }
-                    sectionChoiceBox.getSelectionModel().select(currentSection);
-                    isLocalChange = false;
                 }
+                sectionChoiceBox.getSelectionModel().select(currentSection);
+                isLocalChange = false;
+            }
 
-            }
         });
     }
 
--- a/tests/golden-image-suite/src/modena/SamplePageTableHelper.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/golden-image-suite/src/modena/SamplePageTableHelper.java	Tue Jun 10 14:35:17 2014 -0400
@@ -38,12 +38,9 @@
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleStringProperty;
 import javafx.beans.property.StringProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
 import javafx.collections.SetChangeListener;
-import javafx.event.EventHandler;
 import javafx.scene.Node;
 import javafx.scene.control.Label;
 import javafx.scene.control.SelectionMode;
@@ -58,7 +55,6 @@
 import javafx.scene.paint.Color;
 import javafx.scene.paint.Paint;
 import javafx.scene.shape.Rectangle;
-import javafx.util.Callback;
 
 /**
  * Helper class for creating table views for testing
@@ -95,11 +91,7 @@
                     return firstName.get() + " " + lastName.get();
                 }
             });
-            this.invited.addListener(new ChangeListener<Boolean>() {
-                public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) {
-                    System.out.println(getFirstName() + " invited: " + t1);
-                }
-            });
+            this.invited.addListener((ov, t, t1) -> System.out.println(getFirstName() + " invited: " + t1));
         }
         
         public Boolean isInvited() { return invited.get(); }
@@ -216,18 +208,10 @@
         emailCol = new TableColumn<Person, String>();
         emailCol.setText("Email");
         emailCol.setMinWidth(200);
-        emailCol.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Person, String>, ObservableValue<String>>() {
-            public ObservableValue<String> call(TableColumn.CellDataFeatures<Person, String> p) {
-                return p.getValue().emailProperty();
-            }
-        });
+        emailCol.setCellValueFactory(p -> p.getValue().emailProperty());
         countryCol = new TableColumn<Person, String>();
         countryCol.setText("Country");
-        countryCol.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Person, String>, ObservableValue<String>>() {
-            public ObservableValue<String> call(TableColumn.CellDataFeatures<Person, String> p) {
-                return new ReadOnlyObjectWrapper<String>("New Zealand");
-            }
-        });
+        countryCol.setCellValueFactory(p -> new ReadOnlyObjectWrapper<String>("New Zealand"));
         // Create TableView
         TableView<Person> tableView = new TableView<Person>();
         tableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
@@ -268,56 +252,38 @@
 //        });
 //        firstNameCol.setSortNode(sortNode);
         firstNameCol.setCellValueFactory(new PropertyValueFactory<Person,String>("firstName"));
-        firstNameCol.setOnEditCommit(new EventHandler<TableColumn.CellEditEvent<Person, String>>() {
-            @Override public void handle(TableColumn.CellEditEvent<Person, String> t) {
-                System.out.println("Edit commit event: " + t.getNewValue());
-            }
-        });
+        firstNameCol.setOnEditCommit(t -> System.out.println("Edit commit event: " + t.getNewValue()));
         final Node graphic1 = new ImageView(new Image("file:src/helloworld/about_16.png"));
         lastNameCol = new TableColumn<Person, String>();
         lastNameCol.setGraphic(graphic1);
         lastNameCol.setText("Last");
         lastNameCol.setSortType(TableColumn.SortType.DESCENDING);
-        lastNameCol.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Person, String>, ObservableValue<String>>() {
-            public ObservableValue<String> call(TableColumn.CellDataFeatures<Person, String> p) {
-                return p.getValue().lastNameProperty();
-            }
-        });
+        lastNameCol.setCellValueFactory(p -> p.getValue().lastNameProperty());
         nameCol = new TableColumn<Person, String>();
         nameCol.setText("Name");
         nameCol.getColumns().addAll(firstNameCol, lastNameCol);
         emailCol = new TableColumn<Person, String>();
         emailCol.setText("Email");
         emailCol.setMinWidth(200);
-        emailCol.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Person, String>, ObservableValue<String>>() {
-            public ObservableValue<String> call(TableColumn.CellDataFeatures<Person, String> p) {
-                return p.getValue().emailProperty();
-            }
-        });
+        emailCol.setCellValueFactory(p -> p.getValue().emailProperty());
         countryCol = new TableColumn<Person, String>();
         countryCol.setText("Country");
-        countryCol.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Person, String>, ObservableValue<String>>() {
-            public ObservableValue<String> call(TableColumn.CellDataFeatures<Person, String> p) {
-                return new ReadOnlyObjectWrapper<String>("New Zealand");
-            }
-        });
+        countryCol.setCellValueFactory(p -> new ReadOnlyObjectWrapper<String>("New Zealand"));
         // Test case for RT-28410 MODENA: can't make tree/table cell factories change color based
         // on background when setGraphic(...) is used
-        countryCol.setCellFactory(new Callback<TableColumn<Person, String>, TableCell<Person, String>>() {
-            @Override public TableCell<Person, String> call(TableColumn<Person, String> param) {
-                final Label label = new Label();
-                label.setStyle(
-                        "-fx-font-family: 'Times New Roman';" +
-                        "-fx-font-size: 0.8em;" +
-                        "-fx-text-fill: ladder(-fx-background, yellow 49%, red 50%);");
-                TableCell cell = new TableCell() {
-                    @Override protected void updateItem(Object item, boolean empty) {
-                        label.setText(empty ? null : item.toString());
-                    }
-                };
-                cell.setGraphic(label);
-                return cell;
-            }
+        countryCol.setCellFactory(param -> {
+            final Label label = new Label();
+            label.setStyle(
+                    "-fx-font-family: 'Times New Roman';" +
+                    "-fx-font-size: 0.8em;" +
+                    "-fx-text-fill: ladder(-fx-background, yellow 49%, red 50%);");
+            TableCell cell = new TableCell() {
+                @Override protected void updateItem(Object item, boolean empty) {
+                    label.setText(empty ? null : item.toString());
+                }
+            };
+            cell.setGraphic(label);
+            return cell;
         });
 
         invitedCol = new TableColumn<Person, Boolean>();
@@ -325,11 +291,7 @@
         invitedCol.setPrefWidth(55);
         invitedCol.setMaxWidth(55);
         invitedCol.setCellValueFactory(new PropertyValueFactory("invited"));
-        invitedCol.setCellFactory(new Callback<TableColumn<Person, Boolean>, TableCell<Person, Boolean>>() {
-            public TableCell<Person, Boolean> call(TableColumn<Person, Boolean> p) {
-                return new CheckBoxTableCell<Person, Boolean>();
-            }
-        });
+        invitedCol.setCellFactory(p -> new CheckBoxTableCell<Person, Boolean>());
         
         
         TableView<Person> tableView = new TableView<Person>();
--- a/tests/golden-image-suite/src/modena/SamplePageTreeTableHelper.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/golden-image-suite/src/modena/SamplePageTreeTableHelper.java	Tue Jun 10 14:35:17 2014 -0400
@@ -36,12 +36,11 @@
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
-import java.util.Comparator;
 import java.util.Date;
 import java.util.List;
 import java.util.Random;
+
 import javafx.beans.property.ReadOnlyObjectWrapper;
-import javafx.beans.value.ObservableValue;
 import javafx.collections.ObservableList;
 import javafx.scene.Node;
 import javafx.scene.control.SelectionMode;
@@ -51,7 +50,6 @@
 import javafx.scene.control.TreeTableColumn;
 import javafx.scene.control.TreeTableView;
 import javafx.scene.shape.SVGPath;
-import javafx.util.Callback;
 
 /**
  * Helper class for creating tree table views for testing
@@ -141,83 +139,63 @@
         // --- name column
         TreeTableColumn<DummyFile, String> nameColumn = new TreeTableColumn<DummyFile, String>("Name");
         nameColumn.setPrefWidth(300);
-        nameColumn.setCellValueFactory(new Callback<TreeTableColumn.CellDataFeatures<DummyFile, String>, ObservableValue<String>>() {
-            @Override public ObservableValue<String> call(TreeTableColumn.CellDataFeatures<DummyFile, String> p) {
-                DummyFile f = p.getValue().getValue();
-                String text = f == ROOT ? "/" : f.getName();
-                return new ReadOnlyObjectWrapper<String>(text);
-            }
+        nameColumn.setCellValueFactory(p -> {
+            DummyFile f = p.getValue().getValue();
+            String text = f == ROOT ? "/" : f.getName();
+            return new ReadOnlyObjectWrapper<String>(text);
         });
 
         // --- size column
         TreeTableColumn<DummyFile, DummyFile> sizeColumn = new TreeTableColumn<DummyFile, DummyFile>("Size");
         sizeColumn.setPrefWidth(100);
-        sizeColumn.setCellValueFactory(new Callback<TreeTableColumn.CellDataFeatures<DummyFile, DummyFile>, ObservableValue<DummyFile>>() {
-            @Override public ObservableValue<DummyFile> call(TreeTableColumn.CellDataFeatures<DummyFile, DummyFile> p) {
-                return new ReadOnlyObjectWrapper<DummyFile>(p.getValue().getValue());
+        sizeColumn.setCellValueFactory(p -> new ReadOnlyObjectWrapper<DummyFile>(p.getValue().getValue()));
+        sizeColumn.setCellFactory(p -> new TreeTableCell<DummyFile, DummyFile>() {
+            @Override protected void updateItem(DummyFile item, boolean empty) {
+                super.updateItem(item, empty);
+                
+                TreeTableView treeTable = p.getTreeTableView();
+
+                // if the File is a directory, it has no size...
+//                        ObservableList<TreeItem<DummyFile>> items = p.getTreeTableView().getItems();
+                if (getIndex() >= treeTable.getExpandedItemCount()) {
+                    setText(null);
+                } else {
+                    TreeItem<DummyFile> treeItem = treeTable.getTreeItem(getIndex());
+                    if (item == null || empty || treeItem == null || 
+                            treeItem.getValue() == null || treeItem.getValue().isDirectory()) {
+                        setText(null);
+                    } else {
+                        setText(nf.format(item.getSize()) + " KB");
+                    }
+                }
             }
         });
-        sizeColumn.setCellFactory(new Callback<TreeTableColumn<DummyFile, DummyFile>, TreeTableCell<DummyFile, DummyFile>>() {
-            @Override public TreeTableCell<DummyFile, DummyFile> call(final TreeTableColumn<DummyFile, DummyFile> p) {
-                return new TreeTableCell<DummyFile, DummyFile>() {
-                    @Override protected void updateItem(DummyFile item, boolean empty) {
-                        super.updateItem(item, empty);
-                        
-                        TreeTableView treeTable = p.getTreeTableView();
-
-                        // if the File is a directory, it has no size...
-//                        ObservableList<TreeItem<DummyFile>> items = p.getTreeTableView().getItems();
-                        if (getIndex() >= treeTable.getExpandedItemCount()) {
-                            setText(null);
-                        } else {
-                            TreeItem<DummyFile> treeItem = treeTable.getTreeItem(getIndex());
-                            if (item == null || empty || treeItem == null || 
-                                    treeItem.getValue() == null || treeItem.getValue().isDirectory()) {
-                                setText(null);
-                            } else {
-                                setText(nf.format(item.getSize()) + " KB");
-                            }
-                        }
-                    }
-                };
-            }
-        });
-        sizeColumn.setComparator(new Comparator<DummyFile>() {
-            @Override public int compare(DummyFile f1, DummyFile f2) {
-                long s1 = f1.isDirectory() ? 0 : f1.getSize();
-                long s2 = f2.isDirectory() ? 0 : f2.getSize();
-                long result = s1 - s2;
-                if (result < 0) {
-                    return -1;
-                } else if (result == 0) {
-                    return 0;
-                } else {
-                    return 1;
-                }
+        sizeColumn.setComparator((f1, f2) -> {
+            long s1 = f1.isDirectory() ? 0 : f1.getSize();
+            long s2 = f2.isDirectory() ? 0 : f2.getSize();
+            long result = s1 - s2;
+            if (result < 0) {
+                return -1;
+            } else if (result == 0) {
+                return 0;
+            } else {
+                return 1;
             }
         });
         
         // --- modified column
         TreeTableColumn<DummyFile, Date> lastModifiedColumn = new TreeTableColumn<DummyFile, Date>("Last Modified");
         lastModifiedColumn.setPrefWidth(130);
-        lastModifiedColumn.setCellValueFactory(new Callback<TreeTableColumn.CellDataFeatures<DummyFile, Date>, ObservableValue<Date>>() {
-            @Override public ObservableValue<Date> call(TreeTableColumn.CellDataFeatures<DummyFile, Date> p) {
-                return new ReadOnlyObjectWrapper<Date>(p.getValue().getValue().getModified());
-            }
-        });
-        lastModifiedColumn.setCellFactory(new Callback<TreeTableColumn<DummyFile, Date>, TreeTableCell<DummyFile, Date>>() {
-            @Override public TreeTableCell<DummyFile, Date> call(TreeTableColumn<DummyFile, Date> p) {
-                return new TreeTableCell<DummyFile, Date>() {
-                    @Override protected void updateItem(Date item, boolean empty) {
-                        super.updateItem(item, empty);
-                        
-                        if (item == null || empty) {
-                            setText(null);
-                        } else {
-                            setText(df.format(item));
-                        }
-                    }
-                };
+        lastModifiedColumn.setCellValueFactory(p -> new ReadOnlyObjectWrapper<Date>(p.getValue().getValue().getModified()));
+        lastModifiedColumn.setCellFactory(p -> new TreeTableCell<DummyFile, Date>() {
+            @Override protected void updateItem(Date item, boolean empty) {
+                super.updateItem(item, empty);
+                
+                if (item == null || empty) {
+                    setText(null);
+                } else {
+                    setText(df.format(item));
+                }
             }
         });
         
--- a/tests/golden-image-suite/src/modena/SimpleWindowPage.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/golden-image-suite/src/modena/SimpleWindowPage.java	Tue Jun 10 14:35:17 2014 -0400
@@ -86,21 +86,19 @@
             ubuntuWindowContent = (Node)FXMLLoader.load(SimpleWindowPage.class.getResource("simple-window.fxml"));
             ubuntuWindow.getChildren().add(ubuntuWindowContent);
             
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    final Node macRB2 = macWindowContent.lookup("#RadioButton2");
-                    macRB2.setMouseTransparent(true);
-                    macRB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
-                    final Node windows7RB2 = windows7WindowContent.lookup("#RadioButton2");
-                    windows7RB2.setMouseTransparent(true);
-                    windows7RB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
-                    final Node windows8RB2 = windows8WindowContent.lookup("#RadioButton2");
-                    windows8RB2.setMouseTransparent(true);
-                    windows8RB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
-                    final Node ubuntuRB2 = ubuntuWindowContent.lookup("#RadioButton2");
-                    ubuntuRB2.setMouseTransparent(true);
-                    ubuntuRB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
-                }
+            Platform.runLater(() -> {
+                final Node macRB2 = macWindowContent.lookup("#RadioButton2");
+                macRB2.setMouseTransparent(true);
+                macRB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
+                final Node windows7RB2 = windows7WindowContent.lookup("#RadioButton2");
+                windows7RB2.setMouseTransparent(true);
+                windows7RB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
+                final Node windows8RB2 = windows8WindowContent.lookup("#RadioButton2");
+                windows8RB2.setMouseTransparent(true);
+                windows8RB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
+                final Node ubuntuRB2 = ubuntuWindowContent.lookup("#RadioButton2");
+                ubuntuRB2.setMouseTransparent(true);
+                ubuntuRB2.pseudoClassStateChanged(PseudoClass.getPseudoClass("focused"), true);
             });
             
             box.getChildren().addAll(macWindow, ubuntuWindow, windows7Window, windows8Window);
--- a/tests/manual/printing/PageLayoutTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/manual/printing/PageLayoutTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -22,8 +22,6 @@
  */
 
 import javafx.application.Application;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.scene.Group;
 import javafx.scene.Scene;
 import javafx.scene.control.Button;
@@ -32,7 +30,6 @@
 import javafx.scene.text.Text;
 import javafx.stage.Screen;
 import javafx.stage.Stage;
-
 import javafx.print.PageLayout;
 import javafx.print.PageOrientation;
 import javafx.print.Paper;
@@ -113,12 +110,7 @@
         scene.setFill(Color.RED);
 
         Button print = new Button("Print");
-        print.setOnAction(new EventHandler<ActionEvent>() {
-            @Override
-            public void handle(ActionEvent e) {
-                createJob();
-            }
-        });
+        print.setOnAction(e -> createJob());
         ((Group) scene.getRoot()).getChildren().add(print);
         return scene;
 
--- a/tests/manual/printing/PrintOrientTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/manual/printing/PrintOrientTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -1,20 +1,16 @@
 import java.util.Set;
+
 import javafx.print.JobSettings;
 import javafx.print.Printer;
 import javafx.print.PrinterAttributes;
-
 import javafx.print.PrinterJob;
 import javafx.print.PrintColor;
 import javafx.print.PageOrientation;
 import javafx.print.PageLayout;
 import static javafx.print.PageOrientation.*;
-
 import javafx.application.Application;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
 import javafx.geometry.Rectangle2D;
 import javafx.geometry.VPos;
-
 import javafx.scene.Group;
 import javafx.scene.Scene;
 import javafx.scene.control.Button;
@@ -82,14 +78,11 @@
         Button print = new Button("Print");
         print.setLayoutX(80);
         print.setLayoutY(200);
-        print.setOnAction(new EventHandler<ActionEvent>() {
-            @Override
-            public void handle(ActionEvent e) {
-                createJob(PORTRAIT);
-                createJob(REVERSE_PORTRAIT);
-                createJob(LANDSCAPE);
-                createJob(REVERSE_LANDSCAPE);
-            }
+        print.setOnAction(e -> {
+            createJob(PORTRAIT);
+            createJob(REVERSE_PORTRAIT);
+            createJob(LANDSCAPE);
+            createJob(REVERSE_LANDSCAPE);
         });
         ((Group)scene.getRoot()).getChildren().add(print);
         return scene;
--- a/tests/performance/VMPerformance/src/VMPerformance.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/performance/VMPerformance/src/VMPerformance.java	Tue Jun 10 14:35:17 2014 -0400
@@ -610,15 +610,13 @@
 
     static class CreateAndCollectWeakReferenceWithQueue extends ObjectCreationTest {
         final ReferenceQueue queue = new ReferenceQueue();
-        Thread queueThread = new Thread(new Runnable() {
-            public void run() {
-                try {
-                    while (true) {
-                        Reference r = queue.remove();
-                    }
-                } catch (InterruptedException e) {
-                    return;
+        Thread queueThread = new Thread(() -> {
+            try {
+                while (true) {
+                    Reference r = queue.remove();
                 }
+            } catch (InterruptedException e) {
+                return;
             }
         });
         {
@@ -637,15 +635,13 @@
     static class CreateAndCollectPhantomReferenceWithQueue
             extends ObjectCreationTest {
         final ReferenceQueue queue = new ReferenceQueue();
-        Thread queueThread = new Thread(new Runnable() {
-            public void run() {
-                try {
-                    while (true) {
-                        Reference r = queue.remove();
-                    }
-                } catch (InterruptedException e) {
-                    return;
+        Thread queueThread = new Thread(() -> {
+            try {
+                while (true) {
+                    Reference r = queue.remove();
                 }
+            } catch (InterruptedException e) {
+                return;
             }
         });
         {
--- a/tests/system/src/test/java/com/sun/glass/ui/DefaultExceptionHandlerTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/glass/ui/DefaultExceptionHandlerTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -55,20 +55,12 @@
 
     @BeforeClass
     public static void setup() throws Exception {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
-            @Override
-            public void uncaughtException(Thread t, Throwable e) {
-                exception = e;
-                System.out.println("Exception caught: " + e);
-                System.out.flush();
-            }
+        Thread.setDefaultUncaughtExceptionHandler((t, e) -> {
+            exception = e;
+            System.out.println("Exception caught: " + e);
+            System.out.flush();
         });
-        new Thread(new Runnable() {
-            @Override
-            public void run() {
-                Application.launch(TestApp.class);
-            }
-        }).start();
+        new Thread(() -> Application.launch(TestApp.class)).start();
         startupLatch.await();
     }
 
@@ -76,18 +68,10 @@
     public void test1() throws Throwable {
         exception = null;
         final CountDownLatch l = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                throw new TestException("test1");
-            }
+        Platform.runLater(() -> {
+            throw new TestException("test1");
         });
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                l.countDown();
-            }
-        });
+        Platform.runLater(l::countDown);
         l.await(10000, TimeUnit.MILLISECONDS);
         if (exception == null) {
             throw new RuntimeException("Test FAILED: TestException is not caught");
--- a/tests/system/src/test/java/com/sun/glass/ui/ExceptionHandlerTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/glass/ui/ExceptionHandlerTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -49,13 +49,10 @@
     public static class TestApp extends Application {
         @Override
         public void start(Stage t) {
-            Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
-                @Override
-                public void uncaughtException(Thread t, Throwable e) {
-                    exception = e;
-                    System.out.println("Exception caught: " + e);
-                    System.out.flush();
-                }
+            Thread.currentThread().setUncaughtExceptionHandler((t2, e) -> {
+                exception = e;
+                System.out.println("Exception caught: " + e);
+                System.out.flush();
             });
             startupLatch.countDown();
         }
@@ -69,12 +66,7 @@
 
     @BeforeClass
     public static void setup() throws Exception {
-        new Thread(new Runnable() {
-            @Override
-            public void run() {
-                Application.launch(TestApp.class);
-            }
-        }).start();
+        new Thread(() -> Application.launch(TestApp.class)).start();
         startupLatch.await();
     }
 
@@ -82,18 +74,10 @@
     public void test1() throws Throwable {
         exception = null;
         final CountDownLatch l = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                throw new TestException("test1");
-            }
+        Platform.runLater(() -> {
+            throw new TestException("test1");
         });
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                l.countDown();
-            }
-        });
+        Platform.runLater(l::countDown);
         l.await(10000, TimeUnit.MILLISECONDS);
         if (exception == null) {
             throw new RuntimeException("Test FAILED: TestException is not caught");
--- a/tests/system/src/test/java/com/sun/glass/ui/monocle/input/DoubleClickTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/glass/ui/monocle/input/DoubleClickTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -50,11 +50,9 @@
     public void testDoubleClick1() throws Exception {
         int x = (int) Math.round(width / 2.0);
         int y = (int) Math.round(height / 2.0);
-        TestApplication.getStage().getScene().setOnMouseClicked((e) -> {
-            TestLog.format("Mouse clicked: %d, %d: clickCount %d",
-                           (int) e.getScreenX(), (int) e.getScreenY(),
-                           e.getClickCount());
-        });
+        TestApplication.getStage().getScene().setOnMouseClicked((e) -> TestLog.format("Mouse clicked: %d, %d: clickCount %d",
+                       (int) e.getScreenX(), (int) e.getScreenY(),
+                       e.getClickCount()));
         TestLog.reset();
         int p = device.addPoint(x, y);
         device.sync();
@@ -75,11 +73,9 @@
         int x2 = x1 + device.getTapRadius();
         int y2 = y1 + device.getTapRadius();
 
-        TestApplication.getStage().getScene().setOnMouseClicked((e) -> {
-            TestLog.format("Mouse clicked: %d, %d: clickCount %d",
-                           (int) e.getScreenX(), (int) e.getScreenY(),
-                           e.getClickCount());
-        });
+        TestApplication.getStage().getScene().setOnMouseClicked((e) -> TestLog.format("Mouse clicked: %d, %d: clickCount %d",
+                       (int) e.getScreenX(), (int) e.getScreenY(),
+                       e.getClickCount()));
         TestLog.reset();
         int p = device.addPoint(x1, y1);
         device.sync();
--- a/tests/system/src/test/java/com/sun/glass/ui/monocle/input/InputDevicePropertyTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/glass/ui/monocle/input/InputDevicePropertyTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -55,26 +55,20 @@
 
     @Test
     public void testTouch() throws Exception {
-        TestRunnable.invokeAndWait(() -> {
-            Assert.assertTrue(Platform.isSupported(ConditionalFeature.INPUT_TOUCH));
-        });
+        TestRunnable.invokeAndWait(() -> Assert.assertTrue(Platform.isSupported(ConditionalFeature.INPUT_TOUCH)));
     }
 
     @Test
     public void testMultiTouch() throws Exception {
-        TestRunnable.invokeAndWait(() -> {
-            Assert.assertEquals(device.getPointCount() > 1,
-                                Platform.isSupported(
-                                        ConditionalFeature.INPUT_MULTITOUCH));
-        });
+        TestRunnable.invokeAndWait(() -> Assert.assertEquals(device.getPointCount() > 1,
+                            Platform.isSupported(
+                                    ConditionalFeature.INPUT_MULTITOUCH)));
     }
 
     @Test
     public void testPointer() throws Exception {
-        TestRunnable.invokeAndWait(() -> {
-            Assert.assertFalse(
-                    Platform.isSupported(ConditionalFeature.INPUT_POINTER));
-        });
+        TestRunnable.invokeAndWait(() -> Assert.assertFalse(
+                Platform.isSupported(ConditionalFeature.INPUT_POINTER)));
     }
 
 }
--- a/tests/system/src/test/java/com/sun/glass/ui/monocle/input/MonocleUInput.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/glass/ui/monocle/input/MonocleUInput.java	Tue Jun 10 14:35:17 2014 -0400
@@ -61,15 +61,13 @@
                    + Integer.toHexString(vendor) + "/"
                    + Integer.toHexString(product) + "/"
                    + Integer.toHexString(version));
-        Application.invokeAndWait(() -> {
-            device = registry.addDevice(
-                    new LinuxInputDevice(capabilities,
-                                         createAbsCapsMap(),
-                                         pipe.source(),
-                                         udevManifest,
-                                         uevent),
-                    "Simulated Linux Input Device");
-        });
+        Application.invokeAndWait(() -> device = registry.addDevice(
+                new LinuxInputDevice(capabilities,
+                                     createAbsCapsMap(),
+                                     pipe.source(),
+                                     udevManifest,
+                                     uevent),
+                "Simulated Linux Input Device"));
     }
 
     protected void openConnection() {
--- a/tests/system/src/test/java/com/sun/glass/ui/monocle/input/RapidTapTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/glass/ui/monocle/input/RapidTapTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -90,7 +90,7 @@
                 while (System.nanoTime() < end) { } // spin
             }
         };
-        Platform.runLater(() -> a.start());
+        Platform.runLater(a::start);
         latch.await();
         try {
             for (int i = 0; i < 20; i++) {
@@ -109,7 +109,7 @@
                 Assert.assertEquals(20, TestLog.countLogContaining("Mouse clicked"));
             }, 10000);
         } finally {
-            Platform.runLater(() -> a.stop());
+            Platform.runLater(a::stop);
         }
     }
 
--- a/tests/system/src/test/java/com/sun/glass/ui/monocle/input/TestApplication.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/glass/ui/monocle/input/TestApplication.java	Tue Jun 10 14:35:17 2014 -0400
@@ -96,9 +96,7 @@
         if (stage == null) {
             ready.acquire();
             UInput.setup();
-            new Thread(() -> {
-                Application.launch(TestApplication.class);
-            }).start();
+            new Thread(() -> Application.launch(TestApplication.class)).start();
             ready.acquire();
             Platform.runLater(() -> {
                 if (isMonocle()) {
@@ -196,46 +194,26 @@
     }
 
     public static void addKeyListeners() throws Exception {
-        getStage().getScene().setOnKeyTyped((e) -> {
-            TestLog.log("Key typed: " + e.getCharacter());
-        });
-        getStage().getScene().setOnKeyPressed((e) -> {
-            TestLog.log("Key pressed: " + e.getCode());
-        });
-        getStage().getScene().setOnKeyReleased((e) -> {
-            TestLog.log("Key released: " + e.getCode());
-        });
+        getStage().getScene().setOnKeyTyped((e) -> TestLog.log("Key typed: " + e.getCharacter()));
+        getStage().getScene().setOnKeyPressed((e) -> TestLog.log("Key pressed: " + e.getCode()));
+        getStage().getScene().setOnKeyReleased((e) -> TestLog.log("Key released: " + e.getCode()));
     }
 
     public static void addMouseListeners() throws Exception {
-        getStage().getScene().setOnMousePressed((e) -> {
-            TestLog.log("Mouse pressed: "
-                    + (int) e.getScreenX() + ", " + (int) e.getScreenY());
-        });
-        getStage().getScene().setOnMouseMoved((e) -> {
-            TestLog.log("Mouse moved: "
-                    + (int) e.getScreenX() + ", " + (int) e.getScreenY());
-        });
-        getStage().getScene().setOnMouseDragged((e) -> {
-            TestLog.log("Mouse dragged: "
-                    + (int) e.getScreenX() + ", " + (int) e.getScreenY());
-        });
-        getStage().getScene().setOnMouseReleased((e) -> {
-            TestLog.log("Mouse released: "
-                    + (int) e.getScreenX() + ", " + (int) e.getScreenY());
-        });
-        getStage().getScene().setOnMouseClicked((e) -> {
-            TestLog.log("Mouse clicked: "
-                    + (int) e.getScreenX() + ", " + (int) e.getScreenY());
-        });
-        getStage().getScene().setOnMouseEntered((e) -> {
-            TestLog.log("Mouse entered: "
-                                + (int) e.getScreenX() + ", " + (int) e.getScreenY());
-        });
-        getStage().getScene().setOnMouseExited((e) -> {
-            TestLog.log("Mouse exited: "
-                                + (int) e.getScreenX() + ", " + (int) e.getScreenY());
-        });
+        getStage().getScene().setOnMousePressed((e) -> TestLog.log("Mouse pressed: "
+                + (int) e.getScreenX() + ", " + (int) e.getScreenY()));
+        getStage().getScene().setOnMouseMoved((e) -> TestLog.log("Mouse moved: "
+                + (int) e.getScreenX() + ", " + (int) e.getScreenY()));
+        getStage().getScene().setOnMouseDragged((e) -> TestLog.log("Mouse dragged: "
+                + (int) e.getScreenX() + ", " + (int) e.getScreenY()));
+        getStage().getScene().setOnMouseReleased((e) -> TestLog.log("Mouse released: "
+                + (int) e.getScreenX() + ", " + (int) e.getScreenY()));
+        getStage().getScene().setOnMouseClicked((e) -> TestLog.log("Mouse clicked: "
+                + (int) e.getScreenX() + ", " + (int) e.getScreenY()));
+        getStage().getScene().setOnMouseEntered((e) -> TestLog.log("Mouse entered: "
+                            + (int) e.getScreenX() + ", " + (int) e.getScreenY()));
+        getStage().getScene().setOnMouseExited((e) -> TestLog.log("Mouse exited: "
+                            + (int) e.getScreenX() + ", " + (int) e.getScreenY()));
     }
 
     public static void addTouchListeners() throws Exception {
@@ -279,77 +257,57 @@
 
     public static void addGestureListeners() throws Exception {
         //Zoom
-        getStage().getScene().setOnZoom((e) -> {
-            TestLog.log("Zoom, factor: " + e.getZoomFactor()
-                    + ", total factor: " + e.getTotalZoomFactor()
-                    + ", inertia value: " + e.isInertia());
-        });
+        getStage().getScene().setOnZoom((e) -> TestLog.log("Zoom, factor: " + e.getZoomFactor()
+                + ", total factor: " + e.getTotalZoomFactor()
+                + ", inertia value: " + e.isInertia()));
 
-        getStage().getScene().setOnZoomStarted((e) -> {
-            TestLog.log("Zoom started, factor: " + e.getZoomFactor()
-                    + ", total factor: " + e.getTotalZoomFactor()
-                    + ", inertia value: " + e.isInertia());
-        });
+        getStage().getScene().setOnZoomStarted((e) -> TestLog.log("Zoom started, factor: " + e.getZoomFactor()
+                + ", total factor: " + e.getTotalZoomFactor()
+                + ", inertia value: " + e.isInertia()));
 
-        getStage().getScene().setOnZoomFinished((e) -> {
-            TestLog.log("Zoom finished, factor: " + e.getZoomFactor()
-                    + ", total factor: " + e.getTotalZoomFactor()
-                    + ", inertia value: " + e.isInertia());
-        });
+        getStage().getScene().setOnZoomFinished((e) -> TestLog.log("Zoom finished, factor: " + e.getZoomFactor()
+                + ", total factor: " + e.getTotalZoomFactor()
+                + ", inertia value: " + e.isInertia()));
 
         //Rotate
-        getStage().getScene().setOnRotate((e) -> {
-            TestLog.log("Rotation, angle: " + Math.round(e.getAngle())
-                    + ", total angle: " + Math.round(e.getTotalAngle())
-                    + ", inertia value: " + e.isInertia());
-        });
+        getStage().getScene().setOnRotate((e) -> TestLog.log("Rotation, angle: " + Math.round(e.getAngle())
+                + ", total angle: " + Math.round(e.getTotalAngle())
+                + ", inertia value: " + e.isInertia()));
 
-        getStage().getScene().setOnRotationStarted((e) -> {
-            TestLog.log("Rotation started, angle: " + Math.round(e.getAngle())
-                    + ", total angle: " + Math.round(e.getTotalAngle())
-                    + ", inertia value: " + e.isInertia());
-        });
+        getStage().getScene().setOnRotationStarted((e) -> TestLog.log("Rotation started, angle: " + Math.round(e.getAngle())
+                + ", total angle: " + Math.round(e.getTotalAngle())
+                + ", inertia value: " + e.isInertia()));
 
-        getStage().getScene().setOnRotationFinished((e) -> {
-            TestLog.log("Rotation finished, angle: " + Math.round(e.getAngle())
-                    + ", total angle: " + Math.round(e.getTotalAngle())
-                    + ", inertia value: " + e.isInertia());
-        });
+        getStage().getScene().setOnRotationFinished((e) -> TestLog.log("Rotation finished, angle: " + Math.round(e.getAngle())
+                + ", total angle: " + Math.round(e.getTotalAngle())
+                + ", inertia value: " + e.isInertia()));
 
         //Scroll
-        getStage().getScene().setOnScroll((e) -> {
-            TestLog.log("Scroll, DeltaX: " + Math.round(e.getDeltaX())
-                    + ", DeltaY: " + Math.round(e.getDeltaY())
-                    + ", totalDeltaX: " + Math.round(e.getTotalDeltaX())
-                    + ", totalDeltaY: " + Math.round(e.getTotalDeltaY())
-                    + ", touch points: " + e.getTouchCount()
-                    + ", inertia value: " + e.isInertia());
-        });
+        getStage().getScene().setOnScroll((e) -> TestLog.log("Scroll, DeltaX: " + Math.round(e.getDeltaX())
+                + ", DeltaY: " + Math.round(e.getDeltaY())
+                + ", totalDeltaX: " + Math.round(e.getTotalDeltaX())
+                + ", totalDeltaY: " + Math.round(e.getTotalDeltaY())
+                + ", touch points: " + e.getTouchCount()
+                + ", inertia value: " + e.isInertia()));
 
-        getStage().getScene().setOnScrollStarted((e) -> {
-            TestLog.log("Scroll started, DeltaX: " + Math.round(e.getDeltaX())
-                    + ", DeltaY: " + Math.round(e.getDeltaY())
-                    + ", totalDeltaX: " + Math.round(e.getTotalDeltaX())
-                    + ", totalDeltaY: " + Math.round(e.getTotalDeltaY())
-                    + ", touch points: " + e.getTouchCount()
-                    + ", inertia value: " + e.isInertia());
-        });
+        getStage().getScene().setOnScrollStarted((e) -> TestLog.log("Scroll started, DeltaX: " + Math.round(e.getDeltaX())
+                + ", DeltaY: " + Math.round(e.getDeltaY())
+                + ", totalDeltaX: " + Math.round(e.getTotalDeltaX())
+                + ", totalDeltaY: " + Math.round(e.getTotalDeltaY())
+                + ", touch points: " + e.getTouchCount()
+                + ", inertia value: " + e.isInertia()));
 
-        getStage().getScene().setOnScrollFinished((e) -> {
-            TestLog.log("Scroll finished, DeltaX: " + Math.round(e.getDeltaX())
-                    + ", DeltaY: " + Math.round(e.getDeltaY())
-                    + ", totalDeltaX: " + Math.round(e.getTotalDeltaX())
-                    + ", totalDeltaY: " + Math.round(e.getTotalDeltaY())
-                    + ", touch points: " + e.getTouchCount()
-                    + ", inertia value: " + e.isInertia());
-        });
+        getStage().getScene().setOnScrollFinished((e) -> TestLog.log("Scroll finished, DeltaX: " + Math.round(e.getDeltaX())
+                + ", DeltaY: " + Math.round(e.getDeltaY())
+                + ", totalDeltaX: " + Math.round(e.getTotalDeltaX())
+                + ", totalDeltaY: " + Math.round(e.getTotalDeltaY())
+                + ", touch points: " + e.getTouchCount()
+                + ", inertia value: " + e.isInertia()));
     }
 
     public static void movePointerTo(final int targetX, final int targetY) throws Exception {
         final Semaphore released = new Semaphore(0);
-        EventHandler<TouchEvent> touchHandler = (e) -> {
-            released.release();
-        };
+        EventHandler<TouchEvent> touchHandler = (e) -> released.release();
         getStage().addEventHandler(TouchEvent.TOUCH_RELEASED, touchHandler);
         final UInput ui = new UInput();
         ui.processLine("OPEN");
--- a/tests/system/src/test/java/com/sun/glass/ui/monocle/input/TouchButtonTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/glass/ui/monocle/input/TouchButtonTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -61,9 +61,7 @@
         button.setId(text);
         button.setLayoutX(x);
         button.setLayoutY(y);
-        button.setOnMousePressed((e) -> {
-            button.requestFocus();
-        });
+        button.setOnMousePressed((e) -> button.requestFocus());
         if (setListeners) {
             button.addEventHandler(MouseEvent.ANY, e ->
                 TestLog.log(e.getEventType().getName() +": " 
--- a/tests/system/src/test/java/com/sun/glass/ui/monocle/input/TouchExceptionTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/glass/ui/monocle/input/TouchExceptionTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -48,9 +48,7 @@
     public void testRuntimeException() throws Exception {
         Platform.runLater(
                 () -> Thread.currentThread()
-                        .setUncaughtExceptionHandler((t, e) -> {
-                            TestLog.log(e.toString());
-                        })
+                        .setUncaughtExceptionHandler((t, e) -> TestLog.log(e.toString()))
         );
         TestApplication.getStage().getScene().addEventHandler(
                 InputEvent.ANY,
--- a/tests/system/src/test/java/com/sun/glass/ui/monocle/input/TouchTestBase.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/glass/ui/monocle/input/TouchTestBase.java	Tue Jun 10 14:35:17 2014 -0400
@@ -84,9 +84,7 @@
         ui = new UInput();
         systemErrFilter = new SystemErrFilter(System.err);
         System.setErr(systemErrFilter);
-        TestRunnable.invokeAndWait(() -> {
-            screen = Screen.getPrimary().getBounds();
-        });
+        TestRunnable.invokeAndWait(() -> screen = Screen.getPrimary().getBounds());
     }
 
     @After
--- a/tests/system/src/test/java/com/sun/javafx/application/ListenerTestCommon.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/javafx/application/ListenerTestCommon.java	Tue Jun 10 14:35:17 2014 -0400
@@ -75,16 +75,10 @@
 
     private void setup() {
         // Start the FX Platform
-        new Thread(new Runnable() {
-            @Override public void run() {
-                PlatformImpl.startup(new Runnable() {
-                    @Override public void run() {
-                        assertTrue(Platform.isFxApplicationThread());
-                        launchLatch.countDown();
-                    }
-                });
-            }
-        }).start();
+        new Thread(() -> PlatformImpl.startup(() -> {
+            assertTrue(Platform.isFxApplicationThread());
+            launchLatch.countDown();
+        })).start();
 
         try {
             if (!launchLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)) {
@@ -133,11 +127,9 @@
         setup();
         assertNotNull(listener);
 
-        Util.runAndWait(new Runnable() {
-            @Override public void run() {
-                assertTrue(Platform.isFxApplicationThread());
-                assertTrue(Platform.isImplicitExit());
-            }
+        Util.runAndWait(() -> {
+            assertTrue(Platform.isFxApplicationThread());
+            assertTrue(Platform.isImplicitExit());
         });
 
         Util.sleep(DELAY);
@@ -170,26 +162,22 @@
         setup();
         assertNotNull(listener);
 
-        Util.runAndWait(new Runnable() {
-            @Override public void run() {
-                assertTrue(Platform.isFxApplicationThread());
-                assertTrue(Platform.isImplicitExit());
-                if (!implicit) {
-                    Platform.setImplicitExit(false);
-                }
-                PlatformImpl.addListener(listener);
+        Util.runAndWait(() -> {
+            assertTrue(Platform.isFxApplicationThread());
+            assertTrue(Platform.isImplicitExit());
+            if (!implicit) {
+                Platform.setImplicitExit(false);
             }
+            PlatformImpl.addListener(listener);
         });
 
         Util.sleep(DELAY);
         assertEquals(1, exitNotification.getCount());
         assertEquals(1, idleNotification.getCount());
 
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                stage = makeStage();
-                stage.show();
-            }
+        Util.runAndWait(() -> {
+            stage = makeStage();
+            stage.show();
         });
 
         Util.sleep(SLEEP_TIME);
@@ -197,17 +185,15 @@
         assertEquals(1, idleNotification.getCount());
 
         final CountDownLatch rDone = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            public void run() {
-                try {
-                    if (throwableType == ThrowableType.EXCEPTION) {
-                        throw new RuntimeException("this exception is expected");
-                    } else if (throwableType == ThrowableType.ERROR) {
-                        throw new InternalError("this error is expected");
-                    }
-                } finally {
-                    rDone.countDown();
+        Platform.runLater(() -> {
+            try {
+                if (throwableType == ThrowableType.EXCEPTION) {
+                    throw new RuntimeException("this exception is expected");
+                } else if (throwableType == ThrowableType.ERROR) {
+                    throw new InternalError("this error is expected");
                 }
+            } finally {
+                rDone.countDown();
             }
         });
 
@@ -221,11 +207,7 @@
                         + throwableType);
         }
 
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                stage.hide();
-            }
-        });
+        Util.runAndWait(stage::hide);
 
         try {
             if (!idleNotification.await(TIMEOUT, TimeUnit.MILLISECONDS)) {
--- a/tests/system/src/test/java/com/sun/javafx/application/RunLaterTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/javafx/application/RunLaterTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -61,11 +61,7 @@
     @BeforeClass
     public static void setupOnce() {
         // Start the Application
-        new Thread(new Runnable() {
-            @Override public void run() {
-                Application.launch(MyApp.class, (String[])null);
-            }
-        }).start();
+        new Thread(() -> Application.launch(MyApp.class, (String[])null)).start();
 
         try {
             if (!launchLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)) {
@@ -91,14 +87,12 @@
         Runnable[] runnables = new Runnable[numRunnables];
         for (int i = 0; i < numRunnables; i++) {
             final int idx = i;
-            runnables[idx] = new Runnable() {
-                @Override public void run() {
-                    if (idx == 0) {
-                        Util.sleep(100);
-                    }
-                    int seq = seqNum.getAndIncrement();
-                    assertEquals(idx, seq);
+            runnables[idx] = () -> {
+                if (idx == 0) {
+                    Util.sleep(100);
                 }
+                int seq = seqNum.getAndIncrement();
+                assertEquals(idx, seq);
             };
         }
         Util.runAndWait(DELAY, runnables);
--- a/tests/system/src/test/java/com/sun/javafx/application/SingleExitCommon.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/javafx/application/SingleExitCommon.java	Tue Jun 10 14:35:17 2014 -0400
@@ -152,15 +152,13 @@
         final Thread testThread = Thread.currentThread();
 
         // Start the Application
-        new Thread(new Runnable() {
-            @Override public void run() {
-                try {
-                    Application.launch(MyApp.class, (String[])null);
-                    latch.countDown();
-                } catch (Throwable th) {
-                    testError[0] = th;
-                    testThread.interrupt();
-                }
+        new Thread(() -> {
+            try {
+                Application.launch(MyApp.class, (String[])null);
+                latch.countDown();
+            } catch (Throwable th) {
+                testError[0] = th;
+                testThread.interrupt();
             }
         }).start();
 
@@ -174,17 +172,15 @@
             }
 
             final CountDownLatch rDone = new CountDownLatch(1);
-            Platform.runLater(new Runnable() {
-                public void run() {
-                    try {
-                        if (throwableType == ThrowableType.EXCEPTION) {
-                            throw new RuntimeException("this exception is expected");
-                        } else if (throwableType == ThrowableType.ERROR) {
-                            throw new InternalError("this error is expected");
-                        }
-                    } finally {
-                        rDone.countDown();
+            Platform.runLater(() -> {
+                try {
+                    if (throwableType == ThrowableType.EXCEPTION) {
+                        throw new RuntimeException("this exception is expected");
+                    } else if (throwableType == ThrowableType.ERROR) {
+                        throw new InternalError("this error is expected");
                     }
+                } finally {
+                    rDone.countDown();
                 }
             });
 
@@ -195,11 +191,7 @@
 
             if (stageShown) {
                 Thread.sleep(SLEEP_TIME);
-                Util.runAndWait(new Runnable() {
-                    public void run() {
-                        myApp.primaryStage.hide();
-                    }
-                });
+                Util.runAndWait(myApp.primaryStage::hide);
             }
 
             final CountDownLatch exitLatch = PlatformImpl.test_getPlatformExitLatch();
--- a/tests/system/src/test/java/com/sun/javafx/application/SwingExitCommon.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/javafx/application/SwingExitCommon.java	Tue Jun 10 14:35:17 2014 -0400
@@ -81,13 +81,11 @@
         frame.getContentPane().add(fxPanel, BorderLayout.CENTER);
 
         // Create scene and add it to the panel
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                Group root = new Group();
-                Scene scene = new Scene(root);
-                scene.setFill(Color.LIGHTYELLOW);
-                fxPanel.setScene(scene);
-            }
+        Util.runAndWait(() -> {
+            Group root = new Group();
+            Scene scene = new Scene(root);
+            scene.setFill(Color.LIGHTYELLOW);
+            fxPanel.setScene(scene);
         });
 
         // show frame
@@ -108,14 +106,12 @@
         final Thread testThread = Thread.currentThread();
 
         // Start the Application
-        SwingUtilities.invokeLater(new Runnable() {
-            public void run() {
-                try {
-                    init();
-                } catch (Throwable th) {
-                    testError[0] = th;
-                    testThread.interrupt();
-                }
+        SwingUtilities.invokeLater(() -> {
+            try {
+                init();
+            } catch (Throwable th) {
+                testError[0] = th;
+                testThread.interrupt();
             }
         });
 
@@ -126,11 +122,9 @@
 
             Thread.sleep(SLEEP_TIME);
             try {
-                SwingUtilities.invokeAndWait(new Runnable() {
-                    public void run() {
-                        frame.setVisible(false);
-                        frame.dispose();
-                    }
+                SwingUtilities.invokeAndWait(() -> {
+                    frame.setVisible(false);
+                    frame.dispose();
                 });
             }
             catch (InvocationTargetException ex) {
--- a/tests/system/src/test/java/com/sun/javafx/application/SwingNoExit.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/javafx/application/SwingNoExit.java	Tue Jun 10 14:35:17 2014 -0400
@@ -68,13 +68,11 @@
         frame.getContentPane().add(fxPanel, BorderLayout.CENTER);
 
         // Create scene and add it to the panel
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                Group root = new Group();
-                Scene scene = new Scene(root);
-                scene.setFill(Color.LIGHTYELLOW);
-                fxPanel.setScene(scene);
-            }
+        Util.runAndWait(() -> {
+            Group root = new Group();
+            Scene scene = new Scene(root);
+            scene.setFill(Color.LIGHTYELLOW);
+            fxPanel.setScene(scene);
         });
 
         // show frame
@@ -88,14 +86,12 @@
         final AtomicReference<Throwable> error = new AtomicReference<>(null);
 
         final CountDownLatch initLatch = new CountDownLatch(1);
-        SwingUtilities.invokeLater(new Runnable() {
-            public void run() {
-                try {
-                    init();
-                    initLatch.countDown();
-                } catch (Throwable th) {
-                    error.set(th);
-                }
+        SwingUtilities.invokeLater(() -> {
+            try {
+                init();
+                initLatch.countDown();
+            } catch (Throwable th) {
+                error.set(th);
             }
         });
         if (!initLatch.await(Util.TIMEOUT, TimeUnit.MILLISECONDS)) {
@@ -107,11 +103,9 @@
         }
 
         final CountDownLatch runAndWait = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            public void run() {
-                Platform.exit();
-                runAndWait.countDown();
-            }
+        Platform.runLater(() -> {
+            Platform.exit();
+            runAndWait.countDown();
         });
         if (!runAndWait.await(Util.TIMEOUT, TimeUnit.MILLISECONDS)) {
             throw new AssertionFailedError("Timeout waiting for Platform.exit()");
@@ -124,11 +118,9 @@
                             1, exitLatch.getCount());
 
         try {
-            SwingUtilities.invokeAndWait(new Runnable() {
-                public void run() {
-                    frame.setVisible(false);
-                    frame.dispose();
-                }
+            SwingUtilities.invokeAndWait(() -> {
+                frame.setVisible(false);
+                frame.dispose();
             });
         }
         catch (InvocationTargetException ex) {
--- a/tests/system/src/test/java/com/sun/javafx/application/TaskbarAppCommon.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/javafx/application/TaskbarAppCommon.java	Tue Jun 10 14:35:17 2014 -0400
@@ -46,16 +46,10 @@
 
     private void startup() {
         // Start the FX Platform
-        new Thread(new Runnable() {
-            @Override public void run() {
-                PlatformImpl.startup(new Runnable() {
-                    @Override public void run() {
-                        assertTrue(Platform.isFxApplicationThread());
-                        launchLatch.countDown();
-                    }
-                });
-            }
-        }).start();
+        new Thread(() -> PlatformImpl.startup(() -> {
+            assertTrue(Platform.isFxApplicationThread());
+            launchLatch.countDown();
+        })).start();
 
         try {
             if (!launchLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)) {
--- a/tests/system/src/test/java/com/sun/javafx/sg/prism/RT36296Test.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/javafx/sg/prism/RT36296Test.java	Tue Jun 10 14:35:17 2014 -0400
@@ -68,11 +68,7 @@
     @BeforeClass
     public static void setupOnce() {
         // Start the Application
-        new Thread(new Runnable() {
-            @Override public void run() {
-                Application.launch(MyApp.class, (String[])null);
-            }
-        }).start();
+        new Thread(() -> Application.launch(MyApp.class, (String[])null)).start();
 
         try {
             if (!launchLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)) {
--- a/tests/system/src/test/java/com/sun/javafx/tk/quantum/CloseWindowTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/javafx/tk/quantum/CloseWindowTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -56,12 +56,9 @@
             t.setHeight(100);
             t.show();
 
-            Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
-                @Override
-                public void uncaughtException(Thread t, Throwable e) {
-                    System.out.println("e = " + e);
-                    exception = e;
-                }
+            Thread.currentThread().setUncaughtExceptionHandler((t2, e) -> {
+                System.out.println("e = " + e);
+                exception = e;
             });
 
             startupLatch.countDown();
@@ -70,48 +67,32 @@
 
     @BeforeClass
     public static void setup() throws Exception {
-        new Thread(new Runnable() {
-            @Override
-            public void run() {
-                Application.launch(TestApp.class);
-            }
-        }).start();
+        new Thread(() -> Application.launch(TestApp.class)).start();
         startupLatch.await();
     }
 
     @AfterClass
     public static void shutdown() {
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                primaryStage.hide();
-            }
-        });
+        Platform.runLater(primaryStage::hide);
     }
 
     @Test
     public void test1() throws Throwable {
         final CountDownLatch l = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                final Stage t = new Stage();
-                t.setScene(new Scene(new Group()));
-                t.show();
-                Platform.runLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        try {
-                            t.hide();
-                            t.hide();
-                        } catch (Throwable z) {
-                            exception = z;
-                        } finally {
-                            l.countDown();
-                        }
-                    }
-                });
-            }
+        Platform.runLater(() -> {
+            final Stage t = new Stage();
+            t.setScene(new Scene(new Group()));
+            t.show();
+            Platform.runLater(() -> {
+                try {
+                    t.hide();
+                    t.hide();
+                } catch (Throwable z) {
+                    exception = z;
+                } finally {
+                    l.countDown();
+                }
+            });
         });
         l.await();
         if (exception != null) {
@@ -122,30 +103,24 @@
     @Test
     public void test2() throws Throwable {
         final CountDownLatch l = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                final Stage t = new Stage();
-                t.setScene(new Scene(new Group()));
-                t.show();
-                final Stage p = new Stage();
-                p.initOwner(t);
-                p.setScene(new Scene(new Group()));
-                p.show();
-                Platform.runLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        try {
-                            t.hide();
-                            p.hide();
-                        } catch (Throwable z) {
-                            exception = z;
-                        } finally {
-                            l.countDown();
-                        }
-                    }
-                });
-            }
+        Platform.runLater(() -> {
+            final Stage t = new Stage();
+            t.setScene(new Scene(new Group()));
+            t.show();
+            final Stage p = new Stage();
+            p.initOwner(t);
+            p.setScene(new Scene(new Group()));
+            p.show();
+            Platform.runLater(() -> {
+                try {
+                    t.hide();
+                    p.hide();
+                } catch (Throwable z) {
+                    exception = z;
+                } finally {
+                    l.countDown();
+                }
+            });
         });
         l.await();
         if (exception != null) {
@@ -156,31 +131,25 @@
     @Test
     public void test3() throws Throwable {
         final CountDownLatch l = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                final Stage t = new Stage();
-                t.setScene(new Scene(new Group()));
-                t.show();
-                final Stage p = new Stage();
-                p.initOwner(t);
-                p.initModality(Modality.WINDOW_MODAL);
-                p.setScene(new Scene(new Group()));
-                p.show();
-                Platform.runLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        try {
-                            t.hide();
-                            p.hide();
-                        } catch (Throwable z) {
-                            exception = z;
-                        } finally {
-                            l.countDown();
-                        }
-                    }
-                });
-            }
+        Platform.runLater(() -> {
+            final Stage t = new Stage();
+            t.setScene(new Scene(new Group()));
+            t.show();
+            final Stage p = new Stage();
+            p.initOwner(t);
+            p.initModality(Modality.WINDOW_MODAL);
+            p.setScene(new Scene(new Group()));
+            p.show();
+            Platform.runLater(() -> {
+                try {
+                    t.hide();
+                    p.hide();
+                } catch (Throwable z) {
+                    exception = z;
+                } finally {
+                    l.countDown();
+                }
+            });
         });
         l.await();
         if (exception != null) {
@@ -191,35 +160,29 @@
     @Test
     public void test4() throws Throwable {
         final CountDownLatch l = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                final Stage t = new Stage();
-                t.setScene(new Scene(new Group()));
-                t.show();
-                final Stage p = new Stage();
-                p.initOwner(t);
-                p.setScene(new Scene(new Group()));
-                p.show();
-                final Stage s = new Stage();
-                s.initOwner(p);
-                s.setScene(new Scene(new Group()));
-                p.show();
-                Platform.runLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        try {
-                            t.hide();
-                            s.hide();
-                            p.hide();
-                        } catch (Throwable z) {
-                            exception = z;
-                        } finally {
-                            l.countDown();
-                        }
-                    }
-                });
-            }
+        Platform.runLater(() -> {
+            final Stage t = new Stage();
+            t.setScene(new Scene(new Group()));
+            t.show();
+            final Stage p = new Stage();
+            p.initOwner(t);
+            p.setScene(new Scene(new Group()));
+            p.show();
+            final Stage s = new Stage();
+            s.initOwner(p);
+            s.setScene(new Scene(new Group()));
+            p.show();
+            Platform.runLater(() -> {
+                try {
+                    t.hide();
+                    s.hide();
+                    p.hide();
+                } catch (Throwable z) {
+                    exception = z;
+                } finally {
+                    l.countDown();
+                }
+            });
         });
         l.await();
         if (exception != null) {
--- a/tests/system/src/test/java/com/sun/javafx/tk/quantum/WindowSceneInitDisposeTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/com/sun/javafx/tk/quantum/WindowSceneInitDisposeTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -56,13 +56,10 @@
             t.setHeight(100);
             t.show();
 
-            Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
-                @Override
-                public void uncaughtException(Thread t, Throwable e) {
-                    System.out.println("Exception caught: " + e);
-                    System.out.flush();
-                    exception = e;
-                }
+            Thread.currentThread().setUncaughtExceptionHandler((t2, e) -> {
+                System.out.println("Exception caught: " + e);
+                System.out.flush();
+                exception = e;
             });
 
             startupLatch.countDown();
@@ -71,45 +68,29 @@
 
     @BeforeClass
     public static void setup() throws Exception {
-        new Thread(new Runnable() {
-            @Override
-            public void run() {
-                Application.launch(TestApp.class);
-            }
-        }).start();
+        new Thread(() -> Application.launch(TestApp.class)).start();
         startupLatch.await();
     }
 
     @AfterClass
     public static void shutdown() {
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                primaryStage.hide();
-            }
-        });
+        Platform.runLater(primaryStage::hide);
     }
 
     @Test
     public void test1() throws Throwable {
         final CountDownLatch l = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                final Stage t = new Stage();
-                t.setScene(new Scene(new Group()));
-                t.show();
-                Platform.runLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        try {
-                            t.hide();
-                        } finally {
-                            l.countDown();
-                        }
-                    }
-                });
-            }
+        Platform.runLater(() -> {
+            final Stage t = new Stage();
+            t.setScene(new Scene(new Group()));
+            t.show();
+            Platform.runLater(() -> {
+                try {
+                    t.hide();
+                } finally {
+                    l.countDown();
+                }
+            });
         });
         l.await();
         if (exception != null) {
@@ -120,23 +101,17 @@
     @Test
     public void test2() throws Throwable {
         final CountDownLatch l = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                final Stage t = new Stage();
-                t.show();
-                t.setScene(new Scene(new Group()));
-                Platform.runLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        try {
-                            t.hide();
-                        } finally {
-                            l.countDown();
-                        }
-                    }
-                });
-            }
+        Platform.runLater(() -> {
+            final Stage t = new Stage();
+            t.show();
+            t.setScene(new Scene(new Group()));
+            Platform.runLater(() -> {
+                try {
+                    t.hide();
+                } finally {
+                    l.countDown();
+                }
+            });
         });
         l.await();
         if (exception != null) {
@@ -147,22 +122,16 @@
     @Test
     public void test3() throws Throwable {
         final CountDownLatch l = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                final Stage t = new Stage();
-                t.show();
-                Platform.runLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        try {
-                            t.hide();
-                        } finally {
-                            l.countDown();
-                        }
-                    }
-                });
-            }
+        Platform.runLater(() -> {
+            final Stage t = new Stage();
+            t.show();
+            Platform.runLater(() -> {
+                try {
+                    t.hide();
+                } finally {
+                    l.countDown();
+                }
+            });
         });
         l.await();
         if (exception != null) {
@@ -173,24 +142,18 @@
     @Test
     public void test4() throws Throwable {
         final CountDownLatch l = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                final Stage t = new Stage();
-                t.setScene(new Scene(new Group()));
-                t.show();
-                Platform.runLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        try {
-                            t.setScene(null);
-                            t.hide();
-                        } finally {
-                            l.countDown();
-                        }
-                    }
-                });
-            }
+        Platform.runLater(() -> {
+            final Stage t = new Stage();
+            t.setScene(new Scene(new Group()));
+            t.show();
+            Platform.runLater(() -> {
+                try {
+                    t.setScene(null);
+                    t.hide();
+                } finally {
+                    l.countDown();
+                }
+            });
         });
         l.await();
         if (exception != null) {
@@ -201,24 +164,18 @@
     @Test
     public void test5() throws Throwable {
         final CountDownLatch l = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                final Stage t = new Stage();
-                t.setScene(new Scene(new Group()));
-                t.show();
-                Platform.runLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        try {
-                            t.hide();
-                            t.setScene(null);
-                        } finally {
-                            l.countDown();
-                        }
-                    }
-                });
-            }
+        Platform.runLater(() -> {
+            final Stage t = new Stage();
+            t.setScene(new Scene(new Group()));
+            t.show();
+            Platform.runLater(() -> {
+                try {
+                    t.hide();
+                    t.setScene(null);
+                } finally {
+                    l.countDown();
+                }
+            });
         });
         l.await();
         if (exception != null) {
@@ -229,24 +186,18 @@
     @Test
     public void test6() throws Throwable {
         final CountDownLatch l = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                final Stage t = new Stage();
-                t.setScene(new Scene(new Group()));
-                t.show();
-                Platform.runLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        try {
-                            t.setScene(new Scene(new Group()));
-                            t.hide();
-                        } finally {
-                            l.countDown();
-                        }
-                    }
-                });
-            }
+        Platform.runLater(() -> {
+            final Stage t = new Stage();
+            t.setScene(new Scene(new Group()));
+            t.show();
+            Platform.runLater(() -> {
+                try {
+                    t.setScene(new Scene(new Group()));
+                    t.hide();
+                } finally {
+                    l.countDown();
+                }
+            });
         });
         l.await();
         if (exception != null) {
@@ -257,28 +208,22 @@
     @Test
     public void test7() throws Throwable {
         final CountDownLatch l = new CountDownLatch(1);
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                final Stage t = new Stage();
-                final Scene s = new Scene(new Group());
-                t.setScene(s);
-                t.show();
-                final Stage p = new Stage();
-                p.show();
-                Platform.runLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        try {
-                            p.setScene(s);
-                            p.hide();
-                            t.hide();
-                        } finally {
-                            l.countDown();
-                        }
-                    }
-                });
-            }
+        Platform.runLater(() -> {
+            final Stage t = new Stage();
+            final Scene s = new Scene(new Group());
+            t.setScene(s);
+            t.show();
+            final Stage p = new Stage();
+            p.show();
+            Platform.runLater(() -> {
+                try {
+                    p.setScene(s);
+                    p.hide();
+                    t.hide();
+                } finally {
+                    l.countDown();
+                }
+            });
         });
         l.await();
         if (exception != null) {
--- a/tests/system/src/test/java/helloworld/RectangleTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/helloworld/RectangleTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -48,20 +48,16 @@
         final int WIDTH = 400;
         final int HEIGHT = 300;
 
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                testStage = getStage();
-                testScene = new Scene(new Group(), WIDTH, HEIGHT);
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+        runAndWait(() -> {
+            testStage = getStage();
+            testScene = new Scene(new Group(), WIDTH, HEIGHT);
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                Color color = getColor(testScene, WIDTH / 2, HEIGHT / 2);
-                assertColorEquals(Color.WHITE, color, TOLERANCE);
-            }
+        runAndWait(() -> {
+            Color color = getColor(testScene, WIDTH / 2, HEIGHT / 2);
+            assertColorEquals(Color.WHITE, color, TOLERANCE);
         });
     }
 
@@ -70,21 +66,17 @@
         final int WIDTH = 400;
         final int HEIGHT = 300;
 
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                testStage = getStage();
-                testScene = new Scene(new Group(), WIDTH, HEIGHT);
-                testScene.setFill(Color.CORNFLOWERBLUE);
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+        runAndWait(() -> {
+            testStage = getStage();
+            testScene = new Scene(new Group(), WIDTH, HEIGHT);
+            testScene.setFill(Color.CORNFLOWERBLUE);
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                Color color = getColor(testScene, WIDTH / 2, HEIGHT / 2);
-                assertColorEquals(Color.CORNFLOWERBLUE, color, TOLERANCE);
-            }
+        runAndWait(() -> {
+            Color color = getColor(testScene, WIDTH / 2, HEIGHT / 2);
+            assertColorEquals(Color.CORNFLOWERBLUE, color, TOLERANCE);
         });
     }
 
@@ -98,29 +90,25 @@
         final int RECT_H = 60;
         final int OFFSET = 10;
 
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                Rectangle rect = new Rectangle(RECT_X, RECT_Y, RECT_W, RECT_H);
-                rect.setFill(Color.ORANGE);
-                Group root = new Group(rect);
-                testScene = new Scene(root, WIDTH, HEIGHT);
-                testScene.setFill(Color.PALEGREEN);
+        runAndWait(() -> {
+            Rectangle rect = new Rectangle(RECT_X, RECT_Y, RECT_W, RECT_H);
+            rect.setFill(Color.ORANGE);
+            Group root = new Group(rect);
+            testScene = new Scene(root, WIDTH, HEIGHT);
+            testScene.setFill(Color.PALEGREEN);
 
-                testStage = getStage();
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            testStage = getStage();
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                Color color = getColor(testScene, RECT_X - OFFSET, RECT_Y - OFFSET);
-                assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
-                color = getColor(testScene, RECT_X + RECT_W + OFFSET, RECT_Y + RECT_H + OFFSET);
-                assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
-                color = getColor(testScene, RECT_X + (RECT_W / 2), RECT_Y + (RECT_H / 2));
-                assertColorEquals(Color.ORANGE, color, TOLERANCE);
-            }
+        runAndWait(() -> {
+            Color color = getColor(testScene, RECT_X - OFFSET, RECT_Y - OFFSET);
+            assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
+            color = getColor(testScene, RECT_X + RECT_W + OFFSET, RECT_Y + RECT_H + OFFSET);
+            assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
+            color = getColor(testScene, RECT_X + (RECT_W / 2), RECT_Y + (RECT_H / 2));
+            assertColorEquals(Color.ORANGE, color, TOLERANCE);
         });
     }
 
@@ -134,48 +122,40 @@
         final int RECT_H = 60;
         final int OFFSET = 10;
 
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                Group root = new Group();
-                testScene = new Scene(root, WIDTH, HEIGHT);
-                testScene.setFill(Color.PALEGREEN);
+        runAndWait(() -> {
+            Group root = new Group();
+            testScene = new Scene(root, WIDTH, HEIGHT);
+            testScene.setFill(Color.PALEGREEN);
 
-                testStage = getStage();
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            testStage = getStage();
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                Color color = getColor(testScene, RECT_X - OFFSET, RECT_Y - OFFSET);
-                assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
-                color = getColor(testScene, RECT_X + RECT_W + OFFSET, RECT_Y + RECT_H + OFFSET);
-                assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
-                color = getColor(testScene, RECT_X + (RECT_W / 2), RECT_Y + (RECT_H / 2));
-                assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
-            }
+        runAndWait(() -> {
+            Color color = getColor(testScene, RECT_X - OFFSET, RECT_Y - OFFSET);
+            assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
+            color = getColor(testScene, RECT_X + RECT_W + OFFSET, RECT_Y + RECT_H + OFFSET);
+            assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
+            color = getColor(testScene, RECT_X + (RECT_W / 2), RECT_Y + (RECT_H / 2));
+            assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
         });
 
         // Now add a rectangle
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                Rectangle rect = new Rectangle(RECT_X, RECT_Y, RECT_W, RECT_H);
-                rect.setFill(Color.ORANGE);
-                Group root = (Group)testScene.getRoot();
-                root.getChildren().add(rect);
-            }
+        runAndWait(() -> {
+            Rectangle rect = new Rectangle(RECT_X, RECT_Y, RECT_W, RECT_H);
+            rect.setFill(Color.ORANGE);
+            Group root = (Group)testScene.getRoot();
+            root.getChildren().add(rect);
         });
         waitNextFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                Color color = getColor(testScene, RECT_X - OFFSET, RECT_Y - OFFSET);
-                assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
-                color = getColor(testScene, RECT_X + RECT_W + OFFSET, RECT_Y + RECT_H + OFFSET);
-                assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
-                color = getColor(testScene, RECT_X + (RECT_W / 2), RECT_Y + (RECT_H / 2));
-                assertColorEquals(Color.ORANGE, color, TOLERANCE);
-            }
+        runAndWait(() -> {
+            Color color = getColor(testScene, RECT_X - OFFSET, RECT_Y - OFFSET);
+            assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
+            color = getColor(testScene, RECT_X + RECT_W + OFFSET, RECT_Y + RECT_H + OFFSET);
+            assertColorEquals(Color.PALEGREEN, color, TOLERANCE);
+            color = getColor(testScene, RECT_X + (RECT_W / 2), RECT_Y + (RECT_H / 2));
+            assertColorEquals(Color.ORANGE, color, TOLERANCE);
         });
     }
 
--- a/tests/system/src/test/java/javafx/embed/swing/RT23603Test.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/javafx/embed/swing/RT23603Test.java	Tue Jun 10 14:35:17 2014 -0400
@@ -25,7 +25,6 @@
 
 package javafx.embed.swing;
 
-import com.sun.javafx.tk.TKPulseListener;
 import javafx.application.Platform;
 import javafx.scene.Scene;
 import javafx.scene.layout.Region;
@@ -36,15 +35,18 @@
 import java.awt.Point;
 import java.awt.Robot;
 import java.awt.Toolkit;
+
 import javax.swing.JFrame;
 import javax.swing.SwingUtilities;
+
 import sun.awt.SunToolkit;
 
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
+
 import javafx.animation.AnimationTimer;
+import junit.framework.Assert;
 
-import junit.framework.Assert;
 import org.junit.Test;
 import org.junit.Ignore;
 
@@ -58,12 +60,7 @@
 
     @Test
     public void test() {
-        SwingUtilities.invokeLater(new Runnable() {
-            @Override
-            public void run() {
-                initAndShowGUI();
-            }
-        });
+        SwingUtilities.invokeLater(this::initAndShowGUI);
 
         //
         // wait for frame to be set visible and jfxpanel to be installed
@@ -77,12 +74,7 @@
 
         // 3 pulses should guarantee the scene is rendered
         final CountDownLatch l2 = new CountDownLatch(3);
-        com.sun.javafx.tk.Toolkit.getToolkit().addSceneTkPulseListener(new TKPulseListener() {
-            @Override
-            public void pulse() {
-                l2.countDown();
-            }
-        });
+        com.sun.javafx.tk.Toolkit.getToolkit().addSceneTkPulseListener(l2::countDown);
 
         //
         // wait for jfxpanel to be rendered
@@ -118,21 +110,18 @@
 
         final JFXPanel fxPanel = new JFXPanel();
 
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                Region rgn = new Region();
-                Scene scene = new Scene(rgn);
-                rgn.setStyle("-fx-background-color: #00ff00;");
-                fxPanel.setScene(scene);
+        Platform.runLater(() -> {
+            Region rgn = new Region();
+            Scene scene = new Scene(rgn);
+            rgn.setStyle("-fx-background-color: #00ff00;");
+            fxPanel.setScene(scene);
 
-                // start constant pulse activity
-                new AnimationTimer() {
-                    @Override public void handle(long l) {}
-                }.start();
+            // start constant pulse activity
+            new AnimationTimer() {
+                @Override public void handle(long l) {}
+            }.start();
 
-                l1.countDown(); // jfxpanel is installed
-            }
+            l1.countDown(); // jfxpanel is installed
         });
 
         frame.getContentPane().setBackground(java.awt.Color.RED);
--- a/tests/system/src/test/java/javafx/embed/swing/RT30650GUI.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/javafx/embed/swing/RT30650GUI.java	Tue Jun 10 14:35:17 2014 -0400
@@ -87,38 +87,22 @@
         stage.setTitle("RT-30650");
         stage.show();
         
-        SwingUtilities.invokeLater(new Runnable() {
-            @Override
-            public void run() {
-                JPanel panel = new JPanel();
-                panel.setBackground(Color.RED);
-                swingNode.setContent(panel);
-                
-                Platform.runLater(new Runnable() {
-                    @Override public void run() {
-                        pulseListener = new TKPulseListener() {
-                            @Override
-                            public void pulse() {
-                                if (--pulseCount == 0) {
-                                    SwingUtilities.invokeLater(new Runnable() {
-                                        @Override
-                                        public void run() {
-                                            passed = testColor(stage);
-                                            Platform.runLater(new Runnable() {
-                                                @Override
-                                                public void run() {
-                                                    stage.close();
-                                                }
-                                            });
-                                        }
-                                    });
-                                }
-                            }
-                        };
-                        com.sun.javafx.tk.Toolkit.getToolkit().addSceneTkPulseListener(pulseListener);
+        SwingUtilities.invokeLater(() -> {
+            JPanel panel = new JPanel();
+            panel.setBackground(Color.RED);
+            swingNode.setContent(panel);
+            
+            Platform.runLater(() -> {
+                pulseListener = () -> {
+                    if (--pulseCount == 0) {
+                        SwingUtilities.invokeLater(() -> {
+                            passed = testColor(stage);
+                            Platform.runLater(stage::close);
+                        });
                     }
-                });
-            }
+                };
+                com.sun.javafx.tk.Toolkit.getToolkit().addSceneTkPulseListener(pulseListener);
+            });
         });        
     }
     
--- a/tests/system/src/test/java/javafx/scene/PhongMaterialTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/javafx/scene/PhongMaterialTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -112,11 +112,7 @@
         System.setProperty("prism.order", "es2");
 
         // Start the Application
-        new Thread(new Runnable() {
-            @Override public void run() {
-                Application.launch(MyApp.class, (String[])null);
-            }
-        }).start();
+        new Thread(() -> Application.launch(MyApp.class, (String[])null)).start();
 
         try {
             if (!launchLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)) {
@@ -140,18 +136,14 @@
     private RuntimeException exception = null;
 
     private void runAndWait(final Runnable r) {
-        PlatformImpl.runAndWait(new Runnable() {
-
-            public void run() {
-                try {
-                    r.run();
-                } catch (RuntimeException ex) {
-                    exception = ex;
-                } catch (Error err) {
-                    error = err;
-                }
+        PlatformImpl.runAndWait(() -> {
+            try {
+                r.run();
+            } catch (RuntimeException ex) {
+                exception = ex;
+            } catch (Error err) {
+                error = err;
             }
-
         });
 
         if (error != null) {
@@ -182,29 +174,25 @@
     public void testDefaultPhongMaterial() {
 
 
-        runAndWait(new Runnable() {
-            public void run() {
-                testMat = new PhongMaterial();
-                shape = new Sphere();
-                shape.setMaterial(testMat);
-                Group root = (Group) myApp.scene.getRoot();
-                root.getChildren().add(shape);
-            }
+        runAndWait(() -> {
+            testMat = new PhongMaterial();
+            shape = new Sphere();
+            shape.setMaterial(testMat);
+            Group root = (Group) myApp.scene.getRoot();
+            root.getChildren().add(shape);
         });
 
         //TODO: should just wait for pulse
         sleep(SLEEP_TIME);
 
-        runAndWait(new Runnable() {
-            public void run() {
-                final NGShape3D peer = shape.impl_getPeer();
-                final NGPhongMaterial phongMaterial = NGHelper.getMaterial(peer);
-                com.sun.prism.PhongMaterial tmp = NGHelper.createMaterial(phongMaterial);
-                if (com.sun.prism.es2.ES2Pipeline.class.equals(pipelineClass)) {
-                    ES2Helper.checkMaterial(testMat, tmp);
-                }
+        runAndWait(() -> {
+            final NGShape3D peer = shape.impl_getPeer();
+            final NGPhongMaterial phongMaterial = NGHelper.getMaterial(peer);
+            com.sun.prism.PhongMaterial tmp = NGHelper.createMaterial(phongMaterial);
+            if (com.sun.prism.es2.ES2Pipeline.class.equals(pipelineClass)) {
+                ES2Helper.checkMaterial(testMat, tmp);
+            }
 
-            }
         });
 
     }
--- a/tests/system/src/test/java/javafx/scene/Snapshot1Test.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/javafx/scene/Snapshot1Test.java	Tue Jun 10 14:35:17 2014 -0400
@@ -110,11 +110,7 @@
     public void testSnapshotSceneImmediateWrongThread() {
         assertFalse(Platform.isFxApplicationThread());
 
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                tmpScene = new Scene(new Group(), 200, 100);
-            }
-        });
+        Util.runAndWait(() -> tmpScene = new Scene(new Group(), 200, 100));
 
         // Should throw IllegalStateException
         tmpScene.snapshot(null);
@@ -126,17 +122,11 @@
     public void testSnapshotSceneDeferredWrongThread() {
         assertFalse(Platform.isFxApplicationThread());
 
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                tmpScene = new Scene(new Group(), 200, 100);
-            }
-        });
+        Util.runAndWait(() -> tmpScene = new Scene(new Group(), 200, 100));
 
         // Should throw IllegalStateException
-        tmpScene.snapshot(new Callback<SnapshotResult, Void>() {
-            public Void call(SnapshotResult p) {
-                throw new AssertionFailedError("Should never get here");
-            }
+        tmpScene.snapshot(p -> {
+            throw new AssertionFailedError("Should never get here");
         }, null);
     }
 
@@ -161,22 +151,18 @@
         tmpNode = new Rectangle(10, 10);
 
         // Should throw IllegalStateException
-        tmpNode.snapshot(new Callback<SnapshotResult, Void>() {
-            public Void call(SnapshotResult p) {
-                throw new AssertionFailedError("Should never get here");
-            }
+        tmpNode.snapshot(p -> {
+            throw new AssertionFailedError("Should never get here");
         }, null, null);
     }
 
     // Test immediate snapshot
     @Test
     public void testSceneImmediate() {
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                tmpScene = new Scene(new Group(), 200, 100);
-                WritableImage img = tmpScene.snapshot(null);
-                assertNotNull(img);
-            }
+        Util.runAndWait(() -> {
+            tmpScene = new Scene(new Group(), 200, 100);
+            WritableImage img = tmpScene.snapshot(null);
+            assertNotNull(img);
         });
     }
 
@@ -185,23 +171,19 @@
     public void testSceneCallback() {
         final CountDownLatch latch = new CountDownLatch(1);
 
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                tmpScene = new Scene(new Group(), 200, 100);
+        Util.runAndWait(() -> {
+            tmpScene = new Scene(new Group(), 200, 100);
 
-                Callback<SnapshotResult, Void> cb = new Callback<SnapshotResult, Void>() {
-                    @Override public Void call(SnapshotResult param) {
-                        assertNotNull(param);
+            Callback<SnapshotResult, Void> cb = param -> {
+                assertNotNull(param);
 
-                        latch.countDown();
-                        return null;
-                    }
-                };
+                latch.countDown();
+                return null;
+            };
 
-                tmpScene.snapshot(cb, null);
-                Util.sleep(SLEEP_TIME);
-                assertEquals(1, latch.getCount());
-            }
+            tmpScene.snapshot(cb, null);
+            Util.sleep(SLEEP_TIME);
+            assertEquals(1, latch.getCount());
         });
 
         try {
@@ -299,23 +281,19 @@
     // Test deferred snapshot with null callback (should throw NPE)
     @Test (expected=NullPointerException.class)
     public void testNullSceneCallback() {
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                tmpScene = new Scene(new Group(), 200, 100);
-                tmpScene.snapshot(null, null);
-            }
+        Util.runAndWait(() -> {
+            tmpScene = new Scene(new Group(), 200, 100);
+            tmpScene.snapshot(null, null);
         });
     }
 
     // Test immediate snapshot
     @Test
     public void testNodeImmediate() {
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                tmpNode = new Rectangle(10, 10);
-                WritableImage img = tmpNode.snapshot(null, null);
-                assertNotNull(img);
-            }
+        Util.runAndWait(() -> {
+            tmpNode = new Rectangle(10, 10);
+            WritableImage img = tmpNode.snapshot(null, null);
+            assertNotNull(img);
         });
     }
 
@@ -324,23 +302,19 @@
     public void testNodeCallback() {
         final CountDownLatch latch = new CountDownLatch(1);
 
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                tmpNode = new Rectangle(10, 10);
+        Util.runAndWait(() -> {
+            tmpNode = new Rectangle(10, 10);
 
-                Callback<SnapshotResult, Void> cb = new Callback<SnapshotResult, Void>() {
-                    @Override public Void call(SnapshotResult param) {
-                        assertNotNull(param);
+            Callback<SnapshotResult, Void> cb = param -> {
+                assertNotNull(param);
 
-                        latch.countDown();
-                        return null;
-                    }
-                };
+                latch.countDown();
+                return null;
+            };
 
-                tmpNode.snapshot(cb, null, null);
-                Util.sleep(SLEEP_TIME);
-                assertEquals(1, latch.getCount());
-            }
+            tmpNode.snapshot(cb, null, null);
+            Util.sleep(SLEEP_TIME);
+            assertEquals(1, latch.getCount());
         });
 
         try {
@@ -438,11 +412,9 @@
     // Test deferred snapshot with null callback (should throw NPE)
     @Test (expected=NullPointerException.class)
     public void testNullNodeCallback() {
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                tmpNode = new Rectangle(10, 10);
-                tmpNode.snapshot(null, null, null);
-            }
+        Util.runAndWait(() -> {
+            tmpNode = new Rectangle(10, 10);
+            tmpNode.snapshot(null, null, null);
         });
     }
 
--- a/tests/system/src/test/java/javafx/scene/Snapshot2Test.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/javafx/scene/Snapshot2Test.java	Tue Jun 10 14:35:17 2014 -0400
@@ -105,11 +105,9 @@
 
     @After
     public void teardownEach() {
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                if (tmpStage != null && tmpStage.isShowing()) {
-                    tmpStage.hide();
-                }
+        Util.runAndWait(() -> {
+            if (tmpStage != null && tmpStage.isShowing()) {
+                tmpStage.hide();
             }
         });
     }
@@ -117,17 +115,15 @@
     // ========================== TEST CASES ==========================
 
     private void setupEmptyScene() {
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                Group root = new Group();
-                tmpScene = new Scene(root);
-                if (live) {
-                    tmpStage = new TestStage(tmpScene);
-                    assertNotNull(tmpScene.getWindow());
-                    tmpStage.show();
-                } else {
-                    assertNull(tmpScene.getWindow());
-                }
+        Util.runAndWait(() -> {
+            Group root = new Group();
+            tmpScene = new Scene(root);
+            if (live) {
+                tmpStage = new TestStage(tmpScene);
+                assertNotNull(tmpScene.getWindow());
+                tmpStage.show();
+            } else {
+                assertNull(tmpScene.getWindow());
             }
         });
     }
@@ -138,17 +134,15 @@
         setupEmptyScene();
 
         final WritableImage img = useImage ? new WritableImage(1, 1) : null;
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                WritableImage wimg = tmpScene.snapshot(img);
-                assertNotNull(wimg);
-                if (img != null) {
-                    assertSame(img, wimg);
-                }
+        Util.runAndWait(() -> {
+            WritableImage wimg = tmpScene.snapshot(img);
+            assertNotNull(wimg);
+            if (img != null) {
+                assertSame(img, wimg);
+            }
 
-                assertEquals(1, (int)wimg.getWidth());
-                assertEquals(1, (int)wimg.getHeight());
-            }
+            assertEquals(1, (int)wimg.getWidth());
+            assertEquals(1, (int)wimg.getHeight());
         });
     }
 
@@ -156,37 +150,33 @@
     public void testSnapshotEmptySceneDefer() {
         setupEmptyScene();
         final WritableImage img = useImage ? new WritableImage(1, 1) : null;
-        runDeferredSnapshotWait(tmpScene, new Callback<SnapshotResult, Void>() {
-            public Void call(SnapshotResult result) {
-                assertSame(tmpScene, result.getSource());
-                assertNull(result.getSnapshotParameters());
-                assertNotNull(result.getImage());
-                if (img != null) {
-                    assertSame(img, result.getImage());
-                }
+        runDeferredSnapshotWait(tmpScene, result -> {
+            assertSame(tmpScene, result.getSource());
+            assertNull(result.getSnapshotParameters());
+            assertNotNull(result.getImage());
+            if (img != null) {
+                assertSame(img, result.getImage());
+            }
 
-                assertEquals(1, (int)result.getImage().getWidth());
-                assertEquals(1, (int)result.getImage().getHeight());
+            assertEquals(1, (int)result.getImage().getWidth());
+            assertEquals(1, (int)result.getImage().getHeight());
 
-                return null;
-            }
+            return null;
         }, img);
     }
 
     private void doTestSnapshotEmptyNodeImm(final SnapshotParameters snapshotParams) {
         setupEmptyScene();
         final WritableImage img = useImage ? new WritableImage(1, 1) : null;
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                WritableImage wimg = tmpScene.getRoot().snapshot(snapshotParams, img);
-                assertNotNull(wimg);
-                if (img != null) {
-                    assertSame(img, wimg);
-                }
+        Util.runAndWait(() -> {
+            WritableImage wimg = tmpScene.getRoot().snapshot(snapshotParams, img);
+            assertNotNull(wimg);
+            if (img != null) {
+                assertSame(img, wimg);
+            }
 
-                assertEquals(1, (int)wimg.getWidth());
-                assertEquals(1, (int)wimg.getHeight());
-            }
+            assertEquals(1, (int)wimg.getWidth());
+            assertEquals(1, (int)wimg.getHeight());
         });
     }
 
@@ -203,20 +193,18 @@
     private void doTestSnapshotEmptyNodeDefer(final SnapshotParameters snapshotParams) {
         setupEmptyScene();
         final WritableImage img = useImage ? new WritableImage(1, 1) : null;
-        runDeferredSnapshotWait(tmpScene.getRoot(), new Callback<SnapshotResult, Void>() {
-            public Void call(SnapshotResult result) {
-                assertSame(tmpScene.getRoot(), result.getSource());
-                assertNotNull(result.getSnapshotParameters());
-                assertNotNull(result.getImage());
-                if (img != null) {
-                    assertSame(img, result.getImage());
-                }
+        runDeferredSnapshotWait(tmpScene.getRoot(), result -> {
+            assertSame(tmpScene.getRoot(), result.getSource());
+            assertNotNull(result.getSnapshotParameters());
+            assertNotNull(result.getImage());
+            if (img != null) {
+                assertSame(img, result.getImage());
+            }
 
-                assertEquals(1, (int)result.getImage().getWidth());
-                assertEquals(1, (int)result.getImage().getHeight());
+            assertEquals(1, (int)result.getImage().getWidth());
+            assertEquals(1, (int)result.getImage().getHeight());
 
-                return null;
-            }
+            return null;
         }, snapshotParams, img);
     }
 
@@ -236,19 +224,17 @@
     private static final int NODE_H = SCENE_H - 2*5;
 
     private void setupSimpleScene() {
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                tmpNode = new Rectangle(10, 5, NODE_W, NODE_H);
-                Group root = new Group();
-                tmpScene = new Scene(root, SCENE_W, SCENE_H);
-                root.getChildren().add(tmpNode);
-                if (live) {
-                    tmpStage = new TestStage(tmpScene);
-                    assertNotNull(tmpScene.getWindow());
-                    tmpStage.show();
-                } else {
-                    assertNull(tmpScene.getWindow());
-                }
+        Util.runAndWait(() -> {
+            tmpNode = new Rectangle(10, 5, NODE_W, NODE_H);
+            Group root = new Group();
+            tmpScene = new Scene(root, SCENE_W, SCENE_H);
+            root.getChildren().add(tmpNode);
+            if (live) {
+                tmpStage = new TestStage(tmpScene);
+                assertNotNull(tmpScene.getWindow());
+                tmpStage.show();
+            } else {
+                assertNull(tmpScene.getWindow());
             }
         });
     }
@@ -260,17 +246,15 @@
         setupSimpleScene();
 
         final WritableImage img = useImage ? new WritableImage(SCENE_W, SCENE_H) : null;
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                WritableImage wimg = tmpScene.snapshot(img);
-                assertNotNull(wimg);
-                if (img != null) {
-                    assertSame(img, wimg);
-                }
+        Util.runAndWait(() -> {
+            WritableImage wimg = tmpScene.snapshot(img);
+            assertNotNull(wimg);
+            if (img != null) {
+                assertSame(img, wimg);
+            }
 
-                assertEquals(SCENE_W, (int)wimg.getWidth());
-                assertEquals(SCENE_H, (int)wimg.getHeight());
-            }
+            assertEquals(SCENE_W, (int)wimg.getWidth());
+            assertEquals(SCENE_H, (int)wimg.getHeight());
         });
     }
 
@@ -279,20 +263,18 @@
         setupSimpleScene();
 
         final WritableImage img = useImage ? new WritableImage(SCENE_W, SCENE_H) : null;
-        runDeferredSnapshotWait(tmpScene, new Callback<SnapshotResult, Void>() {
-            public Void call(SnapshotResult result) {
-                assertSame(tmpScene, result.getSource());
-                assertNull(result.getSnapshotParameters());
-                assertNotNull(result.getImage());
-                if (img != null) {
-                    assertSame(img, result.getImage());
-                }
+        runDeferredSnapshotWait(tmpScene, result -> {
+            assertSame(tmpScene, result.getSource());
+            assertNull(result.getSnapshotParameters());
+            assertNotNull(result.getImage());
+            if (img != null) {
+                assertSame(img, result.getImage());
+            }
 
-                assertEquals(SCENE_W, (int)result.getImage().getWidth());
-                assertEquals(SCENE_H, (int)result.getImage().getHeight());
+            assertEquals(SCENE_W, (int)result.getImage().getWidth());
+            assertEquals(SCENE_H, (int)result.getImage().getHeight());
 
-                return null;
-            }
+            return null;
         }, img);
     }
 
@@ -301,17 +283,15 @@
         setupSimpleScene();
         final SnapshotParameters snapshotParams = new SnapshotParameters();
         final WritableImage img = useImage ? new WritableImage(NODE_W, NODE_H) : null;
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                WritableImage wimg = tmpScene.getRoot().snapshot(snapshotParams, img);
-                assertNotNull(wimg);
-                if (img != null) {
-                    assertSame(img, wimg);
-                }
+        Util.runAndWait(() -> {
+            WritableImage wimg = tmpScene.getRoot().snapshot(snapshotParams, img);
+            assertNotNull(wimg);
+            if (img != null) {
+                assertSame(img, wimg);
+            }
 
-                assertEquals(NODE_W, (int)wimg.getWidth());
-                assertEquals(NODE_H, (int)wimg.getHeight());
-            }
+            assertEquals(NODE_W, (int)wimg.getWidth());
+            assertEquals(NODE_H, (int)wimg.getHeight());
         });
     }
 
@@ -320,20 +300,18 @@
         setupSimpleScene();
         final SnapshotParameters snapshotParams = new SnapshotParameters();
         final WritableImage img = useImage ? new WritableImage(NODE_W, NODE_H) : null;
-        runDeferredSnapshotWait(tmpScene.getRoot(), new Callback<SnapshotResult, Void>() {
-            public Void call(SnapshotResult result) {
-                assertSame(tmpScene.getRoot(), result.getSource());
-                assertNotNull(result.getSnapshotParameters());
-                assertNotNull(result.getImage());
-                if (img != null) {
-                    assertSame(img, result.getImage());
-                }
+        runDeferredSnapshotWait(tmpScene.getRoot(), result -> {
+            assertSame(tmpScene.getRoot(), result.getSource());
+            assertNotNull(result.getSnapshotParameters());
+            assertNotNull(result.getImage());
+            if (img != null) {
+                assertSame(img, result.getImage());
+            }
 
-                assertEquals(NODE_W, (int)result.getImage().getWidth());
-                assertEquals(NODE_H, (int)result.getImage().getHeight());
+            assertEquals(NODE_W, (int)result.getImage().getWidth());
+            assertEquals(NODE_H, (int)result.getImage().getHeight());
 
-                return null;
-            }
+            return null;
         }, snapshotParams, img);
     }
 
@@ -346,17 +324,15 @@
         final int WIDTH = NODE_W * xScale;
         final int HEIGHT = NODE_H * yScale;
         final WritableImage img = useImage ? new WritableImage(WIDTH, HEIGHT) : null;
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                WritableImage wimg = tmpScene.getRoot().snapshot(snapshotParams, img);
-                assertNotNull(wimg);
-                if (img != null) {
-                    assertSame(img, wimg);
-                }
+        Util.runAndWait(() -> {
+            WritableImage wimg = tmpScene.getRoot().snapshot(snapshotParams, img);
+            assertNotNull(wimg);
+            if (img != null) {
+                assertSame(img, wimg);
+            }
 
-                assertEquals(WIDTH, (int)wimg.getWidth());
-                assertEquals(HEIGHT, (int)wimg.getHeight());
-            }
+            assertEquals(WIDTH, (int)wimg.getWidth());
+            assertEquals(HEIGHT, (int)wimg.getHeight());
         });
     }
 
@@ -367,20 +343,18 @@
         final int WIDTH = NODE_W * xScale;
         final int HEIGHT = NODE_H * yScale;
         final WritableImage img = useImage ? new WritableImage(WIDTH, HEIGHT) : null;
-        runDeferredSnapshotWait(tmpScene.getRoot(), new Callback<SnapshotResult, Void>() {
-            public Void call(SnapshotResult result) {
-                assertSame(tmpScene.getRoot(), result.getSource());
-                assertNotNull(result.getSnapshotParameters());
-                assertNotNull(result.getImage());
-                if (img != null) {
-                    assertSame(img, result.getImage());
-                }
+        runDeferredSnapshotWait(tmpScene.getRoot(), result -> {
+            assertSame(tmpScene.getRoot(), result.getSource());
+            assertNotNull(result.getSnapshotParameters());
+            assertNotNull(result.getImage());
+            if (img != null) {
+                assertSame(img, result.getImage());
+            }
 
-                assertEquals(WIDTH, (int)result.getImage().getWidth());
-                assertEquals(HEIGHT, (int)result.getImage().getHeight());
+            assertEquals(WIDTH, (int)result.getImage().getWidth());
+            assertEquals(HEIGHT, (int)result.getImage().getHeight());
 
-                return null;
-            }
+            return null;
         }, snapshotParams, img);
     }
 
@@ -429,17 +403,15 @@
         final int WIDTH = NODE_H;
         final int HEIGHT = NODE_W;
         final WritableImage img = useImage ? new WritableImage(WIDTH, HEIGHT) : null;
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                WritableImage wimg = tmpScene.getRoot().snapshot(snapshotParams, img);
-                assertNotNull(wimg);
-                if (img != null) {
-                    assertSame(img, wimg);
-                }
+        Util.runAndWait(() -> {
+            WritableImage wimg = tmpScene.getRoot().snapshot(snapshotParams, img);
+            assertNotNull(wimg);
+            if (img != null) {
+                assertSame(img, wimg);
+            }
 
-                assertEquals(WIDTH, (int)wimg.getWidth());
-                assertEquals(HEIGHT, (int)wimg.getHeight());
-            }
+            assertEquals(WIDTH, (int)wimg.getWidth());
+            assertEquals(HEIGHT, (int)wimg.getHeight());
         });
     }
 
@@ -452,20 +424,18 @@
         final int WIDTH = NODE_H;
         final int HEIGHT = NODE_W;
         final WritableImage img = useImage ? new WritableImage(WIDTH, HEIGHT) : null;
-        runDeferredSnapshotWait(tmpScene.getRoot(), new Callback<SnapshotResult, Void>() {
-            public Void call(SnapshotResult result) {
-                assertSame(tmpScene.getRoot(), result.getSource());
-                assertNotNull(result.getSnapshotParameters());
-                assertNotNull(result.getImage());
-                if (img != null) {
-                    assertSame(img, result.getImage());
-                }
+        runDeferredSnapshotWait(tmpScene.getRoot(), result -> {
+            assertSame(tmpScene.getRoot(), result.getSource());
+            assertNotNull(result.getSnapshotParameters());
+            assertNotNull(result.getImage());
+            if (img != null) {
+                assertSame(img, result.getImage());
+            }
 
-                assertEquals(WIDTH, (int)result.getImage().getWidth());
-                assertEquals(HEIGHT, (int)result.getImage().getHeight());
+            assertEquals(WIDTH, (int)result.getImage().getWidth());
+            assertEquals(HEIGHT, (int)result.getImage().getHeight());
 
-                return null;
-            }
+            return null;
         }, snapshotParams, img);
     }
 
@@ -483,17 +453,15 @@
         final WritableImage img = useImage ? new WritableImage(NODE_W, NODE_H) : null;
         final int WIDTH = useImage ? NODE_W : VP_WIDTH;
         final int HEIGHT = useImage ? NODE_H : VP_HEIGHT;
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                WritableImage wimg = tmpScene.getRoot().snapshot(snapshotParams, img);
-                assertNotNull(wimg);
-                if (img != null) {
-                    assertSame(img, wimg);
-                }
+        Util.runAndWait(() -> {
+            WritableImage wimg = tmpScene.getRoot().snapshot(snapshotParams, img);
+            assertNotNull(wimg);
+            if (img != null) {
+                assertSame(img, wimg);
+            }
 
-                assertEquals(WIDTH, (int)wimg.getWidth());
-                assertEquals(HEIGHT, (int)wimg.getHeight());
-            }
+            assertEquals(WIDTH, (int)wimg.getWidth());
+            assertEquals(HEIGHT, (int)wimg.getHeight());
         });
     }
 
@@ -505,20 +473,18 @@
         final WritableImage img = useImage ? new WritableImage(NODE_W, NODE_H) : null;
         final int WIDTH = useImage ? NODE_W : VP_WIDTH;
         final int HEIGHT = useImage ? NODE_H : VP_HEIGHT;
-        runDeferredSnapshotWait(tmpScene.getRoot(), new Callback<SnapshotResult, Void>() {
-            public Void call(SnapshotResult result) {
-                assertSame(tmpScene.getRoot(), result.getSource());
-                assertNotNull(result.getSnapshotParameters());
-                assertNotNull(result.getImage());
-                if (img != null) {
-                    assertSame(img, result.getImage());
-                }
+        runDeferredSnapshotWait(tmpScene.getRoot(), result -> {
+            assertSame(tmpScene.getRoot(), result.getSource());
+            assertNotNull(result.getSnapshotParameters());
+            assertNotNull(result.getImage());
+            if (img != null) {
+                assertSame(img, result.getImage());
+            }
 
-                assertEquals(WIDTH, (int)result.getImage().getWidth());
-                assertEquals(HEIGHT, (int)result.getImage().getHeight());
+            assertEquals(WIDTH, (int)result.getImage().getWidth());
+            assertEquals(HEIGHT, (int)result.getImage().getHeight());
 
-                return null;
-            }
+            return null;
         }, snapshotParams, img);
     }
 
@@ -536,28 +502,24 @@
         final WritableImage img = useImage ? new WritableImage(NODE_W, NODE_H) : null;
         final int WIDTH = useImage ? NODE_W : NEW_WIDTH;
         final int HEIGHT = useImage ? NODE_H : NEW_HEIGHT;
-        Callback<SnapshotResult, Void> cb = new Callback<SnapshotResult, Void>() {
-            public Void call(SnapshotResult result) {
-                assertSame(tmpScene.getRoot(), result.getSource());
-                assertNotNull(result.getSnapshotParameters());
-                assertNotNull(result.getImage());
-                if (img != null) {
-                    assertSame(img, result.getImage());
-                }
+        Callback<SnapshotResult, Void> cb = result -> {
+            assertSame(tmpScene.getRoot(), result.getSource());
+            assertNotNull(result.getSnapshotParameters());
+            assertNotNull(result.getImage());
+            if (img != null) {
+                assertSame(img, result.getImage());
+            }
 
-                assertEquals(WIDTH, (int)result.getImage().getWidth());
-                assertEquals(HEIGHT, (int)result.getImage().getHeight());
+            assertEquals(WIDTH, (int)result.getImage().getWidth());
+            assertEquals(HEIGHT, (int)result.getImage().getHeight());
 
-                return null;
-            }
+            return null;
         };
-        Runnable runAfter = new Runnable() {
-            public void run() {
-                assertTrue(tmpNode instanceof Rectangle);
-                Rectangle rect = (Rectangle)tmpNode;
-                rect.setWidth(NEW_WIDTH);
-                rect.setHeight(NEW_HEIGHT);
-            }
+        Runnable runAfter = () -> {
+            assertTrue(tmpNode instanceof Rectangle);
+            Rectangle rect = (Rectangle)tmpNode;
+            rect.setWidth(NEW_WIDTH);
+            rect.setHeight(NEW_HEIGHT);
         };
 
         runDeferredSnapshotWait(tmpScene.getRoot(), cb, snapshotParams, img, runAfter);
--- a/tests/system/src/test/java/javafx/scene/SnapshotCommon.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/javafx/scene/SnapshotCommon.java	Tue Jun 10 14:35:17 2014 -0400
@@ -101,11 +101,7 @@
 
     static void doSetupOnce() {
         // Start the Application
-        new Thread(new Runnable() {
-            @Override public void run() {
-                Application.launch(MyApp.class, (String[])null);
-            }
-        }).start();
+        new Thread(() -> Application.launch(MyApp.class, (String[])null)).start();
 
         try {
             if (!launchLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)) {
@@ -133,25 +129,21 @@
         final Throwable[] testError = new Throwable[1];
         final CountDownLatch latch = new CountDownLatch(1);
 
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                node.snapshot(new Callback<SnapshotResult, Void>() {
-                    public Void call(SnapshotResult result) {
-                        try {
-                            cb.call(result);
-                        } catch (Throwable th) {
-                            testError[0] = th;
-                        } finally {
-                            latch.countDown();
-                        }
-                        return null;
-                    }
-                }, params, img);
-                assertEquals(1, latch.getCount());
+        Util.runAndWait(() -> {
+            node.snapshot(result -> {
+                try {
+                    cb.call(result);
+                } catch (Throwable th) {
+                    testError[0] = th;
+                } finally {
+                    latch.countDown();
+                }
+                return null;
+            }, params, img);
+            assertEquals(1, latch.getCount());
 
-                if (runAfter != null) {
-                    runAfter.run();
-                }
+            if (runAfter != null) {
+                runAfter.run();
             }
         });
 
@@ -193,22 +185,18 @@
         final Throwable[] testError = new Throwable[1];
         final CountDownLatch latch = new CountDownLatch(1);
 
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                scene.snapshot(new Callback<SnapshotResult, Void>() {
-                    public Void call(SnapshotResult result) {
-                        try {
-                            cb.call(result);
-                        } catch (Throwable th) {
-                            testError[0] = th;
-                        } finally {
-                            latch.countDown();
-                        }
-                        return null;
-                    }
-                }, img);
-                assertEquals(1, latch.getCount());
-            }
+        Util.runAndWait(() -> {
+            scene.snapshot(result -> {
+                try {
+                    cb.call(result);
+                } catch (Throwable th) {
+                    testError[0] = th;
+                } finally {
+                    latch.countDown();
+                }
+                return null;
+            }, img);
+            assertEquals(1, latch.getCount());
         });
 
         try {
--- a/tests/system/src/test/java/javafx/scene/layout/RegionUITestBase.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/javafx/scene/layout/RegionUITestBase.java	Tue Jun 10 14:35:17 2014 -0400
@@ -56,26 +56,20 @@
     @Override
     public void doSetup() {
         super.doSetup();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                stage = getStage();
-                region = new Region();
-                region.setPrefSize(REGION_WIDTH, REGION_HEIGHT);
-                region.relocate(REGION_LEFT, REGION_TOP);
-                scene = new Scene(root = new Group(region), WIDTH, HEIGHT);
-                scene.setFill(SCENE_FILL);
-                stage.setScene(scene);
-                stage.show();
-            }
+        runAndWait(() -> {
+            stage = getStage();
+            region = new Region();
+            region.setPrefSize(REGION_WIDTH, REGION_HEIGHT);
+            region.relocate(REGION_LEFT, REGION_TOP);
+            scene = new Scene(root = new Group(region), WIDTH, HEIGHT);
+            scene.setFill(SCENE_FILL);
+            stage.setScene(scene);
+            stage.show();
         });
     }
 
     protected void setStyle(final String style) {
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                region.setStyle(style);
-            }
-        });
+        runAndWait(() -> region.setStyle(style));
         waitFirstFrame();
     }
 
@@ -97,12 +91,7 @@
 
     private Color getColor(int x, int y) {
         AtomicReference<Color> color = new AtomicReference<>();
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                color.set(getColor(scene, x, y));
-            }
-        });
+        runAndWait(() -> color.set(getColor(scene, x, y)));
         return color.get();
     }
 
--- a/tests/system/src/test/java/javafx/stage/ShowAndWaitTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/javafx/stage/ShowAndWaitTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -114,11 +114,7 @@
     @BeforeClass
     public static void setupOnce() {
         // Start the Application
-        new Thread(new Runnable() {
-            @Override public void run() {
-                Application.launch(MyApp.class, (String[])null);
-            }
-        }).start();
+        new Thread(() -> Application.launch(MyApp.class, (String[])null)).start();
 
         try {
             if (!launchLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)) {
@@ -172,11 +168,7 @@
             if (stage.isShowing()) {
                 System.err.println("Cleaning up stage after a failed test...");
                 try {
-                    Util.runAndWait(new Runnable() {
-                        public void run() {
-                            stage.hide();
-                        }
-                    });
+                    Util.runAndWait(stage::hide);
                 } catch (Throwable t) {
                     System.err.println("WARNING: unable to hide stage after test failure");
                     t.printStackTrace(System.err);
@@ -209,21 +201,19 @@
         test1Run = true;
 
         assertEquals(0, launchLatch.getCount());
-        Util.runAndWait(new Runnable() {
-            @Override public void run() {
-                assertTrue(Platform.isFxApplicationThread());
-                assertTrue(myApp.primaryStage.isPrimary());
-                assertFalse(myApp.primaryStage.isShowing());
+        Util.runAndWait(() -> {
+            assertTrue(Platform.isFxApplicationThread());
+            assertTrue(myApp.primaryStage.isPrimary());
+            assertFalse(myApp.primaryStage.isShowing());
 
-                // Verify that we cannot call showAndWait on the primaryStage
-                try {
-                    myApp.primaryStage.showAndWait();
-                    throw new AssertionFailedError("Expected IllegalStateException was not thrown");
-                } catch (IllegalStateException ex) {
-                }
+            // Verify that we cannot call showAndWait on the primaryStage
+            try {
+                myApp.primaryStage.showAndWait();
+                throw new AssertionFailedError("Expected IllegalStateException was not thrown");
+            } catch (IllegalStateException ex) {
+            }
 
-                myApp.primaryStage.show();
-            }
+            myApp.primaryStage.show();
         });
     }
 
@@ -246,13 +236,11 @@
     public void testShowWaitWrongThread() {
         ensureTest1();
         assertFalse(Platform.isFxApplicationThread());
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                tmpStage1 = new TestStage(modality);
-                stages.add(tmpStage1);
-                assertFalse(tmpStage1.isPrimary());
-                assertFalse(tmpStage1.isShowing());
-            }
+        Util.runAndWait(() -> {
+            tmpStage1 = new TestStage(modality);
+            stages.add(tmpStage1);
+            assertFalse(tmpStage1.isPrimary());
+            assertFalse(tmpStage1.isShowing());
         });
         assertNotNull(tmpStage1);
 
@@ -264,21 +252,19 @@
     @Test (expected=IllegalStateException.class)
     public void testVisibleThrow() {
         ensureTest1();
-        Util.runAndWait(new Runnable() {
-            public void run() {
-                tmpStage1 = new TestStage(modality);
-                stages.add(tmpStage1);
-                assertFalse(tmpStage1.isPrimary());
-                assertFalse(tmpStage1.isShowing());
-                tmpStage1.show();
-                assertTrue(tmpStage1.isShowing());
+        Util.runAndWait(() -> {
+            tmpStage1 = new TestStage(modality);
+            stages.add(tmpStage1);
+            assertFalse(tmpStage1.isPrimary());
+            assertFalse(tmpStage1.isShowing());
+            tmpStage1.show();
+            assertTrue(tmpStage1.isShowing());
 
-                try {
-                    // The following should throw IllegalStateException
-                    tmpStage1.showAndWait();
-                } finally {
-                    tmpStage1.hide();
-                }
+            try {
+                // The following should throw IllegalStateException
+                tmpStage1.showAndWait();
+            } finally {
+                tmpStage1.hide();
             }
         });
     }
@@ -291,27 +277,23 @@
         final AtomicBoolean stageShowReturned = new AtomicBoolean(false);
         final AtomicBoolean hideActionReached = new AtomicBoolean(false);
 
-        Runnable rShow = new Runnable() {
-            @Override public void run() {
-                tmpStage1 = new TestStage(modality);
-                stages.add(tmpStage1);
-                assertFalse(tmpStage1.isPrimary());
-                assertFalse(tmpStage1.isShowing());
-                tmpStage1.show();
-                stageShowReturned.set(true);
-                assertTrue(tmpStage1.isShowing());
-                assertFalse(hideActionReached.get());
-            }
+        Runnable rShow = () -> {
+            tmpStage1 = new TestStage(modality);
+            stages.add(tmpStage1);
+            assertFalse(tmpStage1.isPrimary());
+            assertFalse(tmpStage1.isShowing());
+            tmpStage1.show();
+            stageShowReturned.set(true);
+            assertTrue(tmpStage1.isShowing());
+            assertFalse(hideActionReached.get());
         };
 
-        Runnable rHide = new Runnable() {
-            @Override public void run() {
-                assertNotNull(tmpStage1);
-                assertTrue(tmpStage1.isShowing());
-                assertTrue(stageShowReturned.get());
-                hideActionReached.set(true);
-                tmpStage1.hide();
-            }
+        Runnable rHide = () -> {
+            assertNotNull(tmpStage1);
+            assertTrue(tmpStage1.isShowing());
+            assertTrue(stageShowReturned.get());
+            hideActionReached.set(true);
+            tmpStage1.hide();
         };
 
         Util.runAndWait(rShow, rHide);
@@ -331,37 +313,28 @@
         final AtomicBoolean hide1EventReached = new AtomicBoolean(false);
         final AtomicBoolean nextRunnableReached = new AtomicBoolean(false);
 
-        Runnable rShow1 = new Runnable() {
-            @Override public void run() {
-                tmpStage1 = new TestStage(modality);
-                stages.add(tmpStage1);
-                assertFalse(tmpStage1.isPrimary());
-                assertFalse(tmpStage1.isShowing());
-                tmpStage1.showAndWait();
-                stage1ShowReturned.set(true);
-                assertFalse(tmpStage1.isShowing());
-                assertTrue(hide1EventReached.get());
-                assertFalse(nextRunnableReached.get());
-            }
+        Runnable rShow1 = () -> {
+            tmpStage1 = new TestStage(modality);
+            stages.add(tmpStage1);
+            assertFalse(tmpStage1.isPrimary());
+            assertFalse(tmpStage1.isShowing());
+            tmpStage1.showAndWait();
+            stage1ShowReturned.set(true);
+            assertFalse(tmpStage1.isShowing());
+            assertTrue(hide1EventReached.get());
+            assertFalse(nextRunnableReached.get());
         };
 
-        Runnable rHide1 = new Runnable() {
-            @Override public void run() {
-                hide1EventReached.set(true);
-                assertFalse(stage1ShowReturned.get());
-                assertNotNull(tmpStage1);
-                tmpStage1.hide();
-                Util.sleep(1);
-                assertFalse(stage1ShowReturned.get());
-            }
+        Runnable rHide1 = () -> {
+            hide1EventReached.set(true);
+            assertFalse(stage1ShowReturned.get());
+            assertNotNull(tmpStage1);
+            tmpStage1.hide();
+            Util.sleep(1);
+            assertFalse(stage1ShowReturned.get());
         };
 
-        Runnable rNext = new Runnable() {
-            public void run() {
-                // This should happen after the nested event loop exits
-                nextRunnableReached.set(true);
-            }
-        };
+        Runnable rNext = () -> nextRunnableReached.set(true);
 
         Util.runAndWait(rShow1, rHide1, rNext);
 
@@ -381,35 +354,26 @@
         final AtomicBoolean hide1EventReached = new AtomicBoolean(false);
         final AtomicBoolean nextRunnableReached = new AtomicBoolean(false);
 
-        Runnable rShow1 = new Runnable() {
-            @Override public void run() {
-                tmpStage1 = new TestStage(modality);
-                stages.add(tmpStage1);
-                assertFalse(tmpStage1.isPrimary());
-                assertFalse(tmpStage1.isShowing());
-                tmpStage1.showAndWait();
-                stage1ShowReturned.set(true);
-                assertFalse(tmpStage1.isShowing());
-                assertTrue(hide1EventReached.get());
-                assertFalse(nextRunnableReached.get());
-            }
+        Runnable rShow1 = () -> {
+            tmpStage1 = new TestStage(modality);
+            stages.add(tmpStage1);
+            assertFalse(tmpStage1.isPrimary());
+            assertFalse(tmpStage1.isShowing());
+            tmpStage1.showAndWait();
+            stage1ShowReturned.set(true);
+            assertFalse(tmpStage1.isShowing());
+            assertTrue(hide1EventReached.get());
+            assertFalse(nextRunnableReached.get());
         };
 
-        Runnable rHide1 = new Runnable() {
-            @Override public void run() {
-                hide1EventReached.set(true);
-                assertFalse(stage1ShowReturned.get());
-                assertNotNull(tmpStage1);
-                tmpStage1.hide();
-                Util.sleep(1);
-                assertFalse(stage1ShowReturned.get());
-                Platform.runLater(new Runnable() {
-                    public void run() {
-                        // This should happen after the nested event loop exits
-                        nextRunnableReached.set(true);
-                    }
-                });
-            }
+        Runnable rHide1 = () -> {
+            hide1EventReached.set(true);
+            assertFalse(stage1ShowReturned.get());
+            assertNotNull(tmpStage1);
+            tmpStage1.hide();
+            Util.sleep(1);
+            assertFalse(stage1ShowReturned.get());
+            Platform.runLater(() -> nextRunnableReached.set(true));
         };
 
         Util.runAndWait(rShow1, rHide1);
@@ -428,60 +392,52 @@
         final AtomicBoolean stage2ShowReturned = new AtomicBoolean(false);
         final AtomicBoolean hide2EventReached = new AtomicBoolean(false);
 
-        Runnable rShow1 = new Runnable() {
-            @Override public void run() {
-                tmpStage1 = new TestStage(modality);
-                stages.add(tmpStage1);
-                assertFalse(tmpStage1.isPrimary());
-                assertFalse(tmpStage1.isShowing());
-                tmpStage1.showAndWait();
-                stage1ShowReturned.set(true);
-                assertFalse(tmpStage1.isShowing());
-                assertTrue(stage2ShowReturned.get());
-                assertTrue(hide1EventReached.get());
-                assertTrue(hide2EventReached.get());
-            }
+        Runnable rShow1 = () -> {
+            tmpStage1 = new TestStage(modality);
+            stages.add(tmpStage1);
+            assertFalse(tmpStage1.isPrimary());
+            assertFalse(tmpStage1.isShowing());
+            tmpStage1.showAndWait();
+            stage1ShowReturned.set(true);
+            assertFalse(tmpStage1.isShowing());
+            assertTrue(stage2ShowReturned.get());
+            assertTrue(hide1EventReached.get());
+            assertTrue(hide2EventReached.get());
         };
 
-        Runnable rShow2 = new Runnable() {
-            @Override public void run() {
-                tmpStage2 = new TestStage(modality);
-                stages.add(tmpStage2);
-                assertFalse(tmpStage2.isPrimary());
-                assertFalse(tmpStage2.isShowing());
-                tmpStage2.showAndWait();
-                stage2ShowReturned.set(true);
-                assertFalse(stage1ShowReturned.get());
-                assertFalse(tmpStage2.isShowing());
-                assertTrue(hide2EventReached.get());
-                assertFalse(hide1EventReached.get());
-            }
+        Runnable rShow2 = () -> {
+            tmpStage2 = new TestStage(modality);
+            stages.add(tmpStage2);
+            assertFalse(tmpStage2.isPrimary());
+            assertFalse(tmpStage2.isShowing());
+            tmpStage2.showAndWait();
+            stage2ShowReturned.set(true);
+            assertFalse(stage1ShowReturned.get());
+            assertFalse(tmpStage2.isShowing());
+            assertTrue(hide2EventReached.get());
+            assertFalse(hide1EventReached.get());
         };
 
-        Runnable rHide1 = new Runnable() {
-            @Override public void run() {
-                hide1EventReached.set(true);
-                assertFalse(stage1ShowReturned.get());
-                assertTrue(stage2ShowReturned.get());
-                assertTrue(hide2EventReached.get());
-                assertNotNull(tmpStage1);
-                tmpStage1.hide();
-                Util.sleep(1);
-                assertFalse(stage1ShowReturned.get());
-            }
+        Runnable rHide1 = () -> {
+            hide1EventReached.set(true);
+            assertFalse(stage1ShowReturned.get());
+            assertTrue(stage2ShowReturned.get());
+            assertTrue(hide2EventReached.get());
+            assertNotNull(tmpStage1);
+            tmpStage1.hide();
+            Util.sleep(1);
+            assertFalse(stage1ShowReturned.get());
         };
 
-        Runnable rHide2 = new Runnable() {
-            @Override public void run() {
-                hide2EventReached.set(true);
-                assertFalse(stage2ShowReturned.get());
-                assertFalse(stage1ShowReturned.get());
-                assertFalse(hide1EventReached.get());
-                assertNotNull(tmpStage2);
-                tmpStage2.hide();
-                Util.sleep(1);
-                assertFalse(stage2ShowReturned.get());
-            }
+        Runnable rHide2 = () -> {
+            hide2EventReached.set(true);
+            assertFalse(stage2ShowReturned.get());
+            assertFalse(stage1ShowReturned.get());
+            assertFalse(hide1EventReached.get());
+            assertNotNull(tmpStage2);
+            tmpStage2.hide();
+            Util.sleep(1);
+            assertFalse(stage2ShowReturned.get());
         };
 
         Util.runAndWait(rShow1, rShow2, rHide2, rHide1);
@@ -501,60 +457,52 @@
         final AtomicBoolean stage2ShowReturned = new AtomicBoolean(false);
         final AtomicBoolean hide2EventReached = new AtomicBoolean(false);
 
-        Runnable rShow1 = new Runnable() {
-            @Override public void run() {
-                tmpStage1 = new TestStage(modality);
-                stages.add(tmpStage1);
-                assertFalse(tmpStage1.isPrimary());
-                assertFalse(tmpStage1.isShowing());
-                tmpStage1.showAndWait();
-                stage1ShowReturned.set(true);
-                assertFalse(tmpStage1.isShowing());
-                assertTrue(stage2ShowReturned.get());
-                assertTrue(hide1EventReached.get());
-                assertTrue(hide2EventReached.get());
-            }
+        Runnable rShow1 = () -> {
+            tmpStage1 = new TestStage(modality);
+            stages.add(tmpStage1);
+            assertFalse(tmpStage1.isPrimary());
+            assertFalse(tmpStage1.isShowing());
+            tmpStage1.showAndWait();
+            stage1ShowReturned.set(true);
+            assertFalse(tmpStage1.isShowing());
+            assertTrue(stage2ShowReturned.get());
+            assertTrue(hide1EventReached.get());
+            assertTrue(hide2EventReached.get());
         };
 
-        Runnable rShow2 = new Runnable() {
-            @Override public void run() {
-                tmpStage2 = new TestStage(modality);
-                stages.add(tmpStage2);
-                assertFalse(tmpStage2.isPrimary());
-                assertFalse(tmpStage2.isShowing());
-                tmpStage2.showAndWait();
-                stage2ShowReturned.set(true);
-                assertFalse(tmpStage2.isShowing());
-                assertFalse(stage1ShowReturned.get());
-                assertTrue(hide2EventReached.get());
-                assertTrue(hide1EventReached.get());
-            }
+        Runnable rShow2 = () -> {
+            tmpStage2 = new TestStage(modality);
+            stages.add(tmpStage2);
+            assertFalse(tmpStage2.isPrimary());
+            assertFalse(tmpStage2.isShowing());
+            tmpStage2.showAndWait();
+            stage2ShowReturned.set(true);
+            assertFalse(tmpStage2.isShowing());
+            assertFalse(stage1ShowReturned.get());
+            assertTrue(hide2EventReached.get());
+            assertTrue(hide1EventReached.get());
         };
 
-        Runnable rHide1 = new Runnable() {
-            @Override public void run() {
-                hide1EventReached.set(true);
-                assertFalse(stage1ShowReturned.get());
-                assertFalse(stage2ShowReturned.get());
-                assertFalse(hide2EventReached.get());
-                assertNotNull(tmpStage1);
-                tmpStage1.hide();
-                Util.sleep(1);
-                assertFalse(stage1ShowReturned.get());
-            }
+        Runnable rHide1 = () -> {
+            hide1EventReached.set(true);
+            assertFalse(stage1ShowReturned.get());
+            assertFalse(stage2ShowReturned.get());
+            assertFalse(hide2EventReached.get());
+            assertNotNull(tmpStage1);
+            tmpStage1.hide();
+            Util.sleep(1);
+            assertFalse(stage1ShowReturned.get());
         };
 
-        Runnable rHide2 = new Runnable() {
-            @Override public void run() {
-                hide2EventReached.set(true);
-                assertFalse(stage2ShowReturned.get());
-                assertFalse(stage1ShowReturned.get());
-                assertTrue(hide1EventReached.get());
-                assertNotNull(tmpStage2);
-                tmpStage2.hide();
-                Util.sleep(1);
-                assertFalse(stage2ShowReturned.get());
-            }
+        Runnable rHide2 = () -> {
+            hide2EventReached.set(true);
+            assertFalse(stage2ShowReturned.get());
+            assertFalse(stage1ShowReturned.get());
+            assertTrue(hide1EventReached.get());
+            assertNotNull(tmpStage2);
+            tmpStage2.hide();
+            Util.sleep(1);
+            assertFalse(stage2ShowReturned.get());
         };
 
         Util.runAndWait(rShow1, rShow2, rHide1, rHide2);
@@ -580,43 +528,39 @@
             final int idx = i;
             stageShowReturned[idx] = new AtomicBoolean(false);
             hideEventReached[idx] = new AtomicBoolean(false);
-            rShow[idx] = new Runnable() {
-                @Override public void run() {
-                    tmpStage[idx] = new TestStage(modality);
-                    stages.add(tmpStage[idx]);
-                    assertFalse(tmpStage[idx].isShowing());
-                    tmpStage[idx].showAndWait();
-                    stageShowReturned[idx].set(true);
-                    assertFalse(tmpStage[idx].isShowing());
-                    assertTrue(hideEventReached[idx].get());
-                    for (int j = 0; j < idx; j++) {
-                        assertFalse(stageShowReturned[j].get());
-                        assertFalse(hideEventReached[j].get());
-                    }
-                    for (int j = idx+1; j < N; j++) {
-                        assertTrue(stageShowReturned[j].get());
-                        assertTrue(hideEventReached[j].get());
-                    }
+            rShow[idx] = () -> {
+                tmpStage[idx] = new TestStage(modality);
+                stages.add(tmpStage[idx]);
+                assertFalse(tmpStage[idx].isShowing());
+                tmpStage[idx].showAndWait();
+                stageShowReturned[idx].set(true);
+                assertFalse(tmpStage[idx].isShowing());
+                assertTrue(hideEventReached[idx].get());
+                for (int j = 0; j < idx; j++) {
+                    assertFalse(stageShowReturned[j].get());
+                    assertFalse(hideEventReached[j].get());
+                }
+                for (int j = idx+1; j < N; j++) {
+                    assertTrue(stageShowReturned[j].get());
+                    assertTrue(hideEventReached[j].get());
                 }
             };
 
-            rHide[idx] = new Runnable() {
-                @Override public void run() {
-                    hideEventReached[idx].set(true);
-                    assertFalse(stageShowReturned[idx].get());
-                    for (int j = 0; j < idx; j++) {
-                        assertFalse(stageShowReturned[j].get());
-                        assertFalse(hideEventReached[j].get());
-                    }
-                    for (int j = idx+1; j < N; j++) {
-                        assertTrue(stageShowReturned[j].get());
-                        assertTrue(hideEventReached[j].get());
-                    }
-                    assertNotNull(tmpStage[idx]);
-                    tmpStage[idx].hide();
-                    Util.sleep(1);
-                    assertFalse(stageShowReturned[idx].get());
+            rHide[idx] = () -> {
+                hideEventReached[idx].set(true);
+                assertFalse(stageShowReturned[idx].get());
+                for (int j = 0; j < idx; j++) {
+                    assertFalse(stageShowReturned[j].get());
+                    assertFalse(hideEventReached[j].get());
                 }
+                for (int j = idx+1; j < N; j++) {
+                    assertTrue(stageShowReturned[j].get());
+                    assertTrue(hideEventReached[j].get());
+                }
+                assertNotNull(tmpStage[idx]);
+                tmpStage[idx].hide();
+                Util.sleep(1);
+                assertFalse(stageShowReturned[idx].get());
             };
         }
 
@@ -649,43 +593,39 @@
             final int idx = i;
             stageShowReturned[idx] = new AtomicBoolean(false);
             hideEventReached[idx] = new AtomicBoolean(false);
-            rShow[idx] = new Runnable() {
-                @Override public void run() {
-                    tmpStage[idx] = new TestStage(modality);
-                    stages.add(tmpStage[idx]);
-                    assertFalse(tmpStage[idx].isShowing());
-                    tmpStage[idx].showAndWait();
-                    stageShowReturned[idx].set(true);
-                    assertFalse(tmpStage[idx].isShowing());
-                    assertTrue(hideEventReached[idx].get());
-                    for (int j = 0; j < idx; j++) {
-                        assertFalse(stageShowReturned[j].get());
-                        assertTrue(hideEventReached[j].get());
-                    }
-                    for (int j = idx+1; j < N; j++) {
-                        assertTrue(stageShowReturned[j].get());
-                        assertTrue(hideEventReached[j].get());
-                    }
+            rShow[idx] = () -> {
+                tmpStage[idx] = new TestStage(modality);
+                stages.add(tmpStage[idx]);
+                assertFalse(tmpStage[idx].isShowing());
+                tmpStage[idx].showAndWait();
+                stageShowReturned[idx].set(true);
+                assertFalse(tmpStage[idx].isShowing());
+                assertTrue(hideEventReached[idx].get());
+                for (int j = 0; j < idx; j++) {
+                    assertFalse(stageShowReturned[j].get());
+                    assertTrue(hideEventReached[j].get());
+                }
+                for (int j = idx+1; j < N; j++) {
+                    assertTrue(stageShowReturned[j].get());
+                    assertTrue(hideEventReached[j].get());
                 }
             };
 
-            rHide[idx] = new Runnable() {
-                @Override public void run() {
-                    hideEventReached[idx].set(true);
-                    assertFalse(stageShowReturned[idx].get());
-                    for (int j = 0; j < idx; j++) {
-                        assertFalse(stageShowReturned[j].get());
-                        assertTrue(hideEventReached[j].get());
-                    }
-                    for (int j = idx+1; j < N; j++) {
-                        assertFalse(stageShowReturned[j].get());
-                        assertFalse(hideEventReached[j].get());
-                    }
-                    assertNotNull(tmpStage[idx]);
-                    tmpStage[idx].hide();
-                    Util.sleep(1);
-                    assertFalse(stageShowReturned[idx].get());
+            rHide[idx] = () -> {
+                hideEventReached[idx].set(true);
+                assertFalse(stageShowReturned[idx].get());
+                for (int j = 0; j < idx; j++) {
+                    assertFalse(stageShowReturned[j].get());
+                    assertTrue(hideEventReached[j].get());
                 }
+                for (int j = idx+1; j < N; j++) {
+                    assertFalse(stageShowReturned[j].get());
+                    assertFalse(hideEventReached[j].get());
+                }
+                assertNotNull(tmpStage[idx]);
+                tmpStage[idx].hide();
+                Util.sleep(1);
+                assertFalse(stageShowReturned[idx].get());
             };
         }
 
--- a/tests/system/src/test/java/launchertest/TestApp.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/launchertest/TestApp.java	Tue Jun 10 14:35:17 2014 -0400
@@ -58,11 +58,7 @@
             System.exit(ERROR_START_BEFORE_INIT);
         }
         startCalled = true;
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                Platform.exit();
-            }
-        });
+        Platform.runLater(Platform::exit);
     }
 
     @Override public void stop() {
@@ -87,10 +83,8 @@
 
     static {
         try {
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    // do nothing
-                }
+            Platform.runLater(() -> {
+                // do nothing
             });
         } catch (IllegalStateException ex) {
             ex.printStackTrace();
--- a/tests/system/src/test/java/launchertest/TestAppNoMain.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/launchertest/TestAppNoMain.java	Tue Jun 10 14:35:17 2014 -0400
@@ -40,11 +40,7 @@
 
     @Override public void start(Stage stage) throws Exception {
         startCalled = true;
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                Platform.exit();
-            }
-        });
+        Platform.runLater(Platform::exit);
     }
 
     @Override public void stop() {
@@ -56,10 +52,8 @@
 
     static {
         try {
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    // do nothing
-                }
+            Platform.runLater(() -> {
+                // do nothing
             });
         } catch (IllegalStateException ex) {
             ex.printStackTrace();
--- a/tests/system/src/test/java/launchertest/TestAppNoMainThreadCheck.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/launchertest/TestAppNoMainThreadCheck.java	Tue Jun 10 14:35:17 2014 -0400
@@ -53,11 +53,7 @@
             System.exit(ERROR_START_WRONG_THREAD);
         }
 
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                Platform.exit();
-            }
-        });
+        Platform.runLater(Platform::exit);
     }
 
     @Override public void stop() {
@@ -75,10 +71,8 @@
         }
 
         try {
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    // do nothing
-                }
+            Platform.runLater(() -> {
+                // do nothing
             });
         } catch (IllegalStateException ex) {
             ex.printStackTrace();
--- a/tests/system/src/test/java/launchertest/TestAppThreadCheck.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/launchertest/TestAppThreadCheck.java	Tue Jun 10 14:35:17 2014 -0400
@@ -53,11 +53,7 @@
             System.exit(ERROR_START_WRONG_THREAD);
         }
 
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                Platform.exit();
-            }
-        });
+        Platform.runLater(Platform::exit);
     }
 
     @Override public void stop() {
@@ -82,10 +78,8 @@
         }
 
         try {
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    // do nothing
-                }
+            Platform.runLater(() -> {
+                // do nothing
             });
         } catch (IllegalStateException ex) {
             ex.printStackTrace();
--- a/tests/system/src/test/java/launchertest/TestNotApplication.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/launchertest/TestNotApplication.java	Tue Jun 10 14:35:17 2014 -0400
@@ -37,10 +37,8 @@
 
     public static void main(String[] args) {
         try {
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    // do nothing
-                }
+            Platform.runLater(() -> {
+                // do nothing
             });
             System.exit(ERROR_TOOLKIT_IS_RUNNING);
         } catch (IllegalStateException ex) {
--- a/tests/system/src/test/java/launchertest/TestNotApplicationThreadCheck.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/launchertest/TestNotApplicationThreadCheck.java	Tue Jun 10 14:35:17 2014 -0400
@@ -37,10 +37,8 @@
 
     public static void main(String[] args) {
         try {
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    // do nothing
-                }
+            Platform.runLater(() -> {
+                // do nothing
             });
             System.exit(ERROR_TOOLKIT_IS_RUNNING);
         } catch (IllegalStateException ex) {
--- a/tests/system/src/test/java/launchertest/TestPreloader.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/launchertest/TestPreloader.java	Tue Jun 10 14:35:17 2014 -0400
@@ -54,10 +54,8 @@
             System.exit(ERROR_PRELOADER_START_WRONG_THREAD);
         }
 
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                // No-op
-            }
+        Platform.runLater(() -> {
+            // No-op
         });
     }
 
@@ -74,10 +72,8 @@
         }
 
         try {
-            Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    // do nothing
-                }
+            Platform.runLater(() -> {
+                // do nothing
             });
         } catch (IllegalStateException ex) {
             ex.printStackTrace();
--- a/tests/system/src/test/java/painttest/ImagePaintTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/painttest/ImagePaintTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -75,44 +75,40 @@
         final Color COLOR1 = Color.RED;
         final Color COLOR2 = Color.GREEN;
 
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                Image image1;
-                Image image2;
-                image1 = createImage(IMAGE_WIDTH, IMAGE_HEIGHT, COLOR1, COLOR2);
-                if (useSeparateImage) {
-                    image2 = createImage(IMAGE_WIDTH, IMAGE_HEIGHT, COLOR1, COLOR2);
-                } else {
-                    image2 = image1;
-                }
-                Rectangle rect1 = createRect(image1, 0, 0, 0, 0);
-                Rectangle rect2 = createRect(image2, IMAGE_WIDTH / 2, 0, 0, IMAGE_HEIGHT);
-                Group root = new Group(rect1, rect2);
-                testScene = new Scene(root, WIDTH, HEIGHT);
-                testScene.setFill(Color.WHITE);
+        runAndWait(() -> {
+            Image image1;
+            Image image2;
+            image1 = createImage(IMAGE_WIDTH, IMAGE_HEIGHT, COLOR1, COLOR2);
+            if (useSeparateImage) {
+                image2 = createImage(IMAGE_WIDTH, IMAGE_HEIGHT, COLOR1, COLOR2);
+            } else {
+                image2 = image1;
+            }
+            Rectangle rect1 = createRect(image1, 0, 0, 0, 0);
+            Rectangle rect2 = createRect(image2, IMAGE_WIDTH / 2, 0, 0, IMAGE_HEIGHT);
+            Group root = new Group(rect1, rect2);
+            testScene = new Scene(root, WIDTH, HEIGHT);
+            testScene.setFill(Color.WHITE);
 
-                testStage = getStage();
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            testStage = getStage();
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                Color color;
+        runAndWait(() -> {
+            Color color;
 
-                // Test first rectangle, anchor at (0,0)
-                color = getColor(testScene, 1, 1);
-                assertColorEquals(COLOR1, color, TOLERANCE);
-                color = getColor(testScene, 1 + IMAGE_WIDTH / 2, 1);
-                assertColorEquals(COLOR2, color, TOLERANCE);
+            // Test first rectangle, anchor at (0,0)
+            color = getColor(testScene, 1, 1);
+            assertColorEquals(COLOR1, color, TOLERANCE);
+            color = getColor(testScene, 1 + IMAGE_WIDTH / 2, 1);
+            assertColorEquals(COLOR2, color, TOLERANCE);
 
-                // Test second rectangle, anchor at (w/2,0)
-                color = getColor(testScene, 1, 1 + IMAGE_HEIGHT);
-                assertColorEquals(COLOR2, color, TOLERANCE);
-                color = getColor(testScene, 1 + IMAGE_WIDTH / 2, 1 + IMAGE_HEIGHT);
-                assertColorEquals(COLOR1, color, TOLERANCE);
-            }
+            // Test second rectangle, anchor at (w/2,0)
+            color = getColor(testScene, 1, 1 + IMAGE_HEIGHT);
+            assertColorEquals(COLOR2, color, TOLERANCE);
+            color = getColor(testScene, 1 + IMAGE_WIDTH / 2, 1 + IMAGE_HEIGHT);
+            assertColorEquals(COLOR1, color, TOLERANCE);
         });
     }
 
--- a/tests/system/src/test/java/sandbox/app/FXApp.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/sandbox/app/FXApp.java	Tue Jun 10 14:35:17 2014 -0400
@@ -86,9 +86,7 @@
             stage.show();
 
             // Hide the stage after the specified amount of time
-            KeyFrame kf = new KeyFrame(Duration.millis(SHOWTIME), e -> {
-                stage.hide();
-            });
+            KeyFrame kf = new KeyFrame(Duration.millis(SHOWTIME), e -> stage.hide());
             Timeline timeline = new Timeline(kf);
             timeline.play();
         } catch (SecurityException ex) {
--- a/tests/system/src/test/java/test3d/NearAndFarClipTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/test3d/NearAndFarClipTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -55,97 +55,92 @@
         final double NEAR = 0.1;
         final double FAR = 10.0;
 
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("Near and Far Clip Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("Near and Far Clip Test");
 
-                final double tanOfHalfFOV = Math.tan(Math.toRadians(FOV) / 2.0);
-                final double halfHeight = HEIGHT / 2;
-                final double focalLength = halfHeight / tanOfHalfFOV;
-                final double eyePositionZ = -1.0 * focalLength;
-                final double nearClipDistance = focalLength * NEAR + eyePositionZ;
-                final double farClipDistance =  focalLength * FAR + eyePositionZ;
-                final double nearClipDistanceOffset = Math.abs(nearClipDistance * OFFSET_PERCENT);
-                final double farClipDistanceOffset = Math.abs(farClipDistance * OFFSET_PERCENT);
-        
+            final double tanOfHalfFOV = Math.tan(Math.toRadians(FOV) / 2.0);
+            final double halfHeight = HEIGHT / 2;
+            final double focalLength = halfHeight / tanOfHalfFOV;
+            final double eyePositionZ = -1.0 * focalLength;
+            final double nearClipDistance = focalLength * NEAR + eyePositionZ;
+            final double farClipDistance =  focalLength * FAR + eyePositionZ;
+            final double nearClipDistanceOffset = Math.abs(nearClipDistance * OFFSET_PERCENT);
+            final double farClipDistanceOffset = Math.abs(farClipDistance * OFFSET_PERCENT);
+      
 //                System.out.println("In scene coordinate: focalLength = " + focalLength
 //                        + ", nearClipDistance = " + nearClipDistance
 //                        + ", nearClipDistanceOffset = " + nearClipDistanceOffset
 //                        + ", farClipDistance = " + farClipDistance
 //                        + ", farClipDistanceOffset = " + farClipDistanceOffset);
 
-                Rectangle insideRect = new Rectangle(220, 220, Color.GREEN);
-                insideRect.setLayoutX(140);
-                insideRect.setLayoutY(140);
+            Rectangle insideRect = new Rectangle(220, 220, Color.GREEN);
+            insideRect.setLayoutX(140);
+            insideRect.setLayoutY(140);
 
-                Rectangle insideNearClip = new Rectangle(16, 16, Color.BLUE);
-                insideNearClip.setLayoutX(242);
-                insideNearClip.setLayoutY(242);
-                insideNearClip.setTranslateZ(nearClipDistance + nearClipDistanceOffset);
+            Rectangle insideNearClip = new Rectangle(16, 16, Color.BLUE);
+            insideNearClip.setLayoutX(242);
+            insideNearClip.setLayoutY(242);
+            insideNearClip.setTranslateZ(nearClipDistance + nearClipDistanceOffset);
 
-                Rectangle outsideNearClip = new Rectangle(16, 16, Color.YELLOW);
-                outsideNearClip.setLayoutX(242);
-                outsideNearClip.setLayoutY(242);
-                outsideNearClip.setTranslateZ(nearClipDistance - nearClipDistanceOffset);
+            Rectangle outsideNearClip = new Rectangle(16, 16, Color.YELLOW);
+            outsideNearClip.setLayoutX(242);
+            outsideNearClip.setLayoutY(242);
+            outsideNearClip.setTranslateZ(nearClipDistance - nearClipDistanceOffset);
 
-                Rectangle insideFarClip = new Rectangle(3000, 3000, Color.RED);
-                insideFarClip.setTranslateX(-1250);
-                insideFarClip.setTranslateY(-1250);
-                insideFarClip.setTranslateZ(farClipDistance - farClipDistanceOffset);
+            Rectangle insideFarClip = new Rectangle(3000, 3000, Color.RED);
+            insideFarClip.setTranslateX(-1250);
+            insideFarClip.setTranslateY(-1250);
+            insideFarClip.setTranslateZ(farClipDistance - farClipDistanceOffset);
 
-                Rectangle outsideFarClip = new Rectangle(4000, 4000, Color.CYAN);
-                outsideFarClip.setTranslateX(-1750);
-                outsideFarClip.setTranslateY(-1750);
-                outsideFarClip.setTranslateZ(farClipDistance + farClipDistanceOffset);
+            Rectangle outsideFarClip = new Rectangle(4000, 4000, Color.CYAN);
+            outsideFarClip.setTranslateX(-1750);
+            outsideFarClip.setTranslateY(-1750);
+            outsideFarClip.setTranslateZ(farClipDistance + farClipDistanceOffset);
 
-                Group root = new Group();
+            Group root = new Group();
 
-                // Render in painter order (far to near)
-                root.getChildren().addAll(outsideFarClip, insideFarClip, insideRect, insideNearClip, outsideNearClip);
+            // Render in painter order (far to near)
+            root.getChildren().addAll(outsideFarClip, insideFarClip, insideRect, insideNearClip, outsideNearClip);
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(root, WIDTH, HEIGHT, false);
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(root, WIDTH, HEIGHT, false);
 
-                PerspectiveCamera camera = new PerspectiveCamera();
-                camera.setFieldOfView(FOV);
-                camera.setNearClip(NEAR);
-                camera.setFarClip(FAR);
-                testScene.setCamera(camera);
+            PerspectiveCamera camera = new PerspectiveCamera();
+            camera.setFieldOfView(FOV);
+            camera.setNearClip(NEAR);
+            camera.setFarClip(FAR);
+            testScene.setCamera(camera);
 
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
+        runAndWait(() -> {
+            
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
+            }
 
-                Color color;
-                // Verify Near Clip
-                color = getColor(testScene, WIDTH / 2, HEIGHT / 2);
-                assertColorEquals(Color.BLUE, color, TOLERANCE);
+            Color color;
+            // Verify Near Clip
+            color = getColor(testScene, WIDTH / 2, HEIGHT / 2);
+            assertColorEquals(Color.BLUE, color, TOLERANCE);
 
-                // Verify Inside Rect
-                color = getColor(testScene, (WIDTH / 3), HEIGHT / 2);
-                assertColorEquals(Color.GREEN, color, TOLERANCE);
+            // Verify Inside Rect
+            color = getColor(testScene, (WIDTH / 3), HEIGHT / 2);
+            assertColorEquals(Color.GREEN, color, TOLERANCE);
 
-                // Verify Far Clip
-                color = getColor(testScene, WIDTH / 5, HEIGHT / 2);
-                assertColorEquals(Color.RED, color, TOLERANCE);
+            // Verify Far Clip
+            color = getColor(testScene, WIDTH / 5, HEIGHT / 2);
+            assertColorEquals(Color.RED, color, TOLERANCE);
 
-                // Verify Fill
-                color = getColor(testScene, WIDTH / 8, HEIGHT / 2);
-                assertColorEquals(Color.WHITE, color, TOLERANCE);
-            }
+            // Verify Fill
+            color = getColor(testScene, WIDTH / 8, HEIGHT / 2);
+            assertColorEquals(Color.WHITE, color, TOLERANCE);
         });
     }
 
--- a/tests/system/src/test/java/test3d/Snapshot3DTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/test3d/Snapshot3DTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -155,11 +155,7 @@
     @Test(timeout=5000)
     public void testSnapshot3D() {
         final AtomicBoolean scene3dSupported = new AtomicBoolean();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                scene3dSupported.set(Platform.isSupported(ConditionalFeature.SCENE3D));
-            }
-        });
+        runAndWait(() -> scene3dSupported.set(Platform.isSupported(ConditionalFeature.SCENE3D)));
         if (!scene3dSupported.get()) {
             System.out.println("*************************************************************");
             System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
@@ -167,28 +163,24 @@
             return;
         }
 
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                testStage = getStage();
-                testStage.setTitle("Snapshot 3D Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("Snapshot 3D Test");
 
-                testScene = buildScene();
+            testScene = buildScene();
 
-                // Take snapshot
-                wImage = testScene.snapshot(null);
+            // Take snapshot
+            wImage = testScene.snapshot(null);
 
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                // Compare the colors in the snapshot image with those rendered to the scene
-                compareColors(testScene, wImage, SAMPLE_X1, SAMPLE_Y1);
-                compareColors(testScene, wImage, SAMPLE_X2, SAMPLE_Y2);
-                compareColors(testScene, wImage, SAMPLE_X3, SAMPLE_Y3);
-            }
+        runAndWait(() -> {
+            // Compare the colors in the snapshot image with those rendered to the scene
+            compareColors(testScene, wImage, SAMPLE_X1, SAMPLE_Y1);
+            compareColors(testScene, wImage, SAMPLE_X2, SAMPLE_Y2);
+            compareColors(testScene, wImage, SAMPLE_X3, SAMPLE_Y3);
         });
     }
 
--- a/tests/system/src/test/java/test3d/TriangleMeshValidationTest.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/test3d/TriangleMeshValidationTest.java	Tue Jun 10 14:35:17 2014 -0400
@@ -58,655 +58,570 @@
 
     @Test(timeout=5000)
     public void testEmptyMesh() {
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("TriangleMesh Validation Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("TriangleMesh Validation Test");
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(buildScene(), WIDTH, HEIGHT, true);
-                testScene.setFill(bgColor);
-                addCamera(testScene);
-                triMesh = new TriangleMesh();
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(buildScene(), WIDTH, HEIGHT, true);
+            testScene.setFill(bgColor);
+            addCamera(testScene);
+            triMesh = new TriangleMesh();
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
+        runAndWait(() -> {
 
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // No warning. Rendering nothing.
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(bgColor, color, TOLERANCE);
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
             }
+            // No warning. Rendering nothing.
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(bgColor, color, TOLERANCE);
         });
     }
 
     @Test(timeout=5000)
     public void testInvalidPointsLength() {
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("TriangleMesh Validation Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("TriangleMesh Validation Test");
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(buildScene(), 800, 800, true);
-                testScene.setFill(bgColor);
-                addCamera(testScene);
-                buildBox();
-                // set invalid points
-                triMesh.getPoints().setAll(1, 1, 1,
-                                1, 1, -1,
-                                1, -1, 1,
-                                1, -1, -1,
-                                -1, 1, 1,
-                                -1, 1, -1,
-                                -1, //-1, 1,
-                                -1, -1, -1);
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(buildScene(), 800, 800, true);
+            testScene.setFill(bgColor);
+            addCamera(testScene);
+            buildBox();
+            // set invalid points
+            triMesh.getPoints().setAll(1, 1, 1,
+                            1, 1, -1,
+                            1, -1, 1,
+                            1, -1, -1,
+                            -1, 1, 1,
+                            -1, 1, -1,
+                            -1, //-1, 1,
+                            -1, -1, -1);
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
+        runAndWait(() -> {
 
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // Rendering nothing. Should receive warning from validatePoints
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(bgColor, color, TOLERANCE);
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
             }
+            // Rendering nothing. Should receive warning from validatePoints
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(bgColor, color, TOLERANCE);
         });
     }
 
     @Test(timeout=5000)
     public void testInvalidTexCoordLength() {
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("TriangleMesh Validation Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("TriangleMesh Validation Test");
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(buildScene(), 800, 800, true);
-                testScene.setFill(bgColor);
-                addCamera(testScene);
-                buildBox();
-                // set invalid texcoords
-                triMesh.getTexCoords().setAll(0, 0,
-                        0, 1,
-                        1, //0,
-                        1, 1);
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(buildScene(), 800, 800, true);
+            testScene.setFill(bgColor);
+            addCamera(testScene);
+            buildBox();
+            // set invalid texcoords
+            triMesh.getTexCoords().setAll(0, 0,
+                    0, 1,
+                    1, //0,
+                    1, 1);
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
+        runAndWait(() -> {
 
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // Rendering nothing. Should receive warning from validateTexcoords
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(bgColor, color, TOLERANCE);
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
             }
+            // Rendering nothing. Should receive warning from validateTexcoords
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(bgColor, color, TOLERANCE);
         });
     }
 
     @Test(timeout=5000)
     public void testInvalidFacesLength() {
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("TriangleMesh Validation Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("TriangleMesh Validation Test");
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(buildScene(), 800, 800, true);
-                testScene.setFill(bgColor);
-                addCamera(testScene);
-                buildBox();
-                // set invalid faces
-                triMesh.getFaces().setAll(0, 0, 2, 2, 1, 1,
-                                2, 2, 3, 3, 1, 1,
-                                4, 0, 5, 1, 6, 2,
-                                6, 2, 5, 1, 7, 3,
-                                0, 0, 1, 1, 4, 2,
-                                4, 2, 1, 1, 5, //3,
-                                2, 0, 6, 2, 3, 1,
-                                3, 1, 6, 2, 7, 3,
-                                0, 0, 4, 1, 2, 2,
-                                2, 2, 4, 1, 6, 3,
-                                1, 0, 3, 1, 5, 2,
-                                5, 2, 3, 1, 7, 3);
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(buildScene(), 800, 800, true);
+            testScene.setFill(bgColor);
+            addCamera(testScene);
+            buildBox();
+            // set invalid faces
+            triMesh.getFaces().setAll(0, 0, 2, 2, 1, 1,
+                            2, 2, 3, 3, 1, 1,
+                            4, 0, 5, 1, 6, 2,
+                            6, 2, 5, 1, 7, 3,
+                            0, 0, 1, 1, 4, 2,
+                            4, 2, 1, 1, 5, //3,
+                            2, 0, 6, 2, 3, 1,
+                            3, 1, 6, 2, 7, 3,
+                            0, 0, 4, 1, 2, 2,
+                            2, 2, 4, 1, 6, 3,
+                            1, 0, 3, 1, 5, 2,
+                            5, 2, 3, 1, 7, 3);
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
+        runAndWait(() -> {
 
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // Rendering nothing. Should receive warning from validateFaces
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(bgColor, color, TOLERANCE);
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
             }
+            // Rendering nothing. Should receive warning from validateFaces
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(bgColor, color, TOLERANCE);
         });
     }
 
     @Test(timeout=5000)
     public void testInvalidFacesIndex() {
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("TriangleMesh Validation Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("TriangleMesh Validation Test");
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(buildScene(), 800, 800, true);
-                testScene.setFill(bgColor);
-                addCamera(testScene);
-                buildBox();
-                triMesh.getFaces().setAll(0, 0, 2, 2, 1, 1,
-                                2, 2, 3, 3, 1, 1,
-                                4, 0, 5, 1, 6, 2,
-                                6, 2, 5, 1, 7, 3,
-                                0, 0, 1, 1, 4, 2,
-                                4, 2, 1, 1, 5, 8, // 8 is out of bound
-                                2, 0, 6, 2, 3, 1,
-                                3, 1, 6, 2, 7, 3,
-                                0, 0, 4, 1, 2, 2,
-                                2, 2, 4, 1, 6, 3,
-                                1, 0, 3, 1, 5, 2,
-                                5, 2, 3, 1, 7, 3);
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(buildScene(), 800, 800, true);
+            testScene.setFill(bgColor);
+            addCamera(testScene);
+            buildBox();
+            triMesh.getFaces().setAll(0, 0, 2, 2, 1, 1,
+                            2, 2, 3, 3, 1, 1,
+                            4, 0, 5, 1, 6, 2,
+                            6, 2, 5, 1, 7, 3,
+                            0, 0, 1, 1, 4, 2,
+                            4, 2, 1, 1, 5, 8, // 8 is out of bound
+                            2, 0, 6, 2, 3, 1,
+                            3, 1, 6, 2, 7, 3,
+                            0, 0, 4, 1, 2, 2,
+                            2, 2, 4, 1, 6, 3,
+                            1, 0, 3, 1, 5, 2,
+                            5, 2, 3, 1, 7, 3);
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
+        runAndWait(() -> {
 
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // Rendering nothing. Should receive warning from validateFaces
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(bgColor, color, TOLERANCE);
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
             }
+            // Rendering nothing. Should receive warning from validateFaces
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(bgColor, color, TOLERANCE);
         });
     }
 
     @Test(timeout=5000)
     public void testInvalidFaceSmoothingGroupsLength() {
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("TriangleMesh Validation Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("TriangleMesh Validation Test");
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(buildScene(), 800, 800, true);
-                testScene.setFill(bgColor);
-                addCamera(testScene);
-                buildBox();
-                // set invalid faceSmoothingGroups
-                triMesh.getFaceSmoothingGroups().setAll(1, 1, 1, 1, 2, 2,/* 2, 2,*/ 4, 4, 4, 4);
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(buildScene(), 800, 800, true);
+            testScene.setFill(bgColor);
+            addCamera(testScene);
+            buildBox();
+            // set invalid faceSmoothingGroups
+            triMesh.getFaceSmoothingGroups().setAll(1, 1, 1, 1, 2, 2,/* 2, 2,*/ 4, 4, 4, 4);
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
+        runAndWait(() -> {
 
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // Rendering nothing. Should receive warning from validateFacesSmoothingGroups
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(bgColor, color, TOLERANCE);
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
             }
+            // Rendering nothing. Should receive warning from validateFacesSmoothingGroups
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(bgColor, color, TOLERANCE);
         });
     }
 
     @Test(timeout=5000)
     public void testPointsLengthChange() {
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("TriangleMesh Validation Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("TriangleMesh Validation Test");
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(buildScene(), 800, 800, true);
-                testScene.setFill(bgColor);
-                addCamera(testScene);
-                buildBox();
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(buildScene(), 800, 800, true);
+            testScene.setFill(bgColor);
+            addCamera(testScene);
+            buildBox();
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
+        runAndWait(() -> {
 
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(Color.RED, color, TOLERANCE);
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
+            }
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(Color.RED, color, TOLERANCE);
 
-                // Valid change of points
-                triMesh.getPoints().setAll(1, 1, 1);
-            }
+            // Valid change of points
+            triMesh.getPoints().setAll(1, 1, 1);
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // Rendering nothing because faces is invalid.
-                // Should receive warning from validateFaces
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(bgColor, color, TOLERANCE);
+        runAndWait(() -> {
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
             }
+            // Rendering nothing because faces is invalid.
+            // Should receive warning from validateFaces
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(bgColor, color, TOLERANCE);
         });
     }
 
     @Test(timeout=5000)
     public void testTexCoordsLengthChange() {
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("TriangleMesh Validation Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("TriangleMesh Validation Test");
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(buildScene(), 800, 800, true);
-                testScene.setFill(bgColor);
-                addCamera(testScene);
-                buildBox();
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(buildScene(), 800, 800, true);
+            testScene.setFill(bgColor);
+            addCamera(testScene);
+            buildBox();
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
+        runAndWait(() -> {
 
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(Color.RED, color, TOLERANCE);
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
+            }
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(Color.RED, color, TOLERANCE);
 
-                // Valid change of texcoords
-                triMesh.getTexCoords().setAll(0, 0, 1, 1);
-            }
+            // Valid change of texcoords
+            triMesh.getTexCoords().setAll(0, 0, 1, 1);
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // Rendering nothing because faces is invalid.
-                // Should receive warning from validateFaces
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(bgColor, color, TOLERANCE);
+        runAndWait(() -> {
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
             }
+            // Rendering nothing because faces is invalid.
+            // Should receive warning from validateFaces
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(bgColor, color, TOLERANCE);
         });
     }
 
     @Test(timeout=10000)
     public void testFaceLengthChange() {
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("TriangleMesh Validation Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("TriangleMesh Validation Test");
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(buildScene(), 800, 800, true);
-                testScene.setFill(bgColor);
-                addCamera(testScene);
-                buildBox();
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(buildScene(), 800, 800, true);
+            testScene.setFill(bgColor);
+            addCamera(testScene);
+            buildBox();
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
+        runAndWait(() -> {
 
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                Color color = getColor(testScene, WIDTH / 4, WIDTH / 4);
-                assertColorEquals(Color.RED, color, TOLERANCE);
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
+            }
+            Color color = getColor(testScene, WIDTH / 4, WIDTH / 4);
+            assertColorEquals(Color.RED, color, TOLERANCE);
 
-                // Valid change of faces
-                triMesh.getFaces().setAll( 5, 2, 3, 1, 7, 3);
+            // Valid change of faces
+            triMesh.getFaces().setAll( 5, 2, 3, 1, 7, 3);
 
-            }
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // Rendering nothing because faceSmoothingGroups is invalid.
-                // Should receive warning from validateFacesSmoothingGroups
-                Color color = getColor(testScene, WIDTH / 4, WIDTH / 4);
-                assertColorEquals(bgColor, color, TOLERANCE);
-                // Reset faceSmoothingGroups
-                triMesh.getFaceSmoothingGroups().setAll();
+        runAndWait(() -> {
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
             }
+            // Rendering nothing because faceSmoothingGroups is invalid.
+            // Should receive warning from validateFacesSmoothingGroups
+            Color color = getColor(testScene, WIDTH / 4, WIDTH / 4);
+            assertColorEquals(bgColor, color, TOLERANCE);
+            // Reset faceSmoothingGroups
+            triMesh.getFaceSmoothingGroups().setAll();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // Rendering a triangle
-                Color color = getColor(testScene, WIDTH / 4, WIDTH / 4);
-                assertColorEquals(Color.RED, color, TOLERANCE);
-                assertColorDoesNotEqual(bgColor, color, TOLERANCE);
+        runAndWait(() -> {
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
             }
+            // Rendering a triangle
+            Color color = getColor(testScene, WIDTH / 4, WIDTH / 4);
+            assertColorEquals(Color.RED, color, TOLERANCE);
+            assertColorDoesNotEqual(bgColor, color, TOLERANCE);
         });
     }
 
     @Test(timeout=5000)
     public void testResetFaceSmoothingGroup() {
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("TriangleMesh Validation Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("TriangleMesh Validation Test");
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(buildScene(), 800, 800, true);
-                testScene.setFill(bgColor);
-                addCamera(testScene);
-                buildBox();
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(buildScene(), 800, 800, true);
+            testScene.setFill(bgColor);
+            addCamera(testScene);
+            buildBox();
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
+        runAndWait(() -> {
 
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(Color.RED, color, TOLERANCE);
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
+            }
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(Color.RED, color, TOLERANCE);
 
-                triMesh.getFaceSmoothingGroups().setAll();
-            }
+            triMesh.getFaceSmoothingGroups().setAll();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // Empty Sm should not affect rendering
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(Color.RED, color, TOLERANCE);
+        runAndWait(() -> {
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
             }
+            // Empty Sm should not affect rendering
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(Color.RED, color, TOLERANCE);
         });
     }
 
     @Test(timeout=5000)
     public void testUpdateMesh() {
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("TriangleMesh Validation Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("TriangleMesh Validation Test");
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(buildScene(), 800, 800, true);
-                testScene.setFill(bgColor);
-                addCamera(testScene);
-                buildBox();
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(buildScene(), 800, 800, true);
+            testScene.setFill(bgColor);
+            addCamera(testScene);
+            buildBox();
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
+        runAndWait(() -> {
 
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // Rendering nothing. Should receive warning from validatePoints
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(Color.RED, color, TOLERANCE);
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
+            }
+            // Rendering nothing. Should receive warning from validatePoints
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(Color.RED, color, TOLERANCE);
 
-                color = getColor(testScene, WIDTH / 5, WIDTH / 5);
-                assertColorEquals(bgColor, color, TOLERANCE);
-                // set points
-                triMesh.getPoints().setAll(1.5f, 1.5f, 1.5f,
-                                1.5f, 1.5f, -1.5f,
-                                1.5f, -1.5f, 1.5f,
-                                1.5f, -1.5f, -1.5f,
-                                -1.5f, 1.5f, 1.5f,
-                                -1.5f, 1.5f, -1.5f,
-                                -1.5f, -1.5f, 1.5f,
-                                -1.5f, -1.5f, -1.5f);
-                triMesh.getTexCoords().setAll(0, 0,
-                                1, 0,
-                                0, 1,
-                                1, 1);
-                triMesh.getFaces().setAll(5, 2, 3, 1, 7, 3);
-                triMesh.getFaceSmoothingGroups().setAll(1);
-            }
+            color = getColor(testScene, WIDTH / 5, WIDTH / 5);
+            assertColorEquals(bgColor, color, TOLERANCE);
+            // set points
+            triMesh.getPoints().setAll(1.5f, 1.5f, 1.5f,
+                            1.5f, 1.5f, -1.5f,
+                            1.5f, -1.5f, 1.5f,
+                            1.5f, -1.5f, -1.5f,
+                            -1.5f, 1.5f, 1.5f,
+                            -1.5f, 1.5f, -1.5f,
+                            -1.5f, -1.5f, 1.5f,
+                            -1.5f, -1.5f, -1.5f);
+            triMesh.getTexCoords().setAll(0, 0,
+                            1, 0,
+                            0, 1,
+                            1, 1);
+            triMesh.getFaces().setAll(5, 2, 3, 1, 7, 3);
+            triMesh.getFaceSmoothingGroups().setAll(1);
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                Color color = getColor(testScene, WIDTH / 5, WIDTH / 5);
-                assertColorEquals(Color.RED, color, TOLERANCE);
+        runAndWait(() -> {
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
             }
+            Color color = getColor(testScene, WIDTH / 5, WIDTH / 5);
+            assertColorEquals(Color.RED, color, TOLERANCE);
         });
     }
 
     @Test(timeout = 5000)
     public void testDegeneratedMeshUpdateFaces() {
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("TriangleMesh Validation Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("TriangleMesh Validation Test");
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(buildScene(), 800, 800, true);
-                testScene.setFill(bgColor);
-                addCamera(testScene);
-                buildSquare();
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(buildScene(), 800, 800, true);
+            testScene.setFill(bgColor);
+            addCamera(testScene);
+            buildSquare();
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
+        runAndWait(() -> {
 
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // Rendering 2 Triangles that form a square
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(Color.RED, color, TOLERANCE);
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
+            }
+            // Rendering 2 Triangles that form a square
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(Color.RED, color, TOLERANCE);
 
-                color = getColor(testScene, WIDTH / 2 + 10, WIDTH / 2 + 10);
-                assertColorEquals(Color.RED, color, TOLERANCE);
-                // set faces with degenerated triangle
-                triMesh.getFaces().setAll(
-                        2, 0, 1, 0, 3, 0,
-                        2, 0, 1, 0, 1, 0);
-            }
+            color = getColor(testScene, WIDTH / 2 + 10, WIDTH / 2 + 10);
+            assertColorEquals(Color.RED, color, TOLERANCE);
+            // set faces with degenerated triangle
+            triMesh.getFaces().setAll(
+                    2, 0, 1, 0, 3, 0,
+                    2, 0, 1, 0, 1, 0);
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
+        runAndWait(() -> {
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
+            }
 
-                // Should render 1 Triangle
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(Color.RED, color, TOLERANCE);
-                color = getColor(testScene, WIDTH / 2 + 10, WIDTH / 2 + 10);
-                assertColorEquals(bgColor, color, TOLERANCE);
+            // Should render 1 Triangle
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(Color.RED, color, TOLERANCE);
+            color = getColor(testScene, WIDTH / 2 + 10, WIDTH / 2 + 10);
+            assertColorEquals(bgColor, color, TOLERANCE);
 
-            }
         });
     }
 
     @Test(timeout = 5000)
     public void testDegeneratedMeshUpdatePoints() {
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                testStage = getStage();
-                testStage.setTitle("TriangleMesh Validation Test");
+        runAndWait(() -> {
+            testStage = getStage();
+            testStage.setTitle("TriangleMesh Validation Test");
 
-                // Intentionally set depth buffer to false to reduce test complexity
-                testScene = new Scene(buildScene(), 800, 800, true);
-                testScene.setFill(bgColor);
-                addCamera(testScene);
-                buildSquare();
-                testStage.setScene(testScene);
-                testStage.show();
-            }
+            // Intentionally set depth buffer to false to reduce test complexity
+            testScene = new Scene(buildScene(), 800, 800, true);
+            testScene.setFill(bgColor);
+            addCamera(testScene);
+            buildSquare();
+            testStage.setScene(testScene);
+            testStage.show();
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
+        runAndWait(() -> {
 
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
-                // Rendering 2 Triangles that form a square
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(Color.RED, color, TOLERANCE);
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
+            }
+            // Rendering 2 Triangles that form a square
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(Color.RED, color, TOLERANCE);
 
-                color = getColor(testScene, WIDTH / 2 + 10, WIDTH / 2 + 10);
-                assertColorEquals(Color.RED, color, TOLERANCE);
-                // set points that casuses a degenerated triangle
-                triMesh.getPoints().setAll(
-                        1.5f, -1.5f, 0f,
-                        1.5f, -1.5f, 0f,
-                        -1.5f, 1.5f, 0f,
-                        -1.5f, -1.5f, 0f);
-            }
+            color = getColor(testScene, WIDTH / 2 + 10, WIDTH / 2 + 10);
+            assertColorEquals(Color.RED, color, TOLERANCE);
+            // set points that casuses a degenerated triangle
+            triMesh.getPoints().setAll(
+                    1.5f, -1.5f, 0f,
+                    1.5f, -1.5f, 0f,
+                    -1.5f, 1.5f, 0f,
+                    -1.5f, -1.5f, 0f);
         });
         waitFirstFrame();
-        runAndWait(new Runnable() {
-            @Override
-            public void run() {
-                if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
-                    System.out.println("*************************************************************");
-                    System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
-                    System.out.println("*************************************************************");
-                    return;
-                }
+        runAndWait(() -> {
+            if (!Platform.isSupported(ConditionalFeature.SCENE3D)) {
+                System.out.println("*************************************************************");
+                System.out.println("*      Platform isn't SCENE3D capable, skipping 3D test.    *");
+                System.out.println("*************************************************************");
+                return;
+            }
 
-                // Should render 1 Triangle
-                Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
-                assertColorEquals(Color.RED, color, TOLERANCE);
-                color = getColor(testScene, WIDTH / 2 + 10, WIDTH / 2 + 10);
-                assertColorEquals(bgColor, color, TOLERANCE);
+            // Should render 1 Triangle
+            Color color = getColor(testScene, WIDTH / 3, WIDTH / 3);
+            assertColorEquals(Color.RED, color, TOLERANCE);
+            color = getColor(testScene, WIDTH / 2 + 10, WIDTH / 2 + 10);
+            assertColorEquals(bgColor, color, TOLERANCE);
 
-            }
         });
     }
 
--- a/tests/system/src/test/java/testharness/VisualTestBase.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/testharness/VisualTestBase.java	Tue Jun 10 14:35:17 2014 -0400
@@ -83,12 +83,7 @@
     @BeforeClass
     public static void doSetupOnce() {
         // Start the Application
-        new Thread(new Runnable() {
-            @Override
-            public void run() {
-                Application.launch(MyApp.class, (String[]) null);
-            }
-        }).start();
+        new Thread(() -> Application.launch(MyApp.class, (String[]) null)).start();
 
         try {
             if (!launchLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)) {
@@ -110,25 +105,19 @@
 
     @Before
     public void doSetup() {
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                robot = com.sun.glass.ui.Application.GetApplication().createRobot();
-            }
-        });
+        runAndWait(() -> robot = com.sun.glass.ui.Application.GetApplication().createRobot());
     }
 
     @After
     public void doTeardown() {
-        runAndWait(new Runnable() {
-            @Override public void run() {
-                if (!stages.isEmpty()) {
-                    for (final Stage stage : stages) {
-                        if (stage.isShowing()) {
-                            stage.hide();
-                        }
+        runAndWait(() -> {
+            if (!stages.isEmpty()) {
+                for (final Stage stage : stages) {
+                    if (stage.isShowing()) {
+                        stage.hide();
                     }
-                    stages.clear();
                 }
+                stages.clear();
             }
         });
     }
@@ -204,15 +193,13 @@
 
     private void frameWait(int n) {
         final CountDownLatch frameCounter = new CountDownLatch(n);
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                timer = new AnimationTimer() {
-                    @Override public void handle(long l) {
-                        frameCounter.countDown();
-                    }
-                };
-                timer.start();
-            }
+        Platform.runLater(() -> {
+            timer = new AnimationTimer() {
+                @Override public void handle(long l) {
+                    frameCounter.countDown();
+                }
+            };
+            timer.start();
         });
 
         try {
@@ -220,11 +207,9 @@
         } catch (InterruptedException ex) {
             throw new AssertionFailedError("Unexpected exception: " + ex);
         } finally {
-            runAndWait(new Runnable() {
-                @Override public void run() {
-                    if (timer != null) {
-                        timer.stop();
-                    }
+            runAndWait(() -> {
+                if (timer != null) {
+                    timer.stop();
                 }
             });
         }
--- a/tests/system/src/test/java/util/Util.java	Tue Jun 10 14:06:11 2014 -0400
+++ b/tests/system/src/test/java/util/Util.java	Tue Jun 10 14:35:17 2014 -0400
@@ -72,47 +72,43 @@
         final Throwable[] testError = new Throwable[1];
         final CountDownLatch latch = new CountDownLatch(1);
 
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                try {
-                    if (delayLatch != null) {
-                        delayLatch.await();
-                    }
-                    r.run();
-                } catch (Throwable th) {
-                    testError[0] = th;
-                } finally {
-                    latch.countDown();
+        Platform.runLater(() -> {
+            try {
+                if (delayLatch != null) {
+                    delayLatch.await();
                 }
+                r.run();
+            } catch (Throwable th) {
+                testError[0] = th;
+            } finally {
+                latch.countDown();
             }
         });
 
-        Future future = new Future() {
-            @Override public boolean await(long timeout, TimeUnit unit) {
-                try {
-                    if (!latch.await(timeout, unit)) {
-                        return false;
-                    }
-                } catch (InterruptedException ex) {
-                    AssertionFailedError err = new AssertionFailedError("Unexpected exception");
-                    err.initCause(ex);
+        Future future = (timeout, unit) -> {
+            try {
+                if (!latch.await(timeout, unit)) {
+                    return false;
+                }
+            } catch (InterruptedException ex) {
+                AssertionFailedError err = new AssertionFailedError("Unexpected exception");
+                err.initCause(ex);
+                throw err;
+            }
+
+            if (testError[0] != null) {
+                if (testError[0] instanceof Error) {
+                    throw (Error)testError[0];
+                } else if (testError[0] instanceof RuntimeException) {
+                    throw (RuntimeException)testError[0];
+                } else {
+                    AssertionFailedError err = new AssertionFailedError("Unknown execution exception");
+                    err.initCause(testError[0].getCause());
                     throw err;
                 }
+            }
 
-                if (testError[0] != null) {
-                    if (testError[0] instanceof Error) {
-                        throw (Error)testError[0];
-                    } else if (testError[0] instanceof RuntimeException) {
-                        throw (RuntimeException)testError[0];
-                    } else {
-                        AssertionFailedError err = new AssertionFailedError("Unknown execution exception");
-                        err.initCause(testError[0].getCause());
-                        throw err;
-                    }
-                }
-
-                return true;
-            }
+            return true;
         };
 
         return future;