added and refactored TypeAnalysisTests