added unit test files and fixed CMakeLists.txt