// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java
// public class MockitoCollections {
// 
// 	private static Initialiser INITIALISER = new Initialiser();
// 
// 	private static Verifier VERIFIER = new Verifier();
// 
// 	/**
// 	 * {@link Initialiser#initialise(Object)}
// 	 * 
// 	 * @param object
// 	 */
// 	public static void initialise(Object object) {
// 		INITIALISER.initialise(object);
// 	}
// 
// 	/**
// 	 * {@link Verifier#collectiveVerify(Class, Collection)}
// 	 * 
// 	 * @param mockClass
// 	 * @param collection
// 	 * @return Object used for verification of all the mocks in the supplied collection
// 	 */
// 	public static <T> T collectiveVerify(Class<T> mockClass, Collection<T> collection) {
// 		return VERIFIER.collectiveVerify(mockClass, collection);
// 	}
// 
// 	/**
// 	 * {@link Verifier#collectiveVerify(Class, Collection, VerificationMode)}
// 	 * 
// 	 * @param mockClass
// 	 * @param collection
// 	 * @param mode
// 	 * @return Object used for verification of all the mocks in the supplied collection
// 	 */
// 	public static <T> T collectiveVerify(Class<T> mockClass, Collection<T> collection, VerificationMode mode) {
// 		return VERIFIER.collectiveVerify(mockClass, collection, mode);
// 	}
// 
// 	/**
// 	 * {@link Verifier#collectiveVerifyZeroInteractions(Collection...)}
// 	 * 
// 	 * @param mocks
// 	 */
// 	public static <T> void collectiveVerifyZeroInteractions(Collection<T>... mocks) {
// 		VERIFIER.collectiveVerifyZeroInteractions(mocks);
// 	}
// 
// 	/**
// 	 * {@link Verifier#collectiveVerifyNoMoreInteractions(Collection...)}
// 	 * 
// 	 * @param mocks
// 	 */
// 	public static <T> void collectiveVerifyNoMoreInteractions(Collection<T>... mocks) {
// 		VERIFIER.collectiveVerifyNoMoreInteractions(mocks);
// 	}
// }


import static org.junit.Assert.assertArrayEquals;
import static org.mockito.BDDMockito.given;
import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import uk.co.webamoeba.mockito.collections.MockitoCollections;
package uk.co.webamoeba.mockito.collections.sample;





/**
 * This test shows how you can use Mockito Collections to deal simply with a {@link Set} of delegates that return
 * values. Comments are included throughout the file to hellp clarify what's going on.
 * 
 * @author James Kennard
 */
@RunWith(MockitoJUnitRunner.class)
public class HandlerManagerAlterantiveTest {

	// HandlerManager containing a Set of Handlers
	@InjectMocks
	private HandlerManager manager;

	// Mock to be injected
	// Name means it will be always first even though it is to be injected into a Set (alphabetical)
	@Mock
	private Handler handler1;

	// Another Mock to be injected
	// Name means it will always be second even though it is to be injected into a Set (alphabetical)
	@Mock
	private Handler handler2;

	// Setup making use of Mockito Collections for injection of handlers
	@Before
	public void before() {
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java
// public class MockitoCollections {
// 
// 	private static Initialiser INITIALISER = new Initialiser();
// 
// 	private static Verifier VERIFIER = new Verifier();
// 
// 	/**
// 	 * {@link Initialiser#initialise(Object)}
// 	 * 
// 	 * @param object
// 	 */
// 	public static void initialise(Object object) {
// 		INITIALISER.initialise(object);
// 	}
// 
// 	/**
// 	 * {@link Verifier#collectiveVerify(Class, Collection)}
// 	 * 
// 	 * @param mockClass
// 	 * @param collection
// 	 * @return Object used for verification of all the mocks in the supplied collection
// 	 */
// 	public static <T> T collectiveVerify(Class<T> mockClass, Collection<T> collection) {
// 		return VERIFIER.collectiveVerify(mockClass, collection);
// 	}
// 
// 	/**
// 	 * {@link Verifier#collectiveVerify(Class, Collection, VerificationMode)}
// 	 * 
// 	 * @param mockClass
// 	 * @param collection
// 	 * @param mode
// 	 * @return Object used for verification of all the mocks in the supplied collection
// 	 */
// 	public static <T> T collectiveVerify(Class<T> mockClass, Collection<T> collection, VerificationMode mode) {
// 		return VERIFIER.collectiveVerify(mockClass, collection, mode);
// 	}
// 
// 	/**
// 	 * {@link Verifier#collectiveVerifyZeroInteractions(Collection...)}
// 	 * 
// 	 * @param mocks
// 	 */
// 	public static <T> void collectiveVerifyZeroInteractions(Collection<T>... mocks) {
// 		VERIFIER.collectiveVerifyZeroInteractions(mocks);
// 	}
// 
// 	/**
// 	 * {@link Verifier#collectiveVerifyNoMoreInteractions(Collection...)}
// 	 * 
// 	 * @param mocks
// 	 */
// 	public static <T> void collectiveVerifyNoMoreInteractions(Collection<T>... mocks) {
// 		VERIFIER.collectiveVerifyNoMoreInteractions(mocks);
// 	}
// }


// Path: mockito-collections-samples/src/test/java/uk/co/webamoeba/mockito/collections/sample/HandlerManagerAlterantiveTest.java
import static org.junit.Assert.assertArrayEquals;
import static org.mockito.BDDMockito.given;
import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import uk.co.webamoeba.mockito.collections.MockitoCollections;

package uk.co.webamoeba.mockito.collections.sample;





/**
 * This test shows how you can use Mockito Collections to deal simply with a {@link Set} of delegates that return
 * values. Comments are included throughout the file to hellp clarify what's going on.
 * 
 * @author James Kennard
 */
@RunWith(MockitoJUnitRunner.class)
public class HandlerManagerAlterantiveTest {

	// HandlerManager containing a Set of Handlers
	@InjectMocks
	private HandlerManager manager;

	// Mock to be injected
	// Name means it will be always first even though it is to be injected into a Set (alphabetical)
	@Mock
	private Handler handler1;

	// Another Mock to be injected
	// Name means it will always be second even though it is to be injected into a Set (alphabetical)
	@Mock
	private Handler handler2;

	// Setup making use of Mockito Collections for injection of handlers
	@Before
	public void before() {
		MockitoCollections.initialise(this);