I have an A class, which I can set a listener to it by using an assignment (as B does in the example below). My problem is when I want to write unit tests to class B and I w