add test for ComponentData.toJSON