content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Thu Mar 21 08:41:58 GMT 2024
   */
  
  package ipac;
  
  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 ipac.BinaryCalculate;
  import java.awt.HeadlessException;
  import java.util.NoSuchElementException;
  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 BinaryCalculate_Original_ESTest extends BinaryCalculate_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSubBinaryReturningNonEmptyString() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        String subBinary = binaryCalculate.subBinary("nd,25u'x;yI&0`,Nb", "");
        assertEquals("00000000000010001", subBinary);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSubBinaryReturningEmptyString() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        String subBinary = binaryCalculate.subBinary("O,", "O,");
        assertEquals("", subBinary);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddBinary0() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        String addBinary = binaryCalculate.addBinary("n/", "<16;qM.{;)?PuV");
        assertEquals("1", addBinary);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddBinary1() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        String addBinary = binaryCalculate.addBinary("+{a!1#{WLm49}v31{", "11");
        assertEquals("100", addBinary);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddBinary2() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        String addBinary = binaryCalculate.addBinary("3]`_i451~f>1fq2Z", "3]`_i451~f>1fq2Z");
        assertEquals("110", addBinary);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddBinaryReturningEmptyString() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        String addBinary = binaryCalculate.addBinary("JdYh/H+00p", "Exit");
        assertEquals("", addBinary);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddBinary3() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        String addBinary = binaryCalculate.addBinary("+{a!1#{WLm49}v31{", "0000000000000");
        assertEquals("11", addBinary);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddBinary4() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        String addBinary = binaryCalculate.addBinary("H5K&\"SFaGm60x-& q)p", "H5K&\"SFaGm60x-& q)p");
        assertEquals("0", addBinary);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddBinary5() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        String addBinary = binaryCalculate.addBinary(">#NMo0n$}E~j1}'~", ">#NMo0n$}E~j1}'~");
        assertEquals("10", addBinary);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddBinary6() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        String addBinary = binaryCalculate.addBinary("1", "00001");
        assertEquals("00010", addBinary);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrefixInPrefixCalculateThrowsHeadlessException() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        // Undeclared exception!
        try { 
          binaryCalculate.prefixInPrefixCalculate("110", "110", 0, "3]`_i451~f>1fq2Z");
          fail("Expecting exception: HeadlessException");
        
        } catch(HeadlessException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("java.awt.GraphicsEnvironment", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrefixInPrefixCalculateThrowsTooManyResourcesException() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        binaryCalculate.MAXPREFIX = 32;
        // Undeclared exception!
        binaryCalculate.prefixInPrefixCalculate("Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : 0\nSubnet: \nBinary Subnet: \nBroadcast Address: \nPrefix: /-2\nNetmask: \nBinary Netmask: ", "Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : 0\nSubnet: \nBinary Subnet: \nBroadcast Address: \nPrefix: /-2\nNetmask: \nBinary Netmask: ", 32, ".");
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrefixInPrefixCalculateThrowsNoSuchElementException() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        // Undeclared exception!
        try { 
          binaryCalculate.prefixInPrefixCalculate("Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : 19,342,813,113,834,066,795,298,816\nSubnet: \nBinary Subnet: Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : 0\nSubnet: \nBinary Subnet: \nBroadcast Address: \nPrefix: /-2\nNe\nBroadcast Address: \nPrefix: /0\nNetmask: \nBinary Netmask: 0000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000", "Subnet:", 127, "3(~");
          fail("Expecting exception: NoSuchElementException");
        
        } catch(NoSuchElementException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("java.util.StringTokenizer", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrefixInPrefixCalculateThrowsNumberFormatException() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        // Undeclared exception!
        try { 
          binaryCalculate.prefixInPrefixCalculate("Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : 38,685,626,227,668,133,724,815,360\nSubnet: \nBinary Subnet: Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : 4,096\nSubnet: \nBinary Subnet: \nBroadcast Address: \nPrefix: /0\nBroadcast Address: \nPrefix: /0\nNetmask: \nBinary Netmask: 0000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000001", "Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : 38,685,626,227,668,133,724,815,360\nSubnet: \nBinary Subnet: Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : 4,096\nSubnet: \nBinary Subnet: \nBroadcast Address: \nPrefix: /0\nBroadcast Address: \nPrefix: /0\nNetmask: \nBinary Netmask: 0000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000001", 127, (String) null);
          fail("Expecting exception: NumberFormatException");
        
        } catch(NumberFormatException e) {
           //
           // radix 0 less than Character.MIN_RADIX
           //
           verifyException("java.lang.Integer", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIPCalculate0() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        binaryCalculate.MAXPREFIX = 6;
        binaryCalculate.lengthOfToken = 6;
        String IPCalculate = binaryCalculate.IPCalculate("H5K&\"SFaGm60x-& q)p", "H5K&\"SFaGm60x-& q)p");
        assertEquals("Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : 128\nSubnet: \nBinary Subnet: H5K&\"S\nBroadcast Address: \nPrefix: /0\nNetmask: \nBinary Netmask: 000000", IPCalculate);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIPCalculateThrowsStringIndexOutOfBoundsException() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        binaryCalculate.MAXPREFIX = 128;
        // Undeclared exception!
        try { 
          binaryCalculate.IPCalculate("Y;641U#eE8v", "Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : 0\nSubnet: \nBinary Subnet: \nBroadcast Address: \nPrefix: /-2\nNetmask: \nBinary Netmask: ");
          fail("Expecting exception: StringIndexOutOfBoundsException");
        
        } catch(StringIndexOutOfBoundsException e) {
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddBinary7() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        String addBinary = binaryCalculate.addBinary(">#NMo0n$}E~j1}'~", "&wET1o<X]5[nbwb");
        assertEquals("1", addBinary);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIPCalculate1() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        String IPCalculate = binaryCalculate.IPCalculate("10", "10");
        assertEquals("Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : 1\nSubnet: \nBinary Subnet: \nBroadcast Address: \nPrefix: /0\nNetmask: \nBinary Netmask: ", IPCalculate);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testPrefixInPrefixCalculateThrowsStringIndexOutOfBoundsException() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        // Undeclared exception!
        try { 
          binaryCalculate.prefixInPrefixCalculate("Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : 0\nSubnet: \nBinary Subnet: Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : 64\nSubnet: \nBinary Subnet: \nBroadcast Address: \nPrefix: /-7\nN\nBroadcast Address: \nPrefix: /125\nNetmask: \nBinary Netmask: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "wS9A8cI<t/", 127, "3(~");
          fail("Expecting exception: StringIndexOutOfBoundsException");
        
        } catch(StringIndexOutOfBoundsException e) {
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testIPCalculate2() throws Throwable  {
        BinaryCalculate binaryCalculate = new BinaryCalculate();
        String IPCalculate = binaryCalculate.IPCalculate("0", "0");
        assertEquals("Total Range:  -- \nUsable Range:  -- \n\nTotal usable IP Addresses : -1\nSubnet: \nBinary Subnet: \nBroadcast Address: \nPrefix: /0\nNetmask: \nBinary Netmask: ", IPCalculate);
    }
  }
  