### Question:
MvcResponseStateManager extends ResponseStateManagerWrapper implements RenderKitIdAware { @Override public void writeState(FacesContext context, Object state) throws IOException { if (SpringFacesContext.getCurrentInstance() != null && SpringFacesContext.getCurrentInstance().getRendering() != null && RenderKitFactory.HTML_BASIC_RENDER_KIT.equals(this.renderKitId)) { ViewArtifact viewArtifact = SpringFacesContext.getCurrentInstance().getRendering().getViewArtifact(); this.stateHandler.write(context, viewArtifact); } super.writeState(context, state); } MvcResponseStateManager(ResponseStateManager delegate, FacesViewStateHandler stateHandler); void setRenderKitId(String renderKitId); @Override ResponseStateManager getWrapped(); @Override void writeState(FacesContext context, Object state);  }### Answer:
@Test public void shouldDelegateWriteState() throws Exception { this.stateManager.writeState(this.context, this.state); verify(this.delegate).writeState(this.context, this.state); }