### Question:
SecurityManagerImpl implements SecurityManager { @Override public boolean isMemberOf(long userId, long groupId) { try { return userDAO.queryForInt( "select count(*) from ld_usergroup where ld_userid=" + userId + " and ld_groupid=" + groupId) > 0; } catch (PersistenceException e) { log.error(e.getMessage(), e); return false; } } private  SecurityManagerImpl(); void setMenuDAO(MenuDAO menuDAO); void setGroupDAO(GroupDAO groupDAO); void setUserDAO(UserDAO userDAO); @Override Set<Group> getAllowedGroups(long menuId); @Override boolean isMemberOf(long userId, long groupId); @Override boolean isMemberOf(long userId, String groupName); @Override boolean isWriteEnabled(long docId, long userId); @Override boolean isReadEnabled(long docId, long userId); @Override boolean isPrintEnabled(long docId, long userId); @Override boolean isDownloadEnabled(long docId, long userId); @Override boolean isPermissionEnabled(Permission permission, long docId, long userId); @Override Set<Permission> getEnabledPermissions(long docId, long userId); void setFolderDAO(FolderDAO folderDAO); void setDocumentDAO(DocumentDAO documentDAO);  }### Answer:
@Test public void testIsMemberOfLongLong() { Assert.assertTrue(manager.isMemberOf(1, 1)); Assert.assertFalse(manager.isMemberOf(1, 1234)); Assert.assertFalse(manager.isMemberOf(1, 2)); }
@Test public void testIsMemberOfLongString() { Assert.assertTrue(manager.isMemberOf(1, "admin")); Assert.assertFalse(manager.isMemberOf(1, "xyz")); Assert.assertFalse(manager.isMemberOf(1, "author")); }