In this scene (Act 4, sc. 3) that takes place in England, Macduff has come to get Malcolm to return to Scotland to help overthrow Macbeth. Macduff tells Malcolm how bad things are in Scotland under Macbeth's rule. Malcolm does not want an insincere sycophant with him (Malcolm) telling him only things that he thinks Malcolm wants to hear. Malcolm wants people with him who are loyal to the country of Scotland, not just loyal to a person. For this reason, he tests Macduff's loyalty. Malcolm tells Macduff that he, Malcolm, would be an awful king. He says that he has every wicked vice that there is and that he would take full advantage of his position. Malcolm says that he possesses none of the good qualities a king should have such as justice, honesty, temperance, courage, patience, devotion, etc. By the time he finishes telling Macduff how awful he'd be as a king, Macduff is horrified and says that not only should Malcolm not be a king, he shouldn't even live. Then he says, "O Scotland, Scotland!" with great sadness. With those words, Malcolm tells Macduff that he believes in Macduff's true loyalty to the country. He continues by confessing to Macduff that he is just the opposite of all those things he just said. This shows us that Malcolm and Macduff both have their country's best interests as their goals. They are both loyal Scots. This also shows that Malcolm would be a good king since he does possess those qualities that make a good king and he is clearly loyal to his country. Macduff, too, is a good Thane since his interests are with his country and he's not out for himself. It's also evident that neither Malcolm nor Macduff knew one another very well before this or there would be no need for the "test."