agave-monitors/monitors-core/src/test/java/org/iplantc/service/monitor/uuid/MonitorCheckUUIDEntityLookupTest.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 MonitorCheck createEntity() {
        MonitorCheck testMonitorCheck = null;
        try {
            Monitor testMonitor = it.createStorageMonitor();
            new MonitorDao().persist(testMonitor);
            testMonitorCheck = new MonitorCheck(testMonitor, MonitorStatusType.FAILED, "Test check output", MonitorCheckType.STORAGE);
            new MonitorCheckDao().persist(testMonitorCheck);
        } catch (Exception e) {
            Assert.fail("Unable to create storage monitor", e);
        }
        return testMonitorCheck;
    }
@ Override public MonitorCheck createEntity ( ) { MonitorCheck testMonitorCheck = null ; try { Monitor testMonitor = it . createStorageMonitor ( ) ; new MonitorDao ( ) . persist ( testMonitor ) ; testMonitorCheck = new MonitorCheck ( testMonitor , MonitorStatusType . FAILED , "Test check output" , MonitorCheckType . STORAGE ) ; new MonitorCheckDao ( ) . persist ( testMonitorCheck ) ; } catch ( Exception e ) { Assert . fail ( "Unable to create storage monitor" , e ) ; } return testMonitorCheck ; }
Create a test entity persisted and available for lookup.
Create a test entity persisted and available for lookup .