@Test public void shouldReturnOKIfTimeIsUp() { ConnectorManager connector = mock(ConnectorManager.class); assertTrue(w.execute(connector).isSuccess()); }
@Override public ExecuteResult execute(ConnectorManager connector) { try { LOGGER.info(LoggerMarkers.LEARNER, "Waiting for {} ms.", duration); Thread.sleep(duration); return getSuccessOutput(); } catch (InterruptedException e) { LOGGER.error(LoggerMarkers.LEARNER, "Failed to wait.", e); return getFailedOutput(); } }
WaitAction extends SymbolAction { @Override public ExecuteResult execute(ConnectorManager connector) { try { LOGGER.info(LoggerMarkers.LEARNER, "Waiting for {} ms.", duration); Thread.sleep(duration); return getSuccessOutput(); } catch (InterruptedException e) { LOGGER.error(LoggerMarkers.LEARNER, "Failed to wait.", e); return getFailedOutput(); } } }
WaitAction extends SymbolAction { @Override public ExecuteResult execute(ConnectorManager connector) { try { LOGGER.info(LoggerMarkers.LEARNER, "Waiting for {} ms.", duration); Thread.sleep(duration); return getSuccessOutput(); } catch (InterruptedException e) { LOGGER.error(LoggerMarkers.LEARNER, "Failed to wait.", e); return getFailedOutput(); } }  }
WaitAction extends SymbolAction { @Override public ExecuteResult execute(ConnectorManager connector) { try { LOGGER.info(LoggerMarkers.LEARNER, "Waiting for {} ms.", duration); Thread.sleep(duration); return getSuccessOutput(); } catch (InterruptedException e) { LOGGER.error(LoggerMarkers.LEARNER, "Failed to wait.", e); return getFailedOutput(); } }  @Override ExecuteResult execute(ConnectorManager connector); Long getDuration(); void setDuration(Long duration); }
WaitAction extends SymbolAction { @Override public ExecuteResult execute(ConnectorManager connector) { try { LOGGER.info(LoggerMarkers.LEARNER, "Waiting for {} ms.", duration); Thread.sleep(duration); return getSuccessOutput(); } catch (InterruptedException e) { LOGGER.error(LoggerMarkers.LEARNER, "Failed to wait.", e); return getFailedOutput(); } }  @Override ExecuteResult execute(ConnectorManager connector); Long getDuration(); void setDuration(Long duration);  }