public void testAddListenerWithIllegalArguments() {
   Fixture.fakePhase(PhaseId.PROCESS_ACTION);
   Display display = new Display();
   Widget widget = new Shell(display);
   IEventAdapter eventAdapter = (IEventAdapter) widget.getAdapter(IEventAdapter.class);
   try {
     eventAdapter.addListener(SelectionListener.class, new Object());
     fail();
   } catch (final IllegalArgumentException iae) {
   }
   try {
     eventAdapter.addListener(SelectionListener.class, null);
     fail();
   } catch (final IllegalArgumentException iae) {
   }
   try {
     SelectionListener validListener = new SelectionAdapter() {};
     eventAdapter.addListener(null, validListener);
     fail();
   } catch (final IllegalArgumentException iae) {
   }
   Object[] listeners = eventAdapter.getListener(SelectionListener.class);
   assertEquals(0, listeners.length);
 }