@Test
public void testTakeSnapshot() 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);
  Pair<Node,String> result = SnapshotService
      .create(cxt, SNAPSHOT_MANAGER_EXECUTOR)
      .takeSnapshot("Test", Node.builder().withHostname("127.0.0.1").build());
  Assertions.assertThat(result.getLeft().getHostname()).isEqualTo("127.0.0.1");
  Assertions.assertThat(result.getRight()).isEqualTo("Test");
  verify(storageMBean, times(1)).takeSnapshot("Test");
}