content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Wed Mar 20 11:28:07 GMT 2024
   */
  
  package org.scribe.model;
  
  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.HttpURLConnection;
  import java.util.Map;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.junit.runner.RunWith;
  import org.scribe.model.Request;
  import org.scribe.model.Verb;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class Request_Original_ESTest extends Request_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetBodyContentsThrowsRuntimeException() throws Throwable  {
        Verb arg0 = Verb.PUT;
        Request request = new Request(arg0, "");
        request.setCharset("Cannot encode null string");
        // Undeclared exception!
        try { 
          request.getBodyContents();
          fail("Expecting exception: RuntimeException");
        
        } catch(RuntimeException e) {
           //
           // Unsupported Charset: Cannot encode null string
           //
           verifyException("org.scribe.model.Request", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetVerbReturningNonNull() throws Throwable  {
        Verb arg0 = Verb.PUT;
        Request request = new Request(arg0, "Unsupported Charset: ");
        Verb verb = request.getVerb();
        assertSame(verb, arg0);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetUrlReturningNonEmptyString() throws Throwable  {
        Verb arg0 = Verb.GET;
        Request request = new Request(arg0, ";b)o0_hy;!_f");
        String url = request.getUrl();
        assertEquals(";b)o0_hy;!_f", url);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetUrlReturningEmptyString() throws Throwable  {
        Verb arg0 = Verb.GET;
        Request request = new Request(arg0, "");
        String url = request.getUrl();
        assertEquals("", url);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSanitizedUrlReturningEmptyString() throws Throwable  {
        Verb arg0 = Verb.POST;
        Request request = new Request(arg0, "");
        String sanitizedUrl = request.getSanitizedUrl();
        assertEquals("", sanitizedUrl);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCharsetReturningNonEmptyString() throws Throwable  {
        Verb arg0 = Verb.PUT;
        Request request = new Request(arg0, "O(EJ'?");
        String charset = request.getCharset();
        assertEquals("UTF-8", charset);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetVerbReturningNull() throws Throwable  {
        Request request = new Request((Verb) null, "true");
        request.getVerb();
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetBodyContentsReturningEmptyString() throws Throwable  {
        Verb arg0 = Verb.POST;
        Request request = new Request(arg0, "#3(~`&%7+E#QxM^|N$");
        String bodyContents = request.getBodyContents();
        assertEquals("", bodyContents);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddPayload() throws Throwable  {
        Verb arg0 = Verb.POST;
        Request request = new Request(arg0, "#3(~`&%7+E#QxM^|N$");
        request.addPayload("#3(~`&%7+E#QxM^|N$");
        String bodyContents = request.getBodyContents();
        assertEquals("#3(~`&%7+E#QxM^|N$", bodyContents);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddQuerystringParameter() throws Throwable  {
        Verb arg0 = Verb.DELETE;
        Request request = new Request(arg0, "\\d{4}");
        request.addQuerystringParameter("\\d{4}", "\\d{4}");
        assertEquals("\\d{4}", request.getUrl());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetQueryStringParamsThrowsRuntimeException() throws Throwable  {
        Verb arg0 = Verb.DELETE;
        Request request = new Request(arg0, "AG^I#f");
        // Undeclared exception!
        try { 
          request.getQueryStringParams();
          fail("Expecting exception: RuntimeException");
        
        } catch(RuntimeException e) {
           //
           // Malformed URL
           //
           verifyException("org.scribe.model.Request", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSanitizedUrlReturningNonEmptyString() throws Throwable  {
        Verb arg0 = Verb.DELETE;
        Request request = new Request(arg0, "\"P|u@S7O:8~?jBPb");
        String sanitizedUrl = request.getSanitizedUrl();
        assertEquals("\"P|u@S7O:8~", sanitizedUrl);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSendThrowsRuntimeException() throws Throwable  {
        Verb arg0 = Verb.POST;
        Request request = new Request(arg0, "X?:Oo-)ww&");
        // Undeclared exception!
        try { 
          request.send();
          fail("Expecting exception: RuntimeException");
        
        } catch(RuntimeException e) {
           //
           // Problems while creating connection
           //
           verifyException("org.scribe.model.Request", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testSetConnectionKeepAlive() throws Throwable  {
        Verb arg0 = Verb.POST;
        Request request = new Request(arg0, "bvc*f)fxH:|#;?v");
        request.setConnectionKeepAlive(true);
        // Undeclared exception!
        try { 
          request.send();
          fail("Expecting exception: RuntimeException");
        
        } catch(RuntimeException e) {
           //
           // Problems while creating connection
           //
           verifyException("org.scribe.model.Request", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddHeader() throws Throwable  {
        Verb arg0 = Verb.PUT;
        Request request = new Request(arg0, "fQ");
        request.addHeader("", "");
        Map<String, String> headers = request.getHeaders();
        assertFalse(headers.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToString() throws Throwable  {
        Verb arg0 = Verb.DELETE;
        Request request = new Request(arg0, "");
        String string = request.toString();
        assertEquals("@Request(DELETE )", string);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCharsetReturningEmptyString() throws Throwable  {
        Verb arg0 = Verb.DELETE;
        Request request = new Request(arg0, "AG^I#f");
        request.setCharset("");
        String charset = request.getCharset();
        assertEquals("", charset);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetUrlReturningNull() throws Throwable  {
        Verb arg0 = Verb.DELETE;
        Request request = new Request(arg0, (String) null);
        String url = request.getUrl();
        assertNull(url);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddBodyParameter() throws Throwable  {
        Verb arg0 = Verb.POST;
        Request request = new Request(arg0, "");
        request.addBodyParameter("FylOzzx>", "M\"[Y");
        Map<String, String> bodyParams = request.getBodyParams();
        assertFalse(bodyParams.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddBodyThrowsNullPointerException() throws Throwable  {
        Verb arg0 = Verb.DELETE;
        Request request = new Request(arg0, (String) null);
        // Undeclared exception!
        try { 
          request.addBody((HttpURLConnection) null, (byte[]) null);
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("org.scribe.model.Request", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetHeadersReturningMapWhereIsEmptyIsTrueAndMapWhereSizeIsZero() throws Throwable  {
        Verb arg0 = Verb.PUT;
        Request request = new Request(arg0, "fQ");
        Map<String, String> headers = request.getHeaders();
        assertTrue(headers.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetBodyParamsReturningMapWhereIsEmptyIsTrueAndMapWhereSizeIsZero() throws Throwable  {
        Verb arg0 = Verb.DELETE;
        Request request = new Request(arg0, (String) null);
        Map<String, String> bodyParams = request.getBodyParams();
        assertEquals(0, bodyParams.size());
    }
  }
  