Fix wrong check for next element in Iterator#hasNext()

- Calling hasNext() with no elements in the association incorrectly
  returned true
add tests for AssociationHashMap