Is it possible to create a mock object that implements multiple interfaces with EasyMock?
Is it possible to create a mock object that implements several interfaces with EasyMock? For example, interface Foo and interface Closeable ? In Rhino Mocks you can provide multiple interfaces when creating a mock object, but EasyMock's createMock() method only takes one type. Is it possbile to achieve this with EasyMock, without resorting to the fallback of creating a temporary interface that extends both Foo and Closeable , and then mocking that? EasyMock doesn't support this so you're stuck with fallback of the temporary interface. As an aside, I smell a little bit of a code wiff - should a