toObject with tests