@Test
@SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert")
public void testRunAsSoonAsPossibleWhenCalledFromFXThread() {

  interact(() -> { // This will be running in the JavaFX thread
    final boolean[] hasRun = {false};
    unRegisteredPlatform.runAsSoonAsPossible(() -> {
      assertTrue("Should have run in the JavaFX thread!", Platform.isFxApplicationThread());
      hasRun[0] = true;
    });
    assertTrue("When running in the JavaFX thread this should have run immediately in the same "
            + "thread",
        hasRun[0]);
  });
}