Mocking with Mockito

This is going to be a short post about an issue that I faced in my office project. Context: I was working on a project that generates an output file based on the data that is read by some input files. Now the size of the input files can vary and in my case, it went up to 50GB. So when the program was executing on the cloud environment (will call ENV further in post), there wasn’t enough space left in the PVC (Persistant Volume Claim) for this file and the program crashed due to full PVC. As output file delivery was a priority thing, so I pulled the file locally and tried to generate the file using Integration test. For local generation, I wrote a test, that stubs the file paths that my batchClient downloads. ...

July 19, 2019 · 3 min · Vivek Bhadauria