Start blob service locally, then add the following code at the end of lib.rs file:
```
#[tokio::test]
async fn upload_download_test() {
let holder = "test1".to_string();
let hash = "test1".to_string();
let upload_data = vec!["test".to_string(), "test".to_string()];
let mut upload_state = initialize_upload_state().await.unwrap();
start_upload(&mut upload_state, holder.clone(), hash)
.await
.unwrap();
for chunk in upload_data.iter() {
upload_chunk(&mut upload_state, &chunk).await.unwrap();
}
resume_upload(upload_state).await.unwrap();
let mut download_data = Vec::new();
let mut download_state = initialize_download_state(holder).await.unwrap();
loop {
if !pull_chunk(&mut download_state, &mut download_data)
.await
.unwrap()
{
break;
}
}
assert_eq!(upload_data.join(""), download_data.join(""));
}
```
Test should pass. No additional steps required.