### Question:
Database extends OptionalNamedArg { @Override public String parse( Args parsedArgs ) { return validate( super.parse( parsedArgs ) ); } Database();  Database( String description ); @Override String parse( Args parsedArgs ); static final String ARG_DATABASE; }### Answer:
@Test void parseDatabaseShouldThrowOnPath() { Path path = Paths.get( "data", "databases", GraphDatabaseSettings.DEFAULT_DATABASE_NAME ); IllegalArgumentException exception = assertThrows( IllegalArgumentException.class, () -> arg.parse( Args.parse( "--database=" + path ) ) ); assertEquals( "'database' should be a name but you seem to have specified a path: " + path, exception.getMessage() ); }
@Test void parseDatabaseName() { assertEquals( "bob.db", arg.parse( Args.parse( "--database=bob.db" ) ) ); }