content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Wed Mar 20 17:23:46 GMT 2024
   */
  
  package de.tudarmstadt.ukp.wikipedia.api;
  
  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 de.tudarmstadt.ukp.wikipedia.api.Title;
  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 Title_ESTest extends Title_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToStringReturningNonEmptyString() throws Throwable  {
        // Given a Title object with an empty title value
        Title emptyTitle = new Title("");
        
        // When the toString method is called on this object
        String emptyTitleString = emptyTitle.toString();
        
        // Then the resulting string should be the empty string
        assertEquals("", emptyTitleString);
        
        // Given a Title object with a non-empty title value
        Title nonEmptyTitle = new Title("My Title");
        
        // When the toString method is called on this object
        String nonEmptyTitleString = nonEmptyTitle.toString();
        
        // Then the resulting string should be the non-empty title value
        assertEquals("My Title", nonEmptyTitleString);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetWikiStyleTitleReturningNonEmptyString() throws Throwable  {
        // Create a new Title object with a title of ")"
        Title title = new Title(")");
        
        // Get the wiki-style title for this Title object
        String wikiStyleTitle = title.getWikiStyleTitle();
        
        // Assert that the wiki-style title is equal to the original title, which is ")"
        assertEquals(")", wikiStyleTitle);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSectionTextReturningNull() throws Throwable  {
        // Given: A Title object is created with an empty string as the section text
        Title title = new Title("");
        
        // When: The section text is retrieved from the Title object
        String sectionText = title.getSectionText();
        
        // Then: The section text should be null, as it has not been set
        assertNull(sectionText);
        
        // And: The toString method of the Title object should return a string with the expected format
        assertEquals("", title.toString());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSectionTextReturningEmptyString() throws Throwable  {
        // No Comments were added
        Title title = new Title("#");
        String sectionText = title.getSectionText();
        assertEquals("", sectionText);
        assertEquals("", title.getEntity());
        assertNotNull(sectionText);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPlainTitleReturningNonEmptyString() throws Throwable  {
        // Given a Title object with a value of ")"
        Title title = new Title(")");
        
        // When the getPlainTitle method is called on the Title object
        String plainTitle = title.getPlainTitle();
        
        // Then the returned plain title should be ")"
        assertEquals(")", plainTitle);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetEntityReturningNonEmptyString() throws Throwable  {
        // Arrange
        Title title = new Title("Test Title");
        
        // Act
        String entity = title.getEntity();
        
        // Assert
        assertEquals("Test Title", entity);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDisambiguationTextReturningNull() throws Throwable  {
        // Given a Title object with a non-empty section text and an empty entity
        Title title = new Title("#w8H\"@YdlhtOq*NF");
        
        // When the getDisambiguationText() method is called
        title.getDisambiguationText();
        
        // Then the disambiguation text should be an empty string
        assertEquals("", title.getEntity());
        
        // And the section text should remain unchanged
        assertEquals("#w8H\"@YdlhtOq*NF", title.getSectionText());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetEntityReturningEmptyString() throws Throwable  {
        // Create a Title object with a valid hash tag
        Title title = new Title("#w8H\"@YdlhtOq*NF");
        
        // Get the entity associated with the hash tag
        String entity = title.getEntity();
        
        // Verify that the entity is an empty string
        assertEquals("", entity);
        
        // Verify that the section text is equal to the original hash tag
        assertEquals("#w8H\"@YdlhtOq*NF", title.getSectionText());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesTitle0() throws Throwable  {
        // Given a title with the entity "Dr."
        Title title = new Title("Dr.");
        
        // When we call getEntity on the title
        String entity = title.getEntity();
        
        // Then we should get back the original entity string
        assertEquals("Dr.", entity);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testCreatesTitle1() throws Throwable  {
        // Given: A new Title object is created with an empty string as input
        Title title = null;
        try {
        title = new Title("");
        fail("Expecting exception: Exception");
        } catch (Throwable e) {
        // When: The constructor throws an exception because the input string is empty
        // Then: Verify that the correct exception is thrown with the appropriate message
        verifyException("de.tudarmstadt.ukp.wikipedia.api.Title", e);}
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testToStringReturningEmptyString() throws Throwable  {
        // No Comments were added
        Title title = new Title("#w8H\"@YdlhtOq*NF");
        String string = title.toString();
        assertEquals("w8H\"@YdlhtOq*NF", title.getSectionText());
        assertEquals("", string);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetSectionTextReturningNonEmptyString() throws Throwable  {
        // No Comments were added
        Title title = new Title("#w8H\"@YdlhtOq*NF");
        String sectionText = title.getSectionText();
        assertEquals("w8H\"@YdlhtOq*NF", sectionText);
        assertEquals("", title.getWikiStyleTitle());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetRawTitleText() throws Throwable  {
        // No Comments were added
        Title title = new Title("#w8H\"@YdlhtOq*NF");
        title.getRawTitleText();
        assertEquals("w8H\"@YdlhtOq*NF", title.getSectionText());
        assertEquals("", title.toString());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetPlainTitleReturningEmptyString() throws Throwable  {
        // Test the getPlainTitle method with a Title object that has a valid section text
        Title title = new Title("#w8H\"@YdlhtOq*NF");
        String plainTitle = title.getPlainTitle();
        assertEquals("w8H\"@YdlhtOq*NF", title.getSectionText());
        assertEquals("", plainTitle);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetDisambiguationTextReturningNonEmptyString() throws Throwable  {
        // Arrange
        Title title = new Title("(.v?).((K?))");
        
        // Act
        String disambiguationText = title.getDisambiguationText();
        String wikiStyleTitle = title.getWikiStyleTitle();
        
        // Assert
        assertEquals("(.v?)_((K?))", wikiStyleTitle);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetWikiStyleTitleReturningEmptyString() throws Throwable  {
        // No Comments were added
        Title title = new Title("#w8H\"@YdlhtOq*NF");
        String wikiStyleTitle = title.getWikiStyleTitle();
        assertEquals("w8H\"@YdlhtOq*NF", title.getSectionText());
        assertEquals("", wikiStyleTitle);
    }
  }
  