### Question:
MetadataImpl extends AbstractEmptyTextComponent implements Metadata { @Override public String getPropertyName() { if (Metadata.DataType.COMPUTED.equals(getType())) { return computedProperty; } else { return propertyName; } }  @PostConstruct void init(); @Override DataType getType(); @Override String getLocale(); @Override String getFormat(); @Override ValueMap getProperties(); @Override AssetModel getAsset(); @Override String getPropertyName(); @Override boolean isEmpty(); @Override boolean isReady(); @Nonnull @Override String getExportedType();  }### Answer:
@Test public void getPropertyName() { final String expected = "./dc:title"; ctx.currentResource("/content/metadata"); final Metadata metadata = ctx.request().adaptTo(Metadata.class); assertEquals(expected, metadata.getPropertyName()); }
@Test public void getPropertyName_ComputedProperty() { final String expected = "title"; ctx.currentResource("/content/computed"); final Metadata metadata = ctx.request().adaptTo(Metadata.class); assertEquals(expected, metadata.getPropertyName()); }