urbanairship-core/src/test/java/com/urbanairship/analytics/CustomEventTest.java
@Test
    public void testCustomInteractionEmpty() throws JSONException {
        when(pushManager.getLastReceivedMetadata()).thenReturn("last metadata");

        CustomEvent event = CustomEvent.newBuilder("event name")
                .build();

        EventTestUtils.validateEventValue(event, "interaction_type", null);
        EventTestUtils.validateEventValue(event, "interaction_id", null);
        EventTestUtils.validateEventValue(event, "template_type", null);
    }
/**
     * Test creating a custom event without an interaction, last send id, or
     * conversion push id will be empty.
     */
Test creating a custom event without an interaction, last send id, or
conversion push id will be empty.
Test creating a custom event without an interaction last send id or conversion push id will be empty .
@Test
    public void testCustomInteractionEmpty() throws JSONException {
        when(pushManager.getLastReceivedMetadata()).thenReturn("last metadata");
        CustomEvent event = CustomEvent.newBuilder("event name")
                .build();
        EventTestUtils.validateEventValue(event, "interaction_type", null);
        EventTestUtils.validateEventValue(event, "interaction_id", null);
        EventTestUtils.validateEventValue(event, "template_type", null);
    }
@ Test public void testCustomInteractionEmpty ( ) throws JSONException { when ( pushManager . getLastReceivedMetadata ( ) ) . thenReturn ( "last metadata" ) ; CustomEvent event = CustomEvent . newBuilder ( "event name" ) . build ( ) ; EventTestUtils . validateEventValue ( event , "interaction_type" , null ) ; EventTestUtils . validateEventValue ( event , "interaction_id" , null ) ; EventTestUtils . validateEventValue ( event , "template_type" , null ) ; }
Test creating a custom event without an interaction, last send id, or
 conversion push id will be empty.
Test creating a custom event without an interaction last send id or conversion push id will be empty .