test cases for clustering