@Test
  public void testGetCurrent() throws Exception {
    User user1 = User.getCurrent();
    assertNotNull(user1.ugi);
    LOG.debug("User1 is " + user1.getName());

    for (int i = 0; i < 100; i++) {
      User u = User.getCurrent();
      assertNotNull(u);
      assertEquals(user1.getName(), u.getName());
      assertEquals(user1, u);
      assertEquals(user1.hashCode(), u.hashCode());
    }
  }
Make sure that we're returning a result for the current user. Previously getCurrent() was
returning null if not initialized on non-secure Hadoop variants.
hbase-server/src/test/java/org/apache/hadoop/hbase/security/TestUser.java