AndroidDirectoryProvider implements DirectoryProvider { @Override public File getBackupDirectory() { return backupDirectory; } AndroidDirectoryProvider(String prefName, File baseDir); @Override File getStoreDirectory(); @Override File getBackupDirectory(); @Override File getLockDirectory();  }
@Test public void backupPath() { File backupDirectory = provider.getBackupDirectory(); assertTrue(backupDirectory.exists()); assertTrue(backupDirectory.canRead()); assertTrue(backupDirectory.canWrite()); String actualPath = backupDirectory.getAbsolutePath(); String expectedPath = baseDir.getAbsolutePath() + File.separator + AndroidDirectoryProvider.PREFERENCES_ROOT_DIRECTORY_NAME + File.separator + PREF_NAME + File.separator + AndroidDirectoryProvider.BACKUP_DIRECTORY_NAME; assertEquals(expectedPath, actualPath); }