Refactor FxTestUtils.