Add test code, so that the camel provider can be tested individually.
fix a crash.