users@jersey.java.net

[Jersey] Re: jersey-client - Why final methods in ClientFilter???

From: James Shaw <js102_at_zepler.net>
Date: Sun, 29 Jul 2012 15:57:44 +0100

On 23 July 2012 20:18, Matt Bertolini <viper2843_at_gmail.com> wrote:

>
> In order to unit test this class, I need to verify that the example header
> was set in the request header map. I mock the ClientRequest object so I
> can pass a header map to the mock and check it after the map. The problem
> arrises in the last line of the filter.
>
>
Do you really want to be unit testing when you're integrating with code you
don't own? Take a look at "Only Mock Types That You Own" from Growing
Object Oriented Software.