public void unsecure() {
        BasicAuthConfiguration configuration = configuration();
        if (configuration == null || Boolean.FALSE.equals(configuration.getEnabled())) {
            return;
        }

        settingRepository.save(Setting.builder()
            .key(BASIC_AUTH_SETTINGS_KEY)
            .value(configuration.withEnabled(false))
            .build());
    }
@Test
    void unsecure() {
        assertThat(basicAuthService.isEnabled(), is(true));
        BasicAuthService.SaltedBasicAuthConfiguration previousConfiguration = basicAuthService.configuration();

        basicAuthService.unsecure();

        assertThat(basicAuthService.isEnabled(), is(false));
        BasicAuthService.SaltedBasicAuthConfiguration newConfiguration = basicAuthService.configuration();


        assertThat(newConfiguration.getEnabled(), is(false));
        assertThat(newConfiguration.getUsername(), is(previousConfiguration.getUsername()));
        assertThat(newConfiguration.getPassword(), is(previousConfiguration.getPassword()));
        assertThat(newConfiguration.getRealm(), is(previousConfiguration.getRealm()));
        assertThat(newConfiguration.getOpenUrls(), is(previousConfiguration.getOpenUrls()));
    }