0

How to mock below piece of code using EasyMock?

StorageOptions.newBuilder()
          .setCredentials(ServiceAccountCredentials.fromStream(
              new FileInputStream(Syste.getEnv("gcsCred"))))
          .setProjectId("projectId").build().getService();
    
  • I'm assuming `newBuilder()` is a static method. I'm pretty sure you can't mock static methods in EasyMock. The answers to the duplicate question have more insight than I can offer. – Dawood ibn Kareem Oct 10 '22 at 20:45

0 Answers0