// Path: src/com/esotericsoftware/yamlbeans/YamlReader.java
// public class YamlReaderException extends YamlException {
// 	public YamlReaderException (String message, Throwable cause) {
// 		super("Line " + parser.getLineNumber() + ", column " + parser.getColumn() + ": " + message, cause);
// 	}
// 
// 	public YamlReaderException (String message) {
// 		this(message, null);
// 	}
// }


import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Map;
import org.junit.Test;
import com.esotericsoftware.yamlbeans.YamlReader.YamlReaderException;
import static org.junit.Assert.*;
		sb.append("test1: &1\n").append("  - key1: value1\n").append("  - key2: value2\n");
		sb.append("test2:\n").append("  << : *1");

		YamlReader yamlReader = new YamlReader(sb.toString());
		Map<String, Object> map = (Map<String, Object>) yamlReader.read();
		assertEquals("value1", ((Map<String, String>) map.get("test2")).get("key1"));
		assertEquals("value2", ((Map<String, String>) map.get("test2")).get("key2"));
	}

	@SuppressWarnings("unchecked")
	@Test
	public void testMergeUpdateValue() throws YamlException {
		StringBuilder sb = new StringBuilder();
		sb.append("test1: &1\n").append("  - key1: value1\n").append("  - key2: value2\n").append("  - key3: value3\n");

		sb.append("test2:\n").append("  key2: value22\n").append("  << : *1\n").append("  key3: value33\n");

		YamlReader yamlReader = new YamlReader(sb.toString());
		Map<String, Object> map = (Map<String, Object>) yamlReader.read();
		assertEquals("value1", ((Map<String, String>) map.get("test2")).get("key1"));
		assertEquals("value22", ((Map<String, String>) map.get("test2")).get("key2"));
		assertEquals("value33", ((Map<String, String>) map.get("test2")).get("key3"));
	}

	@Test
	public void testMergeExpectThrowYamlReaderException() throws YamlException {
		StringBuilder sb = new StringBuilder();
		sb.append("test1: &1 123\n");
		sb.append("<< : *1\n");

// Path: src/com/esotericsoftware/yamlbeans/YamlReader.java
// public class YamlReaderException extends YamlException {
// 	public YamlReaderException (String message, Throwable cause) {
// 		super("Line " + parser.getLineNumber() + ", column " + parser.getColumn() + ": " + message, cause);
// 	}
// 
// 	public YamlReaderException (String message) {
// 		this(message, null);
// 	}
// }


// Path: test/com/esotericsoftware/yamlbeans/MergeTest.java
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Map;
import org.junit.Test;
import com.esotericsoftware.yamlbeans.YamlReader.YamlReaderException;
import static org.junit.Assert.*;

		sb.append("test1: &1\n").append("  - key1: value1\n").append("  - key2: value2\n");
		sb.append("test2:\n").append("  << : *1");

		YamlReader yamlReader = new YamlReader(sb.toString());
		Map<String, Object> map = (Map<String, Object>) yamlReader.read();
		assertEquals("value1", ((Map<String, String>) map.get("test2")).get("key1"));
		assertEquals("value2", ((Map<String, String>) map.get("test2")).get("key2"));
	}

	@SuppressWarnings("unchecked")
	@Test
	public void testMergeUpdateValue() throws YamlException {
		StringBuilder sb = new StringBuilder();
		sb.append("test1: &1\n").append("  - key1: value1\n").append("  - key2: value2\n").append("  - key3: value3\n");

		sb.append("test2:\n").append("  key2: value22\n").append("  << : *1\n").append("  key3: value33\n");

		YamlReader yamlReader = new YamlReader(sb.toString());
		Map<String, Object> map = (Map<String, Object>) yamlReader.read();
		assertEquals("value1", ((Map<String, String>) map.get("test2")).get("key1"));
		assertEquals("value22", ((Map<String, String>) map.get("test2")).get("key2"));
		assertEquals("value33", ((Map<String, String>) map.get("test2")).get("key3"));
	}

	@Test
	public void testMergeExpectThrowYamlReaderException() throws YamlException {
		StringBuilder sb = new StringBuilder();
		sb.append("test1: &1 123\n");
		sb.append("<< : *1\n");

		YamlReader yamlReader = new YamlReader(sb.toString());