package nl.utwente.group10.ui.components;

import javafx.application.Application;
import javafx.stage.Stage;
import org.junit.BeforeClass;

/**
 * Superclass for component tests.
 */
public class ComponentTest {
    private static Thread t = null;

    /**
     * Test Application extension with voided start method
     * to enable setup of unit testing.
     */
    public static class MockApp extends Application {
        @Override
        public void start(Stage primaryStage) throws Exception {
            //Do nothing
        }
    }

    /**
     * Before testing start a JavaFX thread to be able to run
     * and test JavaFX elements
     */
    @BeforeClass
    public static void initJFX() {
        if (t == null) {
            t = new Thread("JavaFX Init Thread") {
                public void run() {
                    Application.launch(MockApp.class);
                }
            };
            t.setDaemon(true);
            t.start();
        }
    }
}

@@ -754,87 +754,13 @@
 ead(
-%22JavaFX Init Thread%22) %7B%0A                public void run() %7B%0A                   
+() -%3E
  App
@@ -793,41 +793,9 @@
 ass)
-;%0A                %7D%0A            %7D
+)
 ;%0A  

Simplify thread creation in ComponentTest