Microscopic realizations of the trap model