test for conversion from Java Object to JSON Object