@Override
    public ServiceConfig<U> build() {
        ServiceConfig<U> serviceConfig = new ServiceConfig<>();
        super.build(serviceConfig);

        serviceConfig.setInterface(interfaceName);
        serviceConfig.setInterface(interfaceClass);
        serviceConfig.setRef(ref);
        serviceConfig.setPath(path);
        serviceConfig.setMethods(methods);
        serviceConfig.setProvider(provider);
        serviceConfig.setProviderIds(providerIds);
        serviceConfig.setGeneric(generic);

        return serviceConfig;
    }
@Test
    void build() {
        MethodConfig method = new MethodConfig();
        ProviderConfig provider = new ProviderConfig();

        ServiceBuilder builder = new ServiceBuilder();
        builder.path("path")
                .addMethod(method)
                .provider(provider)
                .providerIds("providerIds")
                .generic(GENERIC_SERIALIZATION_DEFAULT);

        ServiceConfig config = builder.build();
        ServiceConfig config2 = builder.build();

        assertThat(config.getGeneric(), equalTo(GENERIC_SERIALIZATION_DEFAULT));
        Assertions.assertEquals("path", config.getPath());
        Assertions.assertEquals("providerIds", config.getProviderIds());
        Assertions.assertSame(provider, config.getProvider());
        Assertions.assertTrue(config.getMethods().contains(method));
        Assertions.assertEquals(1, config.getMethods().size());
        Assertions.assertNotSame(config, config2);
    }