### Question:
HiveWriteUtils { public static boolean isViewFileSystem(HdfsContext context, HdfsEnvironment hdfsEnvironment, Path path) { try { return getRawFileSystem(hdfsEnvironment.getFileSystem(context, path)) instanceof ViewFileSystem; } catch (IOException e) { throw new PrestoException(HIVE_FILESYSTEM_ERROR, "Failed checking path: " + path, e); } } private  HiveWriteUtils(); static RecordWriter createRecordWriter(Path target, JobConf conf, Properties properties, String outputFormatName, ConnectorSession session); static Serializer initializeSerializer(Configuration conf, Properties properties, String serializerName); static ObjectInspector getJavaObjectInspector(Type type); static List<String> createPartitionValues(List<Type> partitionColumnTypes, Page partitionColumns, int position); static Object getField(Type type, Block block, int position); static void checkTableIsWritable(Table table, boolean writesToNonManagedTablesEnabled); static void checkPartitionIsWritable(String partitionName, Partition partition); static Path getTableDefaultLocation(HdfsContext context, SemiTransactionalHiveMetastore metastore, HdfsEnvironment hdfsEnvironment, String schemaName, String tableName); static Path getTableDefaultLocation(Database database, HdfsContext context, HdfsEnvironment hdfsEnvironment, String schemaName, String tableName); static boolean pathExists(HdfsContext context, HdfsEnvironment hdfsEnvironment, Path path); static boolean isS3FileSystem(HdfsContext context, HdfsEnvironment hdfsEnvironment, Path path); static boolean isViewFileSystem(HdfsContext context, HdfsEnvironment hdfsEnvironment, Path path); static FileSystem getRawFileSystem(FileSystem fileSystem); static boolean isHdfsEncrypted(HdfsContext context, HdfsEnvironment hdfsEnvironment, Path path); static Path createTemporaryPath(ConnectorSession session, HdfsContext context, HdfsEnvironment hdfsEnvironment, Path targetPath); static void createDirectory(HdfsContext context, HdfsEnvironment hdfsEnvironment, Path path); static boolean isWritableType(HiveType hiveType); static List<ObjectInspector> getRowColumnInspectors(List<Type> types); static ObjectInspector getRowColumnInspector(Type type); static HiveDecimal getHiveDecimal(DecimalType decimalType, Block block, int position);  }### Answer:
@Test public void testIsViewFileSystem() { Path viewfsPath = new Path("viewfs: Path nonViewfsPath = new Path("hdfs: HDFS_ENVIRONMENT.getConfiguration(CONTEXT, viewfsPath).set("fs.viewfs.mounttable.ns-default.link./test-folder", "hdfs: assertTrue(isViewFileSystem(CONTEXT, HDFS_ENVIRONMENT, viewfsPath)); assertFalse(isViewFileSystem(CONTEXT, HDFS_ENVIRONMENT, nonViewfsPath)); }