content: /*
   * This file was automatically generated by UTestGen and EvoSuite
   * Mon Mar 18 10:07:47 GMT 2024
   */
  
  package com.puppycrawl.tools.checkstyle.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 com.google.common.collect.ImmutableMap;
  import com.puppycrawl.tools.checkstyle.api.FileContents;
  import com.puppycrawl.tools.checkstyle.api.FileText;
  import com.puppycrawl.tools.checkstyle.api.TextBlock;
  import java.util.List;
  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 FileContents_Original_ESTest extends FileContents_Original_ESTest_scaffolding {
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLineIsCommentReturningTrue() throws Throwable  {
        String[] arg1 = new String[6];
        arg1[1] = "//";
        FileContents fileContents = new FileContents("//", arg1);
        boolean lineIsComment = fileContents.lineIsComment(1);
        assertTrue(lineIsComment);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLineIsCommentReturningFalse() throws Throwable  {
        String[] arg1 = new String[3];
        arg1[2] = "_Aku5U)ru;Rzx~rrupackage-info.java";
        FileContents fileContents = new FileContents("_Aku5U)ru;Rzx~rrupackage-info.java", arg1);
        boolean lineIsComment = fileContents.lineIsComment(2);
        assertFalse(lineIsComment);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLineIsBlankReturningTrue() throws Throwable  {
        String[] arg1 = new String[8];
        arg1[5] = "";
        FileContents fileContents = new FileContents("", arg1);
        boolean lineIsBlank = fileContents.lineIsBlank(5);
        assertTrue(lineIsBlank);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testLineIsBlankReturningFalse() throws Throwable  {
        String[] arg1 = new String[6];
        arg1[0] = "{";
        FileContents fileContents = new FileContents("{", arg1);
        boolean lineIsBlank = fileContents.lineIsBlank(0);
        assertFalse(lineIsBlank);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInPackageInfoReturningTrue() throws Throwable  {
        String[] arg1 = new String[0];
        FileContents fileContents = new FileContents("package-info.java", arg1);
        boolean inPackageInfo = fileContents.inPackageInfo();
        assertTrue(inPackageInfo);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetTextReturningFileTextWhereSizeIsPositive() throws Throwable  {
        String[] arg1 = new String[3];
        FileContents fileContents = new FileContents("_Aku5U)ru;Rzx~rrupackage-info.java", arg1);
        FileText text = fileContents.getText();
        assertEquals(3, text.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetLines() throws Throwable  {
        String[] arg1 = new String[5];
        FileContents fileContents = new FileContents("cVllection too large", arg1);
        String[] lines = fileContents.getLines();
        assertFalse(lines.equals((Object)arg1));
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetLineReturningNonEmptyString() throws Throwable  {
        String[] arg1 = new String[8];
        arg1[7] = "d[_";
        FileContents fileContents = new FileContents("4i|8 I|PYi!", arg1);
        String line = fileContents.getLine(7);
        assertEquals("d[_", line);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetLineReturningEmptyString() throws Throwable  {
        String[] arg1 = new String[7];
        arg1[3] = "";
        FileContents fileContents = new FileContents("", arg1);
        String line = fileContents.getLine(3);
        assertEquals("", line);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetFilenameReturningNonEmptyString() throws Throwable  {
        String[] arg1 = new String[3];
        FileContents fileContents = new FileContents(":", arg1);
        String filename = fileContents.getFilename();
        assertEquals(":", filename);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetFileNameReturningEmptyString() throws Throwable  {
        String[] arg1 = new String[9];
        FileContents fileContents = new FileContents("", arg1);
        String fileName = fileContents.getFileName();
        assertEquals("", fileName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReportCppCommentThrowsArrayIndexOutOfBoundsException() throws Throwable  {
        String[] arg1 = new String[3];
        FileContents fileContents = new FileContents("_Aku5U)ru;Rzx~rrupackage-info.java", arg1);
        // Undeclared exception!
        try { 
          fileContents.reportCppComment(7, (-3609));
          fail("Expecting exception: ArrayIndexOutOfBoundsException");
        
        } catch(ArrayIndexOutOfBoundsException e) {
           //
           // no message in exception (getMessage() returned null)
           //
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testHasIntersectionWithCommentAndReportSingleLineCommentAndHasIntersectionWithCommentReturningFalse() throws Throwable  {
        String[] arg1 = new String[25];
        arg1[1] = "HBlV@B";
        FileContents fileContents = new FileContents("HBlV@B", arg1);
        fileContents.reportSingleLineComment("HBlV@B", 2, 2);
        boolean intersectionWithComment = fileContents.hasIntersectionWithComment(2, 28, 2, 2);
        assertFalse(intersectionWithComment);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testHasIntersectionWithCommentAndReportBlockCommentAndHasIntersectionWithCommentReturningFalse() throws Throwable  {
        String[] arg1 = new String[25];
        arg1[1] = "HBlV@B";
        FileContents fileContents = new FileContents("HBlV@B", arg1);
        fileContents.reportBlockComment("HBlV@B", 2, 2, 2, 2);
        boolean intersectionWithComment = fileContents.hasIntersectionWithComment(2, 28, 2, 2);
        assertFalse(intersectionWithComment);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testHasIntersectionWithCommentAndReportSingleLineCommentAndHasIntersectionWithCommentReturningTrue() throws Throwable  {
        String[] arg1 = new String[25];
        arg1[1] = "HBlV@B";
        FileContents fileContents = new FileContents("HBlV@B", arg1);
        fileContents.reportSingleLineComment("HBlV@B", 2, 2);
        boolean intersectionWithComment = fileContents.hasIntersectionWithComment(2, 4, 2, 2);
        assertTrue(intersectionWithComment);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testHasIntersectionWithCommentAndReportBlockCommentAndHasIntersectionWithCommentReturningTrue() throws Throwable  {
        String[] arg1 = new String[2];
        arg1[1] = "Z=@B";
        FileContents fileContents = new FileContents("Z=@B", arg1);
        fileContents.reportBlockComment("Z=@B", 2, 2, 2, 2);
        boolean intersectionWithComment = fileContents.hasIntersectionWithComment(2, 2, 2, 2);
        assertTrue(intersectionWithComment);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetJavadocBefore0() throws Throwable  {
        String[] arg1 = new String[8];
        arg1[5] = "d[_";
        FileContents fileContents = new FileContents("d[_", arg1);
        TextBlock javadocBefore = fileContents.getJavadocBefore(7);
        assertNull(javadocBefore);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetJavadocBeforeThrowsNullPointerException() throws Throwable  {
        String[] arg1 = new String[6];
        arg1[5] = "";
        FileContents fileContents = new FileContents("", arg1);
        // Undeclared exception!
        try { 
          fileContents.getJavadocBefore(7);
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("com.puppycrawl.tools.checkstyle.api.FileContents", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetJavadocBefore1() throws Throwable  {
        String[] arg1 = new String[6];
        arg1[1] = "//";
        FileContents fileContents = new FileContents("//", arg1);
        TextBlock javadocBefore = fileContents.getJavadocBefore(3);
        assertNull(javadocBefore);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReportBlockCommentThrowsNullPointerException() throws Throwable  {
        String[] arg1 = new String[21];
        arg1[1] = "/<";
        FileContents fileContents = new FileContents("/<", arg1);
        // Undeclared exception!
        try { 
          fileContents.reportBlockComment("/<", 2, 2, 11, 11);
          fail("Expecting exception: NullPointerException");
        
        } catch(NullPointerException e) {
           //
           // no message in exception (getMessage() returned null)
           //
           verifyException("com.puppycrawl.tools.checkstyle.api.FileContents", e);
        }
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReportCComment0() throws Throwable  {
        String[] arg1 = new String[4];
        arg1[1] = "/**";
        FileContents fileContents = new FileContents("/**", arg1);
        fileContents.reportCComment(2, 2, 2, 2);
        assertEquals("/**", fileContents.getFileName());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReportBlockCommentAndReportCComment() throws Throwable  {
        String[] arg1 = new String[17];
        arg1[1] = "H=lV@B";
        FileContents fileContents = new FileContents("H=lV@B", arg1);
        fileContents.reportBlockComment("H=lV@B", 2, 2, 2, 2);
        fileContents.reportCComment(2, 2, 2, 2);
        assertEquals("H=lV@B", fileContents.getFilename());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testReportCComment1() throws Throwable  {
        String[] arg1 = new String[2];
        arg1[1] = "/**/";
        FileContents fileContents = new FileContents("/**/", arg1);
        fileContents.reportCComment(2, 2, 2, 2);
        assertEquals("/**/", fileContents.getFileName());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetFileNameReturningNonEmptyString() throws Throwable  {
        String[] arg1 = new String[7];
        FileContents fileContents = new FileContents("-PWLv7i7;GdU,F(JgX", arg1);
        String fileName = fileContents.getFileName();
        assertEquals("-PWLv7i7;GdU,F(JgX", fileName);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCppComments() throws Throwable  {
        String[] arg1 = new String[3];
        FileContents fileContents = new FileContents("tSULHz", arg1);
        ImmutableMap<Integer, TextBlock> cppComments = fileContents.getCppComments();
        assertEquals(0, cppComments.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testInPackageInfoReturningFalse() throws Throwable  {
        String[] arg1 = new String[0];
        FileContents fileContents = new FileContents("08-i2<ELto[", arg1);
        boolean inPackageInfo = fileContents.inPackageInfo();
        assertFalse(inPackageInfo);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetLineReturningNull() throws Throwable  {
        String[] arg1 = new String[7];
        FileContents fileContents = new FileContents("", arg1);
        String line = fileContents.getLine(3);
        assertNull(line);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetFilenameReturningEmptyString() throws Throwable  {
        String[] arg1 = new String[3];
        FileContents fileContents = new FileContents("", arg1);
        String filename = fileContents.getFilename();
        assertEquals("", filename);
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetTextReturningFileTextWhereSizeIsZero() throws Throwable  {
        String[] arg1 = new String[0];
        FileContents fileContents = new FileContents("/**/", arg1);
        FileText text = fileContents.getText();
        assertEquals(0, text.size());
    }
  
    @Test
    @Timeout(value = 4000 , unit = TimeUnit.MILLISECONDS)
    public void testGetCComments() throws Throwable  {
        String[] arg1 = new String[7];
        FileContents fileContents = new FileContents("", arg1);
        ImmutableMap<Integer, List<TextBlock>> cComments = fileContents.getCComments();
        assertEquals(0, cComments.size());
    }
  }
  