### Question:
EventBuilder { public Event getEvent() { return m_event; } EventBuilder(final String uei, final String source);  EventBuilder(final String uei, final String source, final Date date);  EventBuilder(final Event event);  EventBuilder(final Event event, final Date date); Event getEvent(); EventBuilder setUei(final String uei); EventBuilder setTime(final Date date); EventBuilder setCreationTime(final Date date); EventBuilder setSource(final String source); EventBuilder setSeverity(final String severity); EventBuilder setNodeid(long nodeid); EventBuilder setHost(final String hostname); EventBuilder setInterface(final InetAddress ipAddress); EventBuilder setIfIndex(final int ifIndex); EventBuilder setService(final String serviceName); EventBuilder addParam(final String parmName, final String val); EventBuilder addParam(final String parmName, final String val, final String type, final String encoding); EventBuilder addParam(final Parm parm); EventBuilder addParam(final String parmName, final boolean val); EventBuilder setParam(final String parmName, final String val); EventBuilder addParam(final String parmName, final double val); EventBuilder addParam(final String parmName, final long val); EventBuilder addParam(final String parmName, final int val); EventBuilder addParam(final String parmName, final char ch); EventBuilder addParam(final String parmName, final Collection<String> vals); EventBuilder setAlarmData(final AlarmData alarmData); EventBuilder setNode(final OnmsNode node); EventBuilder setIpInterface(final OnmsIpInterface iface); EventBuilder setMonitoredService(final OnmsMonitoredService monitoredService); EventBuilder setSnmpVersion(final String version); EventBuilder setCommunity(final String community); EventBuilder setEnterpriseId(final String enterprise); EventBuilder setGeneric(final int generic); EventBuilder setSpecific(final int specific); EventBuilder setSnmpHost(final String snmpHost); EventBuilder setSnmpTimeStamp(final long timeStamp); void setField(final String name, final String val); EventBuilder setLogDest(final String dest); EventBuilder setLogMessage(final String content); EventBuilder setDescription(final String descr); EventBuilder setParms(final List<Parm> parms); EventBuilder setUuid(final String uuid); EventBuilder setDistPoller(final String distPoller); EventBuilder setMasterStation(final String masterStation);  }### Answer:
@Test public final void testGetEvent() { EventBuilder builder = new EventBuilder("uei.opennms.org/test", "test"); builder.setSeverity("Warning"); assertEquals("Warning", builder.getEvent().getSeverity()); builder.setSeverity("Waning"); assertEquals("Indeterminate", builder.getEvent().getSeverity()); }
@Test public final void testUsingPassedInDate() throws Exception { Date date = new Date(12345); EventBuilder builder = new EventBuilder("uei.opennms.org/test", "test", date); Event ifEvent = builder.getEvent(); assertEquals(date.toString(), EventConstants.parseToDate(ifEvent.getTime()).toString()); }