private void testSerializingNonEmptySlicedDistinctFacet(final int threshold1, final int threshold2) throws Exception {
final ExtTLongObjectHashMap<ExtTHashMap<BytesRef, DistinctCountPayload>> counts = CacheRecycler.popLongObjectMap();
final BytesRef label1 = new BytesRef("itchy");
final BytesRef label2 = new BytesRef("scratchy");
final ExtTHashMap<BytesRef, DistinctCountPayload> period1 = CacheRecycler.popHashMap();
final DistinctCountPayload payload1 = new DistinctCountPayload(threshold1);
payload1.update(new BytesRef("marge"));
payload1.update(new BytesRef("homer"));
final DistinctCountPayload payload2 = new DistinctCountPayload(threshold1);
payload2.update(new BytesRef("marge"));
payload2.update(new BytesRef("marge"));
period1.put(label1, payload1);
period1.put(label2, payload2);
counts.put(1, period1);
final ExtTHashMap<BytesRef, DistinctCountPayload> period2 = CacheRecycler.popHashMap();
final DistinctCountPayload payload3 = new DistinctCountPayload(threshold2);
payload3.update(new BytesRef("bart"));
payload3.update(new BytesRef("lisa"));
final DistinctCountPayload payload4 = new DistinctCountPayload(threshold2);
payload4.update(new BytesRef("bart"));
payload4.update(new BytesRef("bart"));
period2.put(label1, payload3);
period2.put(label2, payload4);
counts.put(2, period2);
final Map<Long, Map<BytesRef, Integer>> expectedCounts = newHashMap();
final Map<BytesRef, Integer> period1Counts = newHashMap();