To test the effects of heating on magnetization, heat the bar magnet to a specific temperature and measure its magnetization using a magnetometer. To test the effects of cooling, cool the bar magnet to a specific temperature and again measure its magnetization. By comparing the magnetization measurements before and after heating or cooling, you can observe any changes in the magnetization properties of the bar magnet.