CacheService { public static File getDiskCacheDirectory(final Context context) { final String cachePath = context.getCacheDir().getPath(); return new File(cachePath + File.separator + UNIQUE_CACHE_NAME); }  static boolean initializeDiskCache(final Context context); static void initialize(final Context context); static String createValidDiskCacheKey(final String key); static File getDiskCacheDirectory(final Context context); static boolean containsKeyDiskCache(final String key); static String getFilePathDiskCache(final String key); static byte[] getFromDiskCache(final String key); static void getFromDiskCacheAsync(final String key, final DiskLruCacheGetListener diskLruCacheGetListener); static boolean putToDiskCache(final String key, final byte[] content); static boolean putToDiskCache(final String key, final InputStream content); static void putToDiskCacheAsync(final String key, final byte[] content); @Deprecated @VisibleForTesting static void clearAndNullCaches(); @Deprecated @VisibleForTesting static DiskLruCache getDiskLruCache();  }
@Test public void getDiskLruCacheDirectory_shouldReturnValidCacheDirectory() throws Exception { File file = CacheService.getDiskCacheDirectory(context); String expectedPath = context.getCacheDir().toString() + "/mopub-cache"; assertThat(file.getAbsolutePath()).isEqualTo(expectedPath); }