public String getXML() {
    try {
      StringBuilder xml = new StringBuilder( 100 );

      xml.append( XMLHandler.getXMLHeader() ); // UFT-8 XML header
      xml.append( XMLHandler.openTag( XML_TAG ) ).append( Const.CR );

      if ( id != null ) {
        xml.append( "  " ).append( XMLHandler.addTagValue( "ID", id ) );
      }
      xml.append( "  " ).append( XMLHandler.addTagValue( "DragType", getTypeCode() ) );
      xml.append( "  " ).append(
        XMLHandler
          .addTagValue( "Data", new String( Base64.encodeBase64( data.getBytes( Const.XML_ENCODING ) ) ) ) );
      xml.append( XMLHandler.closeTag( XML_TAG ) ).append( Const.CR );

      return xml.toString();
    } catch ( UnsupportedEncodingException e ) {
      throw new RuntimeException( "Unable to encode String in encoding [" + Const.XML_ENCODING + "]", e );
    }
  }
@Test
  public void getXML() {
    DragAndDropContainer dnd = new DragAndDropContainer( DragAndDropContainer.TYPE_BASE_STEP_TYPE, "Step Name"  );

    String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + Const.CR
               + "<DragAndDrop>" + Const.CR
               + "  <DragType>BaseStep</DragType>" + Const.CR
               + "  <Data>U3RlcCBOYW1l</Data>" + Const.CR
               + "</DragAndDrop>" + Const.CR;

    assertEquals( xml, dnd.getXML() );
  }