@Test
public void testDeliverRoleRequestNotSupported () {

    // normal case. xid is pending 
    PendingRoleRequestEntry pending = new PendingRoleRequestEntry(
                        (int)System.currentTimeMillis(),  // arbitrary xid
                        Role.MASTER,
                        System.nanoTime() // arbitrary cookie
                        );
    sw.role = Role.SLAVE;
    sw.pendingRoleRequests.add(pending);
    replay(sw.channel);
    sw.deliverRoleRequestNotSupported(pending.xid);
    verify(sw.channel);
    assertEquals(false, sw.getAttribute(IOFSwitch.SWITCH_SUPPORTS_NX_ROLE));
    assertEquals(null, sw.role);
    assertEquals(0, sw.pendingRoleRequests.size());
}