content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Wed Mar 20 22:58:51 GMT 2024
   */
  
  package net.sourceforge.jwbf.mediawiki.actions.queries;
  
  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 net.sourceforge.jwbf.mediawiki.actions.queries.TemplateUserTitles;
  import net.sourceforge.jwbf.mediawiki.bots.MediaWikiBot;
  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 TemplateUserTitles_ESTest extends TemplateUserTitles_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testFailsToCreateTemplateUserTitlesThrowsIllegalStateException() throws Throwable  {
        // Given: a MediaWikiBot object and an array of integers representing the maximum number of redirects to follow
        MediaWikiBot bot = new MediaWikiBot();
        int[] maxRedirects = new int[6];
        
        // When: trying to create a TemplateUserTitles instance using the constructor with a null HttpBot object
        TemplateUserTitles templateUserTitles = null;
        try {
        templateUserTitles = new TemplateUserTitles(bot, ": ", maxRedirects);
        } catch (IllegalStateException e) {
        // Then: an IllegalStateException is thrown because the constructor was called with a null HttpBot object
        assertTrue(e instanceof IllegalStateException);
        
        // And: the exception message contains the expected error message
        String expectedErrorMessage = "Cannot create TemplateUserTitles without a valid HttpBot";
        assertEquals(expectedErrorMessage, e.getMessage());}
    }
  }
  