FsExport { public boolean isTrusted() { return _isTrusted == Root.TRUSTED; } private  FsExport(String path, FsExportBuilder builder); static int getExportIndex(String path); String getPath(); @Override String toString(); boolean isAllowed(InetAddress client); boolean isTrusted(); String client(); IO ioMode(); int getIndex(); boolean checkAcls(); Sec getSec(); boolean hasAllSquash(); int getAnonUid(); int getAnonGid(); boolean isWithDcap(); boolean isAllRoot(); boolean isWithPnfs(); boolean isPrivilegedClientPortRequired(); List<layouttype4> getLayoutTypes(); static String normalize(String path); @Override int hashCode(); @Override boolean equals(Object obj); final static int DEFAULT_ANON_UID; final static int DEFAULT_ANON_GID; }
@Test public void testTrustedMultimpleClients() throws UnknownHostException { InetAddress trusted = InetAddress.getByName("www.google.com"); InetAddress nontrusted = InetAddress.getByName("www.yahoo.com"); FsExport export1 = _exportFile.getExport("/trusted", trusted); FsExport export2 = _exportFile.getExport("/trusted", nontrusted); assertTrue("trusted host not respected", export1.isTrusted() ); assertFalse("nontrusted host respected", export2.isTrusted() ); }