add the unit test for generateControllerInfo
add the unitest for generate