@Test public void testFileSystemInequivalence() { Configuration hadoopConf = createMock(Configuration.class); FileSystem fs = createMock(FileSystem.class), other = createMock(FileSystem.class); String basePath = "/accumulo"; expect(fs.getConf()).andReturn(hadoopConf).anyTimes(); expect(fs.getUri()).andReturn(URI.create("hdfs: expect(other.getUri()).andReturn(URI.create("hdfs: replay(fs, other); VolumeImpl volume = new VolumeImpl(fs, basePath); assertFalse(volume.equivalentFileSystems(other)); verify(fs, other); }
boolean equivalentFileSystems(FileSystem other) { return fs.getUri().equals(other.getUri()); }
VolumeImpl implements Volume { boolean equivalentFileSystems(FileSystem other) { return fs.getUri().equals(other.getUri()); } }
VolumeImpl implements Volume { boolean equivalentFileSystems(FileSystem other) { return fs.getUri().equals(other.getUri()); } VolumeImpl(Path path, Configuration conf);  VolumeImpl(FileSystem fs, String basePath); }
VolumeImpl implements Volume { boolean equivalentFileSystems(FileSystem other) { return fs.getUri().equals(other.getUri()); } VolumeImpl(Path path, Configuration conf);  VolumeImpl(FileSystem fs, String basePath); @Override FileSystem getFileSystem(); @Override String getBasePath(); @Override Path prefixChild(Path p); @Override boolean isValidPath(Path p); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @Override Path prefixChild(String p); }
VolumeImpl implements Volume { boolean equivalentFileSystems(FileSystem other) { return fs.getUri().equals(other.getUri()); } VolumeImpl(Path path, Configuration conf);  VolumeImpl(FileSystem fs, String basePath); @Override FileSystem getFileSystem(); @Override String getBasePath(); @Override Path prefixChild(Path p); @Override boolean isValidPath(Path p); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); @Override Path prefixChild(String p);  }