@Test
public void testSortedAnalysis() throws Exception {
// Sort without limit or other query should not modify results itself. Analysis is done on the same data, only in another order.
final VarietyAnalysis analysis = variety.withSort("{name:-1}").runAnalysis();
analysis.verifyResult("_id", 5, 100, "ObjectId");
analysis.verifyResult("name", 5, 100, "String");
analysis.verifyResult("bio", 3, 60, "String");
analysis.verifyResult("pets", 2, 40, "String", "Array");
analysis.verifyResult("someBinData", 1, 20, "BinData-old");
analysis.verifyResult("someWeirdLegacyKey", 1, 20, "String");