Source:
<code>public void testEnableSummarization() { SummarizerConfiguration summarizerConfig1 = SummarizerConfiguration.builder("test").build(); NewTableConfiguration ntcSummarization1 = new NewTableConfiguration().enableSummarization(summarizerConfig1); ArrayList<String> summarizerValues = new ArrayList<String>(); for (Map.Entry<String,String> e : ntcSummarization1.getProperties().entrySet()) { if (e.getKey().contains("table.summarizer")) { summarizerValues.add(e.getValue()); } } <START> assertTrue(summarizerValues.get(0) instanceof String); <END> Class<? extends Summarizer> builderClass = FamilySummarizer.class; assertTrue(Summarizer.class.isAssignableFrom(builderClass)); summarizerValues.clear(); SummarizerConfiguration summarizerConfig2 = SummarizerConfiguration.builder(builderClass).build(); NewTableConfiguration ntcSummarization2 = new NewTableConfiguration().enableSummarization(summarizerConfig2); for (Map.Entry<String,String> e : ntcSummarization2.getProperties().entrySet()) { if (e.getKey().contains("table.summarizer")) { summarizerValues.add(e.getValue()); } } assertTrue(summarizerValues.get(0).equals(builderClass.getName())); NewTableConfiguration ntcSummarization3 = new NewTableConfiguration().enableSummarization(summarizerConfig1, summarizerConfig2); summarizerValues.clear(); for (Map.Entry<String,String> e : ntcSummarization3.getProperties().entrySet()) { if (e.getKey().contains("table.summarizer")) { summarizerValues.add(e.getValue()); } } assertEquals(summarizerValues.size(), 2); }</code><technical_language>I this removed if stronger checks I suggested added</technical_language>

Target:
public void testEnableSummarization() { SummarizerConfiguration summarizerConfig1 = SummarizerConfiguration .builder("com.test.summarizer").setPropertyId("s1").addOption("opt1", "v1").build(); NewTableConfiguration ntcSummarization1 = new NewTableConfiguration().enableSummarization(summarizerConfig1); assertEquals("v1", ntcSummarization1.getProperties().get("table.summarizer.s1.opt.opt1")); assertEquals("com.test.summarizer", ntcSummarization1.getProperties().get("table.summarizer.s1")); Class<? extends Summarizer> builderClass = FamilySummarizer.class; assertTrue(Summarizer.class.isAssignableFrom(builderClass)); SummarizerConfiguration summarizerConfig2 = SummarizerConfiguration.builder(builderClass) .setPropertyId("s2").addOption("opt2", "v2").build(); NewTableConfiguration ntcSummarization2 = new NewTableConfiguration().enableSummarization(summarizerConfig2); assertEquals("v2", ntcSummarization2.getProperties().get("table.summarizer.s2.opt.opt2")); assertEquals(builderClass.getName(), ntcSummarization2.getProperties().get("table.summarizer.s2")); NewTableConfiguration ntcSummarization3 = new NewTableConfiguration().enableSummarization(summarizerConfig1, summarizerConfig2); assertEquals("v1", ntcSummarization1.getProperties().get("table.summarizer.s1.opt.opt1")); assertEquals("v2", ntcSummarization2.getProperties().get("table.summarizer.s2.opt.opt2")); assertEquals("com.test.summarizer", ntcSummarization3.getProperties().get("table.summarizer.s1")); assertEquals(builderClass.getName(), ntcSummarization3.getProperties().get("table.summarizer.s2")); }