added gtest for internal unittesting