### Question:
GlusterFileStore extends FileStore { @Override public long getTotalSpace() throws IOException { GlusterFileSystemProvider provider = (GlusterFileSystemProvider) fileSystem.provider(); return provider.getTotalSpace(fileSystem.getVolptr()); }  @Override String name(); @Override String type(); @Override boolean isReadOnly(); @Override long getTotalSpace(); @Override long getUsableSpace(); @Override long getUnallocatedSpace(); @Override boolean supportsFileAttributeView(Class<? extends FileAttributeView> aClass); @Override boolean supportsFileAttributeView(String s); @Override V getFileStoreAttributeView(Class<V> vClass); @Override Object getAttribute(String s); static final String GLUSTERFS; }### Answer:
@Test public void testGetTotalSpace() throws IOException { long volptr = 4321l; long space = 1234l; doReturn(volptr).when(mockFileSystem).getVolptr(); doReturn(space).when(mockProvider).getTotalSpace(volptr); long totalSpace = fileStore.getTotalSpace(); verify(mockProvider).getTotalSpace(volptr); verify(mockFileSystem).getVolptr(); assertEquals(space, totalSpace); }