Map<String, String> execute(ServerWebExchange exchange, StainingRule stainingRule) {
		if (stainingRule == null) {
			return Collections.emptyMap();
		}

		List<StainingRule.Rule> rules = stainingRule.getRules();
		if (CollectionUtils.isEmpty(rules)) {
			return Collections.emptyMap();
		}

		Map<String, String> parsedLabels = new HashMap<>();

		for (StainingRule.Rule rule : rules) {
			List<Condition> conditions = rule.getConditions();

			Set<String> keys = new HashSet<>();
			conditions.forEach(condition -> keys.add(condition.getKey()));
			Map<String, String> actualValues = SpringWebExpressionLabelUtils.resolve(exchange, keys);

			if (!ConditionUtils.match(actualValues, conditions)) {
				continue;
			}

			parsedLabels.putAll(KVPairUtils.toMap(rule.getLabels()));
		}

		return parsedLabels;
	}
@Test
	public void testNoStainingRule() {
		RuleStainingExecutor executor = new RuleStainingExecutor();
		assertThat(executor.execute(null, null)).isEmpty();
		assertThat(executor.execute(null, new StainingRule())).isEmpty();
	}