@Test public void testRemovesGroupWhenRemovingContact() throws Exception { Transaction txn = new Transaction(null, false); Contact contact = getContact(true); Group contactGroup = getGroup(CLIENT_ID, MAJOR_VERSION); context.checking(new Expectations() {{ oneOf(contactGroupFactory).createContactGroup(CLIENT_ID, MAJOR_VERSION, contact); will(returnValue(contactGroup)); oneOf(db).removeGroup(txn, contactGroup); }}); TransportPropertyManagerImpl t = createInstance(); t.removingContact(txn, contact); }
@Override public void removingContact(Transaction txn, Contact c) throws DbException { db.removeGroup(txn, getContactGroup(c)); }
TransportPropertyManagerImpl implements TransportPropertyManager,
		Client, ContactHook, ClientVersioningHook, IncomingMessageHook { @Override public void removingContact(Transaction txn, Contact c) throws DbException { db.removeGroup(txn, getContactGroup(c)); } }
TransportPropertyManagerImpl implements TransportPropertyManager,
		Client, ContactHook, ClientVersioningHook, IncomingMessageHook { @Override public void removingContact(Transaction txn, Contact c) throws DbException { db.removeGroup(txn, getContactGroup(c)); } @Inject  TransportPropertyManagerImpl(DatabaseComponent db,
			ClientHelper clientHelper,
			ClientVersioningManager clientVersioningManager,
			MetadataParser metadataParser,
			ContactGroupFactory contactGroupFactory, Clock clock); }
TransportPropertyManagerImpl implements TransportPropertyManager,
		Client, ContactHook, ClientVersioningHook, IncomingMessageHook { @Override public void removingContact(Transaction txn, Contact c) throws DbException { db.removeGroup(txn, getContactGroup(c)); } @Inject  TransportPropertyManagerImpl(DatabaseComponent db,
			ClientHelper clientHelper,
			ClientVersioningManager clientVersioningManager,
			MetadataParser metadataParser,
			ContactGroupFactory contactGroupFactory, Clock clock); @Override void createLocalState(Transaction txn); @Override void addingContact(Transaction txn, Contact c); @Override void removingContact(Transaction txn, Contact c); @Override void onClientVisibilityChanging(Transaction txn, Contact c,
			Visibility v); @Override boolean incomingMessage(Transaction txn, Message m, Metadata meta); @Override void addRemoteProperties(Transaction txn, ContactId c,
			Map<TransportId, TransportProperties> props); @Override Map<TransportId, TransportProperties> getLocalProperties(); @Override Map<TransportId, TransportProperties> getLocalProperties(
			Transaction txn); @Override TransportProperties getLocalProperties(TransportId t); @Override Map<ContactId, TransportProperties> getRemoteProperties(
			TransportId t); @Override TransportProperties getRemoteProperties(ContactId c, TransportId t); @Override void mergeLocalProperties(TransportId t, TransportProperties p); }
TransportPropertyManagerImpl implements TransportPropertyManager,
		Client, ContactHook, ClientVersioningHook, IncomingMessageHook { @Override public void removingContact(Transaction txn, Contact c) throws DbException { db.removeGroup(txn, getContactGroup(c)); } @Inject  TransportPropertyManagerImpl(DatabaseComponent db,
			ClientHelper clientHelper,
			ClientVersioningManager clientVersioningManager,
			MetadataParser metadataParser,
			ContactGroupFactory contactGroupFactory, Clock clock); @Override void createLocalState(Transaction txn); @Override void addingContact(Transaction txn, Contact c); @Override void removingContact(Transaction txn, Contact c); @Override void onClientVisibilityChanging(Transaction txn, Contact c,
			Visibility v); @Override boolean incomingMessage(Transaction txn, Message m, Metadata meta); @Override void addRemoteProperties(Transaction txn, ContactId c,
			Map<TransportId, TransportProperties> props); @Override Map<TransportId, TransportProperties> getLocalProperties(); @Override Map<TransportId, TransportProperties> getLocalProperties(
			Transaction txn); @Override TransportProperties getLocalProperties(TransportId t); @Override Map<ContactId, TransportProperties> getRemoteProperties(
			TransportId t); @Override TransportProperties getRemoteProperties(ContactId c, TransportId t); @Override void mergeLocalProperties(TransportId t, TransportProperties p);  }