TrieByteArraySortedSet implements ByteArraySortedSet { @Override public int indexOf(@NotNull Buffer element) { if (size() > 0) { return indexOf(new BufferIterator(element)); } return NOT_FOUND; } private  TrieByteArraySortedSet(@NotNull Buffer nodes,
                                   int keysCount); static TrieByteArraySortedSet from(
            @NotNull final Buffer buffer); @Override int size(); @NotNull @Override Buffer get(int i); @Override long getLongUnsafe(int i); @Override int getIntUnsafe(int i); @Override short getShortUnsafe(int i); @Override char getCharUnsafe(int i); @Override byte getByteUnsafe(int i); @Override int indexOf(@NotNull Buffer element); @Override int indexOfGreaterThan(@NotNull Buffer element, boolean orEquals, int upToIndexInclusive); @Override int indexOfLessThan(@NotNull Buffer element, boolean orEquals, int fromIndexInclusive);  }
@Test public void indexOf() { for (String q : queries) { assertEquals( String.format("for query <%s>", q), variableSet.indexOf(query(q)), trieSet.indexOf(query(q)) ); } }
@Test public void indexOfEmpty() { for (String q : queries) { assertEquals( String.format("for query <%s>", q), -1, emptyTrieSet.indexOf(query(q)) ); } }