### Question:
MvcViewHandler extends ViewHandlerWrapper { @Override public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId) { if (SpringFacesContext.getCurrentInstance() != null) { if (getDestinationAndModelForViewId(context, viewId) != null) { return null; } } return super.getViewDeclarationLanguage(context, viewId); } MvcViewHandler(ViewHandler delegate, DestinationViewResolver destinationViewResolver); @Override ViewHandler getWrapped(); @Override UIViewRoot createView(FacesContext context, String viewId); @Override UIViewRoot restoreView(FacesContext context, String viewId); @Override String getActionURL(FacesContext context, String viewId); @Override ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId); @Override void renderView(FacesContext context, UIViewRoot viewToRender); @Override String getBookmarkableURL(FacesContext context, String viewId, Map<String, List<String>> parameters,
			boolean includeViewParams); @Override String getRedirectURL(FacesContext context, String viewId, Map<String, List<String>> parameters,
			boolean includeViewParams);  }### Answer:
@Test public void shouldDelegateVDL() throws Exception { this.handler.getViewDeclarationLanguage(this.context, this.viewId); verify(this.delegate).getViewDeclarationLanguage(this.context, this.viewId); }
@Test public void shouldReturnNullVdlForResolvedDestination() throws Exception { SpringFacesContextSetter.setCurrentInstance(this.springFacesContext); DestinationAndModel destinationAndModel = mock(DestinationAndModel.class); given(this.destinationAndModelRegistry.get(this.context, this.viewId)).willReturn(destinationAndModel); ViewDeclarationLanguage vdl = this.handler.getViewDeclarationLanguage(this.context, this.viewId); verify(this.delegate, never()).getViewDeclarationLanguage(eq(this.context), anyString()); assertThat(vdl, is(nullValue())); }