implemented unit test for digest command.