<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi, guys,<br>
    I'm facing problem of mocking HttpServerExchange via Mockito which
    fails because HttpServerExchange is marked as final. This is a bit
    disappointing and forces me to use other testing framework(e.g.
    PowerMock).<br>
    I've never seen situation where one must use final on class, and
    many situations where it was removed. For example, last time in
    aerospike client code:<br>
    BEFORE (watch final method - client can't be mocked)<br>
<a class="moz-txt-link-freetext" href="https://github.com/aerospike/aerospike-client-java/blob/2.1.0/client/src/com/aerospike/client/AerospikeClient.java">https://github.com/aerospike/aerospike-client-java/blob/2.1.0/client/src/com/aerospike/client/AerospikeClient.java</a><br>
    <br>
    AFTER(now final methods are still in place BUT class now implements
    interface I
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    AerospikeClient - client methods now can be mocked via mocking
    interface)<br>
<a class="moz-txt-link-freetext" href="https://github.com/aerospike/aerospike-client-java/blob/3.1.2/client/src/com/aerospike/client/AerospikeClient.java">https://github.com/aerospike/aerospike-client-java/blob/3.1.2/client/src/com/aerospike/client/AerospikeClient.java</a><br>
    <br>
    Can you explain what are the reasons to use final here? May be
    remove final or switch to interface?<br>
    <div class="moz-signature">-- <br>
      <b><font size="2">Ilya Karpov</font></b>
      <br>
      <font size="2" color="#808080">Developer</font>
      <br>
      <br>
      <font size="2">Clever</font><font size="2" color="#4f8f00">DATA</font>
      <br>
      <font size="2" color="#4f8f00">make your data clever</font></div>
  </body>
</html>