class CmTemplateProcessor implements BlueprintTextProcessor {

    @VisibleForTesting
    Map<String, ServiceComponent> mapRoleRefsToServiceComponents() {
        return ofNullable(cmTemplate.getServices()).orElse(List.of()).stream()
                .filter(service -> service.getRoleConfigGroups() != null)
                .flatMap(service -> service.getRoleConfigGroups().stream()
                        .map(rcg -> Pair.of(service.getServiceType(), rcg)))
                .collect(toMap(
                        pair -> pair.getRight().getRefName(),
                        pair -> ServiceComponent.of(pair.getLeft(), pair.getRight().getRoleType())));
    }

    public  CmTemplateProcessor(@Nonnull String cmTemplateText);

}