content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Mon Mar 18 05:54:17 GMT 2024
   */
  
  package com.hf.sfm.crypt;
  
  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 com.hf.sfm.crypt.Base64;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class Base64_ESTest extends Base64_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testByteArrayToBase64ReturningNonEmptyString() throws Throwable  {
        // Given a byte array with 8 elements
        byte[] arg0 = new byte[8];
        
        // When we convert it to Base64
        String byteArrayToBase64 = Base64.byteArrayToBase64(arg0);
        
        // Then the resulting string should be "AAAAAAAAAAA="
        assertEquals("AAAAAAAAAAA=", byteArrayToBase64);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testByteArrayToAltBase64ReturningEmptyString() throws Throwable  {
        // No Comments were added
        byte[] arg0 = Base64.altBase64ToByteArray("");
        String byteArrayToAltBase64 = Base64.byteArrayToAltBase64(arg0);
        assertEquals("", byteArrayToAltBase64);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBase64ToByteArrayReturningEmptyArray() throws Throwable  {
        // Test the base64 decoding of an empty string
        byte[] base64ToByteArray = Base64.base64ToByteArray("");
        assertEquals(0, base64ToByteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAltBase64ToByteArrayReturningNonEmptyArray() throws Throwable  {
        // rollbacked to evosuite
        byte[] altBase64ToByteArray = Base64.altBase64ToByteArray("j|g=");
        assertArrayEquals(new byte[] {(byte) (-115), (byte)120}, altBase64ToByteArray);
        assertEquals(2, altBase64ToByteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testBase64ToByteArrayReturningNonEmptyArray() throws Throwable  {
        // No Comments were added
        byte[] base64ToByteArray = Base64.base64ToByteArray("aGVsbG8gd29ybGQh");
        assertEquals(12, base64ToByteArray.length);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testByteArrayToBase64ReturningEmptyString() throws Throwable  {
        // Tests that converting a base64-encoded string to a byte array and then back to base64 produces the original string.
        byte[] arg0 = Base64.altBase64ToByteArray("");
        String byteArrayToBase64 = Base64.byteArrayToBase64(arg0);
        assertEquals("", byteArrayToBase64);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAltBase64ToByteArrayThrowsIllegalArgumentException() throws Throwable  {
        // No Comments were added
        // Undeclared exception!
        try { 
          Base64.altBase64ToByteArray("abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+-=[]{}|;':\"<>,./~`");
          fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
           //
           // String length must be a multiple of four.
           //
           verifyException("com.hf.sfm.crypt.Base64", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAltBase64ToByteArrayWithNonEmptyString() throws Throwable  {
        // Undeclared exception!
        try {
        Base64.altBase64ToByteArray("aGkgaXMgYSBzaW1wbGU="); // converts a base64-encoded string to a byte array, using the specified alternate alphabet.
        fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
        //
        // Illegal character G
        //
        verifyException("com.hf.sfm.crypt.Base64", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesBase64() throws Throwable  {
        // rollbacked to evosuite
        Base64 base64_ = new Base64();
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testMain() throws Throwable  {
        // No Comments were added
        Base64.main((String[]) null);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testByteArrayToAltBase64ReturningNonEmptyString() throws Throwable  {
        // Setup
        byte[] arg0 = new byte[2];
        
        // Execute
        String byteArrayToAltBase64 = Base64.byteArrayToAltBase64(arg0);
        
        // Verify
        assertEquals("!!!=", byteArrayToAltBase64);
    }
  }
  