public int process(Collection<? extends Object> aExpected,Collection<? extends Object> aActual){
  expectedCount+=aExpected.size();
  actualCount+=aActual.size();
  Set<Object> actual=new HashSet<>(aActual);
  for (  Object eUnit : aExpected) {
    boolean found=actual.remove(eUnit);
    if (found) {
      hitCount++;
    }
  }
  return hitCount;
}

public int process ( Collection < ? extends Object > aExpected , Collection < ? extends Object > aActual ) { expectedCount += aExpected . size ( ) ; actualCount += aActual . size ( ) ; Set < Object > actual = new HashSet < > ( aActual ) ; for ( Object eUnit : aExpected ) { boolean found = actual . remove ( eUnit ) ; if ( found ) { hitCount ++ ; } } return hitCount ; }
assumes that neither expected nor actual units contain any duplicates .
