@@ -0,0 +1,2307 @@
+package arez.downstream;%0A%0Aimport java.io.IOException;%0Aimport java.nio.file.Path;%0Aimport java.text.ParseException;%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.regex.Pattern;%0Aimport java.util.stream.Collectors;%0Aimport javax.annotation.Nonnull;%0Aimport org.intellij.lang.annotations.RegExp;%0Aimport static org.testng.Assert.*;%0A%0A/**%0A * Index into which symbolMap can be loadded and assertions invoked on contents of index.%0A */%0A@SuppressWarnings( %22WeakerAccess%22 )%0Afinal class SymbolEntryIndex%0A%7B%0A  private final HashMap%3CString, ArrayList%3CSymbolEntry%3E%3E _classNameToEntry = new HashMap%3C%3E();%0A%0A  /**%0A   * Read and build an index from symbolMap file.%0A   *%0A   * @param symbolMapPath the path to load symbolMap from.%0A   * @return the new index.%0A   * @throws IOException    if there is an error reading file.%0A   * @throws ParseException if there is an error parsing file.%0A   */%0A  @Nonnull%0A  static SymbolEntryIndex readSymbolMapIntoIndex( @Nonnull final Path symbolMapPath )%0A    throws IOException, ParseException%0A  %7B%0A    final SymbolEntryIndex index = new SymbolEntryIndex();%0A    SymbolEntry.readSymbolMap( symbolMapPath, index::addEntry );%0A    return index;%0A  %7D%0A%0A  private void addEntry( @Nonnull final SymbolEntry entry )%0A  %7B%0A    _classNameToEntry%0A      .computeIfAbsent( entry.getClassName(), e -%3E new ArrayList%3C%3E() )%0A      .add( entry );%0A  %7D%0A%0A  /**%0A   * Verify no entry for ClassName exists in index.%0A   * If a match is found then fail assertion error.%0A   *%0A   * @param pattern the pattern%0A   */%0A  void assertNoClassNameMatches( @RegExp( prefix = %22%5E%22, suffix = %22$%22 ) @Nonnull final String pattern )%0A  %7B%0A    assertNoClassNameMatches( Pattern.compile( %22%5E%22 + pattern + %22$%22 ) );%0A  %7D%0A%0A  /**%0A   * Verify no entry for ClassName exists in index.%0A   * If a match is found then fail assertion error.%0A   *%0A   * @param pattern the pattern%0A   */%0A  void assertNoClassNameMatches( @Nonnull final Pattern pattern )%0A  %7B%0A    final List%3CString%3E matches =%0A      _classNameToEntry.keySet().stream().filter( n -%3E pattern.matcher( n ).matches() ).collect( Collectors.toList() );%0A    if ( !matches.isEmpty() )%0A    %7B%0A      fail( %22Expected that the SymbolMap would have no classNames that match pattern %22 + pattern +%0A            %22 but the following classNames match: %22 + matches );%0A    %7D%0A  %7D%0A%7D%0A

Add index that can be used to load and verify assert conditions about index