CustomDialingRule r = (CustomDialingRule) m_context.load(DialingRule.class, r2.getId()); assertEquals(r2.getPermissionNames().get(0), r.getPermissionNames().get(0));
    public void testAddDeleteRule() {        // TODO - replace with IDialingRule mocks        DialingRule r1 = new CustomDialingRule();        r1.setName("a1");        DialingRule r2 = new CustomDialingRule();        r2.setName("a2");        m_context.storeRule(r1);        m_context.storeRule(r1);        assertEquals(1, m_context.getRules().size());        m_context.storeRule(r2);        assertEquals(2, m_context.getRules().size());        Integer id1 = r1.getId();        m_context.deleteRules(Collections.singletonList(id1));        Collection rules = m_context.getRules();        assertTrue(rules.contains(r2));        assertFalse(rules.contains(r1));        assertEquals(1, rules.size());    }