### Question:
TextAnnotation extends Artifact implements DMNViewDefinition<GeneralRectangleDimensionsSet>,
                                                        HasText,
                                                        HasContentDefinitionId,
                                                        DynamicReadOnly { @Override public String getContentDefinitionId() { return getId().getValue(); } TextAnnotation();  TextAnnotation(final Id id,
                          final org.kie.workbench.common.dmn.api.property.dmn.Description description,
                          final Text text,
                          final TextFormat textFormat,
                          final BackgroundSet backgroundSet,
                          final FontSet fontSet,
                          final GeneralRectangleDimensionsSet dimensionsSet); String getStunnerCategory(); Set<String> getStunnerLabels(); @Override BackgroundSet getBackgroundSet(); void setBackgroundSet(final BackgroundSet backgroundSet); @Override FontSet getFontSet(); void setFontSet(final FontSet fontSet); @Override GeneralRectangleDimensionsSet getDimensionsSet(); void setDimensionsSet(final GeneralRectangleDimensionsSet dimensionsSet); @Override Text getText(); @Override void setText(final Text text); TextFormat getTextFormat(); void setTextFormat(final TextFormat textFormat); @Override String getContentDefinitionId(); @Override String getDiagramId(); @Override void setContentDefinitionId(final String contentDefinitionId); @Override void setDiagramId(final String dmnDiagramId); @Override boolean equals(final Object o); @Override int hashCode(); @Override void setAllowOnlyVisualChange(final boolean allowOnlyVisualChange); @Override boolean isAllowOnlyVisualChange(); @Override ReadOnly getReadOnly(final String fieldName);  }### Answer:
@Test public void testGetContentDefinitionId() { final String contentDefinitionId = "the id"; final Id id = mock(Id.class); doReturn(id).when(textAnnotation).getId(); when(id.getValue()).thenReturn(contentDefinitionId); final String currentId = textAnnotation.getContentDefinitionId(); assertEquals(contentDefinitionId, currentId); }