@Test void testPersistDocumentWhenVaultLocationIsNotYetKnow() { final DocumentEntity documentEntity = DocumentEntity.builder() .compression(DocumentCompression.NONE) .build(); final VaultLocation vaultLocation = mock(VaultLocation.class); when(vaultLocationFactory.getLocation(documentEntity)) .thenReturn(vaultLocation); underTest.persistDocument(documentEntity, CONTENT); verify(vaultLocation).upload(CONTENT); }
public void persistDocument(final DocumentEntity documentEntity, final byte[] documentContents) { final VaultLocation vaultLocation = vaultLocationFactory.getLocation(documentEntity); persistDocument(documentEntity, documentContents, vaultLocation); }
VaultDocumentStorage { public void persistDocument(final DocumentEntity documentEntity, final byte[] documentContents) { final VaultLocation vaultLocation = vaultLocationFactory.getLocation(documentEntity); persistDocument(documentEntity, documentContents, vaultLocation); } }
VaultDocumentStorage { public void persistDocument(final DocumentEntity documentEntity, final byte[] documentContents) { final VaultLocation vaultLocation = vaultLocationFactory.getLocation(documentEntity); persistDocument(documentEntity, documentContents, vaultLocation); }  }
VaultDocumentStorage { public void persistDocument(final DocumentEntity documentEntity, final byte[] documentContents) { final VaultLocation vaultLocation = vaultLocationFactory.getLocation(documentEntity); persistDocument(documentEntity, documentContents, vaultLocation); }  void persistDocument(final DocumentEntity documentEntity, final byte[] documentContents); void persistDocument(final DocumentEntity documentEntity, final byte[] documentContents,
            final VaultLocation vaultLocation); }
VaultDocumentStorage { public void persistDocument(final DocumentEntity documentEntity, final byte[] documentContents) { final VaultLocation vaultLocation = vaultLocationFactory.getLocation(documentEntity); persistDocument(documentEntity, documentContents, vaultLocation); }  void persistDocument(final DocumentEntity documentEntity, final byte[] documentContents); void persistDocument(final DocumentEntity documentEntity, final byte[] documentContents,
            final VaultLocation vaultLocation);  }