@Test public void factoryShouldReturnDiskBasedCache() { Cache diskCache = DefaultRequestQueueFactory.getDefaultDiskCache(context); assertEquals(diskCache.getClass(), DiskBasedCache.class); }
public static Cache getDefaultDiskCache(Context context) { File cacheDir = getCacheDir(context); if (cacheDir == null) { return new NoCache(); } return new DiskBasedCache(cacheDir); }
DefaultRequestQueueFactory { public static Cache getDefaultDiskCache(Context context) { File cacheDir = getCacheDir(context); if (cacheDir == null) { return new NoCache(); } return new DiskBasedCache(cacheDir); } }
DefaultRequestQueueFactory { public static Cache getDefaultDiskCache(Context context) { File cacheDir = getCacheDir(context); if (cacheDir == null) { return new NoCache(); } return new DiskBasedCache(cacheDir); }  }
DefaultRequestQueueFactory { public static Cache getDefaultDiskCache(Context context) { File cacheDir = getCacheDir(context); if (cacheDir == null) { return new NoCache(); } return new DiskBasedCache(cacheDir); }  static RequestQueue create(Context context); static Network getDefaultNetwork(HttpStack httpStack); static Cache getDefaultDiskCache(Context context); static File getCacheDir(Context context); }
DefaultRequestQueueFactory { public static Cache getDefaultDiskCache(Context context) { File cacheDir = getCacheDir(context); if (cacheDir == null) { return new NoCache(); } return new DiskBasedCache(cacheDir); }  static RequestQueue create(Context context); static Network getDefaultNetwork(HttpStack httpStack); static Cache getDefaultDiskCache(Context context); static File getCacheDir(Context context);  }