### Question:
EventFactory { public static Event flowUpdated(final VersionedFlow versionedFlow) { return new StandardEvent.Builder() .eventType(EventType.UPDATE_FLOW) .addField(EventFieldName.BUCKET_ID, versionedFlow.getBucketIdentifier()) .addField(EventFieldName.FLOW_ID, versionedFlow.getIdentifier()) .addField(EventFieldName.USER, NiFiUserUtils.getNiFiUserIdentity()) .build(); }  static Event bucketCreated(final Bucket bucket); static Event bucketUpdated(final Bucket bucket); static Event bucketDeleted(final Bucket bucket); static Event flowCreated(final VersionedFlow versionedFlow); static Event flowUpdated(final VersionedFlow versionedFlow); static Event flowDeleted(final VersionedFlow versionedFlow); static Event flowVersionCreated(final VersionedFlowSnapshot versionedFlowSnapshot); static Event extensionBundleCreated(final Bundle bundle); static Event extensionBundleDeleted(final Bundle bundle); static Event extensionBundleVersionCreated(final BundleVersion bundleVersion); static Event extensionBundleVersionDeleted(final BundleVersion bundleVersion); static Event userCreated(final User user); static Event userUpdated(final User user); static Event userDeleted(final User user); static Event userGroupCreated(final UserGroup userGroup); static Event userGroupUpdated(final UserGroup userGroup); static Event userGroupDeleted(final UserGroup userGroup);  }### Answer:
@Test public void testFlowUpdated() { final Event event = EventFactory.flowUpdated(versionedFlow); event.validate(); assertEquals(EventType.UPDATE_FLOW, event.getEventType()); assertEquals(3, event.getFields().size()); assertEquals(bucket.getIdentifier(), event.getField(EventFieldName.BUCKET_ID).getValue()); assertEquals(versionedFlow.getIdentifier(), event.getField(EventFieldName.FLOW_ID).getValue()); assertEquals("unknown", event.getField(EventFieldName.USER).getValue()); }