@@ -0,0 +1,1669 @@
+package ca.antonious.viewcelladapter;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.*;%0A%0A/**%0A * Created by George on 2016-12-18.%0A */%0A%0Apublic class ListenerCollectionTests %7B%0A    private RegisteredListener registeredListener;%0A    private ListenerCollection listenerCollection;%0A%0A    @Before%0A    public void set_up() %7B%0A        registeredListener = new RegisteredListener() %7B%0A            @Override%0A            public void listen() %7B%0A%0A            %7D%0A        %7D;%0A%0A        listenerCollection = new ListenerCollection();%0A        listenerCollection.addListener(registeredListener);%0A    %7D%0A%0A    @Test%0A    public void test_getListener_ifListenerIsRegistered_returnsInstanceOfListener() %7B%0A        Object expectedListener = registeredListener;%0A        Object actualListener = listenerCollection.getListener(RegisteredListener.class);%0A%0A        assertEquals(expectedListener, actualListener);%0A    %7D%0A%0A    @Test%0A    public void test_getListener_ifListenerIsNotRegistered_returnsNull() %7B%0A        Object expectedListener = null;%0A        Object actualListener = listenerCollection.getListener(NotRegisteredListener.class);%0A%0A        assertEquals(expectedListener, actualListener);%0A    %7D%0A%0A    @Test%0A    public void test_removeListener_removesListener() %7B%0A        listenerCollection.removeListener(registeredListener);%0A%0A        Object expectedListener = null;%0A        Object actualListener = listenerCollection.getListener(RegisteredListener.class);%0A%0A        assertEquals(expectedListener, actualListener);%0A    %7D%0A%0A    public interface RegisteredListener %7B%0A        void listen();%0A    %7D%0A%0A    public interface NotRegisteredListener %7B%0A        void listen();%0A    %7D%0A%7D%0A

Add tests for the ListenerCollection