### Question:
LegacyDatasourceConverter implements Converter { @Override public Object unmarshal( HierarchicalStreamReader reader, UnmarshallingContext context ) { MultiTableDatasourceDTO resultDTO = new MultiTableDatasourceDTO(); while ( reader.hasMoreChildren() ) { reader.moveDown(); String nodeName = reader.getNodeName(); if ( nodeName.equalsIgnoreCase( "datasourceName" ) ) { String value = reader.getValue(); resultDTO.setDatasourceName( value ); } else if ( nodeName.equalsIgnoreCase( "selectedConnection" ) ) { String connectionClass = reader.getAttribute( "class" ); if ( connectionClass != null ) { DatabaseConnection databaseConnection = new DatabaseConnection(); if ( connectionClass.equals( "org.pentaho.platform.dataaccess.datasource.beans.Connection" ) ) { while ( reader.hasMoreChildren() ) { reader.moveDown(); nodeName = reader.getNodeName(); if ( reader.getNodeName().equalsIgnoreCase( "name" ) ) { String databaseName = reader.getValue(); databaseConnection.setName( databaseName ); databaseConnection.setId( databaseName ); } else if ( reader.getNodeName().equalsIgnoreCase( "username" ) ) { databaseConnection.setUsername( reader.getValue() ); } else if ( reader.getNodeName().equalsIgnoreCase( "password" ) ) { databaseConnection.setPassword( reader.getValue() ); } else if ( reader.getNodeName().equalsIgnoreCase( "url" ) ) { ParsedJdbcUrl parsedJdbcUrl = new ParsedJdbcUrl( reader.getValue() ); databaseConnection.setHostname( parsedJdbcUrl.getHostname() ); databaseConnection.setDatabasePort( parsedJdbcUrl.getPort() ); databaseConnection.setDatabaseName( parsedJdbcUrl.getDatabaseName() ); databaseConnection.setDatabaseType( resolveDatabaseType( parsedJdbcUrl.getJdbcPrefix() ) ); } reader.moveUp(); } resultDTO.setSelectedConnection( databaseConnection ); } else { try { Class databaseConnectionClass = Class.forName( connectionClass ); IDatabaseConnection databaseConnectionInstance = (IDatabaseConnection) context.convertAnother( resultDTO, databaseConnectionClass ); resultDTO.setSelectedConnection( databaseConnectionInstance ); } catch ( ClassNotFoundException e ) { resultDTO.setSelectedConnection( new DatabaseConnection() ); } } } } else if ( nodeName.equalsIgnoreCase( "schemaModel" ) ) { SchemaModel schemaModel = (SchemaModel) context.convertAnother( resultDTO, SchemaModel.class ); if ( schemaModel != null ) { resultDTO.setSchemaModel( schemaModel ); } } else if ( nodeName.equalsIgnoreCase( "selectedTables" ) ) { List<String> selectedTables = (List<String>) context.convertAnother( resultDTO, ArrayList.class ); if ( selectedTables != null ) { resultDTO.setSelectedTables( selectedTables ); } } else if ( nodeName.equalsIgnoreCase( "doOlap" ) ) { resultDTO.setDoOlap( Boolean.valueOf( reader.getValue() ) ); } reader.moveUp(); } return resultDTO; }  @Override void marshal( Object source, HierarchicalStreamWriter writer, MarshallingContext context ); @Override Object unmarshal( HierarchicalStreamReader reader, UnmarshallingContext context ); @Override boolean canConvert( Class type );  }### Answer:
@Test public void testUnmarshal() throws Exception { }