List<IndexInfo> indexes = new ArrayList<IndexInfo>();
indexes.add(new IndexInfo(bytes(0L), bytes(5L), 0, 0));
indexes.add(new IndexInfo(bytes(10L), bytes(15L), 0, 0));
indexes.add(new IndexInfo(bytes(20L), bytes(25L), 0, 0));
AbstractType comp = IntegerType.instance;
assertEquals(0, IndexHelper.indexFor(bytes(-1L), indexes, comp, false, -1));
assertEquals(0, IndexHelper.indexFor(bytes(5L), indexes, comp, false, -1));
assertEquals(1, IndexHelper.indexFor(bytes(12L), indexes, comp, false, -1));
assertEquals(2, IndexHelper.indexFor(bytes(17L), indexes, comp, false, -1));