agave-metadata/metadata-core/src/test/java/org/iplantc/service/metadata/uuid/MetadataItemUUIDEntityUpdateIT.java
/**
     * Create a test entity persisted and available for lookup.
     *
     * @return a persisted instance of the entity
     */
Create a test entity persisted and available for lookup.
@return a persisted instance of the entity
Create a test entity persisted and available for lookup . @return a persisted instance of the entity
@Override
    public MetadataItem createEntity() {
        MetadataItem entity = null;
        try {
            entity = new MetadataItem();
            entity.setName(MetadataItemUUIDEntityLookupIT.class.getName());
            entity.setValue(mapper.createObjectNode().put("testKey", "testValue"));
            entity.setOwner(TEST_USER);
            MetadataDao.getInstance().insert(entity);
        } catch (Exception e) {
            Assert.fail("Unable to create metadata item", e);
        }
        return entity;
    }
@ Override public MetadataItem createEntity ( ) { MetadataItem entity = null ; try { entity = new MetadataItem ( ) ; entity . setName ( MetadataItemUUIDEntityLookupIT . class . getName ( ) ) ; entity . setValue ( mapper . createObjectNode ( ) . put ( "testKey" , "testValue" ) ) ; entity . setOwner ( TEST_USER ) ; MetadataDao . getInstance ( ) . insert ( entity ) ; } catch ( Exception e ) { Assert . fail ( "Unable to create metadata item" , e ) ; } return entity ; }
Create a test entity persisted and available for lookup.
Create a test entity persisted and available for lookup .