I have a listener class which includes this code:
GatewayClient gatewayClient = Framework.getService(GatewayClient.class);
I want to write a junit which will invoke the listener class, and I want to mock the call to the gateway.
My first problem is I don't understand how to mock a class, which is being created inside the class I am testing.
The second problem is that I don't know if the Framwork.getService call will get in the way of the attempt to mock.