Added complete unit tests with comments