Added several unit and ui test cases.