@Test
public void testRotatedRing() throws Exception {

  List<String> tokenStrings = Lists.newArrayList(
      "56713727820156410577229101238628035243",
      "113427455640312821154458202477256070484",
      "113427455640312821154458202477256070485",
      "5",
      "6",
      "56713727820156410577229101238628035242");
  List<BigInteger> tokens = Lists.transform(tokenStrings, (String string) -> new BigInteger(string));
  SegmentGenerator generator = new SegmentGenerator("foo.bar.RandomPartitioner");
  List<Segment> segments
      = generator.generateSegments(10, tokens, Boolean.FALSE, Maps.newHashMap(), "2.2.10");
  assertEquals(15, segments.size());
  assertEquals(
      "(113427455640312821154458202477256070484,113427455640312821154458202477256070485]",
      segments.get(4).getBaseRange().toString());
  assertEquals("(5,6]", segments.get(9).getBaseRange().toString());
  assertEquals(
      "(56713727820156410577229101238628035242,56713727820156410577229101238628035243]",
      segments.get(14).getBaseRange().toString());
}