@Test
void build() {

    ArgumentConfig argument = new ArgumentConfig();
    MethodBuilder builder = new MethodBuilder();
    builder.name("name").stat(1).retry(true).reliable(false).executes(2).deprecated(true).sticky(false)
            .isReturn(true).oninvoke("on-invoke-object").oninvokeMethod("on-invoke-method").service("service")
            .onreturn("on-return-object").onreturnMethod("on-return-method").serviceId("serviceId")
            .onthrow("on-throw-object").onthrowMethod("on-throw-method").addArgument(argument);
    MethodConfig config = builder.build();
    MethodConfig config2 = builder.build();
    Assertions.assertTrue(config.isRetry());
    Assertions.assertFalse(config.isReliable());
    Assertions.assertTrue(config.getDeprecated());
    Assertions.assertFalse(config.getSticky());
    Assertions.assertTrue(config.isReturn());
    Assertions.assertEquals(1, config.getStat());
    Assertions.assertEquals(2, config.getExecutes());
    Assertions.assertEquals("on-invoke-object", config.getOninvoke());
    Assertions.assertEquals("on-invoke-method", config.getOninvokeMethod());
    Assertions.assertEquals("on-return-object", config.getOnreturn());
    Assertions.assertEquals("on-return-method", config.getOnreturnMethod());
    Assertions.assertEquals("on-throw-object", config.getOnthrow());
    Assertions.assertEquals("on-throw-method", config.getOnthrowMethod());
    Assertions.assertEquals("name", config.getName());
    Assertions.assertEquals("service", config.getService());
    Assertions.assertEquals("serviceId", config.getServiceId());
    Assertions.assertNotSame(config, config2);
}