urbanairship-core/src/test/java/com/urbanairship/analytics/CustomEventTest.java
@Test
    public void testPropertyStringArrayExceedsMaxCount() throws JSONException {
        // Add a property value at max length
        CustomEvent.Builder eventBuilder = CustomEvent.newBuilder("event name")
                .addProperty("at max", Arrays.asList(new String[CustomEvent.MAX_PROPERTY_COLLECTION_SIZE]));

        // Make sure its valid
        assertTrue(eventBuilder.build().isValid());

        // Add a property name above max length
        eventBuilder.addProperty("exceeds max", Arrays.asList(new String[CustomEvent.MAX_PROPERTY_COLLECTION_SIZE + 1]));

        // Verify its now invalid
        assertFalse(eventBuilder.build().isValid());
    }
/**
     * Test adding a property with a String[] that is larger than {@link CustomEvent#MAX_PROPERTY_COLLECTION_SIZE}
     * invalidates the event.
     */
Test adding a property with a String[] that is larger than  CustomEvent#MAX_PROPERTY_COLLECTION_SIZE
invalidates the event.
Test adding a property with a String [] that is larger than CustomEvent#MAX_PROPERTY_COLLECTION_SIZE invalidates the event .
@Test
    public void testPropertyStringArrayExceedsMaxCount() throws JSONException {
        CustomEvent.Builder eventBuilder = CustomEvent.newBuilder("event name")
                .addProperty("at max", Arrays.asList(new String[CustomEvent.MAX_PROPERTY_COLLECTION_SIZE]));
        assertTrue(eventBuilder.build().isValid());
        eventBuilder.addProperty("exceeds max", Arrays.asList(new String[CustomEvent.MAX_PROPERTY_COLLECTION_SIZE + 1]));
        assertFalse(eventBuilder.build().isValid());
    }
@ Test public void testPropertyStringArrayExceedsMaxCount ( ) throws JSONException { CustomEvent . Builder eventBuilder = CustomEvent . newBuilder ( "event name" ) . addProperty ( "at max" , Arrays . asList ( new String [ CustomEvent . MAX_PROPERTY_COLLECTION_SIZE ] ) ) ; assertTrue ( eventBuilder . build ( ) . isValid ( ) ) ; eventBuilder . addProperty ( "exceeds max" , Arrays . asList ( new String [ CustomEvent . MAX_PROPERTY_COLLECTION_SIZE + 1 ] ) ) ; assertFalse ( eventBuilder . build ( ) . isValid ( ) ) ; }
Test adding a property with a String[] that is larger than {@link CustomEvent#MAX_PROPERTY_COLLECTION_SIZE}
 invalidates the event.
Test adding a property with a String [] that is larger than { @link CustomEvent#MAX_PROPERTY_COLLECTION_SIZE } invalidates the event .
// Add a property value at max length // Make sure its valid // Add a property name above max length // Verify its now invalid