Ali ibn Abu Talib was once asked by a man: “how can a person know if he is from the people [concerned] with this world (Dunya) or from the people [concerned] with the hereafter (Akhirah)?”
He responded: “there is a measurement inside yourself that you can test yourself with to know which side you are on.”
The man asked: “but how?”
Ali replied: “If a person comes to your house to give you a gift, and at the same time another person comes to take something…” so the gift is something tangible, with a bow and all that, while the second person is asking a favor from you.
Ali continued: “If you are more happy with the person that gave you the gift, then you are from the people [concerned] with this world (Dunya); if you are more happy with the person that took from you [a favor, etc] then you are from the people [concerned] with the hereafter (Akhirah).”
Why?
Because the individual is inclined to like the people who give them things that help them in their goals and their desires. If your desire is to accumulate things, possessions, then the gift will satisfy you more, but if you value your place in the hereafter, then, you will be happy that someone has given you the opportunity to help them.