// Path: waterfallcache/src/main/java/com/github/simonpercic/waterfallcache/cache/Cache.java
// public interface Cache extends RxCache, AsyncCache {
// 
// }
// 
// Path: waterfallcache-sample/src/main/java/com/github/simonpercic/waterfallcachesample/App.java
// public class App extends Application {
// 
//     private Cache waterfallCache;
// 
//     @Override public void onCreate() {
//         super.onCreate();
//         setStrictMode();
//         waterfallCache = createCache();
//     }
// 
//     public Cache getWaterfallCache() {
//         return waterfallCache;
//     }
// 
//     private Cache createCache() {
//         Cache cache = WaterfallCache.builder()
//                 .addMemoryCache(1000)
//                 .addDiskCache(this, 1024 * 1024)
//                 .build();
// 
//         return LazyExpirableCache.fromCache(cache, 10, TimeUnit.MINUTES);
//     }
// 
//     private void setStrictMode() {
//         StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
//                 .detectDiskReads()
//                 .detectDiskWrites()
//                 .detectAll()
//                 .penaltyLog()
//                 .build());
// 
//         StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
//                 .detectLeakedSqlLiteObjects()
//                 .detectLeakedClosableObjects()
//                 .penaltyLog()
//                 .penaltyDeath()
//                 .build());
//     }
// }


import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.github.simonpercic.waterfallcache.cache.Cache;
import com.github.simonpercic.waterfallcachesample.App;
import com.github.simonpercic.waterfallcachesample.R;
package com.github.simonpercic.waterfallcachesample.test.base;



/**
 * @author Simon Percic <a href="https://github.com/simonpercic">https://github.com/simonpercic</a>
 */
public abstract class BaseTestActivity extends AppCompatActivity implements OnClickListener {

    private static final String DEFAULT_KEY = "test";

    private Cache waterfallCache;
    private TextView tvValueDisplay;
    private EditText etValueInput;
    private EditText etKeyInput;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);
// Path: waterfallcache/src/main/java/com/github/simonpercic/waterfallcache/cache/Cache.java
// public interface Cache extends RxCache, AsyncCache {
// 
// }
// 
// Path: waterfallcache-sample/src/main/java/com/github/simonpercic/waterfallcachesample/App.java
// public class App extends Application {
// 
//     private Cache waterfallCache;
// 
//     @Override public void onCreate() {
//         super.onCreate();
//         setStrictMode();
//         waterfallCache = createCache();
//     }
// 
//     public Cache getWaterfallCache() {
//         return waterfallCache;
//     }
// 
//     private Cache createCache() {
//         Cache cache = WaterfallCache.builder()
//                 .addMemoryCache(1000)
//                 .addDiskCache(this, 1024 * 1024)
//                 .build();
// 
//         return LazyExpirableCache.fromCache(cache, 10, TimeUnit.MINUTES);
//     }
// 
//     private void setStrictMode() {
//         StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
//                 .detectDiskReads()
//                 .detectDiskWrites()
//                 .detectAll()
//                 .penaltyLog()
//                 .build());
// 
//         StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
//                 .detectLeakedSqlLiteObjects()
//                 .detectLeakedClosableObjects()
//                 .penaltyLog()
//                 .penaltyDeath()
//                 .build());
//     }
// }


// Path: waterfallcache-sample/src/main/java/com/github/simonpercic/waterfallcachesample/test/base/BaseTestActivity.java
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.github.simonpercic.waterfallcache.cache.Cache;
import com.github.simonpercic.waterfallcachesample.App;
import com.github.simonpercic.waterfallcachesample.R;

package com.github.simonpercic.waterfallcachesample.test.base;



/**
 * @author Simon Percic <a href="https://github.com/simonpercic">https://github.com/simonpercic</a>
 */
public abstract class BaseTestActivity extends AppCompatActivity implements OnClickListener {

    private static final String DEFAULT_KEY = "test";

    private Cache waterfallCache;
    private TextView tvValueDisplay;
    private EditText etValueInput;
    private EditText etKeyInput;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);
        waterfallCache = ((App) getApplication()).getWaterfallCache();