Added some Java and C++ test code