Beispiel #1
0
  @Test
  public void testClone() {
    final Event event = this.createTestEvent();
    final Event clonedEvent = Event.create(event).build();

    assertEquals(event.getType(), clonedEvent.getType());
    assertEquals(event.isDistributed(), clonedEvent.isDistributed());
    assertEquals(event.getData(), clonedEvent.getData());
    assertEquals(event, clonedEvent);
  }
Beispiel #2
0
  @Test
  public void testBuilder() {
    final Event event = this.createTestEvent();

    assertEquals("type", event.getType());
    assertEquals(true, event.isDistributed());
    assertNotNull(event.getData());
    assertTrue(event.hasValue("key1"));
    assertTrue(event.hasValue("key2"));
    assertEquals("val1", event.getValue("key1").get());
    assertEquals("val2", event.getValue("key2").get());
  }