@Override
  public PathLocation getDestinationForPath(final String path)
      throws IOException {
    verifyMountTable();
    PathLocation res;
    readLock.lock();
    try {
      if (this.locationCache == null) {
        res = lookupLocation(processTrashPath(path));
      } else {
        Callable<? extends PathLocation> meh = (Callable<PathLocation>) () -> {
          this.getLocCacheMiss().increment();
          return lookupLocation(processTrashPath(path));
        };
        res = this.locationCache.get(processTrashPath(path), meh);
        this.getLocCacheAccess().increment();
      }
      if (isTrashPath(path)) {
        List<RemoteLocation> remoteLocations = new ArrayList<>();
        for (RemoteLocation remoteLocation : res.getDestinations()) {
          remoteLocations.add(new RemoteLocation(remoteLocation, path));
        }
        return new PathLocation(path, remoteLocations,
            res.getDestinationOrder());
      } else {
        return res;
      }
    } catch (ExecutionException e) {
      Throwable cause = e.getCause();
      final IOException ioe;
      if (cause instanceof IOException) {
        ioe = (IOException) cause;
      } else {
        ioe = new IOException(cause);
      }
      throw ioe;
    } finally {
      readLock.unlock();
    }
  }
@Test
  public void testMuiltipleDestinations() throws IOException {
    try {
      mountTable.getDestinationForPath("/multi");
      fail("The getDestinationForPath call should fail.");
    } catch (IOException ioe) {
      GenericTestUtils.assertExceptionContains(
          "MountTableResolver should not resolve multiple destinations", ioe);
    }
  }