### Question:
BeiderMorseEncoder implements StringEncoder { public void setRuleType(final RuleType ruleType) { this.engine = new PhoneticEngine(this.engine.getNameType(), ruleType, this.engine.isConcat(), this.engine.getMaxPhonemes()); }  @Override Object encode(final Object source); @Override String encode(final String source); NameType getNameType(); RuleType getRuleType(); boolean isConcat(); void setConcat(final boolean concat); void setNameType(final NameType nameType); void setRuleType(final RuleType ruleType); void setMaxPhonemes(final int maxPhonemes);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testSetRuleTypeToRulesIllegalArgumentException() { final BeiderMorseEncoder bmpm = new BeiderMorseEncoder(); bmpm.setRuleType(RuleType.RULES); }