In the Bible we are told that Joseph's brethren agreed to sell him into slavery because they were envious of his father's love for him. He was placed temporarily in a deep pit, but was soon drawn out and sold to the Ishmaelites. Joseph did not enter into the conspiracy of evil by retaliating or being resentful or revengeful.
The spiritual qualities of thought, such as mercy and forgiveness, which Joseph later expressed in dealing with his brothers during their great need made him an instrument for good which God used to manifest great abundance and supply, not only to Joseph's own people, but to many other people.
Joseph, with a heart full of compassion, said to his brothers (Gen. 45:5), "Now therefore be not grieved, nor angry with yourselves, that ye sold me hither: for God did send me before you to preserve life." Thus the conspiracy of evil was reversed and turned into an opportunity to glorify God and prove the supremacy of good over evil.