Yes, the above code is not part of any available sample, so you should add it and recompile in order to test it.
You can create a subclass of the default LiteralBasedProvider class, for instance.