Changed C++ code to use GoogleTest