MethodBuilder extends AbstractMethodBuilder<MethodConfig, MethodBuilder> { public MethodBuilder addArgument(ArgumentConfig argument) { if (this.arguments == null) { this.arguments = new ArrayList<>(); } this.arguments.add(argument); return getThis(); }  MethodBuilder name(String name); MethodBuilder stat(Integer stat); MethodBuilder retry(Boolean retry); MethodBuilder reliable(Boolean reliable); MethodBuilder executes(Integer executes); MethodBuilder deprecated(Boolean deprecated); MethodBuilder sticky(Boolean sticky); MethodBuilder isReturn(Boolean isReturn); MethodBuilder oninvoke(Object oninvoke); MethodBuilder oninvokeMethod(String oninvokeMethod); MethodBuilder onreturn(Object onreturn); MethodBuilder onreturnMethod(String onreturnMethod); MethodBuilder onthrow(Object onthrow); MethodBuilder onthrowMethod(String onthrowMethod); MethodBuilder addArguments(List<? extends ArgumentConfig> arguments); MethodBuilder addArgument(ArgumentConfig argument); MethodBuilder service(String service); MethodBuilder serviceId(String serviceId); MethodConfig build();  }
@Test void addArgument() { ArgumentConfig argument = new ArgumentConfig(); MethodBuilder builder = new MethodBuilder(); builder.addArgument(argument); Assertions.assertTrue(builder.build().getArguments().contains(argument)); Assertions.assertEquals(1, builder.build().getArguments().size()); }