agave-metadata/metadata-core/src/test/java/org/iplantc/service/metadata/search/JsonHandlerTest.java
/**
     * Generates a JsonNode representing a test metadata item
     *
     * @return json representation of a metadata item request value
     */
Generates a JsonNode representing a test metadata item
@return json representation of a metadata item request value
Generates a JsonNode representing a test metadata item @return json representation of a metadata item request value
protected JsonNode createTestMetadataItem() {
        ObjectNode node = mapper.createObjectNode()
                .put("uuid", new AgaveUUID(UUIDType.METADATA).toString())
                .put("schemaId", new AgaveUUID(UUIDType.SCHEMA).toString()) 
                .put("name", UUID.randomUUID().toString());
        node.putObject("value")
                .put("testKey", "testValue");
        node.putArray("associationIds") 
                .add(new AgaveUUID(UUIDType.SCHEMA).toString());
        node.putArray("permissions")
                .addObject()
                .put("username", TEST_SHARE_USER)
                .put("permission", PermissionType.READ.toString());
        node.putArray("notifications").addObject() 
                .put("url", "foo@example.com")
                .put("event", "CREATED")
                .put("persistent", false);
        return node;
    }
protected JsonNode createTestMetadataItem ( ) { ObjectNode node = mapper . createObjectNode ( ) . put ( "uuid" , new AgaveUUID ( UUIDType . METADATA ) . toString ( ) ) . put ( "schemaId" , new AgaveUUID ( UUIDType . SCHEMA ) . toString ( ) ) . put ( "name" , UUID . randomUUID ( ) . toString ( ) ) ; node . putObject ( "value" ) . put ( "testKey" , "testValue" ) ; node . putArray ( "associationIds" ) . add ( new AgaveUUID ( UUIDType . SCHEMA ) . toString ( ) ) ; node . putArray ( "permissions" ) . addObject ( ) . put ( "username" , TEST_SHARE_USER ) . put ( "permission" , PermissionType . READ . toString ( ) ) ; node . putArray ( "notifications" ) . addObject ( ) . put ( "url" , "foo@example.com" ) . put ( "event" , "CREATED" ) . put ( "persistent" , false ) ; return node ; }
Generates a JsonNode representing a test metadata item
 @return json representation of a metadata item request value
Generates a JsonNode representing a test metadata item @return json representation of a metadata item request value
// optional, can be null // optional and can be empty // optional array in request // optional array in request