@Test
public void testSetSessionTimeout() {

    Tracker tracker = new Tracker(mMatomo, mTrackerBuilder);
    tracker.setSessionTimeout(10000);
    TrackHelper.track().screen("test1").with(tracker);
    assertThat(tracker.getLastEventX().get(QueryParams.SESSION_START), notNullValue());
    TrackHelper.track().screen("test2").with(tracker);
    assertThat(tracker.getLastEventX().get(QueryParams.SESSION_START), nullValue());
    tracker.setSessionTimeout(0);
    TestHelper.sleep(1);
    TrackHelper.track().screen("test3").with(tracker);
    assertThat(tracker.getLastEventX().get(QueryParams.SESSION_START), notNullValue());
    tracker.setSessionTimeout(10000);
    assertEquals(tracker.getSessionTimeout(), 10000);
    TrackHelper.track().screen("test3").with(tracker);
    assertThat(tracker.getLastEventX().get(QueryParams.SESSION_START), nullValue());
}