Added self-testing capability and updated the empty test example (template)

Ready for release 0.7