added java and c++ tests