I'm using Google App Engine for Java, and I'm trying to write JUnit tests for my code that deals with the blobstore. How can I put a blob in the blobstore to use during testing (after it has been configured to keep everything in-memory with the LocalBlobstoreServiceTestConfig)? It seems like the solution should be very simple and basic, but somehow I cannot find it.
I imagine it was possible using the Files API, but I have steered clear of it because it is being discontinued (next week).
The only way I know of to get blobs into the blobstore outside of tests is via a multi-part form upload. However, I don't know how I would do that in the context of a JUnit test.
One can also interact with Google Cloud Storage objects via the blobstore API, but I have chosen to use the vanilla blobstore so that I don't need to loop yet another service (and its client libraries) into my app.
So again I ask, how do I get a blob in there so I can test the code that uses it?