* Tests getting a StringMetadataValue for a StringMetadataDefinition.
*/
@Test
public void testGetStringValueForDefinition() {
MetadataValueDefinitionHelper helper = new MetadataValueDefinitionHelper(values);
MetadataDefinition definitionLeaf = TreeStructureUtil.getLeaf(startTreeNode, "child1", "child12");
Object valueForDefinition = helper.getValueForDefinition(definitionLeaf);
Assert.assertThat(valueForDefinition, instanceOf(StringMetadataValue.class));
StringMetadataValue stringMetadataValue = (StringMetadataValue)valueForDefinition;
assertThat(stringMetadataValue.getValue(), equalTo("nonDefaultVal"));
assertThat(helper.getValues().size(), equalTo(0));