### Question:
BackupManager { public void backup(@NotNull final String keyspace) throws IOException { backup(keyspace, "snapshot-" + System.currentTimeMillis()); } BackupManager(@NotNull final JmxConnect jmxConnect, @NotNull final String backupDir); void backup(@NotNull final String keyspace); void backup(@NotNull final String keyspace, @NotNull final String snapshot); void restore(@NotNull final String keyspace);  }### Answer:
@Test public void testBackup() throws IOException { createCassandraDirs(KEYSPACE, TABLE, SNAPSHOT, true); backupManager.backup(KEYSPACE, SNAPSHOT); assertEquals(Arrays.asList("takeSnapshot", "clearSnapshot"), jmxConnect.getInvocations()); assertTrue(new File(backupDir, KEYSPACE).isDirectory()); assertTrue(new File(backupDir, KEYSPACE + "/" + TABLE).isDirectory()); assertTrue(new File(backupDir, KEYSPACE + "/" + TABLE + "/data.db").isFile()); assertTrue(new File(backupDir, KEYSPACE + "/" + TABLE + "/index.db").isFile()); }