content: /*
   * This file was automatically generated by EvoSuite
   */
  
  package com.lts.swing;
  
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.evosuite.junit.EvoSuiteRunner;
  import static org.junit.Assert.*;
  import com.lts.swing.TableSorter;
  import javax.swing.JTable;
  import javax.swing.table.DefaultTableModel;
  import javax.swing.table.TableModel;
  import org.junit.BeforeClass;
  
  @RunWith(EvoSuiteRunner.class)
  public class TableSorterEvoSuiteTest {
  
    @BeforeClass 
    public static void initEvoSuiteFramework(){ 
      org.evosuite.Properties.REPLACE_CALLS = true; 
    } 
  
  
    @Test
    public void test0()  throws Throwable  {
        Object[][] objectArray0 = new Object[9][3];
        Object[] objectArray1 = new Object[15];
        DefaultTableModel defaultTableModel0 = new DefaultTableModel(objectArray0, objectArray1);
        TableSorter tableSorter0 = new TableSorter((TableModel) defaultTableModel0);
        assertNotNull(tableSorter0);
        
        tableSorter0.setValueAt((Object) null, 0, 0);
        assertEquals(true, tableSorter0.ascending);
        assertEquals(15, tableSorter0.getColumnCount());
        assertEquals(9, tableSorter0.getRowCount());
    }
  
    @Test
    public void test1()  throws Throwable  {
        TableSorter tableSorter0 = new TableSorter();
        JTable jTable0 = new JTable(0, 0);
        tableSorter0.addMouseListenerToHeaderInTable(jTable0);
        assertEquals(false, jTable0.getColumnSelectionAllowed());
        assertEquals(true, tableSorter0.ascending);
    }
  
    @Test
    public void test2()  throws Throwable  {
        TableSorter tableSorter0 = new TableSorter();
        // Undeclared exception!
        try {
          tableSorter0.sortByColumn(0);
          fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        }
    }
  
    @Test
    public void test3()  throws Throwable  {
        TableSorter tableSorter0 = new TableSorter();
        // Undeclared exception!
        try {
          tableSorter0.getValueAt(0, 0);
          fail("Expecting exception: NullPointerException");
        } catch(NullPointerException e) {
        }
    }
  
    @Test
    public void test4()  throws Throwable  {
        Object[][] objectArray0 = new Object[9][2];
        Object[] objectArray1 = new Object[10];
        objectArray0[0] = objectArray1;
        DefaultTableModel defaultTableModel0 = new DefaultTableModel(objectArray0, objectArray0[0]);
        TableSorter tableSorter0 = new TableSorter((TableModel) defaultTableModel0);
        assertNotNull(tableSorter0);
        
        tableSorter0.sortByColumn(8, false);
        assertEquals(false, tableSorter0.ascending);
        assertEquals(8, tableSorter0.compares);
    }
  
    @Test
    public void test5()  throws Throwable  {
        TableSorter tableSorter0 = new TableSorter();
        DefaultTableModel defaultTableModel0 = new DefaultTableModel(tableSorter0.sortingColumns, tableSorter0.sortingColumns);
        tableSorter0.setModel((TableModel) defaultTableModel0);
        tableSorter0.sortByColumn(0, true);
        assertEquals(1, tableSorter0.getRowCount());
        assertEquals(0, tableSorter0.compares);
    }
  }
  