…We can say that (1) every person is, being tested in this world; (2) everybody provides a chance of test for others, as well as for himself. For example, if an ill-tempered person harms his neighbour, he is failing in his test; but at the same time he is providing a test for his neighbour also. If his neighbour tries to correct his behaviour by his own example, and by persuasion, then he succeeds in his own test, no matter whether his ill-tempered neighbour changes his attitude or not.
By the way, it is for this reason that Islam expects us to perform our duties towards others without caring whether they perform their duty or not. After all, as we are undergoing a test, we are like students sitting in an examination hall. No student would like to ruin his answer book just because his classfellow did not write his own test-papers well.
—Extract from ‘The Justice of God’ by Sayed Saeed Akhtar Rizvi