### Question:
EditableTextHeaderMetaData implements EditableHeaderMetaData { @Override public void setTitle(final String title) { titleSetter.accept(title); } EditableTextHeaderMetaData(final Supplier<String> titleGetter,
                                      final Consumer<String> titleSetter,
                                      final SingletonDOMElementFactory<W, E> factory);  EditableTextHeaderMetaData(final Supplier<String> titleGetter,
                                      final Consumer<String> titleSetter,
                                      final SingletonDOMElementFactory<W, E> factory,
                                      final String columnGroup); @Override String getTitle(); @Override void setTitle(final String title); @Override String getColumnGroup(); @Override void setColumnGroup(final String columnGroup); @Override void destroyResources(); @Override void edit(final GridBodyCellEditContext context); @Override GridCellEditAction getSupportedEditAction(); @Override boolean equals(final Object o); @Override int hashCode();  }### Answer:
@Test public void checkSetTitleWithHasName() { final HasName mockHasName = new MockHasName("name"); hasName = Optional.of(mockHasName); header.setTitle("new-name"); assertEquals("new-name", mockHasName.getName().getValue()); }
@Test public void checkSetTitleWithoutHasName() { final HasName mockHasName = new MockHasName("name"); hasName = Optional.empty(); header.setTitle("new-name"); assertEquals("name", mockHasName.getName().getValue()); }