### Question:
CurrentUser { public static void authenticate(final String user) { if (StringUtils.isEmpty(user)) { throw new IllegalStateException("Bad user name sent for authentication"); } LOG.info("Logging in {}", user); CurrentUser currentUser = new CurrentUser(user); CURRENT_USER.set(currentUser); } private  CurrentUser(String authenticatedUser); static void authenticate(final String user); static void proxyDoAsUser(final String doAsUser, final String proxyHost); static void proxy(final String aclOwner, final String aclGroup); static void clear(); static boolean isAuthenticated(); static String getAuthenticatedUser(); static UserGroupInformation getAuthenticatedUGI(); static String getUser(); static UserGroupInformation createProxyUGI(String proxyUser); static UserGroupInformation getProxyUGI(); static Set<String> getGroupNames(); static String getPrimaryGroupName();  }### Answer:
@Test (expectedExceptions = IllegalStateException.class) public void testAuthenticateBadUser() throws Exception { CurrentUser.authenticate(""); }