Repository: incubator-ranger
Updated Branches:
  refs/heads/master 02b4790aa -> a9775857d


RANGER-850 Change mocking code of test test30getPolicyFromEventTime to elimate 
the spurious NPE


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/a9775857
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/a9775857
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/a9775857

Branch: refs/heads/master
Commit: a9775857dcfb36477bd282e97e0a71380ffb700f
Parents: 02b4790
Author: Alok Lal <[email protected]>
Authored: Thu Feb 18 11:03:52 2016 -0800
Committer: Alok Lal <[email protected]>
Committed: Thu Feb 18 11:55:31 2016 -0800

----------------------------------------------------------------------
 .../src/test/java/org/apache/ranger/rest/TestServiceREST.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/a9775857/security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java
----------------------------------------------------------------------
diff --git 
a/security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java 
b/security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java
index 0d223e7..7d2b98f 100644
--- a/security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java
+++ b/security-admin/src/test/java/org/apache/ranger/rest/TestServiceREST.java
@@ -89,6 +89,7 @@ import org.junit.rules.ExpectedException;
 import org.junit.runner.RunWith;
 import org.junit.runners.MethodSorters;
 import org.mockito.InjectMocks;
+import org.mockito.Matchers;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -1012,7 +1013,7 @@ public class TestServiceREST {
                Mockito.when(userMgr.getGroupsForUser(userName)).thenReturn(
                                userGroupsList);
 
-               Mockito.when(restErrorUtil.createRESTException((String)null))
+               
Mockito.when(restErrorUtil.createRESTException(Matchers.anyInt(), 
Matchers.anyString(), Matchers.anyBoolean()))
                                .thenThrow(new WebApplicationException());
                thrown.expect(WebApplicationException.class);
        

Reply via email to