// Path: lib/src/test/java/io/reist/sklad/TestUtils.java
// static final String TEST_NAME_1 = "z12";


import android.os.Build;
import android.support.annotation.NonNull;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.stubbing.OngoingStubbing;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
import static io.reist.sklad.TestUtils.TEST_NAME_1;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

            @Override
            public void setFullyCached(@NonNull Storage local, @NonNull String id, boolean fullyCached) throws IOException {
                stateMap.put(id, fullyCached);
            }

            @Override
            public boolean isFullyCached(@NonNull Storage local, @NonNull String id) {
                return Boolean.TRUE.equals(stateMap.get(id));
            }

        };
    }

    @SuppressWarnings({"ConstantConditions", "ResultOfMethodCallIgnored"})
    private static void assertObjectJustCached(
            CachedStorageStates cachedStorageStates,
            Storage remote,
            InputStream remoteInputStream,
            Storage local,
            OutputStream localOutputStream,
            InputStream localInputStream,
            CachedStorage cachedStorage,
            boolean useCacheMethod,
            boolean readFully
    ) throws IOException {

        if (useCacheMethod) {

            try {
// Path: lib/src/test/java/io/reist/sklad/TestUtils.java
// static final String TEST_NAME_1 = "z12";


// Path: lib/src/test/java/io/reist/sklad/CachedStorageStatesTest.java
import android.os.Build;
import android.support.annotation.NonNull;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.stubbing.OngoingStubbing;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
import static io.reist.sklad.TestUtils.TEST_NAME_1;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;


            @Override
            public void setFullyCached(@NonNull Storage local, @NonNull String id, boolean fullyCached) throws IOException {
                stateMap.put(id, fullyCached);
            }

            @Override
            public boolean isFullyCached(@NonNull Storage local, @NonNull String id) {
                return Boolean.TRUE.equals(stateMap.get(id));
            }

        };
    }

    @SuppressWarnings({"ConstantConditions", "ResultOfMethodCallIgnored"})
    private static void assertObjectJustCached(
            CachedStorageStates cachedStorageStates,
            Storage remote,
            InputStream remoteInputStream,
            Storage local,
            OutputStream localOutputStream,
            InputStream localInputStream,
            CachedStorage cachedStorage,
            boolean useCacheMethod,
            boolean readFully
    ) throws IOException {

        if (useCacheMethod) {

            try {
                cachedStorage.cache(TEST_NAME_1);