Tests (one ;P) for fromJSON and toJSON.