You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Appy (JIRA)" <ji...@apache.org> on 2017/10/03 03:19:00 UTC

[jira] [Created] (HBASE-18925) Need updated mockito for using java optional

Appy created HBASE-18925:
----------------------------

             Summary: Need updated mockito for using java optional
                 Key: HBASE-18925
                 URL: https://issues.apache.org/jira/browse/HBASE-18925
             Project: HBase
          Issue Type: Improvement
            Reporter: Appy
            Assignee: Appy


Came up when i was trying to test HBASE-18878.
It kept failing because mock of RpcCall returned null where return type was Optional<User>.
Instead, we want it to return Optional.empty(). 
New mockito versions support this (and other java8 things) - https://github.com/mockito/mockito/wiki/What%27s-new-in-Mockito-2

We use mockito-all which was last released in Dec2014. However, mockito-core has had more than 50 releases after that (https://mvnrepository.com/artifact/org.mockito/mockito-core). 
We need to change our deps from mockito-all to mockito-core.
However that comes with fair breakages, so this is not a simple task of changing pom files.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)