Basic test to serialize an object into JSON with Jackson