Add cluster analysis test

Note: cluster_analysis test has been separated into another branch ``add_cluster_analysis_test``.