public synchronized List<SplunkEvent> getEvents() {
    return getEvents("search");
  }
@Test
  public void testGetEventsShouldThrowErrorWhenServiceClientFailsToExecuteRequest() {
    Job mockJob =
        clientFactory.getServiceClient(any(ServiceArgs.class)).getJobs().create(anyString());
    doThrow(ConditionTimeoutException.class).when(mockJob).isDone();

    assertThrows(ConditionTimeoutException.class, () -> testManager.getEvents(QUERY));
  }