Question on implicit search

I thought I understood implicit search, but this confuses me:

trait Foo:
  trait A
  def foo(using a: A) = a

object Bar extends Foo:
  given A with {}

object Test:
  Bar.foo

How is the given A found in the call to Bar.foo?