Beispiel #1
0
 @Override
 public Future<Void> drop() throws IOException {
   lock.readLock().lock();
   try {
     closed = true;
     return delegate.drop();
   } finally {
     lock.readLock().unlock();
   }
 }
 public static IndexProxy mockIndexProxy() throws IOException {
   IndexProxy result = mock(IndexProxy.class);
   when(result.drop()).thenReturn(FutureAdapter.VOID);
   when(result.close()).thenReturn(FutureAdapter.VOID);
   return result;
 }