EasyMock.expect(mockedCodec.decodeResource(EasyMock.<FacesContext>notNull(), EasyMock.eq("StateHolderResource")))
.andReturn(resourceCodecData);
EasyMock.replay(mockedCodec, resourceCodecData, mockCache);
ServicesFactoryImpl injector = new ServicesFactoryImpl();
injector.init(Collections.<Module>singletonList(new Module() {
public void configure(ServicesFactory injector) {
injector.setInstance(ResourceCodec.class, mockedCodec);
injector.setInstance(org.richfaces.cache.Cache.class, mockCache);
injector.setInstance(Uptime.class, new Uptime());
injector.setInstance(DependencyInjector.class, new DependencyInjectorImpl());