@Test
@SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert")
public void testRunAsSoonAsPossibleRunsInCorrectThreadWhenNotCalledFromFXThread() throws
    Exception {

  final Waiter waiter = new Waiter();
  platform.runAsSoonAsPossible(() -> {
    waiter.assertTrue(Platform.isFxApplicationThread());
    waiter.resume();
  });
  waiter.await();
}