### Question:
DeadLetterTopicExceptionHandlerConfig extends AbstractConfig { public List<Class<?>> getFatalExceptions() { List<String> classes = getList(FATAL_ERRORS_CONFIG); if (classes == null) return Collections.emptyList(); List<Class<?>> fatal = new ArrayList<>(classes.size()); for (String cls : classes) { try { fatal.add(Class.forName(cls)); } catch (final ClassNotFoundException e) { throw new ConfigException("Cannot found exception class '" + cls + "' from config '" + FATAL_ERRORS_CONFIG + "'"); } } return fatal; } DeadLetterTopicExceptionHandlerConfig(final Map<String, ?> originals); String outputTopic(); Map<String, Object> customHeaders(); Map<String, Object> producerConfigs(); List<Class<?>> getFatalExceptions(); static ConfigDef configDef(); static final String DEAD_LETTER_TOPIC_CONFIG; static final String DEAD_LETTER_TOPIC_DOC; static final String FATAL_ERRORS_CONFIG; static final String FATAL_ERRORS_DOC; static final String DEAD_LETTER_PRODUCER_CONFIG; static final String DEAD_LETTER_HEADERS_PREFIX; }### Answer:
@Test public void shouldAcceptFatalExceptionClassListConfig() { DeadLetterTopicExceptionHandlerConfig config = new DeadLetterTopicExceptionHandlerConfig( Collections.singletonMap(FATAL_ERRORS_CONFIG, Exception.class.getName() + ","+ StreamsException.class.getName()) ); List<Class<?>> fatalExceptions = config.getFatalExceptions(); assertEquals(2, fatalExceptions.size()); }