### Question:
FxmlView { public <C> C getController() { ensureViewLoaded(); return fxmlLoader.getController(); } FxmlView(Class<?> controllerClass, Object... controllers); C getController(); T getRootNode(); static Function<Class<?>, Object> getControllerFactory(); static void setControllerFactory(Function<Class<?>, Object> controllerFactory);  }### Answer:
@Test public void testNewControllerInstancePerView() { assertTrue(new FxmlView(TestController.class).getController() != new FxmlView(TestController.class) .getController()); }
@Test public void testResourceBundleLoaded() { FxmlView view = new FxmlView(TestController.class); TestController controller = view.getController(); assertEquals("hi", controller.resourceBundle.getObject("label")); }
@Test public void testControllerInstanceUsage() { TestController testController = new TestController(); HeaderSubViewController headerSubViewController = new HeaderSubViewController(); FxmlView view = new FxmlView(TestController.class, testController, headerSubViewController); TestController mainController = view.getController(); assertSame(testController, mainController); assertSame(headerSubViewController, mainController.headerController.headerSubViewController); assertFalse(mainController.subView1Controller == mainController.subView2Controller); }