@Test
public void shouldHaveRenderingWhenRendering() throws Exception {
FacesView view = mock(FacesView.class);
given(view.getViewArtifact()).willReturn(new ViewArtifact("artifact"));
Map<String, Object> model = new HashMap<String, Object>();
final ModelAndViewArtifact modelAndViewArtifact = new ModelAndViewArtifact("artifact", model);
Lifecycle lifecycle = mock(Lifecycle.class);
given(this.lifecycleAccessor.getLifecycle()).willReturn(lifecycle);
willAnswer(new Answer<Object>() {
public Object answer(InvocationOnMock invocation) throws Throwable {
assertThat(DefaultSpringFacesContextTest.this.springFacesContext.getRendering(),