Modified the API of SpectralClusteringTest.