### Question:
DataSourceManagementBootstrap { protected void initializeDefChangeHandler() { logger.info("Initializing data source definitions change handler"); String defChangeHandlerName = getManagedProperty(DataSourceSettings.getInstance().getProperties(), DEF_CHANGE_HANDLER_BEAN); if (defChangeHandlerName != null) { try { defResourceChangeObserver.setDefChangeHandler(getDefChangeHandler(defChangeHandlerName)); } catch (Exception e) { logger.error("An error was produced during defChangeHandler initialization: " + defChangeHandlerName, e); } } else { logger.info("defChangeHandler was not set"); } } DataSourceManagementBootstrap(); @Inject  DataSourceManagementBootstrap(DataSourceRuntimeManager dataSourceRuntimeManager,
                                         DataSourceDefDeployer dataSourceDefDeployer,
                                         DriverDefDeployer driverDefDeployer,
                                         DefaultDriverInitializer driverInitializer,
                                         DefResourceChangeObserver defResourceChangeObserver,
                                         BeanManager beanManager); @PostConstruct void init(); @PreDestroy void destroy(); static final String DEPLOYMENTS_INITIALIZATION_RETRIES; static final String DEPLOYMENTS_INITIALIZATION_DELAY; static final String DEF_CHANGE_HANDLER_BEAN; }### Answer:
@Test public void testInitializeDefChangeHandler() { dataSourceManagementBootstrap.init(); verify(defResourceChangeObserver, times(1)).setDefChangeHandler(defChangeHandler); }