@Test
public void testParseOperation() {

  final OperationEntry op1Entry = new OperationEntry(Op1.class);
  final OperationEntry op2Entry = new OperationEntry(Op2.class);
  op1Entry.addChild(op2Entry);
  final List<OperationEntry> entries = new ArrayList<>();
  entries.add(op1Entry);
  entries.add(op2Entry);
  final OperationParser parser = new OperationParser(new OperationRegistry(entries));
  final Op2 op2 = new Op2();
  parser.parse(op2, new String[] {"--username", "user", "--password", "blah"});
  Assert.assertEquals("blah", op2.args.passWord);
  Assert.assertEquals("user", op2.args.userName);
}