@Test public void testStorageCredentialsSAS() throws URISyntaxException, StorageException { String token = "?sig=1&sp=abcde&api-version=" + Constants.HeaderConstants.TARGET_STORAGE_VERSION; StorageCredentialsSharedAccessSignature cred = new StorageCredentialsSharedAccessSignature(token); assertNull(cred.getAccountName()); URI testUri = new URI("http://test/abc" + token); TestHelper.assertURIsEqual(testUri, cred.transformUri(testUri), true); testUri = new URI("http://test/abc?query=a&query2=b"); URI expectedUri = new URI("http://test/abc?sig=1&query=a&sp=abcde&query2=b&api-version=" + Constants.HeaderConstants.TARGET_STORAGE_VERSION); TestHelper.assertURIsEqual(expectedUri, cred.transformUri(testUri), true); }