write some unit tests for CodeView