### Question:
GlusterFileSystem extends FileSystem { @Override public PathMatcher getPathMatcher(String s) { if (!s.contains(":")) { throw new IllegalArgumentException("PathMatcher requires input syntax:expression"); } String[] parts = s.split(":", 2); Pattern pattern; if ("glob".equals(parts[0])) { pattern = GlobPattern.compile(parts[1]); } else if ("regex".equals(parts[0])) { pattern = Pattern.compile(parts[1]); } else { throw new UnsupportedOperationException("Unknown PathMatcher syntax: " + parts[0]); } return new GlusterPathMatcher(pattern); }  @Override FileSystemProvider provider(); @Override void close(); @Override boolean isOpen(); @Override boolean isReadOnly(); @Override String getSeparator(); @Override Iterable<Path> getRootDirectories(); @Override Iterable<FileStore> getFileStores(); @Override Set<String> supportedFileAttributeViews(); @Override Path getPath(String s, String... strings); @Override PathMatcher getPathMatcher(String s); @Override UserPrincipalLookupService getUserPrincipalLookupService(); @Override WatchService newWatchService(); String toString();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testGetPathMatcher_whenBadInput() { fileSystem.getPathMatcher("foo"); }
@Test(expected = UnsupportedOperationException.class) public void testGetPathMatcher_whenBadSyntax() { fileSystem.getPathMatcher("foo:bar"); }
@Test(expected = PatternSyntaxException.class) public void testGetPathMatcher_whenBadExpression() { fileSystem.getPathMatcher("regex:["); }