test_class.declarator: exception = ExpectedException.none()
test_class.modifier: @Rule public final
test_class.original_string: @Rule public final ExpectedException exception = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: exception
test_class.declarator: temporaryFolder = new TemporaryFolder()
test_class.modifier: @Rule public final
test_class.original_string: @Rule public final TemporaryFolder temporaryFolder = new TemporaryFolder();
test_class.type: TemporaryFolder
test_class.var_name: temporaryFolder
test_class.file: crypto-lib/src/test/java/ee/ria/DigiDoc/crypto/CryptoContainerTest.java
test_class.identifier: CryptoContainerTest
test_case.body: @Test
      public void encrypt_recipientsEmpty() throws Exception {
          exception.expect(RecipientsEmptyException.class);
  
          CryptoContainer.encrypt(
                  ImmutableList.of(resource("example1.txt")),
                  ImmutableList.of(),
                  temporaryFolder.newFile("test1.cdoc"));
      }
test_case.class_method_signature: CryptoContainerTest.encrypt_recipientsEmpty()
test_case.full_signature: @Test public void encrypt_recipientsEmpty()
test_case.identifier: encrypt_recipientsEmpty
test_case.invocations: expect encrypt of resource of newFile
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void encrypt_recipientsEmpty()
focal_class.declarator: EXTENSION = "cdoc"
focal_class.modifier: private static final
focal_class.original_string: private static final String EXTENSION = "cdoc";
focal_class.type: String
focal_class.var_name: EXTENSION
focal_class.file: crypto-lib/src/main/java/ee/ria/DigiDoc/crypto/CryptoContainer.java
focal_class.identifier: CryptoContainer
focal_class.class_method_signature: CryptoContainer.file()
focal_class.full_signature: public abstract File file()
focal_class.identifier: file
focal_class.modifiers: public abstract
focal_class.parameters: ()
focal_class.return: File
focal_class.signature: File file()
focal_class.class_method_signature: CryptoContainer.dataFiles()
focal_class.full_signature: public abstract ImmutableList<File> dataFiles()
focal_class.identifier: dataFiles
focal_class.modifiers: public abstract
focal_class.parameters: ()
focal_class.return: ImmutableList<File>
focal_class.signature: ImmutableList<File> dataFiles()
focal_class.class_method_signature: CryptoContainer.recipients()
focal_class.full_signature: public abstract ImmutableList<Certificate> recipients()
focal_class.identifier: recipients
focal_class.modifiers: public abstract
focal_class.parameters: ()
focal_class.return: ImmutableList<Certificate>
focal_class.signature: ImmutableList<Certificate> recipients()
focal_class.class_method_signature: CryptoContainer.decrypted()
focal_class.full_signature: public abstract boolean decrypted()
focal_class.identifier: decrypted
focal_class.modifiers: public abstract
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean decrypted()
focal_class.class_method_signature: CryptoContainer.decrypt(DecryptToken decryptToken, Certificate authCertificate,
                                     String pin1, File dataFilesDirectory)
focal_class.full_signature: public CryptoContainer decrypt(DecryptToken decryptToken, Certificate authCertificate,
                                     String pin1, File dataFilesDirectory)
focal_class.identifier: decrypt
focal_class.modifiers: public
focal_class.parameters: (DecryptToken decryptToken, Certificate authCertificate,
                                     String pin1, File dataFilesDirectory)
focal_class.return: CryptoContainer
focal_class.signature: CryptoContainer decrypt(DecryptToken decryptToken, Certificate authCertificate,
                                     String pin1, File dataFilesDirectory)
focal_class.class_method_signature: CryptoContainer.open(File file)
focal_class.full_signature: @WorkerThread public static CryptoContainer open(File file)
focal_class.identifier: open
focal_class.modifiers: @WorkerThread public static
focal_class.parameters: (File file)
focal_class.return: CryptoContainer
focal_class.signature: CryptoContainer open(File file)
focal_class.class_method_signature: CryptoContainer.encrypt(ImmutableList<File> dataFiles,
                                            ImmutableList<Certificate> recipients, File file)
focal_class.full_signature: @WorkerThread public static CryptoContainer encrypt(ImmutableList<File> dataFiles,
                                            ImmutableList<Certificate> recipients, File file)
focal_class.identifier: encrypt
focal_class.modifiers: @WorkerThread public static
focal_class.parameters: (ImmutableList<File> dataFiles,
                                            ImmutableList<Certificate> recipients, File file)
focal_class.return: CryptoContainer
focal_class.signature: CryptoContainer encrypt(ImmutableList<File> dataFiles,
                                            ImmutableList<Certificate> recipients, File file)
focal_class.class_method_signature: CryptoContainer.isContainerFileName(String fileName)
focal_class.full_signature: public static boolean isContainerFileName(String fileName)
focal_class.identifier: isContainerFileName
focal_class.modifiers: public static
focal_class.parameters: (String fileName)
focal_class.return: boolean
focal_class.signature: boolean isContainerFileName(String fileName)
focal_class.class_method_signature: CryptoContainer.createContainerFileName(String fileName)
focal_class.full_signature: public static String createContainerFileName(String fileName)
focal_class.identifier: createContainerFileName
focal_class.modifiers: public static
focal_class.parameters: (String fileName)
focal_class.return: String
focal_class.signature: String createContainerFileName(String fileName)
focal_class.class_method_signature: CryptoContainer.create(File file, ImmutableList<File> dataFiles,
                                            ImmutableList<Certificate> recipients,
                                            boolean decrypted)
focal_class.full_signature: private static CryptoContainer create(File file, ImmutableList<File> dataFiles,
                                            ImmutableList<Certificate> recipients,
                                            boolean decrypted)
focal_class.identifier: create
focal_class.modifiers: private static
focal_class.parameters: (File file, ImmutableList<File> dataFiles,
                                            ImmutableList<Certificate> recipients,
                                            boolean decrypted)
focal_class.return: CryptoContainer
focal_class.signature: CryptoContainer create(File file, ImmutableList<File> dataFiles,
                                            ImmutableList<Certificate> recipients,
                                            boolean decrypted)
focal_method.body: @WorkerThread
      public static CryptoContainer encrypt(ImmutableList<File> dataFiles,
                                            ImmutableList<Certificate> recipients, File file)
              throws CryptoException {
          try {
              CDOCBuilder builder = CDOCBuilder.defaultVersion();
              for (File dataFile : dataFiles) {
                  builder.withDataFile(dataFile);
              }
              for (Certificate recipient : recipients) {
                  builder.withRecipient(recipient.x509Certificate());
              }
              builder.buildToFile(file);
              return open(file);
          } catch (DataFileMissingException e) {
              throw new DataFilesEmptyException();
          } catch (RecipientMissingException e) {
              throw new RecipientsEmptyException();
          } catch (Exception e) {
              throw new CryptoException("Encryption failed", e);
          }
      }
focal_method.class_method_signature: CryptoContainer.encrypt(ImmutableList<File> dataFiles,
                                            ImmutableList<Certificate> recipients, File file)
focal_method.full_signature: @WorkerThread public static CryptoContainer encrypt(ImmutableList<File> dataFiles,
                                            ImmutableList<Certificate> recipients, File file)
focal_method.identifier: encrypt
focal_method.invocations: defaultVersion withDataFile withRecipient x509Certificate buildToFile open
focal_method.modifiers: @WorkerThread public static
focal_method.parameters: (ImmutableList<File> dataFiles,
                                            ImmutableList<Certificate> recipients, File file)
focal_method.return: CryptoContainer
focal_method.signature: CryptoContainer encrypt(ImmutableList<File> dataFiles,
                                            ImmutableList<Certificate> recipients, File file)