add unit testing code for SelectMany