    @Test
    public void testSplitSegmentSelectsTheLargestSegmentToSplit() {

        testSubject.splitSegment(CONTEXT, CLIENTS, PROCESSOR_NAME_TO_SPLIT);

        ArgumentCaptor<SplitSegmentRequest> argumentCaptor = ArgumentCaptor.forClass(SplitSegmentRequest.class);
        verify(applicationEventPublisher).publishEvent(argumentCaptor.capture());
        SplitSegmentRequest result = argumentCaptor.getValue();

        assertFalse(result.isProxied());
        assertEquals(CLIENT_NAME_OF_SPLIT, result.getClientId());
        assertEquals(PROCESSOR_NAME_TO_SPLIT, result.getProcessorName());
        assertEquals(SEGMENT_ID_TO_SPLIT, result.getSegmentId());
    }