added the unittests for the implemented testing features.
corrected the basic consistency test
added support for unittests