Hi , is there a way to use Mockito instance with Application composer for
unit tests ?

For example here, is there a solution to use the mockito instance for the
EjbJar ? :


> @RunWith(ApplicationComposer.class)
> public class EchoServiceTest {
>
>     @Mock
>     private DummyService dummyService;
>     @EJB
>     private EchoService echoService;
>     @Before
>     public void init() {
>         MockitoAnnotations.initMocks(this);
>     }
>
>     @Module
>     public EjbJar createEjbJar() {
>         EjbJar ejbJar = new EjbJar(this.getClass().getSimpleName());
>         ejbJar.addEnterpriseBean(new StatelessBean(EchoService.class));
> //        ejbJar.addEnterpriseBean(new StatelessBean);
>         return ejbJar;
>     }

Reply via email to