@@ -0,0 +1,1455 @@
+package eu.drus.jpa.unit.cdi;%0A%0Aimport static org.hamcrest.CoreMatchers.instanceOf;%0Aimport static org.hamcrest.CoreMatchers.not;%0Aimport static org.hamcrest.CoreMatchers.nullValue;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.mockito.Mockito.verifyNoMoreInteractions;%0A%0Aimport javax.enterprise.inject.spi.ProcessProducer;%0Aimport javax.enterprise.inject.spi.Producer;%0Aimport javax.persistence.EntityManager;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.ArgumentCaptor;%0Aimport org.mockito.Captor;%0Aimport org.mockito.Mock;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0A%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class JpaUnitCdiExtensionTest %7B%0A%0A    @Mock%0A    private ProcessProducer%3CObject, EntityManager%3E producer;%0A%0A    @Captor%0A    private ArgumentCaptor%3CProducer%3CEntityManager%3E%3E producerCaptor;%0A%0A    @Test%0A    public void testRegisterProducer() %7B%0A        // GIVEN%0A        final JpaUnitCdiExtension extension = new JpaUnitCdiExtension();%0A%0A        // WHEN%0A        extension.registerProducer(producer);%0A%0A        // THEN%0A        verify(producer).getProducer();%0A        verify(producer).setProducer(producerCaptor.capture());%0A        verifyNoMoreInteractions(producer);%0A%0A        final Producer%3CEntityManager%3E captured = producerCaptor.getValue();%0A        assertThat(captured, not(nullValue()));%0A        assertThat(captured, instanceOf(EntityManagerProducer.class));%0A    %7D%0A%7D%0A

Test for JpaUnitCdiExtension added