private ILibrarySpecification newSpec(boolean exists, IRequestDecoder decoder)
{
MockControl control = newControl(ILibrarySpecification.class);
ILibrarySpecification spec = (ILibrarySpecification) control.getMock();
spec.checkExtension(Tapestry.REQUEST_DECODER_EXTENSION_NAME);
control.setReturnValue(exists);
if (exists)
{
spec.getExtension(Tapestry.REQUEST_DECODER_EXTENSION_NAME, IRequestDecoder.class);