@Test
public void shouldDeleteAffintyGroupById() {

    AffinityGroupVO mockGroup = Mockito.mock(AffinityGroupVO.class);
    when(mockGroup.getId()).thenReturn(1L);
    when(_affinityGroupDao.findById(Matchers.anyLong())).thenReturn(mockGroup);
    _affinityService.deleteAffinityGroup(1L, ACCOUNT_NAME, null, DOMAIN_ID, null);
    Mockito.verify(_affinityGroupDao).expunge(1L);
}