@@ -0,0 +1,2066 @@
+package de.skuzzle.jeve;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertSame;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.verify;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0A%0Aimport de.skuzzle.jeve.invoke.FailedEventInvocation;%0A%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class FailureCollectorTest %7B%0A%0A    @Mock%0A    private ExceptionCallback delegate;%0A%0A    private FailureCollector subject;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%7D%0A%0A    @Test(expected = IllegalArgumentException.class)%0A    public void testCreateNullDelegate() throws Exception %7B%0A        FailureCollector.delegatingTo(null);%0A    %7D%0A%0A    @Test%0A    public void testInitiallyEmpty() throws Exception %7B%0A        assertEquals(0, FailureCollector.create().getFailedInvocations().size());%0A    %7D%0A%0A    @Test%0A    public void testCollectWithoutDelegate() throws Exception %7B%0A        this.subject = FailureCollector.create();%0A        final FailedEventInvocation failed = mock(FailedEventInvocation.class);%0A        final FailedEventInvocation failed2 = mock(FailedEventInvocation.class);%0A        this.subject.exception(failed);%0A        this.subject.exception(failed2);%0A%0A        assertEquals(2, this.subject.getFailedInvocations().size());%0A        assertSame(failed, this.subject.iterator().next());%0A    %7D%0A%0A    @Test%0A    public void testCollectWithDelegate() throws Exception %7B%0A        this.subject = FailureCollector.delegatingTo(this.delegate);%0A        final FailedEventInvocation failed = mock(FailedEventInvocation.class);%0A        final FailedEventInvocation failed2 = mock(FailedEventInvocation.class);%0A        this.subject.exception(failed);%0A        this.subject.exception(failed2);%0A%0A        assertEquals(2, this.subject.getFailedInvocations().size());%0A        assertSame(failed, this.subject.iterator().next());%0A        verify(this.delegate).exception(failed);%0A        verify(this.delegate).exception(failed2);%0A    %7D%0A%7D%0A

Add FailureCollector test