TestEntity entity = uow.newEntity( TestEntity.class );
entity.changedDescription( "New description" );
uow.complete();
// Print events
EventSource source = (EventSource) module.findService( EventSource.class ).get();
source.events( 0, Long.MAX_VALUE ).transferTo( Transforms.map( new Function<UnitOfWorkDomainEventsValue, String>()
{
public String map( UnitOfWorkDomainEventsValue unitOfWorkDomainEventsValue )
{
return unitOfWorkDomainEventsValue.toString();
}