### Question:
ScriptBasedMapping extends CachedDNSToSwitchMapping { @Override public void setConf(Configuration conf) { super.setConf(conf); getRawMapping().setConf(conf); } ScriptBasedMapping();  ScriptBasedMapping(Configuration conf); @Override Configuration getConf(); @Override String toString(); @Override void setConf(Configuration conf); static final String NO_SCRIPT; }### Answer:
@Test public void testFilenameMeansMultiSwitch() throws Throwable { Configuration conf = new Configuration(); conf.set(ScriptBasedMapping.SCRIPT_FILENAME_KEY, "any-filename"); ScriptBasedMapping mapping = createMapping(conf); assertFalse("Expected to be multi switch", mapping.isSingleSwitch()); mapping.setConf(new Configuration()); assertTrue("Expected to be single switch", mapping.isSingleSwitch()); }