Added the test framework
Merge pull request #3091 from wet-boew/v4.0-test

Unit tests!!!!!!!!!