use of com.artezio.arttime.web.ProjectsBean in project ART-TIME by Artezio.
the class CDIUtilsTest method testGetBean.
@Test
public void testGetBean() {
CDI cdi = createMock(CDI.class);
Instance instance = createMock(Instance.class);
ProjectsBean projectsBean = createMock(ProjectsBean.class);
PowerMock.mockStatic(CDI.class);
expect(CDI.current()).andReturn(cdi);
expect(cdi.select(ProjectsBean.class)).andReturn(instance);
expect(instance.get()).andReturn(projectsBean);
PowerMock.replayAll(CDI.class, cdi, instance);
ProjectsBean actual = CDIUtils.getBean(ProjectsBean.class);
PowerMock.verifyAll();
}
Aggregations