private static Function<WithDittoHeaders, CompletionStage<WithDittoHeaders>> newPreEnforcer( final BlockedNamespaces blockedNamespaces, final PlaceholderSubstitution placeholderSubstitution) { return withDittoHeaders -> BlockNamespaceBehavior.of(blockedNamespaces) .block(withDittoHeaders) .thenApply(CommandWithOptionalEntityValidator.getInstance()) .thenCompose(placeholderSubstitution); }