### Question:
TransactionalUserContactsService extends AbstractTransactionalEntityService<UserContactType, UserContactsDao> implements UserContactsService { public List<UserContactType> getAvailableContactTypes() { return getDao().getAvailableContactTypes(); } TransactionalUserContactsService(UserContactsDao dao, UserService userService); List<UserContactType> getAvailableContactTypes(); JCUser saveEditedUserContacts(long editedUserId, List<UserContactContainer> contacts);  }### Answer:
@Test public void testsGetAvailableContactTypes() { List<UserContactType> expectedTypes = new ArrayList<>(); expectedTypes.add(createUserContactType(1)); when(userContactsDao.getAvailableContactTypes()).thenReturn(expectedTypes); List<UserContactType> types = userContactsService.getAvailableContactTypes(); assertTrue(types.containsAll(expectedTypes)); }