### Question:
BackupManager { File findTableSnapshotDir(@NotNull final String keyspace, @NotNull final String table, @NotNull final String snapshot) { final File dataDir = new File(jmxConnect.getStorageServiceProxy().getAllDataFileLocations()[0]); final File keyspaceDir = new File(dataDir, keyspace); final File tableDir = findTableDir(keyspaceDir, table); final File snapshotDir = new File(tableDir, "/snapshots/" + snapshot); if (!snapshotDir.exists()) throw new IllegalStateException("Snapshot dir does not exist: " + snapshotDir); return snapshotDir; } 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 testFindTableSnapshotDir() throws IOException { File dataDir = new File(jmxConnect.getStorageServiceProxy().getAllDataFileLocations()[0]); try { backupManager.findTableSnapshotDir(KEYSPACE, TABLE, SNAPSHOT); fail(); } catch (IllegalStateException e) {} File snapshotDir = new File(dataDir, KEYSPACE + "/" + TABLE + "-123/snapshots/" + SNAPSHOT); Files.createDirectories(snapshotDir.toPath()); File dir = backupManager.findTableSnapshotDir(KEYSPACE, TABLE, SNAPSHOT); assertEquals(snapshotDir, dir); }