### Question:
DataSourceInfoUtil { public static Map<String, String> parseDataSourceInfo( final String text ) { Map<String, String> parameters = new LinkedHashMap<String, String>(); StringBuilder name = new StringBuilder(); StringBuilder value = new StringBuilder(); int state = 0; char ch; int i, len = text.length(); for ( i = 0; i < len; i++ ) { ch = text.charAt( i ); switch ( state ) { case 0: if ( name.length() != 0 ) { parameters.put( name.toString(), value.toString() ); name.setLength( 0 ); value.setLength( 0 ); } switch ( ch ) { case ';': break; default: state = 1; name.append( ch ); } break; case 1: switch ( ch ) { case '=': state = 2; break; default: name.append( ch ); } break; case 2: switch ( ch ) { case '"': state = 3; break; case ';': state = 0; break; default: value.append( ch ); state = 4; } break; case 3: switch ( ch ) { case '"': state = 0; break; default: value.append( ch ); } break; case 4: switch ( ch ) { case ';': state = 0; break; default: value.append( ch ); } break; default: } } if ( name.length() != 0 ) { parameters.put( name.toString(), value.toString() ); } return parameters; }  static String escapeQuotes( final String text ); static String unescapeQuotes( final String text ); static Map<String, String> parseDataSourceInfo( final String text );  }### Answer:
@Test public void testParseDataSourceInfo() { String value = "DataSource=\"DS &quot;Test's&quot; & <Fun>\";Param=\"TestValue"; Map map = DataSourceInfoUtil.parseDataSourceInfo( value ); assertEquals( map.get( "DataSource" ), "DS &quot;Test's&quot; & <Fun>" ); assertEquals( map.get( "Param" ), "TestValue" ); }