Fix tests for new analyzer
Fix tests for new analyzer

- Missing imports now get an ImportElement
- Update the expectations to use hasLength() since it gives better error
  messages

dart-lang/build,dart-lang/build,dart-lang/build,dart-lang/build