StoredConfigurationUtil { public static Set<StoredConfigItemKey> changedValues ( final StoredConfiguration originalConfiguration, final StoredConfiguration modifiedConfiguration ) { final Instant startTime = Instant.now(); final Set<StoredConfigItemKey> interestedReferences = new HashSet<>( originalConfiguration.modifiedItems() ); interestedReferences.addAll( modifiedConfiguration.modifiedItems() ); final Set<StoredConfigItemKey> deltaReferences = interestedReferences .parallelStream() .filter( reference -> { final Optional<String> hash1 = originalConfiguration.readStoredValue( reference ).map( StoredValue::valueHash ); final Optional<String> hash2 = modifiedConfiguration.readStoredValue( reference ).map( StoredValue::valueHash ); return !hash1.equals( hash2 ); } ).collect( Collectors.toSet() ); LOGGER.trace( () -> "generated changeLog items via compare", () -> TimeDuration.fromCurrent( startTime ) ); return Collections.unmodifiableSet( deltaReferences ); }  static List<String> profilesForSetting(
            final PwmSetting pwmSetting,
            final StoredConfiguration storedConfiguration
    ); static List<String> profilesForCategory(
            final PwmSettingCategory category,
            final StoredConfiguration storedConfiguration
    ); static StoredConfiguration copyConfigAndBlankAllPasswords( final StoredConfiguration storedConfig ); static List<String> validateValues( final StoredConfiguration storedConfiguration ); static Set<StoredConfigItemKey> search( final StoredConfiguration storedConfiguration, final String searchTerm, final Locale locale ); static boolean matchSetting(
            final StoredConfiguration storedConfiguration,
            final PwmSetting setting,
            final StoredValue storedValue,
            final String term,
            final Locale defaultLocale ); static boolean verifyPassword( final StoredConfiguration storedConfiguration, final String password ); static boolean hasPassword( final StoredConfiguration storedConfiguration ); static void setPassword( final StoredConfigurationModifier storedConfiguration, final String password ); static void initNewRandomSecurityKey( final StoredConfigurationModifier modifier ); static Map<String, String> makeDebugMap(
            final StoredConfiguration storedConfiguration,
            final Collection<StoredConfigItemKey> interestedItems,
            final Locale locale
    ); static Set<StoredConfigItemKey> allPossibleSettingKeysForConfiguration(
            final StoredConfiguration storedConfiguration
    ); static Set<StoredConfigItemKey> changedValues(
            final StoredConfiguration originalConfiguration,
            final StoredConfiguration modifiedConfiguration
    );  }
@Test public void testChangedValues() throws PwmUnrecoverableException { final StoredConfiguration storedConfiguration = StoredConfigurationFactory.newConfig(); final StoredConfigurationModifier modifier = StoredConfigurationModifier.newModifier( storedConfiguration ); modifier.writeSetting( PwmSetting.NOTES, null, new StringValue( "notes test" ), null ); final StoredConfiguration newConfig = modifier.newStoredConfiguration(); final Set<StoredConfigItemKey> modifiedKeys = StoredConfigurationUtil.changedValues( storedConfiguration, newConfig ); Assert.assertEquals( modifiedKeys.size(), 1 ); Assert.assertEquals( modifiedKeys.iterator().next(), StoredConfigItemKey.fromSetting( PwmSetting.NOTES, null ) ); final StoredConfigurationModifier modifier2 = StoredConfigurationModifier.newModifier( newConfig ); modifier2.resetSetting( PwmSetting.NOTES, null, null ); final StoredConfiguration resetConfig = modifier2.newStoredConfiguration(); final Set<StoredConfigItemKey> resetKeys = StoredConfigurationUtil.changedValues( newConfig, resetConfig ); Assert.assertEquals( resetKeys.size(), 1 ); Assert.assertEquals( resetKeys.iterator().next(), StoredConfigItemKey.fromSetting( PwmSetting.NOTES, null ) ); }