I would extract method GetHTMLFormatDataObject from CopyToClipboard. Then you could manually create clipboard data for "<p>Hallo</p>" and check in test that GetHTMLFormatDataObject returns expected DataObject.