An essential ingredient towards doing Teshuva, is חרטה, or regret. Some commentators felt that one of the reasons Yosef did not notify Yakov sooner that he was alive, was because he wanted to see if his brothers had repented.
This might explain why he asked them to bring Binyamin and why he made accusations against them. The brothers clearly recognized their mistake. They assumed that all of the difficulties they were experiencing in Egypt was directly related to their treatment of Yosef.
They openly acknowledged this when they said that they were guilty for not hearing their brother’s cries and his begging for mercy.
Yosef was moved to tears when he heard their admission of guilt was a clear demonstration of חרטה. Yosef accomplished what he set out to do. His brothers had done Teshuva.