### Question:
SingleLevelCacheRepository extends BaseRepository<M, P> implements Repository<M, P> { public void invalidateCache() { cacheDataSource.invalidateCache(); } SingleLevelCacheRepository(@NotNull DataSource<M, P> networkDataSource, @NotNull MemoryCacheDataSource<M, P> cacheDataSource); @NotNull @Override Single<M> get(P params); @NotNull @Override Single<M> getLatest(P params); @SuppressWarnings("WeakerAccess") void setCacheValidity(Long newCacheValidity); void invalidateCache();  }### Answer:
@Test public void whenInvalidateCacheThenInvokeCachedDataSource() { sut.invalidateCache(); verify(cacheDataSource).invalidateCache(); }