// Path: src/test/java/com/j256/simplemagic/types/BaseMagicTypeTest.java
// public abstract class BaseMagicTypeTest {
// 
// 	protected byte[] hexToBytes(String str) {
// 		ByteArrayOutputStream baos = new ByteArrayOutputStream();
// 		for (int i = 0; i < str.length(); i += 2) {
// 			baos.write(Integer.decode("0x" + str.charAt(i) + str.charAt(i + 1)));
// 		}
// 		return baos.toByteArray();
// 	}
// 
// 	protected byte[] byteArraysCombine(byte[]... arrays) {
// 		ByteArrayOutputStream baos = new ByteArrayOutputStream();
// 		for (byte[] array : arrays) {
// 			baos.write(array, 0, array.length);
// 		}
// 		return baos.toByteArray();
// 	}
// 
// 	protected void testOutput(String magic, byte[] bytes, String expectedMsg) throws IOException {
// 		ContentInfoUtil contentInfoUtil = new ContentInfoUtil(new StringReader(magic), new ErrorCallBack() {
// 			@Override
// 			public void error(String line, String details, Exception e) {
// 				throw new RuntimeException("Problems compiling magic: '" + details + "', on line: " + line, e);
// 			}
// 		});
// 		ContentInfo result = contentInfoUtil.findMatch(bytes);
// 		if (expectedMsg == null) {
// 			assertNull("Got result instead of null: " + result, result);
// 		} else {
// 			assertNotNull("Got null result instead of: " + expectedMsg, result);
// 			assertEquals(expectedMsg, result.getMessage());
// 		}
// 	}
// }


import java.io.IOException;
import org.junit.Test;
import com.j256.simplemagic.types.BaseMagicTypeTest;
package com.j256.simplemagic.integration;




/**
 * Run tests from a real magic entry. Mostly from rob stryker via github. Thanks dude.
 * 
 * @author robstryker
 */
public class DigitalSymphonySongTest extends BaseMagicTypeTest {

	private static final String DIGITAL_SYMPHONY_SONG_DEFINITION = //
// Path: src/test/java/com/j256/simplemagic/types/BaseMagicTypeTest.java
// public abstract class BaseMagicTypeTest {
// 
// 	protected byte[] hexToBytes(String str) {
// 		ByteArrayOutputStream baos = new ByteArrayOutputStream();
// 		for (int i = 0; i < str.length(); i += 2) {
// 			baos.write(Integer.decode("0x" + str.charAt(i) + str.charAt(i + 1)));
// 		}
// 		return baos.toByteArray();
// 	}
// 
// 	protected byte[] byteArraysCombine(byte[]... arrays) {
// 		ByteArrayOutputStream baos = new ByteArrayOutputStream();
// 		for (byte[] array : arrays) {
// 			baos.write(array, 0, array.length);
// 		}
// 		return baos.toByteArray();
// 	}
// 
// 	protected void testOutput(String magic, byte[] bytes, String expectedMsg) throws IOException {
// 		ContentInfoUtil contentInfoUtil = new ContentInfoUtil(new StringReader(magic), new ErrorCallBack() {
// 			@Override
// 			public void error(String line, String details, Exception e) {
// 				throw new RuntimeException("Problems compiling magic: '" + details + "', on line: " + line, e);
// 			}
// 		});
// 		ContentInfo result = contentInfoUtil.findMatch(bytes);
// 		if (expectedMsg == null) {
// 			assertNull("Got result instead of null: " + result, result);
// 		} else {
// 			assertNotNull("Got null result instead of: " + expectedMsg, result);
// 			assertEquals(expectedMsg, result.getMessage());
// 		}
// 	}
// }


// Path: src/test/java/com/j256/simplemagic/integration/DigitalSymphonySongTest.java
import java.io.IOException;
import org.junit.Test;
import com.j256.simplemagic.types.BaseMagicTypeTest;

package com.j256.simplemagic.integration;




/**
 * Run tests from a real magic entry. Mostly from rob stryker via github. Thanks dude.
 * 
 * @author robstryker
 */
public class DigitalSymphonySongTest extends BaseMagicTypeTest {

	private static final String DIGITAL_SYMPHONY_SONG_DEFINITION = //
			"0               string  \\x02\\x01\\x13\\x13\\x13\\x01\\x0d\\x10        Digital Symphony sound sample (RISC OS),\n" //