import junit.framework.TestCase;
public class TestMachineTag extends TestCase {
public void testToString() throws Exception{
MachineTag mt = new MachineTag();
assertEquals("",mt.toString());
mt = new MachineTag("ns","predicate","value");
assertEquals("ns:predicate=value",mt.toString());
mt = new MachineTag(null,"predicate","value");
assertEquals("gn:predicate=value",mt.toString());
mt = new MachineTag(null,"predicate","\"value value\"");
assertEquals("gn:predicate=\"value value\"",mt.toString());
mt = new MachineTag("ns","predicate","\"value value\"");
assertEquals("ns:predicate=\"value value\"",mt.toString());
}