reorganise unit test single to do much more comprehensive test cases.