@Test
public void shouldCreateCorrectTypeOfQueueTracker() throws Exception {

    final Session quickfixSession = mock(Session.class, withSettings().defaultAnswer(RETURNS_DEEP_STUBS));
    assertFalse(getField(
            new ThreadPerSessionEventHandlingStrategy(null, 42)
                    .createDispatcherThread(quickfixSession),
            "queueTracker",
            QueueTracker.class) instanceof WatermarkTracker);
    assertTrue(getField(
            new ThreadPerSessionEventHandlingStrategy(null, 42, 43)
                    .createDispatcherThread(quickfixSession),
            "queueTracker",
            QueueTracker.class) instanceof WatermarkTracker);
    assertFalse(getField(
            new ThreadPerSessionEventHandlingStrategy(null, -1, -1)
                    .createDispatcherThread(quickfixSession),
            "queueTracker",
            QueueTracker.class) instanceof WatermarkTracker);
}