Test hangs in HashSet#contains(Object)