adding unit tests, improving on As class for matching collection properties to types