@Test
public void testClearSnapshot() throws InterruptedException, ReaperException, ClassNotFoundException, IOException {

  JmxProxy proxy = (JmxProxy) mock(Class.forName("io.cassandrareaper.jmx.JmxProxyImpl"));
  StorageServiceMBean storageMBean = Mockito.mock(StorageServiceMBean.class);
  JmxProxyTest.mockGetStorageServiceMBean(proxy, storageMBean);
  AppContext cxt = new AppContext();
  cxt.config = TestRepairConfiguration.defaultConfig();
  cxt.jmxConnectionFactory = mock(JmxConnectionFactory.class);
  when(cxt.jmxConnectionFactory.connectAny(any(Collection.class))).thenReturn(proxy);
  SnapshotService
      .create(cxt, SNAPSHOT_MANAGER_EXECUTOR)
      .clearSnapshot("test", Node.builder().withHostname("127.0.0.1").build());
  verify(storageMBean, times(1)).clearSnapshot("test");
}