* @throws InterruptedException
*/
@Test
public void testLogTableColumnsMovingOnUpDownButtonsClick() throws InterruptedException {
SWTBotTable logTable = getLogTable();
String firstItem = logTable.cell(0, 0); // "Level" by default
String secondItem = logTable.cell(1, 0); // "Category" by default
logTable.select(0);
pressMoveDownButton();
pressApplyButton();
closePreferencesDialog();
SWTBotView log4jView = BOT.viewByTitle("Log4j-Viewer");
log4jView.show();
log4jView.setFocus();
Composite log4jViewComposite = (Composite) log4jView.getWidget();
Matcher matcher = instanceOf(Table.class);
SWTBotTable mainViewTable = new SWTBotTable((Table) BOT.widget(matcher, log4jViewComposite));
String firstColumnName = mainViewTable.columns().get(0);
String secondColumnName = mainViewTable.columns().get(1);
boolean moveDownBtnWorks = firstColumnName.equals(secondItem)
&& secondColumnName.equals(firstItem);
assertTrue(moveDownBtnWorks);
// open closed preferences page
openAdditionalPreferencesPage();
// reparse page controls
findAndParsePageControls();
getLogTable().select(1);
pressMoveUpButton();
pressApplyButton();
closePreferencesDialog();
firstColumnName = mainViewTable.columns().get(0);
secondColumnName = mainViewTable.columns().get(1);
boolean moveUpBtnWorks = firstColumnName.equals(firstItem)
&& secondColumnName.equals(secondItem);
assertTrue(moveUpBtnWorks);