assertEquals(4, rules.size());
assertEquals(3, rules.size());
    public void testAppendToGenerationRules() throws Exception {        InternalRule ir = new InternalRule();        ir.setName("kuku");        ir.setDescription(TEST_DESCRIPTION);        ir.setLocalExtensionLen(5);        AutoAttendant aa = new AutoAttendant();        aa.setExtension("100");        ir.setAutoAttendant(aa);        ir.setVoiceMail("20004");        ir.setVoiceMailPrefix("7");        ir.setEnabled(true);        List rules = new ArrayList();        ir.appendToGenerationRules(rules);        assertEquals(4, rules.size());        MappingRule o = (MappingRule) rules.get(0);        MappingRule v = (MappingRule) rules.get(1);        MappingRule vt = (MappingRule) rules.get(2);        MappingRule vf = (MappingRule) rules.get(3);        assertEquals(TEST_DESCRIPTION, o.getDescription());        assertEquals("100", o.getPatterns()[0]);        assertEquals(0, o.getPermissions().size());        UrlTransform to = (UrlTransform) o.getTransforms()[0];        assertEquals(OPERATOR_URL, to.getUrl());        assertEquals(TEST_DESCRIPTION, v.getDescription());        assertEquals("20004", v.getPatterns()[0]);        assertEquals(0, v.getPermissions().size());        UrlTransform tv = (UrlTransform) v.getTransforms()[0];        assertEquals(VOICEMAIL_URL, tv.getUrl());        assertEquals(TEST_DESCRIPTION, vt.getDescription());        assertEquals("7xxxxx", vt.getPatterns()[0]);        assertEquals(0, vt.getPermissions().size());        UrlTransform tvt = (UrlTransform) vt.getTransforms()[0];        assertEquals(VOICEMAIL_TRANSFER_URL, tvt.getUrl());        assertEquals(TEST_DESCRIPTION, vf.getDescription());        assertEquals(".", vf.getPatterns()[0]);        assertEquals(Permission.VOICEMAIL, vf.getPermissions().get(0));        UrlTransform tvf = (UrlTransform) vf.getTransforms()[0];        assertEquals(VOICEMAIL_FALLBACK_URL, tvf.getUrl());    }