<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>CMEAddressActivatedEvent and CMEAddressDeactivatedEvent share Type value</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=5362191" />
  <subtitle>CMEAddressActivatedEvent and CMEAddressDeactivatedEvent share Type value</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=5362191</id>
  <updated>2013-05-19T23:49:27Z</updated>
  <dc:date>2013-05-19T23:49:27Z</dc:date>
  <entry>
    <title>RE: CMEAddressActivatedEvent and CMEAddressDeactivatedEvent share Type valu</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5360134" />
    <author>
      <name>Yaw-Ming Chen</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5360134</id>
    <updated>2012-03-27T18:51:52Z</updated>
    <published>2012-03-27T18:51:52Z</published>
    <summary type="html">Yes, it's a bug, Will raise a case.

Thanks</summary>
    <dc:creator>Yaw-Ming Chen</dc:creator>
    <dc:date>2012-03-27T18:51:52Z</dc:date>
  </entry>
  <entry>
    <title>CMEAddressActivatedEvent and CMEAddressDeactivatedEvent share Type value</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5362190" />
    <author>
      <name>Kyle Tuffley</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5362190</id>
    <updated>2012-03-29T07:37:41Z</updated>
    <published>2012-03-27T17:40:33Z</published>
    <summary type="html">Hello,
 
I found an issue with the CMEAddressDeactivatedEvent.  I am using a CMECSTAListener to recieve CMEEvents.  I am using the events, if the event is of type CMENotification, to monitor calls and to keep a phone inventory of devices and thier statuses.  We can clearly see that CMENotification.Type.ADDRESS_ACTIVATED is 2004 and CMENotification.Type.ADDRESS_DEACTIVATED = 2005.  But the CMEAddressActivatedEvent object Type and the CMEAddressDeactivatedEvent object Type share the same Type.
 
I found this issue while writting unit tests using PowerMock and junit
Sample code:
    @Test
    public void testOnNotificationAddressEvent() throws Exception {

        CMECSTAAbstractSession session = new CMECSTASessionImpl();
        String phoneName = "SEP1234";

        CMEProvider provider = PowerMock.createNiceMock(CMEProvider.class);
        CMELocalAddress addr = new CMELocalAddress(provider, 5, phoneName);
        session.setAddress(addr);

        CMEAddressDeactivatedEvent deactivatedEvent = new CMEAddressDeactivatedEvent(new Object(), session);
        CMEAddressActivatedEvent activatedEvent = new CMEAddressActivatedEvent(new Object(), session);

        assertEquals(deactivatedEvent.getType(), activatedEvent.getType());
    }</summary>
    <dc:creator>Kyle Tuffley</dc:creator>
    <dc:date>2012-03-27T17:40:33Z</dc:date>
  </entry>
</feed>

