@Test
void build() {

    RegistryConfig registry = new RegistryConfig();
    MonitorConfig monitor = new MonitorConfig();
    ModuleBuilder builder = new ModuleBuilder();
    builder.name("name").version("version").owner("owner").organization("organization").addRegistry(registry)
            .monitor(monitor).isDefault(false);
    ModuleConfig config = builder.build();
    ModuleConfig config2 = builder.build();
    Assertions.assertEquals("name", config.getName());
    Assertions.assertEquals("version", config.getVersion());
    Assertions.assertEquals("owner", config.getOwner());
    Assertions.assertEquals("organization", config.getOrganization());
    Assertions.assertTrue(builder.build().getRegistries().contains(registry));
    Assertions.assertSame(monitor, builder.build().getMonitor());
    Assertions.assertFalse(config.isDefault());
    Assertions.assertNotSame(config, config2);
}