test for writing json by using jackson