### Question:
ParserConfiguration { public ParserConfiguration registerDirective(String name, DirectiveHandler<KnowledgeBase> handler) throws IllegalArgumentException { Validate.isTrue(!RESERVED_DIRECTIVE_NAMES.contains(name), "The name \"%s\" is a reserved directive name.", name); Validate.isTrue(!this.directives.containsKey(name), "The directive \"%s\" is already registered.", name); this.directives.put(name, handler); return this; } ParserConfiguration();  ParserConfiguration(ParserConfiguration other); ParserConfiguration registerDataSource(final String name, final DataSourceDeclarationHandler handler); DataSource parseDataSourceSpecificPartOfDataSourceDeclaration(PositiveLiteral declaration); Constant parseDatatypeConstant(final String lexicalForm, final String datatype,
			final TermFactory termFactory); boolean isConfigurableLiteralRegistered(ConfigurableLiteralDelimiter delimiter); Term parseConfigurableLiteral(ConfigurableLiteralDelimiter delimiter, String syntacticForm,
			final SubParserFactory subParserFactory); ParserConfiguration registerDatatype(final String name, final DatatypeConstantHandler handler); ParserConfiguration registerLiteral(ConfigurableLiteralDelimiter delimiter,
			ConfigurableLiteralHandler handler); ParserConfiguration registerDirective(String name, DirectiveHandler<KnowledgeBase> handler); KnowledgeBase parseDirectiveStatement(String name, List<Argument> arguments,
			SubParserFactory subParserFactory); ParserConfiguration setNamedNulls(boolean allow); ParserConfiguration allowNamedNulls(); ParserConfiguration disallowNamedNulls(); boolean isParsingOfNamedNullsAllowed(); String getImportBasePath(); ParserConfiguration setImportBasePath(String importBasePath); static final List<String> RESERVED_DIRECTIVE_NAMES; }### Answer:
@Test(expected = IllegalArgumentException.class) public void registerDirective_duplicateName_throws() throws IllegalArgumentException { parserConfiguration.registerDirective(DIRECTIVE_NAME, directiveHandler); parserConfiguration.registerDirective(DIRECTIVE_NAME, directiveHandler); }
@Test(expected = IllegalArgumentException.class) public void registerDirective_reservedName_throws() throws IllegalArgumentException { parserConfiguration.registerDirective("base", directiveHandler); }
@Test public void registerDirective_unreserverdName_succeeds() throws IllegalArgumentException { parserConfiguration.registerDirective(DIRECTIVE_NAME, directiveHandler); }