@Test public void testSingleDistinguishableFromDouble() throws Exception {
SingleAndDblClickListener.dblClickWaitTime = 1000; // Screen shots take time
SWTBotButton button = bot.button();
button.click();
assertEquals(1, preClicksHandled);
Thread.sleep(SingleAndDblClickListener.dblClickWaitTime + 1);
assertEquals(ACTION.SINGLE_CLICK_ACTION, actionPerformed);
assertEquals(1, clicks);
assertEquals(1, clicksHandled);
button.click();
button.click();
assertEquals(2, preClicksHandled);
assertEquals(ACTION.DOUBLE_CLICK_ACTION, actionPerformed);
assertEquals(3, clicks);
assertEquals(2, clicksHandled);
button.click();
assertEquals(3, preClicksHandled);
Thread.sleep(SingleAndDblClickListener.dblClickWaitTime + 1);
assertEquals(ACTION.SINGLE_CLICK_ACTION, actionPerformed);
assertEquals(4, clicks);
assertEquals(3, clicksHandled);
button.click();
assertEquals(4, preClicksHandled);
Thread.sleep(SingleAndDblClickListener.dblClickWaitTime + 1);
assertEquals(ACTION.SINGLE_CLICK_ACTION, actionPerformed);
assertEquals(5, clicks);
assertEquals(4, clicksHandled);