Fix permissions of three_cpp files
Added three unit tests