### Question:
CacheUtil { private static String buildCacheKey( DataSpec dataSpec, @Nullable CacheKeyFactory cacheKeyFactory) { return (cacheKeyFactory != null ? cacheKeyFactory : DEFAULT_CACHE_KEY_FACTORY) .buildCacheKey(dataSpec); } private  CacheUtil(); static String generateKey(Uri uri); static Pair<Long, Long> getCached(
      DataSpec dataSpec, Cache cache, @Nullable CacheKeyFactory cacheKeyFactory); static void cache(
      DataSpec dataSpec,
      Cache cache,
      @Nullable CacheKeyFactory cacheKeyFactory,
      DataSource upstream,
      @Nullable ProgressListener progressListener,
      @Nullable AtomicBoolean isCanceled); static void cache(
      DataSpec dataSpec,
      Cache cache,
      @Nullable CacheKeyFactory cacheKeyFactory,
      CacheDataSource dataSource,
      byte[] buffer,
      PriorityTaskManager priorityTaskManager,
      int priority,
      @Nullable ProgressListener progressListener,
      @Nullable AtomicBoolean isCanceled,
      boolean enableEOFException); static void remove(
      DataSpec dataSpec, Cache cache, @Nullable CacheKeyFactory cacheKeyFactory); static void remove(Cache cache, String key); static final int DEFAULT_BUFFER_SIZE_BYTES; static final CacheKeyFactory DEFAULT_CACHE_KEY_FACTORY; }### Answer:
@Test public void testDefaultCacheKeyFactory_buildCacheKey() { Uri testUri = Uri.parse("test"); String key = "key"; assertThat( CacheUtil.DEFAULT_CACHE_KEY_FACTORY.buildCacheKey( new DataSpec(testUri, 0, LENGTH_UNSET, key))) .isEqualTo(key); assertThat( CacheUtil.DEFAULT_CACHE_KEY_FACTORY.buildCacheKey( new DataSpec(testUri, 0, LENGTH_UNSET, null))) .isEqualTo(testUri.toString()); }