@Test
public void testBuilder() {

    StreamlineEventImpl event = StreamlineEventImpl.builder().put("a", "A").build();
    assertEquals(1, event.size());
    assertEquals("A", event.get("a"));
    event = StreamlineEventImpl.builder().put("a", "A").put("b", "B").build();
    assertEquals(2, event.size());
    assertEquals("A", event.get("a"));
    assertEquals("B", event.get("b"));
    event = StreamlineEventImpl.builder().put("a", "A").putAll(ImmutableMap.of("b", "B", "c", "C")).build();
    assertEquals(3, event.size());
    assertEquals("A", event.get("a"));
    assertEquals("B", event.get("b"));
    assertEquals("C", event.get("c"));
    ImmutableMap<String, Object> kv = ImmutableMap.of("b", "B", "c", "C");
    event = StreamlineEventImpl.builder().putAll(kv).build();
    assertEquals(2, event.size());
    assertEquals("B", event.get("b"));
    assertEquals("C", event.get("c"));
    // should be same reference
    assertTrue(kv == event.delegate());
    event = StreamlineEventImpl.builder().put("a", "A").put("b", "B").build();
    StreamlineEventImpl event2 = StreamlineEventImpl.builder().dataSourceId("dsrcid").putAll(event).build();
    // should be same reference
    assertTrue(event.delegate() == event2.delegate());
}