Fixed test so that it correctly sends JSON-data to the resource