Before Joseph reveals his identity to his brothers, he tests them to see if they’re really sorrowful; to see if they’re repentant. Because until a person repents, there’s really no change.