@@ -0,0 +1,906 @@
+package org.realityforge.arez;%0A%0Aimport java.util.ArrayList;%0Aimport javax.annotation.Nonnull;%0Aimport static org.testng.Assert.*;%0A%0Afinal class TestSpyEventHandler%0A  implements SpyEventHandler%0A%7B%0A  private final ArrayList%3CObject%3E _events = new ArrayList%3C%3E();%0A%0A  @Override%0A  public void onSpyEvent( @Nonnull final Object event )%0A  %7B%0A    _events.add( event );%0A  %7D%0A%0A  %3CT%3E T assertEvent( @Nonnull final Class%3CT%3E type, final int index )%0A  %7B%0A    assertTrue( eventCount() %3E index );%0A    final Object event = _events.get( index );%0A    assertTrue( type.isInstance( event ),%0A                %22Expected event at index %22 + index + %22 to be of type %22 + type + %22 but is %22 +%0A                event + %22 which is of type %22 + event.getClass() );%0A    return type.cast( event );%0A  %7D%0A%0A  void assertEventCount( final int count )%0A  %7B%0A    assertEquals( eventCount(), count );%0A  %7D%0A%0A  int eventCount()%0A  %7B%0A    return _events.size();%0A  %7D%0A%7D%0A

Add SpyEventHandler useful during tests