### Question:
CurrentUser { public static String getAuthenticatedUser() { CurrentUser user = CURRENT_USER.get(); if (user == null || user.authenticatedUser == null) { throw new IllegalStateException("No user logged into the system"); } else { return user.authenticatedUser; } } 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 testGetAuthenticatedUserInvalid() throws Exception { CurrentUser.getAuthenticatedUser(); }