### Question:
MultipleOutputs implements Closeable { @SuppressWarnings("unchecked") public static void addNamedOutput(Job job, String namedOutput, String outputFormatClass, Class<?> keyClass, Class<?> valueClass, Map<String, String> outputConfigs) { assertValidName(namedOutput); checkNamedOutputName(namedOutput, getNamedOutputsList(job), false); Configuration conf = job.getConfiguration(); conf.set(MULTIPLE_OUTPUTS, conf.get(MULTIPLE_OUTPUTS, "") + " " + namedOutput); conf.set(MO_PREFIX + namedOutput + FORMAT, outputFormatClass); conf.setClass(MO_PREFIX + namedOutput + KEY, keyClass, Object.class); conf.setClass(MO_PREFIX + namedOutput + VALUE, valueClass, Object.class); ConfigurationUtil.setNamedConfigurations(conf, computePrefixName(namedOutput), outputConfigs); } MultipleOutputs(TaskInputOutputContext context); @SuppressWarnings("unchecked") static void addNamedOutput(Job job, String namedOutput, String outputFormatClass,
                                    Class<?> keyClass, Class<?> valueClass, Map<String, String> outputConfigs); @SuppressWarnings("unchecked") void write(String namedOutput, K key, V value); @Override void close(); static void closeRecordWriters(Map<K, RecordWriter<?, ?>> recordWriters,
                                            Map<K, TaskAttemptContext> taskContexts);  }### Answer:
@Test public void testInvalidInputName() throws IOException { Job job = Job.getInstance(); try { MultipleOutputs.addNamedOutput(job, "name.with.dots", null, null, null, null); Assert.fail("Expected not to be able to add an output with a '.' in the name"); } catch (IllegalArgumentException expected) { Assert.assertTrue(expected.getMessage().contains("must consist only of ASCII letters, numbers,")); } }