Fixed issue #24: mocking Java polymorphic methods