 <p>I would use mocks, something like EasyMock, where you could mock the IOrderLogger, and then do something like this:</p> <pre><code>IOrderLogger log = EasyMock.createMock(IOrderLogger.class); log.Action(EasyMock.isA(LogAction.class)); EasyMock.expectLastCall(); </code></pre> <p>This assumes that Action() returns void. This is a very Java-esque way of doing this. I'm not sure how far along the <a href="http://sourceforge.net/projects/easymocknet/" rel="nofollow noreferrer">EasyMock.net</a> has come.</p>