urbanairship-core/src/test/java/com/urbanairship/analytics/data/EventManagerTest.java
@Test
    public void testSendEventMaxCount() {
        // Make the match batch size greater than 500
        dataStore.put(EventManager.MAX_BATCH_SIZE_KEY, 100000);

        // Fake the resolver to act like it has more than 500 events
        when(mockEventResolver.getDatabaseSize()).thenReturn(100000);
        when(mockEventResolver.getEventCount()).thenReturn(1000);

        eventManager.uploadEvents(UAirship.shared());

        // Verify it only asked for 500
        verify(mockEventResolver).getEvents(500);
    }
/**
     * Test event batching only sends a max of 500 events.
     */
Test event batching only sends a max of 500 events.
Test event batching only sends a max of 500 events .
@Test
    public void testSendEventMaxCount() {
        dataStore.put(EventManager.MAX_BATCH_SIZE_KEY, 100000);
        when(mockEventResolver.getDatabaseSize()).thenReturn(100000);
        when(mockEventResolver.getEventCount()).thenReturn(1000);
        eventManager.uploadEvents(UAirship.shared());
        verify(mockEventResolver).getEvents(500);
    }
@ Test public void testSendEventMaxCount ( ) { dataStore . put ( EventManager . MAX_BATCH_SIZE_KEY , 100000 ) ; when ( mockEventResolver . getDatabaseSize ( ) ) . thenReturn ( 100000 ) ; when ( mockEventResolver . getEventCount ( ) ) . thenReturn ( 1000 ) ; eventManager . uploadEvents ( UAirship . shared ( ) ) ; verify ( mockEventResolver ) . getEvents ( 500 ) ; }
Test event batching only sends a max of 500 events.
Test event batching only sends a max of 500 events .
// Make the match batch size greater than 500 // Fake the resolver to act like it has more than 500 events // Verify it only asked for 500