make it work properly when mocking inherited methods