@Override
  public void reload(AppSettings settings) throws IOException {
    if (ClusterSettings.isClusterEnabled(settings)) {
      throw new IllegalStateException("Restart is not possible with cluster mode");
    }
    AppSettings reloaded = settingsLoader.load();
    ensureUnchangedConfiguration(settings.getProps(), reloaded.getProps());
    settings.reload(reloaded.getProps());

    fileSystem.reset();
    logging.configure();
    appState.reset();
  }
@Test
  public void reload_configuration_then_reset_all() throws IOException {
    AppSettings settings = new TestAppSettings(ImmutableMap.of("foo", "bar"));
    AppSettings newSettings = new TestAppSettings(ImmutableMap.of("foo", "newBar", "newProp", "newVal"));
    when(settingsLoader.load()).thenReturn(newSettings);

    underTest.reload(settings);

    assertThat(settings.getProps().rawProperties())
      .contains(entry("foo", "newBar"))
      .contains(entry("newProp", "newVal"));
    verify(logging).configure();
    verify(state).reset();
    verify(fs).reset();
  }