protected String removePatternFromUsernameIfNecessary(final String username) {
        return FunctionUtils.doIfNotNull(removePattern, () -> RegExUtils.removePattern(username, removePattern), () -> username).get();
    }
Initializes the registered service with default values
for fields that are unspecified. Only triggered by JPA.
core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/BaseRegisteredServiceUsernameAttributeProvider.java