private HDocumentUpload mockTwoPartUploadUsingHash(String hash)
throws SQLException {
HDocumentUpload upload = new HDocumentUpload();
upload.setContentHash(hash);
HDocumentUploadPart part0 = new HDocumentUploadPart();
when(partBlob0.getBinaryStream()).thenReturn(
new ByteArrayInputStream("abc".getBytes()));
part0.setContent(partBlob0);
upload.getParts().add(part0);
HDocumentUploadPart part1 = new HDocumentUploadPart();
when(partBlob1.getBinaryStream()).thenReturn(
new ByteArrayInputStream("def".getBytes()));
part1.setContent(partBlob1);
upload.getParts().add(part1);
return upload;
}