// Path: lib/src/main/java/com/google/capillary/AuthModeUnavailableException.java
// public final class AuthModeUnavailableException extends CapillaryException {
// 
//   /**
//    * Creates a new {@link AuthModeUnavailableException} instance.
//    *
//    * @param msg the exception message.
//    */
//   public AuthModeUnavailableException(String msg) {
//     super(msg);
//   }
// }
// 
// Path: lib/src/main/java/com/google/capillary/NoSuchKeyException.java
// public final class NoSuchKeyException extends CapillaryException {
// 
//   /**
//    * Creates a new {@link NoSuchKeyException} object.
//    *
//    * @param msg the exception message.
//    */
//   public NoSuchKeyException(String msg) {
//     super(msg);
//   }
// }


import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import android.content.Context;
import android.os.Build.VERSION_CODES;
import android.security.keystore.UserNotAuthenticatedException;
import com.google.capillary.AuthModeUnavailableException;
import com.google.capillary.NoSuchKeyException;
import com.google.capillary.internal.CapillaryCiphertext;
import com.google.crypto.tink.HybridDecrypt;
import com.google.protobuf.ByteString;
import java.security.GeneralSecurityException;
import java.util.LinkedList;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/*
 * Copyright 2018 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.capillary.android;



@RunWith(JUnit4.class)
public final class DecrypterManagerTest {

  private static final String PLAINTEXT = "plaintext";
  private static final String CIPHERTEXT = "ciphertext";
  private static final String PUBLIC_KEY = "public key";

  private final Context context = mock(Context.class);
  private final KeyManager keyManager = mock(KeyManager.class);
  private final HybridDecrypt hybridDecrypt = mock(HybridDecrypt.class);
  private final CiphertextStorage ciphertextStorage = mock(CiphertextStorage.class);
  private final Utils utils = mock(Utils.class);

  private DecrypterManager decrypterManager;
  private CapillaryCiphertext.Builder ciphertextBuilder;
  private CapillaryHandler handler;
  private Object extra;

  /**
   * Creates a new {@link DecrypterManagerTest} instance.
   */
  public DecrypterManagerTest()
// Path: lib/src/main/java/com/google/capillary/AuthModeUnavailableException.java
// public final class AuthModeUnavailableException extends CapillaryException {
// 
//   /**
//    * Creates a new {@link AuthModeUnavailableException} instance.
//    *
//    * @param msg the exception message.
//    */
//   public AuthModeUnavailableException(String msg) {
//     super(msg);
//   }
// }
// 
// Path: lib/src/main/java/com/google/capillary/NoSuchKeyException.java
// public final class NoSuchKeyException extends CapillaryException {
// 
//   /**
//    * Creates a new {@link NoSuchKeyException} object.
//    *
//    * @param msg the exception message.
//    */
//   public NoSuchKeyException(String msg) {
//     super(msg);
//   }
// }


// Path: lib-android/src/test/java/com/google/capillary/android/DecrypterManagerTest.java
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import android.content.Context;
import android.os.Build.VERSION_CODES;
import android.security.keystore.UserNotAuthenticatedException;
import com.google.capillary.AuthModeUnavailableException;
import com.google.capillary.NoSuchKeyException;
import com.google.capillary.internal.CapillaryCiphertext;
import com.google.crypto.tink.HybridDecrypt;
import com.google.protobuf.ByteString;
import java.security.GeneralSecurityException;
import java.util.LinkedList;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

/*
 * Copyright 2018 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.capillary.android;



@RunWith(JUnit4.class)
public final class DecrypterManagerTest {

  private static final String PLAINTEXT = "plaintext";
  private static final String CIPHERTEXT = "ciphertext";
  private static final String PUBLIC_KEY = "public key";

  private final Context context = mock(Context.class);
  private final KeyManager keyManager = mock(KeyManager.class);
  private final HybridDecrypt hybridDecrypt = mock(HybridDecrypt.class);
  private final CiphertextStorage ciphertextStorage = mock(CiphertextStorage.class);
  private final Utils utils = mock(Utils.class);

  private DecrypterManager decrypterManager;
  private CapillaryCiphertext.Builder ciphertextBuilder;
  private CapillaryHandler handler;
  private Object extra;

  /**
   * Creates a new {@link DecrypterManagerTest} instance.
   */
  public DecrypterManagerTest()
      throws NoSuchKeyException, GeneralSecurityException, AuthModeUnavailableException {