ConsumerBuilder extends AbstractReferenceBuilder<ConsumerConfig, ConsumerBuilder> { public ConsumerConfig build() { ConsumerConfig consumer = new ConsumerConfig(); super.build(consumer); consumer.setDefault(isDefault); consumer.setClient(client); consumer.setThreadpool(threadpool); consumer.setCorethreads(corethreads); consumer.setThreads(threads); consumer.setQueues(queues); consumer.setShareconnections(shareconnections); return consumer; }  ConsumerBuilder isDefault(Boolean isDefault); ConsumerBuilder client(String client); ConsumerBuilder threadPool(String threadPool); ConsumerBuilder coreThreads(Integer coreThreads); ConsumerBuilder threads(Integer threads); ConsumerBuilder queues(Integer queues); ConsumerBuilder shareConnections(Integer shareConnections); ConsumerConfig build();  }
@Test void build() { ConsumerBuilder builder = new ConsumerBuilder(); builder.isDefault(true).client("client").threadPool("threadPool").coreThreads(10).threads(100).queues(200) .shareConnections(300).id("id").prefix("prefix"); ConsumerConfig config = builder.build(); ConsumerConfig config2 = builder.build(); Assertions.assertTrue(config.isDefault()); Assertions.assertEquals("client", config.getClient()); Assertions.assertEquals("threadPool", config.getThreadpool()); Assertions.assertEquals("id", config.getId()); Assertions.assertEquals("prefix", config.getPrefix()); Assertions.assertEquals(10, config.getCorethreads()); Assertions.assertEquals(100, config.getThreads()); Assertions.assertEquals(200, config.getQueues()); Assertions.assertEquals(300, config.getShareconnections()); Assertions.assertNotSame(config, config2); }