@Test
public void testRootOnly() throws Exception {
OperationRequestAddress prefix = new DefaultOperationRequestAddress();
prefix.toNode("a", "b");
DefaultCallbackHandler handler = new DefaultCallbackHandler(prefix);
parser.parse("/", handler);
assertTrue(handler.hasAddress());
assertFalse(handler.hasOperationName());
assertFalse(handler.hasProperties());
assertFalse(handler.endsOnAddressOperationNameSeparator());
assertFalse(handler.endsOnPropertyListStart());
assertFalse(handler.endsOnPropertySeparator());
assertFalse(handler.endsOnPropertyValueSeparator());
// root is also a separator
assertTrue(handler.endsOnNodeSeparator());
assertFalse(handler.endsOnNodeTypeNameSeparator());
assertFalse(handler.isRequestComplete());
OperationRequestAddress address = handler.getAddress();
assertFalse(address.endsOnType());
Iterator<Node> i = address.iterator();
assertFalse(i.hasNext());
}