Add unit tests for similarity graph and density estimation utilities.