@Test
public void testColumnVisibilityActionOnHideable() {

    JXTable table = new JXTable(10, 3);
    table.setColumnControlVisible(true);
    ColumnControlButton columnControl = (ColumnControlButton) table.getColumnControl();
    ColumnVisibilityAction action = columnControl.getColumnVisibilityActions().get(0);
    TableColumnExt columnExt = table.getColumnExt(0);
    // visible property is false
    columnExt.setVisible(false);
    columnExt.setHideable(false);
    assertTrue("visibility action must be selected if not hideable", action.isSelected());
    assertFalse("action must be disabled", action.isEnabled());
    columnExt.setHideable(true);
    assertFalse("visibility action must be unselected if hideable", action.isSelected());
}