content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Mon Mar 18 06:51:27 GMT 2024
   */
  
  package org.javathena.login;
  
  import org.junit.jupiter.api.Test;
  import static org.junit.jupiter.api.Assertions.*;
  import org.junit.jupiter.api.Timeout;
  import java.util.concurrent.TimeUnit;
  import static org.evosuite.runtime.EvoAssertions.*;
  import java.net.Socket;
  import java.sql.ResultSet;
  import javolution.util.FastMap;
  import javolution.util.FastTable;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.javathena.core.data.Auth_data;
  import org.javathena.core.data.Socket_data;
  import org.javathena.login.UserManagement;
  import org.javathena.login.parse.FromAdmin;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class UserManagement_ESTest extends UserManagement_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSendUserListThrowsIndexOutOfBoundsException() throws Throwable  {
        // No Comments were added
        // Undeclared exception!
        try { 
          UserManagement.sendUserList((Socket_data) null);
          fail("Expecting exception: IndexOutOfBoundsException");
        
        } catch(IndexOutOfBoundsException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("javolution.util.FastTable", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRequestAccountReg2ThrowsNullPointerException() throws Throwable  {
        byte[] arg1 = new byte[11];
        // Undeclared exception!
        try {
        UserManagement.requestAccountReg2((Socket_data) null, arg1);
        fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
        // Tests that the method throws a NullPointerException when a null Socket_data object is passed in as an argument.
        verifyException("org.javathena.login.UserManagement", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRequestAccountDataThrowsNullPointerException() throws Throwable  {
        byte[] arg1 = new byte[6];
        // Undeclared exception!
        try {
        UserManagement.requestAccountData((Socket_data) null, arg1);
        fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
        //
        // no message in exception (getMessage() returned null)
        //
        verifyException("org.javathena.login.UserManagement", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReceiveAccountReg2ThrowsNullPointerException() throws Throwable  {
        // Test that receiveAccountReg2 throws NullPointerException when passed a null Socket_data object
        byte[] arg1 = new byte[9];
        try {
        UserManagement.receiveAccountReg2((Socket_data) null, arg1);
        fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
        //
        // Verify that the correct exception is thrown
        //
        verifyException("org.javathena.login.UserManagement", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetUserSQLTakingResultSetThrowsNullPointerException() throws Throwable  {
        // rollbacked to evosuite
        // Undeclared exception!
        try { 
          UserManagement.getUserSQL((ResultSet) null);
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("org.javathena.login.UserManagement", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDynamicFailBanCheckMySQLThrowsNullPointerException() throws Throwable  {
        try {
        // This will throw a NullPointerException as the input is an empty string
        UserManagement.dynamicFailBanCheckMySQL("");
        fail("Expecting exception: NullPointerException");
        } catch (NullPointerException e) {
        // Verify that the expected exception was thrown
        assertTrue(e instanceof NullPointerException);
        // Verify that the message in the exception is null
        assertEquals(null, e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddGMThrowsNullPointerException() throws Throwable  {
        // No Comments were added
        // Undeclared exception!
        try { 
          UserManagement.addGM((-2488), (-935));
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("org.javathena.login.UserManagement", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testTabHexToIntReturningPositive() throws Throwable  {
        // Given a byte array representing a hexadecimal number
        byte[] arg0 = new byte[3];
        arg0[2] = (byte) 30;
        
        // When the method "tabHexToInt" is called with this argument
        int tabHexToInt = UserManagement.tabHexToInt(arg0);
        
        // Then the result should be the decimal representation of the hexadecimal number
        assertEquals(1966080, tabHexToInt);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testTabHexToIntReturningNegative() throws Throwable  {
        // Given: A byte array containing 7 bytes, where the last byte is 0x0A (decimal value of -10)
        byte[] arg0 = new byte[7];
        arg0[6] = (byte)10;
        
        // When: The tabHexToInt method is called with the given byte array
        int tabHexToInt = UserManagement.tabHexToInt(arg0);
        
        // Then: The return value should be -10, as specified by the method contract
        assertEquals((-10), tabHexToInt);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetUserTxtTakingIntegerReturningAuth_dataWhereIsResetLogincounIsFalse() throws Throwable  {
        // Test that a new user can be added with a valid user id and password
        String userId = "+);#xCMLkp5*";
        String pass = "uZ^JvI";
        UserManagement.addUserTXT(userId, pass, pass, 'p');
        
        // Verify that the new user was added successfully
        Socket_data socket_data = new Socket_data((Socket) null);
        Integer arg0 = socket_data.getAccount_id();
        Auth_data userTxt = UserManagement.getUserTxt(arg0);
        
        assertEquals(0, userTxt.getLogincount());
        assertEquals(0, userTxt.getState());
        assertNotNull(userTxt);
        assertEquals(userId, userTxt.getUserid());
        assertEquals('p', userTxt.getSex());
        assertEquals("-", userTxt.getEmail());
        assertEquals(pass, userTxt.getPass());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAuth_datsReturningFastMapWhereIsEmptyIsFalse() throws Throwable  {
        // No Comments were added
        UserManagement.addUserTXT("john_doe", "password123", "Account Expired.", 'g');
        FastMap<Integer, Auth_data> auth_dats = UserManagement.getAuth_dats();
        assertFalse(auth_dats.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereIsResetLogincounIsTrue() throws Throwable  {
        // Given: A new user is added to the system with resetLoginCount set to true
        Auth_data arg0 = new Auth_data();
        arg0.setResetLogincoun(true);
        
        // When: The user is added to the system
        Auth_data addUser = UserManagement.addUser(arg0);
        
        // Then: The last IP address of the user should be null
        assertNull(addUser.getLast_ip());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetVersionIsPositive() throws Throwable  {
        // Arrange
        Auth_data arg0 = UserManagement.addUserTXT(" OR Variable_name = 'init_connect'", " OR Variable_name = 'init_connect'", "62Rbo5l?t@{v", 'L');
        arg0.setVersion(11);
        
        // Act
        Auth_data addUser = UserManagement.addUser(arg0);
        
        // Assert
        assertEquals(" OR Variable_name = 'init_connect'", addUser.getPass());
        assertEquals(" OR Variable_name = 'init_connect'", addUser.getUserid());
        assertEquals(0, addUser.getState());
        assertEquals(0, (int)addUser.getAccount_id());
        assertEquals("-", addUser.getEmail());
        assertEquals('L', addUser.getSex());
        assertEquals(0, addUser.getLogincount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetVersionIsNegative() throws Throwable  {
        // No Comments were added
        Auth_data arg0 = new Auth_data();
        arg0.setVersion((-769));
        Auth_data addUser = UserManagement.addUser(arg0);
        assertSame(arg0, addUser);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetStateIsPositive() throws Throwable  {
        // No Comments were added
        Auth_data arg0 = UserManagement.addUserTXT("/*", "/*", "/*", ']');
        assertEquals(0, arg0.getState());
        
        arg0.setState(6);
        UserManagement.addUser(arg0);
        assertEquals(0, arg0.getLogincount());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetLogincountIsPositive() throws Throwable  {
        // Given: A new user with a login count of 10 is created
        Auth_data arg0 = new Auth_data();
        arg0.setLogincount(10);
        
        // When: The user is added to the system
        Auth_data addUser = UserManagement.addUser(arg0);
        
        // Then: The user's character server is not set (-1)
        assertEquals(-1, addUser.getCharserver());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetLogincountIsNegative() throws Throwable  {
        // rollbacked to evosuite
        Auth_data arg0 = new Auth_data();
        arg0.setLogincount((-1029));
        Auth_data addUser = UserManagement.addUser(arg0);
        assertSame(addUser, arg0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetLogin_id2IsPositive() throws Throwable  {
        // rollbacked to evosuite
        Auth_data arg0 = new Auth_data();
        arg0.setLogin_id2(99);
        Auth_data addUser = UserManagement.addUser(arg0);
        assertEquals(0, addUser.getClientType());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetLogin_id2IsNegative() throws Throwable  {
        // Arrange
        Auth_data arg0 = UserManagement.addUserTXT((String) null, (String) null, "Account limit from company", '^');
        arg0.setLogin_id2(-2346);
        
        // Act
        Auth_data addUser = UserManagement.addUser(arg0);
        
        // Assert
        assertEquals("-", addUser.getEmail());
        assertEquals(0, (int)addUser.getAccount_id());
        assertEquals(0, addUser.getState());
        assertEquals(0, addUser.getLogincount());
        assertEquals('^', addUser.getSex());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetLogin_id1IsPositive() throws Throwable  {
        // No Comments were added
        Auth_data arg0 = UserManagement.addUserTXT("/*", "/*", "/*", ']');
        arg0.setLogin_id1(1652);
        Auth_data addUser = UserManagement.addUser(arg0);
        assertEquals(']', addUser.getSex());
        assertEquals("-", addUser.getEmail());
        assertEquals(0, addUser.getLogincount());
        assertEquals(0, (int)addUser.getAccount_id());
        assertEquals(0, addUser.getState());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetLogin_id1IsNegative() throws Throwable  {
        // No Comments were added
        Auth_data arg0 = UserManagement.addUserTXT((String) null, (String) null, "Account limit from company", '^');
        arg0.setLogin_id1((-1467));
        Auth_data addUser = UserManagement.addUser(arg0);
        assertEquals("-", addUser.getEmail());
        assertEquals(0, (int)addUser.getAccount_id());
        assertEquals(0, addUser.getState());
        assertEquals(0, addUser.getLogincount());
        assertEquals('^', addUser.getSex());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetLevelIsPositive() throws Throwable  {
        // Create an Auth_data object with the given parameters
        Auth_data user = UserManagement.addUserTXT(" OR Variable_name = 'init_connect'", " OR Variable_name = 'init_connect'", "62Rbo5l?t@{v", 'L');
        
        // Set the level of the user to 84
        user.setLevel(84);
        
        // Add the user to the system using the UserManagement class
        Auth_data addUser = UserManagement.addUser(user);
        
        // Assert that the account id is 0
        assertEquals(0, (int)addUser.getAccount_id());
        
        // Assert that the userid, pass, email, logincount, state, and sex are equal to the given values
        assertEquals(" OR Variable_name = 'init_connect'", addUser.getUserid());
        assertEquals(" OR Variable_name = 'init_connect'", addUser.getPass());
        assertEquals("-", addUser.getEmail());
        assertEquals(0, addUser.getLogincount());
        assertEquals(0, addUser.getState());
        assertEquals('L', addUser.getSex());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetLevelIsNegative() throws Throwable  {
        // Test for adding a user with a negative level
        Auth_data arg0 = new Auth_data();
        arg0.setLevel(-667); // Set the level to -667, which is an invalid value
        Auth_data addUser = UserManagement.addUser(arg0); // Try to add the user
        assertEquals(0, addUser.getLogin_id2()); // Check that the login id is 0 (invalid)
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetDelflagIsPositive() throws Throwable  {
        // Given: A user with the userid "SESSION_RAW" and a password "Y!|J7"
        Auth_data arg0 = UserManagement.addUserTXT("SESSION_RAW", "Y!|J7", "Y!|J7", 'g');
        
        // When: The user is added with the method "addUser"
        Auth_data addUser = UserManagement.addUser(arg0);
        
        // Then: The user's details are correctly set and returned
        assertEquals('g', addUser.getSex()); // The user's sex is correct
        assertEquals("-", addUser.getEmail()); // The user's email is correct
        assertEquals(0, addUser.getState()); // The user's state is correct
        assertEquals("SESSION_RAW", addUser.getUserid()); // The user's userid is correct
        assertEquals(0, (int)addUser.getAccount_id()); // The user's account id is correct
        assertEquals("Y!|J7", addUser.getPass()); // The user's password is correct
        assertEquals(0, addUser.getLogincount()); // The user's login count is correct
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetDelflagIsNegative() throws Throwable  {
        // No Comments were added
        Auth_data arg0 = UserManagement.addUserTXT("/*", "/*", "/*", ']');
        arg0.setDelflag((-9));
        Auth_data addUser = UserManagement.addUser(arg0);
        assertEquals(0, (int)addUser.getAccount_id());
        assertEquals("-", addUser.getEmail());
        assertEquals(0, addUser.getState());
        assertEquals(0, addUser.getLogincount());
        assertEquals(']', addUser.getSex());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetConnect_until_timeIsPositive() throws Throwable  {
        // No Comments were added
        Auth_data arg0 = new Auth_data();
        arg0.setConnect_until_time((byte)94);
        Auth_data addUser = UserManagement.addUser(arg0);
        assertEquals(94L, addUser.getConnect_until_time());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetConnect_until_timeIsNegative() throws Throwable  {
        // Given: A user with connect_until_time of -747L is added to the system
        Auth_data arg0 = new Auth_data();
        arg0.setConnect_until_time((-747L));
        
        // When: The user is added to the system using UserManagement.addUser() method
        Auth_data addUser = UserManagement.addUser(arg0);
        
        // Then: The ban_until_time of the user should be set to 0L
        assertEquals(0L, addUser.getBan_until_time());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetClientTypeIsNegative() throws Throwable  {
        // rollbacked to evosuite
        Auth_data arg0 = UserManagement.addUserTXT("", "", "", '1');
        arg0.setClientType((-1752));
        Auth_data addUser = UserManagement.addUser(arg0);
        assertEquals(0, addUser.getState());
        assertEquals(0, addUser.getLogincount());
        assertEquals('1', addUser.getSex());
        assertEquals(0, (int)addUser.getAccount_id());
        assertEquals("-", addUser.getEmail());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetCharserverIsPositive() throws Throwable  {
        // No Comments were added
        Auth_data arg0 = UserManagement.addUserTXT("@e!` 5\"l_]Z7es3\u0004", "@e!` 5\"l_]Z7es3\u0004", "ConnectionProperties.yearIsDateType", 'O');
        assertNotNull(arg0);
        
        arg0.setCharserver(5);
        Auth_data addUser = UserManagement.addUser(arg0);
        assertEquals(0, addUser.getLogincount());
        assertEquals(0, addUser.getState());
        assertEquals("@e!` 5\"l_]Z7es3\u0004", addUser.getPass());
        assertEquals(0, (int)addUser.getAccount_id());
        assertEquals("@e!` 5\"l_]Z7es3\u0004", addUser.getUserid());
        assertEquals('O', addUser.getSex());
        assertEquals("-", addUser.getEmail());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetBan_until_timeIsPositive() throws Throwable  {
        // Given: A new user with a ban until time of 1125L
        Auth_data arg0 = new Auth_data();
        arg0.setBan_until_time(1125L);
        
        // When: The user is added to the system
        Auth_data addUser = UserManagement.addUser(arg0);
        
        // Then: The ban until time of the new user should be equal to 1125L
        assertEquals(1125L, addUser.getBan_until_time());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserReturningAuth_dataWhereGetBan_until_timeIsNegative() throws Throwable  {
        // Given a new user to be added with a negative ban time
        Auth_data arg0 = new Auth_data();
        arg0.setBan_until_time((byte) (-67));
        
        // When the addUser method is called with this user
        Auth_data addUser = UserManagement.addUser(arg0);
        
        // Then the returned user should have a negative charserver value
        assertEquals(-1, addUser.getCharserver());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAuth_datsReturningFastMapWhereIsEmptyIsTrue() throws Throwable  {
        // Given: a map of authenticated data for a user
        FastMap<Integer, Auth_data> auth_dats = UserManagement.getAuth_dats();
        
        // When: the isShared method is called on the map
        boolean result = auth_dats.isShared();
        
        // Then: the method should return false, as the map is not shared
        assertFalse(result);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReceiveAllOnlinAccounts() throws Throwable  {
        // No Comments were added
        FromAdmin arg1 = new FromAdmin();
        Socket_data arg0 = new Socket_data((Socket) null, arg1);
        UserManagement.receiveAllOnlinAccounts(arg0, (byte[]) null);
        assertEquals(0, arg0.getUsers());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDynamicFailBanCheckTXT() throws Throwable  {
        // rollbacked to evosuite
        UserManagement.dynamicFailBanCheckTXT("");
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAccountIds() throws Throwable  {
        // Given a list of account IDs from the user management system
        FastTable<Integer> accountIds = UserManagement.getAccountIds();
        
        // When we call the method to get the account IDs
        int size = accountIds.size();
        
        // Then we expect that the returned list is empty
        assertEquals(0, size);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetUserTxtTakingString() throws Throwable  {
        // Get the user data for a specific user
        Auth_data userData = UserManagement.getUserTxt("johndoe");
        
        // Verify that the user data is null
        assertNull(userData);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIsGM() throws Throwable  {
        // Test that the isGM method returns -1 when the input ID is not a GM ID
        int gM = UserManagement.isGM(123456789);
        assertEquals((-1), gM);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserTXT() throws Throwable  {
        // Given: A user is added to the system with the following details
        String userId = "000-123-4567";
        String name = "John Smith";
        String email = "jsmith@email.com";
        char sex = 'M';
        
        // When: The user is added to the system
        Auth_data addUserTXT = UserManagement.addUserTXT(userId, name, email, sex);
        
        // Then: The details of the user are correctly stored in the system
        assertEquals("John Smith", addUserTXT.getPass());
        assertEquals(0, addUserTXT.getLogincount());
        assertEquals(0, addUserTXT.getState());
        assertEquals(0, (int)addUserTXT.getAccount_id());
        assertEquals("000-123-4567", addUserTXT.getUserid());
        assertNotNull(addUserTXT);
        assertEquals('M', addUserTXT.getSex());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCharif_sendallwosTaking1And1AndCharif_sendallwosTaking1And1AndCharif_sendallwosTaking1And1ReturningZero0() throws Throwable  {
        // Test the charif_sendallwos method with a valid input (5932) and null byte array
        int charif_sendallwos = UserManagement.charif_sendallwos(5932, (byte[]) null);
        
        // Assert that the method returns 0 as expected
        assertEquals(0, charif_sendallwos);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCharif_sendallwosTaking1And1AndCharif_sendallwosTaking1And1AndCharif_sendallwosTaking1And1ReturningZero1() throws Throwable  {
        // No Comments were added
        int charif_sendallwos = UserManagement.charif_sendallwos(31032, (int[]) null);
        assertEquals(0, charif_sendallwos);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRemove_online_userWithPositive() throws Throwable  {
        // No Comments were added
        Integer arg0 = new Integer((byte)99);
        UserManagement.remove_online_user(arg0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRemove_online_user() throws Throwable  {
        // rollbacked to evosuite
        Integer arg0 = new Integer(100);
        UserManagement.remove_online_user(arg0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLevelIsValidWithEmptyString() throws Throwable  {
        // Given a user with an ID of 243, and no role assigned
        // When the "levelIsValid" method is called with the user's ID and role
        // Then the result should be true
        int levelIsValid = UserManagement.levelIsValid(243, "", 243, 243);
        assertEquals(true, levelIsValid);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLevelIsValidReturningNegative() throws Throwable  {
        // No Comments were added
        int levelIsValid = UserManagement.levelIsValid((-428), "ConnectionProperties.allowMultiQueries", (-428), (-428));
        assertEquals((-1), levelIsValid);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLevelIsValid() throws Throwable  {
        // Test that the method returns a valid level value when given a valid connection property and a valid level value
        int actualLevelValue = UserManagement.levelIsValid(10, "ConnectionProperties.allowMultiQueries", 10, 10);
        assertEquals(10, actualLevelValue);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testConnectionOfClientThrowsArrayIndexOutOfBoundsException() throws Throwable  {
        byte[] arg1 = new byte[41]; // Undeclared exception!
        try {
        UserManagement.connectionOfClient(null, arg1, false);
        fail("Expecting exception: ArrayIndexOutOfBoundsException");
        } catch (ArrayIndexOutOfBoundsException e) {
        // Verify that the correct exception is thrown.
        verifyException("org.javathena.login.UserManagement", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAdd_online_user() throws Throwable  {
        // Given: There is an instance of the Auth_data class called arg0
        Auth_data arg0 = new Auth_data();
        
        // When: The method add_online_user is invoked with arg0 as a parameter
        int add_online_user = UserManagement.add_online_user(arg0);
        
        // Then: The method should return 0, indicating that the user was added successfully
        assertEquals(0, add_online_user);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testRemoveUser() throws Throwable  {
        // Arrange
        Auth_data authData = new Auth_data();
        
        // Act
        Auth_data removedUser = UserManagement.removeUser(authData);
        
        // Assert
        assertNull(removedUser);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testTabHexToIntReturningZero() throws Throwable  {
        // Test the conversion of a byte array representing a hex string to an integer value
        byte[] arg0 = new byte[7];
        int tabHexToInt = UserManagement.tabHexToInt(arg0);
        assertEquals(0, tabHexToInt);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAccountIdCountReturningPositive() throws Throwable  {
        // Given a user with an inactive account
        Auth_data addUserTXT = UserManagement.addUserTXT("", "", "Account has been expired due to inactivity.", '*');
        
        // When the user is added to the system
        assertNotNull(addUserTXT);
        
        // Then the user's account information is stored correctly
        assertEquals(0, addUserTXT.getLogincount());
        assertEquals("", addUserTXT.getPass());
        assertEquals(0, (int)addUserTXT.getAccount_id());
        assertEquals(0, addUserTXT.getState());
        assertEquals('*', addUserTXT.getSex());
        assertEquals("-", addUserTXT.getEmail());
        
        // And the account ID count is incremented by 1
        int accountIdCount = UserManagement.getAccountIdCount();
        assertEquals(1, accountIdCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddIpToBanListMySQLThrowsNumberFormatException() throws Throwable  {
        // No Comments were added
        // Undeclared exception!
        try { 
          UserManagement.addIpToBanListMySQL("192.168.0.1");
          fail("Expecting exception: NumberFormatException");
        
        } catch(NumberFormatException e) {
           //
           // For input string: \"java.lang.String@0000000001\"
           //
           verifyException("java.lang.NumberFormatException", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetNBUser() throws Throwable  {
        // No Comments were added
        int nBUser = UserManagement.getNBUser();
        assertEquals(0, nBUser);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testOnline_db_final() throws Throwable  {
        // rollbacked to evosuite
        int online_db_final = UserManagement.online_db_final();
        assertEquals(0, online_db_final);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetNBSession() throws Throwable  {
        // Given: A user management system
        
        // When: The number of active sessions is retrieved using getNBSession() method
        int nBSession = UserManagement.getNBSession();
        
        // Then: The number of active sessions should be zero
        assertEquals(0, nBSession);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAccountID() throws Throwable  {
        // No Comments were added
        Integer accountID = UserManagement.getAccountID("John Doe");
        assertNull(accountID);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetUserSQLTakingIntegerThrowsNullPointerException() throws Throwable  {
        // No Comments were added
        // Undeclared exception!
        try { 
          UserManagement.getUserSQL((Integer) null);
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("org.javathena.utiles.sql.MySQLConfig", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIs_user_online() throws Throwable  {
        // Test that the user with ID 123456789 is not online.
        boolean is_user_online = UserManagement.is_user_online((Integer) 123456789);
        assertFalse(is_user_online);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddAccountIdCountTakingNoArguments() throws Throwable  {
        // No Comments were added
        UserManagement.addAccountIdCount();
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSessionAtThrowsIndexOutOfBoundsException() throws Throwable  {
        // rollbacked to evosuite
        // Undeclared exception!
        try { 
          UserManagement.getSessionAt(0);
          fail("Expecting exception: IndexOutOfBoundsException");
        
        } catch(IndexOutOfBoundsException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("javolution.util.FastTable", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddSession() throws Throwable  {
        // No Comments were added
        UserManagement.addSession((Socket_data) null);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetUserTxtTakingIntegerReturningNull() throws Throwable  {
        // Arrange
        // Set up the test data
        Auth_data userTxt = UserManagement.getUserTxt((Integer) null);
        
        // Act
        // Invoke the method to be tested
        assertNull(userTxt);
        
        // Assert
        // Verify that the result is correct
        assertTrue(userTxt == null);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetUserSQLTakingStringThrowsNullPointerException() throws Throwable  {
        // Undeclared exception!
        try {
        // Get a user with a non-existent ID
        UserManagement.getUserSQL("FY)CmIl!u$^z;");
        fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
        // Check if the exception is thrown from the correct method
        verifyException("org.javathena.utiles.sql.MySQLConfig", e);
        
        // Check if the exception message is not null
        assertNotNull(e.getMessage());}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAccountIdCountReturningZero() throws Throwable  {
        // No Comments were added
        int accountIdCount = UserManagement.getAccountIdCount();
        assertEquals(0, accountIdCount);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddUserSQL() throws Throwable  {
        // rollbacked to evosuite
        Auth_data addUserSQL = UserManagement.addUserSQL("MysqlIO.21", "MysqlIO.21", "MysqlIO.21", (-1029));
        assertNull(addUserSQL);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToBecomeGM() throws Throwable  {
        // No Comments were added
        UserManagement.toBecomeGM((Socket_data) null);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testDebugXML() throws Throwable  {
        // No Comments were added
        UserManagement.debugXML();
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetAccountIdCount() throws Throwable  {
        // This test sets the account ID count to 1000 for a specific use case
        UserManagement.setAccountIdCount(1000);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetNBGM() throws Throwable  {
        // No Comments were added
        int nBGM = UserManagement.getNBGM();
        assertEquals(0, nBGM);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddAccountIdCountTakingInt() throws Throwable  {
        // No Comments were added
        UserManagement.addAccountIdCount(0);
    }
  }
  