content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Thu Mar 21 05:23:21 GMT 2024
   */
  
  package org.exolab.jms.net.socket;
  
  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 org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.exolab.jms.net.socket.SocketRequestInfo;
  import org.exolab.jms.net.uri.URI;
  import org.exolab.jms.net.util.Properties;
  import org.junit.runner.RunWith;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class SocketRequestInfo_Original_ESTest extends SocketRequestInfo_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateSocketRequestInfoTakingURIThrowsException() throws Throwable  {
        URI arg0 = new URI("bindAll", "bindAll", "bindAll", "bindAll", "bindAll");
        SocketRequestInfo socketRequestInfo = null;
        try {
          socketRequestInfo = new SocketRequestInfo(arg0);
          fail("Expecting exception: Exception");
        
        } catch(Throwable e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("org.exolab.jms.net.socket.SocketRequestInfo", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAlternativeURIThrowsException() throws Throwable  {
        URI arg0 = new URI();
        SocketRequestInfo socketRequestInfo = new SocketRequestInfo(arg0);
        socketRequestInfo.setAlternativeHost(";f!)UjM");
        try { 
          socketRequestInfo.getAlternativeURI();
          fail("Expecting exception: Exception");
        
        } catch(Exception e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("org.exolab.jms.net.socket.SocketRequestInfo", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetBindAll() throws Throwable  {
        URI arg0 = new URI();
        SocketRequestInfo socketRequestInfo = new SocketRequestInfo(arg0);
        assertTrue(socketRequestInfo.getBindAll());
        
        socketRequestInfo.setBindAll(false);
        boolean bindAll = socketRequestInfo.getBindAll();
        assertFalse(bindAll);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAlternativeURIReturningURIWhereGetPortIsNegative() throws Throwable  {
        URI arg0 = new URI("org.exolab.jms.net.orb.provider.uri", "org.exolab.jms.net.socket.SocketRequestInfo", "org.exolab.jms.net.socket.SocketRequestInfo", "", "org.exolab.jms.net.socket.SocketRequestInfo");
        SocketRequestInfo socketRequestInfo = new SocketRequestInfo(arg0);
        socketRequestInfo.setAlternativeHost("");
        URI alternativeURI = socketRequestInfo.getAlternativeURI();
        assertEquals(50, socketRequestInfo.getConnectionRequestQueueSize());
        assertTrue(socketRequestInfo.getBindAll());
        assertNotNull(alternativeURI);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAlternativeHostReturningNonEmptyString() throws Throwable  {
        URI arg0 = new URI();
        Properties arg1 = new Properties("Fragment can only be set for a generic URI!");
        SocketRequestInfo socketRequestInfo = new SocketRequestInfo(arg0, arg1);
        socketRequestInfo.setAlternativeHost("+ba>mkM4M");
        socketRequestInfo.getAlternativeHost();
        assertEquals(50, socketRequestInfo.getConnectionRequestQueueSize());
        assertTrue(socketRequestInfo.getBindAll());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAlternativeHostReturningEmptyString() throws Throwable  {
        URI arg0 = new URI("org.exolab.jms.net.orb.provider.uri", "org.exolab.jms.net.socket.SocketRequestInfo", "org.exolab.jms.net.socket.SocketRequestInfo", "", "org.exolab.jms.net.socket.SocketRequestInfo");
        SocketRequestInfo socketRequestInfo = new SocketRequestInfo(arg0);
        socketRequestInfo.setAlternativeHost("");
        socketRequestInfo.getAlternativeHost();
        assertTrue(socketRequestInfo.getBindAll());
        assertEquals(50, socketRequestInfo.getConnectionRequestQueueSize());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsWithNull() throws Throwable  {
        URI arg0 = new URI();
        SocketRequestInfo socketRequestInfo = new SocketRequestInfo(arg0);
        boolean equals = socketRequestInfo.equals((Object) null, (Object) null);
        assertTrue(equals);
        assertTrue(socketRequestInfo.getBindAll());
        assertEquals(50, socketRequestInfo.getConnectionRequestQueueSize());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsWithNonNull() throws Throwable  {
        URI arg0 = new URI();
        SocketRequestInfo socketRequestInfo = new SocketRequestInfo(arg0);
        Object arg1 = new Object();
        boolean equals = socketRequestInfo.equals((Object) null, arg1);
        assertFalse(equals);
        assertEquals(50, socketRequestInfo.getConnectionRequestQueueSize());
        assertTrue(socketRequestInfo.getBindAll());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetBindAllReturningTrue() throws Throwable  {
        URI arg0 = new URI();
        SocketRequestInfo socketRequestInfo = new SocketRequestInfo(arg0);
        boolean bindAll = socketRequestInfo.getBindAll();
        assertEquals(50, socketRequestInfo.getConnectionRequestQueueSize());
        assertTrue(bindAll);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsReturningTrue() throws Throwable  {
        URI arg1 = new URI();
        SocketRequestInfo socketRequestInfo = new SocketRequestInfo(arg1);
        boolean equals = socketRequestInfo.equals((Object) arg1, (Object) arg1);
        assertTrue(equals);
        assertTrue(socketRequestInfo.getBindAll());
        assertEquals(50, socketRequestInfo.getConnectionRequestQueueSize());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testEqualsReturningFalse() throws Throwable  {
        URI arg1 = new URI();
        SocketRequestInfo arg0 = new SocketRequestInfo(arg1);
        boolean equals = arg0.equals((Object) arg0, (Object) arg1);
        assertTrue(arg0.getBindAll());
        assertFalse(equals);
        assertEquals(50, arg0.getConnectionRequestQueueSize());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAlternativeURIReturningNull() throws Throwable  {
        URI arg0 = new URI();
        Properties arg1 = new Properties("Fragment can only be set for a generic URI!");
        SocketRequestInfo socketRequestInfo = new SocketRequestInfo(arg0, arg1);
        URI alternativeURI = socketRequestInfo.getAlternativeURI();
        assertEquals(50, socketRequestInfo.getConnectionRequestQueueSize());
        assertTrue(socketRequestInfo.getBindAll());
        assertNull(alternativeURI);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetConnectionRequestQueueSize() throws Throwable  {
        URI arg0 = new URI();
        SocketRequestInfo socketRequestInfo = new SocketRequestInfo(arg0);
        assertEquals(50, socketRequestInfo.getConnectionRequestQueueSize());
        
        socketRequestInfo.setConnectionRequestQueueSize(0);
        int connectionRequestQueueSize = socketRequestInfo.getConnectionRequestQueueSize();
        assertEquals(0, connectionRequestQueueSize);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetAlternativeHostReturningNull() throws Throwable  {
        URI arg0 = new URI("org.exolab.jms.net.orb.provider.uri", "org.exolab.jms.net.socket.SocketRequestInfo", "org.exolab.jms.net.socket.SocketRequestInfo", "", "org.exolab.jms.net.socket.SocketRequestInfo");
        SocketRequestInfo socketRequestInfo = new SocketRequestInfo(arg0);
        String alternativeHost = socketRequestInfo.getAlternativeHost();
        assertEquals(50, socketRequestInfo.getConnectionRequestQueueSize());
        assertNull(alternativeHost);
        assertTrue(socketRequestInfo.getBindAll());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetConnectionRequestQueueSizeReturningPositive() throws Throwable  {
        URI arg0 = new URI();
        SocketRequestInfo socketRequestInfo = new SocketRequestInfo(arg0);
        int connectionRequestQueueSize = socketRequestInfo.getConnectionRequestQueueSize();
        assertEquals(50, connectionRequestQueueSize);
        assertTrue(socketRequestInfo.getBindAll());
    }
  }
  