// Path: core/src/java/com/strategicgains/eventing/EventHandler.java
// public interface EventHandler
// {
// 	/**
// 	 * Process the given event. Called by the EventMonitor when an event occurs.
// 	 * 
// 	 * @param event
// 	 * @throws Exception if something goes wrong
// 	 */
// 	public void handle(Object event)
// 	throws Exception;
// 	
// 	/**
// 	 * Answers whether this EventHandler can handle events of the given type.
// 	 * If true is returned, the EventMonitor will call handle(), otherwise,
// 	 * the EventMonitor will not ask this event handler to process the event.
// 	 * 
// 	 * @param eventClass
// 	 * @return
// 	 */
// 	public boolean handles(Class<?> eventClass);
// }


import static org.junit.Assert.assertEquals;
import java.io.Serializable;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.strategicgains.eventing.EventHandler;
	{
		assertEquals(0, handler.getCallCount());
		queue.publish(new ErroredEvent());
		Thread.sleep(50);
		assertEquals(1, handler.getCallCount());
		assertEquals(0, ignoredHandler.getCallCount());
		assertEquals(0, longHandler.getCallCount());
	}

	@Test
	public void shouldProcessInParallel()
	throws Exception
	{
		assertEquals(0, longHandler.getCallCount());
		queue.publish(new LongEvent());
		queue.publish(new LongEvent());
		queue.publish(new LongEvent());
		queue.publish(new LongEvent());
		queue.publish(new LongEvent());
		Thread.sleep(50);
		assertEquals(0, handler.getCallCount());
		assertEquals(0, ignoredHandler.getCallCount());
//		System.out.println("longHandler instance=" + longHandler.toString());
		assertEquals(5, longHandler.getCallCount());
	}

	
	// SECTION: INNER CLASSES
	
	private static class DomainEventsTestHandler
// Path: core/src/java/com/strategicgains/eventing/EventHandler.java
// public interface EventHandler
// {
// 	/**
// 	 * Process the given event. Called by the EventMonitor when an event occurs.
// 	 * 
// 	 * @param event
// 	 * @throws Exception if something goes wrong
// 	 */
// 	public void handle(Object event)
// 	throws Exception;
// 	
// 	/**
// 	 * Answers whether this EventHandler can handle events of the given type.
// 	 * If true is returned, the EventMonitor will call handle(), otherwise,
// 	 * the EventMonitor will not ask this event handler to process the event.
// 	 * 
// 	 * @param eventClass
// 	 * @return
// 	 */
// 	public boolean handles(Class<?> eventClass);
// }


// Path: hazelcast/test/java/com/strategicgains/eventing/hazelcast/HazelcastEventBusBuilderTest.java
import static org.junit.Assert.assertEquals;
import java.io.Serializable;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.strategicgains.eventing.EventHandler;

	{
		assertEquals(0, handler.getCallCount());
		queue.publish(new ErroredEvent());
		Thread.sleep(50);
		assertEquals(1, handler.getCallCount());
		assertEquals(0, ignoredHandler.getCallCount());
		assertEquals(0, longHandler.getCallCount());
	}

	@Test
	public void shouldProcessInParallel()
	throws Exception
	{
		assertEquals(0, longHandler.getCallCount());
		queue.publish(new LongEvent());
		queue.publish(new LongEvent());
		queue.publish(new LongEvent());
		queue.publish(new LongEvent());
		queue.publish(new LongEvent());
		Thread.sleep(50);
		assertEquals(0, handler.getCallCount());
		assertEquals(0, ignoredHandler.getCallCount());
//		System.out.println("longHandler instance=" + longHandler.toString());
		assertEquals(5, longHandler.getCallCount());
	}

	
	// SECTION: INNER CLASSES
	
	private static class DomainEventsTestHandler
	implements EventHandler