agave-monitors/monitors-core/src/test/java/org/iplantc/service/monitor/uuid/MonitorEventUUIDEntityLookupTest.java
/**
     * Create a test entity persisted and available for lookup.
     *
     * @return
     */
Create a test entity persisted and available for lookup.
@return
Create a test entity persisted and available for lookup . @return
@Override
    public DomainEntityEvent createEntity() {
        DomainEntityEvent testMonitorEvent = null;
        try {
            Monitor testMonitor = it.createStorageMonitor();
            new MonitorDao().persist(testMonitor);
            testMonitorEvent = new DomainEntityEvent();
            testMonitorEvent.setEntity(testMonitor.getUuid());
            testMonitorEvent.setStatus(MonitorEventType.CREATED.name());
            testMonitorEvent.setDescription(MonitorEventType.CREATED.getDescription());
            testMonitorEvent.setCreatedBy(AbstractMonitorIT.TEST_USER);
            new DomainEntityEventDao().persist(testMonitorEvent);
        } catch (Exception e) {
            Assert.fail("Unable to create monitor event", e);
        }
        return testMonitorEvent;
    }
@ Override public DomainEntityEvent createEntity ( ) { DomainEntityEvent testMonitorEvent = null ; try { Monitor testMonitor = it . createStorageMonitor ( ) ; new MonitorDao ( ) . persist ( testMonitor ) ; testMonitorEvent = new DomainEntityEvent ( ) ; testMonitorEvent . setEntity ( testMonitor . getUuid ( ) ) ; testMonitorEvent . setStatus ( MonitorEventType . CREATED . name ( ) ) ; testMonitorEvent . setDescription ( MonitorEventType . CREATED . getDescription ( ) ) ; testMonitorEvent . setCreatedBy ( AbstractMonitorIT . TEST_USER ) ; new DomainEntityEventDao ( ) . persist ( testMonitorEvent ) ; } catch ( Exception e ) { Assert . fail ( "Unable to create monitor event" , e ) ; } return testMonitorEvent ; }
Create a test entity persisted and available for lookup.
Create a test entity persisted and available for lookup .