@Test
public void testInactiveDomains() {

    String taskType = "test-task";
    String[] domains = new String[]{"domain1", "domain2"};
    PollData pollData1 = new PollData("queue1", domains[0], "worker1", System.currentTimeMillis() - 99 * 10000);
    when(executionDAOFacade.getTaskPollDataByDomain(taskType, domains[0])).thenReturn(pollData1);
    when(executionDAOFacade.getTaskPollDataByDomain(taskType, domains[1])).thenReturn(null);
    String activeDomain = workflowExecutor.getActiveDomain(taskType, domains);
    assertEquals("domain2", activeDomain);
}