users@jersey.java.net

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

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Mon, 23 Jul 2012 17:24:19 +0200

Hi,

i do not see why having get/setNext final should block you from being
able of testing your own client
filters. These methods are only used internally to build the client
filter chain. Could you please elaborate?

Thanks,

~Jakub

On 7/20/12 3:57 PM, viper2843_at_gmail.com wrote:
> I have been using Jersey client to connect to a REST API. Everything
> was going great until I started to write my unit tests. I can't unit
> test my client filters because the abstract class ClientFilter has some
> methods that are final: specifically getNext() and setNext(). I can't
> mock final methods so I can't finish my test of these classes. Is there
> any particular reason why these methods are marked as final? Thanks.
>
>