}
}
@Test
public void anonymous() {
ResourceService unauthenticated = clientFactory.createAnonymous().getService(ResourceService.class);
try {
unauthenticated.list();
fail();
} catch (AccessControlException e) {
assertNotNull(e);
}
ResourceService anonymous = clientFactory.create(ANONYMOUS_UNAME, ANONYMOUS_KEY).
getService(ResourceService.class);
assertFalse(anonymous.list().isEmpty());
}