### Question:
TopicServiceImpl implements TopicService { static Config resourceConfig(ConfiguredTopic topic) { return new Config(topic.getConfig() .entrySet() .stream() .map(e -> new ConfigEntry(e.getKey(), e.getValue())) .collect(toList())); } TopicServiceImpl(AdminClient adminClient, boolean dryRun); @Override Map<String, ConfiguredTopic> listExisting(boolean excludeInternal); @Override void create(List<ConfiguredTopic> topics); @Override void increasePartitions(List<ConfiguredTopic> topics); @Override void alterConfiguration(List<ConfiguredTopic> topics); @Override void delete(List<ConfiguredTopic> topics);  }### Answer:
@Test public void testTopicConfig() { ConfiguredTopic emptyConfig = new ConfiguredTopic("test", 1, (short) 1, Collections.emptyMap()); Assert.assertTrue(TopicServiceImpl.resourceConfig(emptyConfig).entries().isEmpty()); ConfiguredTopic notEmptyConfig = new ConfiguredTopic("test", 1, (short) 1, Collections.singletonMap("k", "v")); Assert.assertEquals(1, TopicServiceImpl.resourceConfig(notEmptyConfig).entries().size()); Assert.assertEquals("v", TopicServiceImpl.resourceConfig(notEmptyConfig).get("k").value()); Assert.assertFalse(TopicServiceImpl.resourceConfig(notEmptyConfig).get("k").isDefault()); }