> + final KeystoneStorageEndpointModule moduleToTest = new
> KeystoneStorageEndpointModule();
> +
> + // Test with a Null Region - just ensure we get either a region 1,2 or
> 3
> + // URI
> + Supplier<URI> resultingSupplier =
> moduleToTest.provideStorageUrl(mockFactory, apiVersion, null);
> + Assert.assertNotNull(resultingSupplier);
> + URI resultingUri = resultingSupplier.get();
> + Assert.assertNotNull(resultingUri);
> +
> + // Without a region our choice is arbitrary. We can't enforce an
> ordering
> + // on the map
> + // as that varies from JVM to JVM - easier to just assume its one of
> the
> + // possible values
> +
> Assert.assertTrue(resultingUri.toString().equals("http://region1.example.org/")
> + || resultingUri.toString().equals("http://region2.example.org/")
> + ||
> resultingUri.toString().equals("http://region3.example.org/"));
See comment about a more deterministic approach above.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/31/files#r4841124