@Test
public void buildEndpointToRangeMapTest() {

  Map<List<String>, List<String>> rangeToEndpoint = Maps.newHashMap();
  rangeToEndpoint.put(Arrays.asList("1", "2"), Arrays.asList("node1", "node2", "node3"));
  rangeToEndpoint.put(Arrays.asList("2", "4"), Arrays.asList("node1", "node2", "node3"));
  rangeToEndpoint.put(Arrays.asList("4", "6"), Arrays.asList("node1"));
  rangeToEndpoint.put(Arrays.asList("6", "8"), Arrays.asList("node1", "node2"));
  Map<String, List<RingRange>> endpointToRangeMap = RepairRunService.buildEndpointToRangeMap(rangeToEndpoint);
  assertEquals(endpointToRangeMap.entrySet().size(), 3);
  assertEquals(endpointToRangeMap.get("node1").size(), 4);
  assertEquals(endpointToRangeMap.get("node2").size(), 3);
  assertEquals(endpointToRangeMap.get("node3").size(), 2);
}