content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Wed Mar 20 11:20:52 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.util.Map;
  import org.evosuite.runtime.EvoRunner;
  import org.evosuite.runtime.EvoRunnerParameters;
  import org.junit.runner.RunWith;
  import org.scribe.model.OAuthRequest;
  import org.scribe.model.Verb;
  
  @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) 
  public class OAuthRequest_ESTest extends OAuthRequest_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddOAuthParameterWithNonEmptyString() throws Throwable  {
        // rollbacked to evosuite
        Verb arg0 = Verb.PUT;
        OAuthRequest oAuthRequest = new OAuthRequest(arg0, "scope");
        oAuthRequest.addOAuthParameter("scope", "scope");
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testAddOAuthParameterThrowsIllegalArgumentException() throws Throwable  {
        Verb arg0 = Verb.GET;
        OAuthRequest oAuthRequest = new OAuthRequest(arg0, "vyGFDVxt.SSn");
        
        // This test is checking that an exception is thrown when trying to add a parameter that does not start with 'oauth_' or is 'scope'
        try {
        oAuthRequest.addOAuthParameter("@OAuthRequest(GET, vyGFDVxt.SSn)", "");
        fail("Expecting exception: IllegalArgumentException");
        
        } catch(IllegalArgumentException e) {
        // This is the expected exception, since the parameter does not start with 'oauth_' or is 'scope'
        verifyException("org.scribe.model.OAuthRequest", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToString() throws Throwable  {
        Verb arg0 = Verb.GET;
        // Create an OAuth request with the GET verb and a specific endpoint URL
        OAuthRequest oAuthRequest = new OAuthRequest(arg0, "https://example.com/api/users");
        String string = oAuthRequest.toString();
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetOauthParametersReturningMapWhereIsEmptyIsFalse() throws Throwable  {
        // Given: The test is set up with a valid OAuth request
        Verb arg0 = Verb.PUT;
        OAuthRequest oAuthRequest = new OAuthRequest(arg0, "");
        
        // When: The OAuth parameters are added to the OAuth request
        oAuthRequest.addOAuthParameter("oauth_", "");
        
        // Then: The OAuth parameters are not empty
        Map<String, String> oauthParameters = oAuthRequest.getOauthParameters();
        assertFalse(oauthParameters.isEmpty());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetOauthParametersReturningMapWhereIsEmptyIsTrue() throws Throwable  {
        // Given: A new instance of OAuthRequest with a PUT verb and an empty string as the endpoint URL
        Verb arg0 = Verb.PUT;
        OAuthRequest oAuthRequest = new OAuthRequest(arg0, "");
        
        // When: The getOauthParameters method is called on the OAuthRequest object
        Map<String, String> oauthParameters = oAuthRequest.getOauthParameters();
        
        // Then: The resulting map should be empty, as there are no oauth parameters to return
        assertEquals(0, oauthParameters.size());
    }
  }
  