urbanairship-core/src/test/java/com/urbanairship/analytics/CustomEventTest.java
@Test
    public void testPropertyNameLengthExceedsMaxLength() throws JSONException {
        // Add a property name at max length
        CustomEvent.Builder eventBuilder = CustomEvent.newBuilder("event name")
                .addProperty(createFixedSizeString('a', CustomEvent.MAX_CHARACTER_LENGTH), "value");

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

        // Add a property name above max length
        eventBuilder.addProperty(createFixedSizeString('a', CustomEvent.MAX_CHARACTER_LENGTH + 1), "value");

        // Verify its now invalid
        assertFalse(eventBuilder.build().isValid());
    }
/**
     * Test adding a property with a name that exceeds {@link CustomEvent#MAX_CHARACTER_LENGTH} invalidates
     * the event.
     */
Test adding a property with a name that exceeds  CustomEvent#MAX_CHARACTER_LENGTH invalidates
the event.
Test adding a property with a name that exceeds CustomEvent#MAX_CHARACTER_LENGTH invalidates the event .
@Test
    public void testPropertyNameLengthExceedsMaxLength() throws JSONException {
        CustomEvent.Builder eventBuilder = CustomEvent.newBuilder("event name")
                .addProperty(createFixedSizeString('a', CustomEvent.MAX_CHARACTER_LENGTH), "value");
        assertTrue(eventBuilder.build().isValid());
        eventBuilder.addProperty(createFixedSizeString('a', CustomEvent.MAX_CHARACTER_LENGTH + 1), "value");
        assertFalse(eventBuilder.build().isValid());
    }
@ Test public void testPropertyNameLengthExceedsMaxLength ( ) throws JSONException { CustomEvent . Builder eventBuilder = CustomEvent . newBuilder ( "event name" ) . addProperty ( createFixedSizeString ( 'a' , CustomEvent . MAX_CHARACTER_LENGTH ) , "value" ) ; assertTrue ( eventBuilder . build ( ) . isValid ( ) ) ; eventBuilder . addProperty ( createFixedSizeString ( 'a' , CustomEvent . MAX_CHARACTER_LENGTH + 1 ) , "value" ) ; assertFalse ( eventBuilder . build ( ) . isValid ( ) ) ; }
Test adding a property with a name that exceeds {@link CustomEvent#MAX_CHARACTER_LENGTH} invalidates
 the event.
Test adding a property with a name that exceeds { @link CustomEvent#MAX_CHARACTER_LENGTH } invalidates the event .
// Add a property name at max length // Make sure its valid // Add a property name above max length // Verify its now invalid