lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hani Suleiman <>
Subject Re: [subscriptions] Re: Please make org.apache.lucene.index.IndexWriter non-final
Date Mon, 06 Oct 2003 05:14:23 GMT

On Sunday, October 5, 2003, at 02:28 PM, Erik Hatcher wrote:

> I'm curious what your take of the two mocks I've recently added to 
> Lucene's codebase is - MockFilter and MockInputStream.  Both of these 
> are for sending in to somewhere else and probing what happens to them. 
>  How else could a Real Deal (tm) work in these scenarios?  And, I 
> would argue that these two are the real deals since they merely are 
> implementations (although certainly minimal and exploratory) of the 
> real interfaces of Lucene.
I looked at both of these and I think that in this case neither of them 
seems an 'abuse' of mocking. If anything, this is the exact usage of 
what a mock should be, whiteboxing a blackbox scenario, where you can 
interact with it, then poke about and verify the results of that 

I don't know if you're used dynamic mocks or the big fat library of 
mocks in the mockobjects-java project, but THAT stuff to me is a pretty 
blatant abuse. Full (useless)  mocks of all of j2ee, where you're 
endlessly forced to define expectations and results for every call. 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message