@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);
}