* HBaseSubscriptionMapper.
*/
@Test
public void testFindSubscriptionsForUser() throws Exception {
LOG.info("findSubscriptionsForUser");
final SimpleSubscription fake1 = new SimpleSubscription("user1", "FAKEBOX");
final SimpleSubscription fake2 = new SimpleSubscription("fakeUser", "INBOX");
for (String user : subscriptionList.keySet()) {
LOG.info("Searching for all subscriptions for user: " + user);
final List<Subscription> found = mapper.findSubscriptionsForUser(user);
assertEquals(subscriptionList.get(user).size(), found.size());
// TODO: patch Subscription to implement equals
//assertTrue(subscriptionList.get(user).containsAll(foundSubscriptions));
//assertTrue(foundSubscriptions.containsAll(subscriptionList.get(user)));
//assertFalse(foundSubscriptions.contains(fake1));
//assertFalse(foundSubscriptions.contains(fake2));
}
//TODO: check what value we should return in case of no subscriptions: null or empty list
assertEquals(mapper.findSubscriptionsForUser(fake2.getMailbox()).size(), 0);
}