@Test
public void testParseTopLevel() {

  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 CommandLineOperationParams params =
      parser.parse(Op1.class, new String[] {"op", "--username", "user", "--password", "blah"});
  final Op2 op2 = (Op2) params.getOperationMap().get("op");
  Assert.assertEquals("blah", op2.args.passWord);
  Assert.assertEquals("user", op2.args.userName);
}