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