### Question:
DatasourceInfo extends XulEventSourceAdapter implements IDatasourceInfo { @Bindable @Override public String getName() { return SafeHtmlUtils.htmlEscape( name ); } DatasourceInfo();  DatasourceInfo( String name, String id, String type );  DatasourceInfo( String name, String id, String type, boolean editable, boolean removable, boolean importable,
                         boolean exportable );  DatasourceInfo( String name, String id, String type, boolean editable, boolean removable, boolean importable,
                         boolean exportable, boolean creatable ); @Bindable @Override String getName(); @Bindable @Override String getDisplayType(); static String getDisplayType( String type ); static String getDisplayType( String type, GwtDatasourceMessages messages ); @Bindable @Override String getId(); @Bindable @Override String getType(); @SuppressWarnings( "nls" ) @Override String toString(); @Override boolean isEditable(); @Override boolean isRemovable(); @Override boolean isImportable(); @Override boolean isExportable(); @Override boolean isCreatable(); static void setMessageBundle( DatasourceMessages bundle );  }### Answer:
@Test public void testGetName() { DatasourceInfo d1 = new DatasourceInfo( "<iMg SrC=x OnErRoR=alert(11111)>", null, null ); Assert.assertEquals( "&lt;iMg SrC=x OnErRoR=alert(11111)&gt;", d1.getName() ); DatasourceInfo d2 = new DatasourceInfo( "<&\"=>;", null, null ); Assert.assertEquals( "&lt;&amp;&quot;=&gt;;", d2.getName() ); }