corrected AnalyzeGeneric and unittest for AnalyzeGeneric