Code example for Supplier

Methods: get

0
   public void testObjectStorageUndefinedRegion() { 
      final HPCloudObjectStorageHttpApiModule.HPCloudObjectStorageEndpointModule moduleToTest = new HPCloudObjectStorageHttpApiModule.HPCloudObjectStorageEndpointModule();
 
      Supplier<URI> resultingSupplier = moduleToTest.provideStorageUrl(mockFactory, apiVersion, "region-that-dne");
      assertNotNull(resultingSupplier);
      URI resultingUri = resultingSupplier.get();
      assertNull(resultingUri);
   } 
 
   @Test
   public void testCDNUndefinedRegion() { 
      final HPCloudObjectStorageHttpApiModule moduleToTest = new HPCloudObjectStorageHttpApiModule();
 
      Supplier<URI> resultingSupplier = moduleToTest.provideCDNUrl(mockCDNFactory, apiVersion, "region-that-dne");
      assertNotNull(resultingSupplier);
      URI resultingUri = resultingSupplier.get();
      assertNull(resultingUri);
   } 
} 
Connect your IDE to all the code out there  Get Codota for Java