@VisibleForTesting
  List<MappingRule> getMappingRules(MappingRulesDescription rules) {
    List<MappingRule> mappingRules = new ArrayList<>();

    for (Rule rule : rules.getRules()) {
      checkMandatoryParameters(rule);

      MappingRuleMatcher matcher = createMatcher(rule);
      MappingRuleAction action = createAction(rule);
      setFallbackToAction(rule, action);

      MappingRule mappingRule = new MappingRule(matcher, action);
      mappingRules.add(mappingRule);
    }

    return mappingRules;
  }
@Test
  public void testSetDefaultRuleWithMissingQueue() {
    rule.setPolicy(Policy.SET_DEFAULT_QUEUE);

    expected.expect(IllegalArgumentException.class);
    expected.expectMessage("default queue is undefined");

    ruleCreator.getMappingRules(description);
  }