  @Test(expected = UncheckedIOException.class)
  public void afterMoveHookIoExceptionTest() throws IOException
  {

    when(destination.facet(StorageFacet.class)).thenReturn(storageFacet);
    when(storageFacet.txSupplier()).thenReturn(() -> tx);
    when(destination.facet(AptHostedFacet.class)).thenReturn(sourceFacet);

    AptComponentDirector director = new AptComponentDirector(bucketStore, repositoryManager);
    doThrow(new IOException()).when(sourceFacet).rebuildIndexes();
    director.afterMove(Collections.emptyList(), destination);
  }