@Test
public void testCheckFirstPendingRoleRequestXid() {

    PendingRoleRequestEntry pending = new PendingRoleRequestEntry(
                        54321, Role.MASTER, 232323);
    replay(sw.channel); // we don't expect any invocations 
    sw.pendingRoleRequests.add(pending);
    assertEquals(true, sw.checkFirstPendingRoleRequestXid(54321));
    assertEquals(false, sw.checkFirstPendingRoleRequestXid(0));
    sw.pendingRoleRequests.clear();
    assertEquals(false, sw.checkFirstPendingRoleRequestXid(54321));
    verify(sw.channel);
}