fixed the diff test, diff and added one unit test case for diff