We must remember that when Allah commanded us to be with those that are truthful, it was done out of pure wisdom. The effort to surround ourselves with a certain caliber of individuals is a great reason for our happiness and feeling comfortable when around our companions. We know that Allah only commands us with things, that are beneficial to us and will bring an enormous amount of good. So make sure that you look at your companions and make sure that these are the types of people you were commanded to be around. Also, and most important, make sure that you are of those people that others are supposed to be around.
Remember, we come together upon good and for the good, and remove ourselves from those people and things that are constantly in contrast to that which we have been commanded with from the Lord of the Worlds.