### Question:
TextAnnotationPropertyReader extends BasePropertyReader { public String getName() { String extendedName = CustomElement.name.of(element).get(); return ConverterUtils.isEmpty(extendedName) ? Optional.ofNullable(element.getText()).orElse("") : extendedName; } TextAnnotationPropertyReader(TextAnnotation element, BPMNDiagram diagram,
                                        BPMNShape shape,
                                        double resolutionFactor); String getName();  }### Answer:
@Test public void getExtendedName() { String name = tested.getName(); assertEquals("custom", name); }
@Test public void getName() { when(element.getExtensionValues()).thenReturn(ECollections.emptyEList()); String name = tested.getName(); assertEquals("name", name); }
@Test public void getTextName() { when(element.getExtensionValues()).thenReturn(ECollections.emptyEList()); when(element.getName()).thenReturn(null); String name = tested.getName(); assertEquals("text", name); }
@Test public void getNameNull() { when(element.getExtensionValues()).thenReturn(ECollections.emptyEList()); when(element.getName()).thenReturn(null); when(element.getText()).thenReturn(null); String name = tested.getName(); assertEquals("", name); }