### Question:
UpdateDomainObjectPropertyCommand extends AbstractCanvasGraphCommand { @Override protected AbstractCanvasCommand newCanvasCommand(final AbstractCanvasHandler context) { return new RefreshPropertiesPanelCommand(); } UpdateDomainObjectPropertyCommand(final DomainObject domainObject,
                                             final String propertyId,
                                             final Object value); @Override String toString();  }### Answer:
@Test public void testNewCanvasCommandExecute() { final CanvasCommand<AbstractCanvasHandler> command = new UpdateDomainObjectPropertyCommand(domainObject, PROPERTY_ID, VALUE).newCanvasCommand(canvasHandler); assertThat(command).isInstanceOf(UpdateDomainObjectPropertyCommand.RefreshPropertiesPanelCommand.class); assertThat(command.execute(canvasHandler)).isEqualTo(CanvasCommandResultBuilder.SUCCESS); verify(canvasHandler).notifyCanvasDomainObjectUpdated(eq(domainObject)); }
@Test public void testNewCanvasCommandUndo() { final CanvasCommand<AbstractCanvasHandler> command = new UpdateDomainObjectPropertyCommand(domainObject, PROPERTY_ID, VALUE).newCanvasCommand(canvasHandler); assertThat(command).isInstanceOf(UpdateDomainObjectPropertyCommand.RefreshPropertiesPanelCommand.class); assertThat(command.undo(canvasHandler)).isEqualTo(CanvasCommandResultBuilder.SUCCESS); verify(canvasHandler).notifyCanvasDomainObjectUpdated(eq(domainObject)); }