@Test
  public void moduleShouldNotBeInitializedWhenNoConfigProvided() throws InterruptedException {
    GraphDatabaseService database = builder().newGraphDatabase();

    registerShutdownHook(database);

    assertTrue(TEST_RUNTIME_MODULES.isEmpty());

    database.shutdown();

    assertTrue(TEST_RUNTIME_MODULES.isEmpty());
  }
  @Test
  public void moduleShouldBeInitializedWhenModuleIsDisabled() throws InterruptedException {
    GraphDatabaseService database =
        builder().setConfig(TestModuleBootstrapper.MODULE_ENABLED, null).newGraphDatabase();

    registerShutdownHook(database);

    assertTrue(TEST_RUNTIME_MODULES.isEmpty());

    database.shutdown();

    assertTrue(TEST_RUNTIME_MODULES.isEmpty());
  }
  @Test(expected = InvalidSettingException.class)
  public void misconfiguredRuntimeShouldFailStartup() throws InterruptedException {
    GraphDatabaseService database =
        builder()
            .setConfig(RUNTIME_ENABLED, "whatever")
            .setConfig(
                TestModuleBootstrapper.MODULE_ENABLED,
                TestModuleBootstrapper.MODULE_ENABLED.getDefaultValue())
            .newGraphDatabase();

    registerShutdownHook(database);

    assertTrue(TEST_RUNTIME_MODULES.isEmpty());

    database.shutdown();

    assertTrue(TEST_RUNTIME_MODULES.isEmpty());
  }