### Question:
HdfsRepositoryFactory implements RepositoryFactory { @Override public Repository newInstance(String name, String url) { URI uri = URI.create(url); String scheme = uri.getScheme(); if (!"hdfs".equalsIgnoreCase(scheme)) { throw new IllegalArgumentException("Invalid hdfs url: " + url); } String path = uri.getPath(); String fileName = Paths.get(path).toFile().getName(); boolean isDirectory = !FilenameUtils.isArchiveFile(fileName); if (!isDirectory) { fileName = FilenameUtils.getNamePart(fileName); } String modelName = null; String artifactId = null; String query = uri.getQuery(); if (query != null) { Matcher matcher = NAME_PATTERN.matcher(query); if (matcher.find()) { modelName = matcher.group(1); } matcher = ARTIFACT_PATTERN.matcher(query); if (matcher.find()) { artifactId = matcher.group(1); } } if (artifactId == null) { artifactId = fileName; } if (modelName == null) { modelName = artifactId; } if (path.isEmpty()) { path = "/"; } try { uri = new URI( "hdfs", uri.getUserInfo(), uri.getHost(), uri.getPort(), null, null, null); } catch (URISyntaxException e) { throw new AssertionError(e); } return new HdfsRepository(config, name, uri, path, artifactId, modelName, isDirectory); } HdfsRepositoryFactory();  HdfsRepositoryFactory(Configuration config); @Override Repository newInstance(String name, String url); @Override Set<String> getSupportedScheme();  }### Answer:
@Test(expectedExceptions = IllegalArgumentException.class) public void testUnsupportedProtocol() { HdfsRepositoryFactory factory = new HdfsRepositoryFactory(); factory.newInstance("hdfs", "https: }