@Override
    public boolean contains(Object o) {
        SelectionKey[] array = keys;
        for (int i = 0, s = size; i < s; i++) {
            SelectionKey k = array[i];
            if (k.equals(o)) {
                return true;
            }
        }
        return false;
    }
@Test
    public void contains() {
        SelectedSelectionKeySet set = new SelectedSelectionKeySet();
        assertTrue(set.add(mockKey));
        assertTrue(set.add(mockKey2));
        assertTrue(set.contains(mockKey));
        assertTrue(set.contains(mockKey2));
        assertFalse(set.contains(mockKey3));
    }