public void shouldUpdateDomainId() throws Throwable {
// pre-conditions
mockDirector.mockRenameDomain("foobarz", GET_DOMAINS_FOOBARS);
final IDomain domain = user.getDomain("foobarz");
// operation
domain.rename("foobars");
// verifications
assertThat(domain.getId()).isEqualTo("foobars");
final IDomain updatedDomain = user.getDomain("foobars");
assertThat(updatedDomain).isNotNull();
assertThat(updatedDomain.getId()).isEqualTo("foobars");