Add tests for the material(id, data) function.