@Test
  public void testUserGroupNames() throws Exception {
    final String username = "testuser";
    final ImmutableSet<String> singleGroups = ImmutableSet.of("group");
    final Configuration conf = HBaseConfiguration.create();
    User user = User.createUserForTesting(conf, username,
      singleGroups.toArray(new String[singleGroups.size()]));
    assertUserGroup(user, singleGroups);

    final ImmutableSet<String> multiGroups = ImmutableSet.of("group", "group1", "group2");
    user = User.createUserForTesting(conf, username,
      multiGroups.toArray(new String[multiGroups.size()]));
    assertUserGroup(user, multiGroups);
  }
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