Foo foo = new Foo(mock(Bar.class)) foo.a(x,y,z)
In my experience mock objects can be brittle. A few sprinkled in judiciously can be ok, but once the density gets high enough, it starts to feel like the test becomes decoupled from the actual code it's supposed to test.