public ExpectedException throwable = ExpectedException.none();
@Test
public void should_order_symbol_and_references() throws Exception {
ComponentDataCache componentDataCache = mock(ComponentDataCache.class);
SymbolTableBuilder symbolTableBuilder = new DefaultSymbolTableBuilder("foo", componentDataCache);
Symbol firstSymbol = symbolTableBuilder.newSymbol(10, 20);
symbolTableBuilder.newReference(firstSymbol, 32);
Symbol secondSymbol = symbolTableBuilder.newSymbol(84, 92);
symbolTableBuilder.newReference(secondSymbol, 124);
Symbol thirdSymbol = symbolTableBuilder.newSymbol(55, 62);
symbolTableBuilder.newReference(thirdSymbol, 70);
symbolTableBuilder.done();
ArgumentCaptor<SymbolData> argCaptor = ArgumentCaptor.forClass(SymbolData.class);
verify(componentDataCache).setData(eq("foo"), eq(SnapshotDataTypes.SYMBOL_HIGHLIGHTING), argCaptor.capture());
SortedSetMultimap<Symbol, Integer> referencesBySymbol = argCaptor.getValue().referencesBySymbol();