### Question:
DefaultEasyFxml implements EasyFxml { @Override public FxmlLoadResult<Pane, FxmlController> load(final FxmlComponent component) { return this.load(component, Pane.class, FxmlController.class); } @Autowired protected  DefaultEasyFxml(
        final ApplicationContext context,
        final ControllerManager controllerManager,
        EasyFxmlProperties easyFxmlProperties
    ); @Override FxmlLoadResult<Pane, FxmlController> load(final FxmlComponent component); @Override FxmlLoadResult<Pane, FxmlController> load(final FxmlComponent component, final Selector selector); @Override FxmlLoadResult<NODE, CONTROLLER> load(
        final FxmlComponent component,
        final Class<? extends NODE> componentClass,
        final Class<? extends CONTROLLER> controllerClass
    ); @Override FxmlLoadResult<NODE, CONTROLLER> load(
        final FxmlComponent component,
        final Class<? extends NODE> nodeClass,
        final Class<? extends CONTROLLER> controllerClass,
        final Selector selector
    );  }### Answer:
@Test public void loadAsPaneSingle() throws InterruptedException, ExecutionException, TimeoutException { Pane testPane = this.assertSuccessAndGet(this.easyFxml.load(paneWithButtonComponent).getNode()); assertThat(testPane.getChildren()).hasSize(1); assertThat(testPane.getChildren().get(0).getClass()).isEqualTo(Button.class); this.assertControllerBoundToTestPane( testPane, this.controllerManager.getSingle(paneWithButtonComponent) ); }
@Test public void loadAsPaneMultiple() throws InterruptedException, ExecutionException, TimeoutException { Object selector = new Object(); Pane testPane = this.assertSuccessAndGet(this.easyFxml.load(paneWithButtonComponent, new Selector(selector)).getNode()); this.assertControllerBoundToTestPane( testPane, this.controllerManager.getMultiple(paneWithButtonComponent, new Selector(selector)) ); assertThat(testPane.getChildren()).hasSize(1); assertThat(testPane.getChildren().get(0).getClass()).isEqualTo(Button.class); }
@Test public void loadWithTypeSuccess() throws InterruptedException, ExecutionException, TimeoutException { Pane testPane = this.assertSuccessAndGet(this.easyFxml.load( paneWithButtonComponent, Pane.class, FxmlController.class ).getNode()); this.assertControllerBoundToTestPane( testPane, this.controllerManager.getSingle(paneWithButtonComponent) ); }
@Test public void loadWithTypeSingleInvalidClassFailure() { this.assertPaneFailedLoadingAndDidNotRegister( () -> this.easyFxml.load(buttonComponent, Pane.class, FxmlController.class).getNode(), this.controllerManager.getSingle(buttonComponent), ClassCastException.class ); }
@Test public void loadWithTypeSingleInvalidFileFailure() { this.assertPaneFailedLoadingAndDidNotRegister( () -> this.easyFxml.load(invalidComponent).getNode(), this.controllerManager.getSingle(invalidComponent), LoadException.class ); }
@Test public void loadWithTypeMultipleInvalidClassFailure() { Object selector = new Object(); this.assertPaneFailedLoadingAndDidNotRegister( () -> this.easyFxml.load(buttonComponent, Pane.class, NoControllerClass.class, new Selector(selector)).getNode(), this.controllerManager.getMultiple(buttonComponent, new Selector(selector)), ClassCastException.class ); }
@Test public void loadWithTypeMultipleInvalidFileFailure() { Object selector = new Object(); this.assertPaneFailedLoadingAndDidNotRegister( () -> this.easyFxml.load(invalidComponent, new Selector(selector)).getNode(), this.controllerManager.getMultiple(invalidComponent, new Selector(selector)), LoadException.class ); }