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

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